/* Scoped Penalty page; does not change tables, racks, authentication or balances. */
#penalty-root{max-width:1440px;margin:auto;color:#203e33;min-width:0}
.pen-page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px}
.pen-page-heading h1{font:36px/1.2 Georgia,serif;margin:10px 0;color:#123f31}.pen-page-heading p{margin:4px 0;color:#6a796a}
.pen-language,.pen-tabs{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.pen-language{border:1px solid #d5dcca;border-radius:24px;padding:3px;background:#fffef7}
.pen-language button,.pen-tabs button{appearance:none;border:1px solid transparent;background:transparent;padding:10px 15px;font:700 12px/1.3 system-ui;color:#415c4b;border-radius:20px;cursor:pointer;min-height:40px}
.pen-language [aria-pressed=true],.pen-tabs [aria-pressed=true]{background:#125c49;color:#fff}.pen-tabs{margin:0 0 22px}.pen-tabs button{border:1px solid #c4d7c9}
.pen-card{background:#fffef8;border:1px solid #d7dfd2;border-radius:18px;padding:26px;max-width:740px;box-shadow:0 8px 28px #16332708;min-width:0}
.pen-card h2{font:700 22px/1.3 system-ui;margin:0 0 14px;color:#144e3d}.pen-card p{font:14px/1.65 system-ui;margin:10px 0;overflow-wrap:anywhere}
.pen-description{max-width:75ch}.pen-scope{background:#edf4e8;border-left:3px solid #b39246;padding:14px 16px;font:13px/1.65 system-ui;margin:18px 0;color:#3a573e}
.pen-card label{display:grid;gap:9px;font:600 14px/1.5 system-ui;color:#304b3d;margin:18px 0 8px}
.pen-input-wrap{display:flex;align-items:center;gap:12px;max-width:230px}.pen-input-wrap input{width:100%;min-width:0;min-height:50px;padding:10px 12px;font:700 24px/1.2 system-ui;border:1px solid #c5d6c4;border-radius:9px;background:#fcfdf8;color:#124732}.pen-input-wrap span{font:600 22px system-ui}
.pen-card .pen-help,.pen-help{color:#6d7c6b;font:12px/1.6 system-ui;margin:8px 0}.pen-example{background:#f1f5ed;border-radius:12px;border:1px solid #dce5d5;padding:16px;margin:20px 0}
.pen-example h3{font:700 13px/1.4 system-ui;margin:0 0 12px}.pen-example>div{display:flex;justify-content:space-between;gap:14px;margin:9px 0;font:13px/1.45 system-ui}.pen-example strong{font-size:19px;white-space:nowrap;color:#194e3b}
.pen-card label.pen-check,.pen-check{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font:13px/1.55 system-ui;margin:18px 0}
.pen-check input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;width:18px!important;height:18px!important;min-width:18px;min-height:18px!important;flex:0 0 18px;margin:2px 0!important;accent-color:#12604a;transform:none!important}.pen-check input:after,.pen-check input:before{display:none!important}
.pen-submit{min-height:46px;font-size:14px}.pen-bottom{margin-top:20px!important}.pen-effective{font:13px/1.5 system-ui;color:#526551}.pen-effective b{color:#164a39}
.pen-message:empty{display:none}.pen-message{border-radius:10px;background:#e7f2e9;border:1px solid #c9dfce;padding:12px 16px;font:13px/1.5 system-ui;margin-bottom:20px}.pen-message.error{background:#fff0e7;border-color:#e8b7a7;color:#7e301f}
.pen-editor{display:grid;grid-template-columns:minmax(300px,410px) minmax(0,1fr);align-items:start;gap:24px}.pen-editor-controls{max-width:none}.pen-editor textarea{width:100%;resize:vertical;min-height:88px;padding:12px;font:14px/1.6 system-ui;border:1px solid #cdd9c8;border-radius:9px;background:#fff;color:#243f30}
.pen-editor select{width:100%;min-height:44px;font:14px system-ui;padding:8px 12px;border:1px solid #cad8c6;background:#fffef9;border-radius:8px}.pen-editor-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.pen-preview{min-width:0;padding:18px;background:#e8eee4;border:1px solid #ced9c7;border-radius:16px;position:sticky;top:16px}.pen-preview-tools{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.pen-preview-tools label{display:grid;gap:6px;min-width:100px;flex:1;font:600 11px system-ui}.pen-preview-stage{position:relative;width:100%;overflow:hidden;background:#f5f4eb;border-radius:12px;border:1px solid #d1d9c8}.pen-preview-frame{display:block;border:0;transform-origin:top left;max-width:none}
.pen-preview-page{margin:0;padding:18px;background:#f5f4eb;color:#203e33}.pen-preview-page .pen-card{padding:20px;max-width:none}.pen-preview-page button{opacity:1!important}.pen-preview-page .pen-exit{background:#fffef8;padding:22px;border:1px solid #d7dfd2;border-radius:15px}
.pen-exit p{line-height:1.6}.pen-exit dl{display:grid;gap:10px;padding:16px;background:#f1f5ec;border-radius:10px;margin:18px 0}.pen-exit dl>div{display:flex;align-items:center;justify-content:space-between;gap:16px}.pen-exit dt{font:13px/1.5 system-ui}.pen-exit dd{font:600 15px/1.5 system-ui;margin:0;white-space:nowrap}.pen-exit .penalty{color:#ab3029}
@media(max-width:1020px){.pen-editor{grid-template-columns:1fr}.pen-preview{position:static}.pen-editor-controls{max-width:none}}
@media(max-width:600px){.pen-page-heading{gap:12px}.pen-page-heading h1{font-size:28px}.pen-page-heading .eyebrow{font-size:9px;letter-spacing:1px}.pen-language button{padding:8px 10px;min-width:38px}.pen-card{padding:19px 17px;border-radius:13px}.pen-card h2{font-size:20px}.pen-card p{font-size:13px}.pen-scope{padding:12px;font-size:12px}.pen-preview{padding:10px}.pen-editor{gap:15px}.pen-editor-buttons{flex-direction:column}.pen-submit{width:100%}.pen-tabs button{flex:1;padding:10px;font-size:11px}.pen-exit dl{padding:12px}.pen-exit dt{font-size:12px}.pen-exit dd{font-size:14px}.pen-exit .form-actions{flex-wrap:wrap}.pen-exit .form-actions button{flex:1}}

/* The game uses light ink; confirmation dialogs have a light surface instead. */
body.pg-mode .modal.pen-exit-modal,body.pg-mode .modal.pen-exit-modal #modal-title{color:#203e33}
body.pg-mode .pen-exit-modal .pen-exit,body.pg-mode .pen-exit-modal .pen-exit>p,body.pg-mode .pen-exit-modal .robot-exit-values{color:#203e33}
body.pg-mode .pen-exit-modal .robot-exit-values .penalty{color:#a02720}
body.pg-mode .pen-exit-modal .pen-help{color:#52644f}
