:root{color-scheme:dark;--bg:#0b111a;--panel:#171e29;--panel2:#202936;--edge:#364050;--gold:#d7b67a;--gold2:#f6e7cb;--text:#e9e5dd;--muted:#acb3bc;--green:#55a583;--red:#c46c6f;--blue:#668ebd;--radius:14px;font-family:Inter,Segoe UI,Roboto,Arial,sans-serif}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}body{background:radial-gradient(ellipse at 74% -18%,#25334a 0,transparent 52%),radial-gradient(ellipse at 4% 94%,#211f24 0,transparent 49%),var(--bg);font-size:15px}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.44;cursor:not-allowed}.app-shell{max-width:1400px;min-height:100vh;margin:auto}.topbar{height:86px;display:flex;align-items:center;gap:13px;padding:16px 28px;border-bottom:1px solid #353942;background:#111923d6}.brand-mark{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border:1px solid #9f8156;background:#26291f;color:var(--gold2);font-family:Georgia,serif;font-size:31px;font-weight:700;clip-path:polygon(50% 0,95% 21%,95% 78%,50% 100%,5% 78%,5% 21%)}.brand{display:flex;flex-direction:column;gap:4px}.brand strong{font-family:Georgia,serif;font-size:16px;letter-spacing:2px;color:var(--gold2)}.brand small{font-size:10px;letter-spacing:2px;color:var(--gold)}.top-actions{margin-left:auto;display:flex;align-items:center;gap:12px}.pill{display:inline-flex;align-items:center;border-radius:30px;padding:7px 11px;font-size:10px;letter-spacing:1.1px;font-weight:800}.demo-pill{border:1px solid #64593e;color:#e5c991;background:#2b2a28}.workspace{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:calc(100vh - 86px)}.sidebar{background:#101822b8;border-right:1px solid #333a44;padding:26px 18px;display:flex;flex-direction:column;gap:13px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.7px;color:#9f9e9d;margin-bottom:1px}select,input,textarea{color:var(--text);background:#111b26;border:1px solid #48505b;border-radius:9px;outline:none;min-height:39px;padding:9px 11px;width:100%}select:focus,input:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 2px #d7b67a22}textarea{resize:vertical;min-height:76px}.side-actions{display:grid;grid-template-columns:1.3fr .7fr;gap:8px}.btn{border-radius:8px;border:1px solid transparent;font-weight:700;font-size:12px;min-height:37px;padding:9px 12px;transition:background .15s,border-color .15s,transform .1s;color:var(--text);background:#293442}.btn:hover:not(:disabled){background:#3c495a;border-color:#66717d}.btn:active:not(:disabled){transform:translateY(1px)}.btn-primary{color:#231c13;background:#ddb979;border:1px solid #f1d49c}.btn-primary:hover:not(:disabled){background:#f4d6a0;color:#231c13}.btn-outline{background:transparent;border-color:#485464}.btn-quiet{background:transparent;color:#c5c0b4;font-weight:500}.btn-danger{background:#4a242a;border-color:#98515c;color:#ffe1e1}.btn-safe{background:#214d3e;border-color:#3d8870;color:#d5fff0}.btn.small{min-height:30px;padding:5px 9px;font-size:11px}.btn.full{width:100%}.sidebar-divider{border-top:1px solid #343d49;margin:11px 0}.nav-tabs{display:flex;flex-direction:column;gap:5px}.nav-tab{display:flex;gap:12px;align-items:center;text-align:left;width:100%;background:transparent;color:#b5bdc8;border:1px solid transparent;border-radius:9px;padding:13px 11px;font-weight:650}.nav-tab span{font-size:11px;font-weight:750;color:#747e8d}.nav-tab.active{background:#302c2b;border-color:#65523e;color:#f5dcad}.nav-tab.active span{color:var(--gold)}.nav-tab:hover{background:#2c3542}.sidebar-note{font-size:11px;line-height:1.55;color:#8593a0}.main-panel{padding:31px clamp(18px,3.7vw,56px) 70px;min-width:0}.page-kicker{font-size:11px;letter-spacing:2.5px;font-weight:800;color:var(--gold);margin-bottom:9px}.page-title{font-family:Georgia,Times New Roman,serif;font-size:clamp(26px,3.6vw,39px);margin:0 0 5px;color:var(--gold2);letter-spacing:.2px}.page-subtitle{margin:0 0 23px;color:#b3bac4;line-height:1.5}.section-title{font-family:Georgia,serif;color:#f1d8a9;font-size:21px;margin:0}.flex{display:flex;align-items:center;gap:10px}.between{display:flex;align-items:center;justify-content:space-between;gap:10px}.wrap{flex-wrap:wrap}.grid{display:grid;gap:14px}.stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin:20px 0}.card{border:1px solid var(--edge);background:linear-gradient(156deg,#202938,#171f2b);border-radius:var(--radius);padding:19px}.stat-card{text-align:center;padding:16px 8px}.stat-card .tiny{min-height:22px;display:block;color:#d1bb92;font-weight:800;font-size:10px;letter-spacing:1.2px}.stat-card .stat-value{font-size:28px;color:#fff3dd;font-weight:750;display:block}.hero{display:flex;align-items:center;gap:20px;border-bottom:1px solid #5c503d;padding-bottom:23px}.portrait{width:100px;height:100px;flex:0 0 100px;border-radius:14px;background:linear-gradient(135deg,#524639,#171d2e);border:2px solid #ae8c57;display:flex;align-items:center;justify-content:center;font-size:44px;font-family:Georgia,serif;color:#f3d49b;background-size:cover;background-position:center}.hero-name{font-size:clamp(29px,3.4vw,41px);font-family:Georgia,serif;color:#fff0d3;margin:0 0 7px}.hero-meta{color:#b8c0c8}.hero .badge{display:inline-flex;margin-bottom:10px}.badge{border:1px solid #65573d;background:#302c25;color:#e4c795;border-radius:40px;padding:4px 9px;font-size:10px;letter-spacing:.7px}.hp-layout{grid-template-columns:1.35fr 1fr}.block-title{font-family:Georgia,serif;font-size:21px;color:var(--gold2);margin:0}.muted{color:var(--muted);font-size:12px;line-height:1.55}.subtext{color:#c0c7cf;font-size:12px}.hp-value{font-size:29px;font-weight:800;color:#f9f2e5}.progress{height:11px;width:100%;background:#38424c;border-radius:30px;overflow:hidden;margin:15px 0}.progress-fill{height:100%;background:linear-gradient(90deg,#2f8268,#72c4a0);border-radius:30px}.progress-fill.low{background:linear-gradient(90deg,#9e414e,#d86a6d)}.quick-buttons{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:9px 0 12px}.quick-buttons.four{grid-template-columns:repeat(4,minmax(0,1fr))}.quick-buttons.eight{grid-template-columns:repeat(8,minmax(0,1fr))}.quick-buttons .btn{padding:7px 0;white-space:nowrap}.small-label{display:block;font-size:11px;font-weight:800;letter-spacing:1.05px;color:#cbb994;margin:10px 0}.control-row{display:flex;gap:8px;align-items:center}.control-row input{max-width:160px}.half{max-width:180px}.ability-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ability-card{border:1px solid #5b5141;background:#1d2734;border-radius:12px;text-align:center;padding:15px 8px}.ability-title{font-size:11px;font-weight:800;letter-spacing:1.8px;color:#dcc293}.ability-mod{display:block;font-size:30px;font-weight:700;color:#fff2d9;margin:7px 0 2px}.ability-value{color:#bac0c7;font-size:12px}.ability-card .btn{margin-top:10px}.ability-grid .ability-card:nth-child(4){grid-column:1}.skills-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.skill-row{display:grid;grid-template-columns:1fr 90px 54px 66px;gap:7px;align-items:center;background:#1b2430;border:1px solid #364150;border-radius:9px;padding:10px}.skill-name{font-size:13px;font-weight:600}.skill-attr{font-size:10px;color:#a1aeba}.skill-row select{min-height:34px;padding:7px 4px;font-size:11px}.skill-bonus{font-weight:800;font-size:16px;color:#eddbb7;text-align:center}.skill-row .btn{padding:6px}.slot-row{display:grid;grid-template-columns:88px 1fr 84px;gap:16px;align-items:center;padding:13px 0;border-bottom:1px solid #384451}.slot-row:last-child{border-bottom:0}.slot-row .level-label{font-weight:800;color:#e9d2a7}.slot-pips{display:flex;flex-wrap:wrap;gap:6px}.pip{width:22px;height:22px;border-radius:50%;border:2px solid #b9a26e;background:#ab8752;cursor:pointer}.pip.empty{background:#26303e;border-color:#637083}.pip:focus-visible{outline:2px solid white;outline-offset:2px}.slot-btns{display:flex;justify-content:end;gap:5px}.slot-btns .btn{min-width:34px}.item-list{display:grid;gap:9px}.item{border:1px solid #48505e;background:#1c2532;border-radius:11px;padding:14px}.item details summary{cursor:pointer;list-style:none}.item details summary::-webkit-details-marker{display:none}.item-head{display:flex;gap:12px;justify-content:space-between;align-items:center}.item-name{font-size:15px;font-weight:700;color:#f6e5c5}.item-detail{font-size:12px;color:#b6bbc6;margin:3px 0 0}.item-description{padding:12px 0 3px;color:#cbd2d9;white-space:pre-wrap;line-height:1.6;font-size:13px}.item-control{display:flex;gap:7px;align-items:center;margin-top:9px;flex-wrap:wrap}.item-control strong{min-width:31px;text-align:center}.coin-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between}.coin-toolbar select{max-width:250px}.coin-total{font-family:Georgia,serif;font-size:32px;color:#f6dbab}.dice-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.die-btn{height:70px;border:1px solid #7f6e4a;border-radius:12px;background:linear-gradient(135deg,#3e3733,#1e2a39);color:#fbe1ab;font-family:Georgia,serif;font-size:23px}.die-btn:hover{background:#68533c}.roll-result{padding:16px;border:1px solid #90754b;border-radius:10px;background:#322b26;margin:14px 0}.roll-big{font-family:Georgia,serif;font-size:35px;font-weight:800;color:#f9e1b0}.history{padding:10px 0;border-bottom:1px solid #37404c;font-size:12px;color:#c2cad3}.history strong{color:#e9d7ba}.spells-list{display:grid;gap:11px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}label.field{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#dfd2bc;font-weight:650}.field small{color:#aeb7bd;font-weight:400}.divider{height:1px;background:#46505c;margin:19px 0}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px;flex-wrap:wrap}.toast{position:fixed;bottom:24px;right:24px;max-width:390px;z-index:30;background:#315646;color:#e8fff5;border:1px solid #7fb29a;padding:12px 17px;border-radius:11px;box-shadow:0 10px 40px #0006;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}.modal-shade{position:fixed;top:0;right:0;bottom:0;left:0;background:#020509c9;display:flex;justify-content:center;align-items:flex-start;z-index:20;padding:4vh 14px;overflow:auto}.modal{width:min(740px,100%);border:1px solid #796748;border-radius:15px;background:#1b2430;box-shadow:0 30px 90px #000a;padding:25px;margin-bottom:20px}.modal h2{margin:0 0 18px;font-family:Georgia,serif;color:#fae3b6}.modal-close{float:right}.modal-buttons{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:20px}.upload-notice{border:1px solid #4e5563;background:#222d3b;padding:12px;border-radius:9px;color:#c4cbd2;font-size:12px;line-height:1.5}.empty-note{border:1px dashed #6e6654;color:#c2b6a0;padding:22px;border-radius:12px}.hint{font-size:12px;color:#a9b1bc}.tags{display:flex;gap:8px;flex-wrap:wrap}.tag{padding:4px 8px;border-radius:16px;background:#2c3440;color:#c7cfdb;font-size:11px}.right{text-align:right}.mt{margin-top:18px}.mb{margin-bottom:15px}.hidden{display:none!important}.switch{display:inline-flex;align-items:center;gap:6px}.switch input{width:auto;min-height:0}.footer-message{font-size:11px;line-height:1.55;color:#7c8896;margin-top:25px}.danger-note{color:#efadb0;font-size:12px}.responsive-only{display:none}@media(max-width:1000px){.hp-layout{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.skills-grid{grid-template-columns:1fr}}@media(max-width:760px){.topbar{padding:14px;height:auto;min-height:76px}.top-actions .btn{display:none}.workspace{display:block}.sidebar{border:0;border-bottom:1px solid #37404c;padding:13px;gap:9px}.sidebar .eyebrow,.sidebar-divider,.sidebar-note,.sidebar>.btn.full{display:none}.side-actions{grid-template-columns:1fr 1fr}.nav-tabs{display:flex;flex-direction:row;gap:4px;overflow:auto;padding-bottom:3px}.nav-tab{white-space:nowrap;width:auto;min-width:max-content;padding:8px}.nav-tab span{display:none}.main-panel{padding:20px 12px 45px}.hero{gap:12px}.portrait{width:70px;height:70px;flex-basis:70px;font-size:30px}.hero-name{font-size:27px}.stat-grid{gap:8px}.stat-card .stat-value{font-size:22px}.stat-card .tiny{font-size:9px}.card{padding:14px}.quick-buttons{gap:4px}.quick-buttons.eight{grid-template-columns:repeat(4,minmax(0,1fr))}.quick-buttons .btn{font-size:11px}.dice-row{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid,.form-grid.three{grid-template-columns:1fr}.modal{padding:17px}.slot-row{grid-template-columns:73px 1fr 78px;gap:5px}.skill-row{grid-template-columns:1fr 90px 40px 54px;gap:4px;padding:8px}.skill-name{font-size:12px}}@media(max-width:390px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.skill-row{grid-template-columns:1fr 80px 34px 49px}.skill-bonus,.brand strong{font-size:12px}.brand small{font-size:8px}.demo-pill{display:none}}:root{--accent:#d7b67a}.brand-mark{color:var(--accent);border-color:var(--accent);clip-path:none;border-radius:11px;background:#1b232d}.brand strong,.brand small,.section-title,.page-title,.hero-name,.block-title,.ability-title,.item-name{color:var(--accent)}.btn-primary{background:var(--accent);border-color:var(--accent);color:#151923}.nav-tab.active{border-color:var(--accent);color:var(--accent)}.card.stat-card{border-color:color-mix(in srgb,var(--accent) 30%,#364050)}.color-dot{width:23px;height:23px;border:1px solid #ddd;border-radius:50%;display:inline-block;margin:2px 4px;vertical-align:middle;cursor:pointer}.status-dead{border:2px solid #d05055!important;background:linear-gradient(145deg,#57252f,#281e29)!important}.status-stable{border:2px solid #d5dce5!important;background:linear-gradient(145deg,#495461,#202a38)!important}.status-dead .hp-value,.status-dead .block-title{color:#ff9797!important}.status-stable .hp-value,.status-stable .block-title{color:#fff!important}.death-pips{display:flex;gap:7px;align-items:center}.death-pips .pip{color:#fef3e2;width:31px;height:31px;font-weight:700}.progress-feature{padding:7px 5px;border-bottom:1px solid #394556;font-size:13px}.modal select[multiple]{min-height:170px;background:#111b26}.modal select[multiple] option{padding:5px 8px}.modal details summary{cursor:pointer;color:var(--accent);font-weight:700}.creator-modal{max-width:1000px}.creator-modal input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent)}.creator-steps{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}.creator-steps button{border:1px solid #526074;background:#111b26;color:#d7dce6;padding:9px 12px;border-radius:7px;cursor:pointer}.creator-steps button.active{border-color:var(--accent);color:var(--accent)}.creator-choice,.creator-level,.creator-option{border:1px solid #394556;border-radius:8px;padding:14px;margin:14px 0;min-width:0}.creator-choice legend{color:var(--accent);font-weight:600;padding:0 6px}.creator-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:12px 0}.creator-options label{display:flex;align-items:center;gap:9px;font-size:14px}.creator-options input[type=checkbox]{width:18px;height:18px;flex-shrink:0;accent-color:var(--accent)}.creator-option p,.creator-level p{font-size:14px;line-height:1.6;white-space:pre-wrap}.creator-option small,.creator-level small,.creator-choice small{color:#aeb8c7;font-size:12px}.creator-level article{border-top:1px solid #394556;margin-top:12px;padding-top:12px}.creator-error{color:#ffb5bc;border-left:3px solid #cc6472;padding:10px}.creator-buttons{position:sticky;bottom:0;padding:12px;background:#111b26;display:flex;flex-wrap:wrap;gap:8px;z-index:2}.dice-popup-overlay[hidden]{display:none}.dice-popup-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:#030711c9;padding:18px;overscroll-behavior:contain}.dice-popup-panel{width:min(560px,100%);max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--accent);border-radius:16px;background:#192330;color:#f3eadb;padding:22px;box-shadow:0 24px 90px #000a;overflow-wrap:anywhere}.dice-result-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.dice-result-header h2{font:700 22px Georgia,serif;color:#fff3d8;color:color-mix(in srgb,var(--accent) 35%,#fff3d8);margin:0 0 8px}.dice-expression{margin:0 0 12px;font:600 16px ui-monospace,monospace;color:#e6d9c4}.dice-close{min-width:44px;min-height:44px;padding:9px;flex-shrink:0;border:1px solid #788493;font-size:19px}.dice-close:focus-visible{outline:3px solid #fff3d8;outline-offset:3px}.dice-type{display:inline-block;margin:0 0 12px;border:1px solid #72859b;border-radius:30px;padding:6px 12px;color:#e3eaf4}.dice-result-group h3{font-size:14px;color:#d8e1ed}.dice-individuals{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:10px 0}.dice-chip{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:48px;min-height:48px;border:1px solid #6c7a8d;border-radius:9px;padding:8px;color:#fff;background:#263344}.dice-chip strong{font-size:21px}.dice-chip small{font-size:11px;margin-top:3px}.dice-chip.natural-twenty{border:2px solid #a4dfba;background:#224736;color:#e1ffea}.dice-chip.natural-one{border:2px solid #f0a6ab;background:#542b34;color:#ffe9ea}.dice-chip.dice-discarded{opacity:.65;border-style:dashed}.dice-modifiers{list-style:none;padding:0;font-size:14px;color:#cbd5e2}.dice-total{display:flex;align-items:baseline;justify-content:space-between;gap:15px;border-top:1px solid #647080;margin:16px 0 8px;padding-top:13px;font-size:17px}.dice-total strong{font:700 44px Georgia,serif;color:#ffebbc}.dice-neutral{margin-bottom:0}.dice-popup-error{border-left:3px solid #f0a6ab;color:#ffe9ea;padding:10px;background:#542b34}.dice-last-result:not(:empty){border:1px solid #90754b;border-radius:10px;padding:16px;margin:14px 0;background:#272b32}#diceLastResult,#diceHistory{overflow-anchor:none}.dice-history-entry{padding:16px 0}.dice-history-entry .dice-result-header h2{font-size:17px}.dice-history-entry .dice-total strong{font-size:28px}@media(max-width:480px){.dice-popup-overlay{padding:10px}.dice-popup-panel{padding:16px;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px)}.dice-result-header h2{font-size:20px}.dice-total strong{font-size:36px}.dice-expression{font-size:14px}}
