:root{--bg: #13100d;--bg-2: #1b1713;--panel: #221d18;--panel-2: #2a241e;--border: #3b3229;--border-2: #4d4135;--text: #ece3d2;--text-dim: #b3a690;--muted: #8b7f6c;--gold: #d8a94a;--gold-2: #f0c66b;--red: #c9483b;--red-2: #e0675a;--green: #5aa66a;--blue: #4f8fc0;--parchment: #efe3c6;--parchment-2: #e4d4ae;--ink: #2b2016;--radius: 8px;--shadow: 0 6px 24px rgba(0, 0, 0, .45);--font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--font-story: "EB Garamond", Georgia, "Times New Roman", serif;--font-title: "Cinzel", Georgia, serif;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:radial-gradient(ellipse at top,#241d16 0%,var(--bg) 60%) fixed;color:var(--text);font-family:var(--font-ui);font-size:14px;line-height:1.45}h1,h2,h3,h4{font-family:var(--font-title);font-weight:600;letter-spacing:.02em;margin:0 0 .5em}h1{font-size:1.4rem}h2{font-size:1.15rem}h3{font-size:1rem}h4{font-size:.85rem;color:var(--text-dim);margin-top:1em}p{margin:0 0 .6em}a{color:var(--gold-2)}code,.code{font-family:ui-monospace,Cascadia Mono,Consolas,monospace;background:#ffffff0f;border:1px solid var(--border);padding:0 .35em;border-radius:4px;color:var(--gold-2)}.code.big{font-size:1.05rem;letter-spacing:.15em}input,select,textarea{font:inherit;color:var(--text);background:var(--bg-2);border:1px solid var(--border-2);border-radius:6px;padding:.45em .6em;outline:none;min-width:0}input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 2px #d8a94a33}textarea{resize:vertical;width:100%}input[type=checkbox]{accent-color:var(--gold)}input[type=range]{accent-color:var(--gold);width:100%;padding:0}input.num{width:5em}label{display:flex;flex-direction:column;gap:4px;color:var(--text-dim);font-size:.85rem}label>input,label>select,label>textarea{color:var(--text);font-size:.95rem}.label{color:var(--text-dim);font-size:.82rem;margin-bottom:4px}.btn{font:inherit;font-weight:500;color:var(--text);background:var(--panel-2);border:1px solid var(--border-2);border-radius:6px;padding:.45em .9em;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:.35em;text-decoration:none;white-space:nowrap;transition:background .12s,border-color .12s,transform .05s}.btn:hover:not(:disabled){background:#352d25;border-color:var(--gold)}.btn:active:not(:disabled){transform:translateY(1px)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.primary{background:linear-gradient(180deg,#c0913a,#9c7128);border-color:#d8a94a;color:#1a1209;font-weight:600}.btn.primary:hover:not(:disabled){background:linear-gradient(180deg,#d8a94a,#b0822f)}.btn.ghost{background:transparent}.btn.danger,.btn.ghost.danger{border-color:var(--red);color:var(--red-2)}.btn.small{padding:.3em .65em;font-size:.85rem}.btn.tiny{padding:.15em .45em;font-size:.78rem}.btn.big{padding:.7em 1.4em;font-size:1.05rem}.icon-btn{font:inherit;background:transparent;border:1px solid transparent;color:var(--text-dim);border-radius:6px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none}.icon-btn:hover{background:#ffffff0f;color:var(--text);border-color:var(--border-2)}.icon-btn.tiny{width:20px;height:20px;font-size:.7rem}.icon-btn.danger:hover{color:var(--red-2)}.link{background:none;border:none;color:var(--gold-2);cursor:pointer;padding:0;font:inherit;text-decoration:underline}.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:12px;flex-wrap:wrap}.tabs button{font:inherit;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-dim);padding:.5em .9em;cursor:pointer}.tabs button.active{color:var(--gold-2);border-bottom-color:var(--gold)}.tabs button:disabled{opacity:.4;cursor:not-allowed}.seg{display:inline-flex;flex-wrap:wrap;gap:4px}.seg button{font:inherit;font-size:.85rem;background:var(--bg-2);border:1px solid var(--border-2);color:var(--text-dim);padding:.35em .75em;border-radius:999px;cursor:pointer}.seg button.active{background:#d8a94a2e;border-color:var(--gold);color:var(--gold-2)}.seg button:disabled{opacity:.4;cursor:not-allowed}.chip{font:inherit;font-size:.82rem;background:var(--bg-2);border:1px solid var(--border-2);color:var(--text-dim);padding:.25em .65em;border-radius:999px;cursor:pointer}.chip:hover:not(:disabled){border-color:var(--gold);color:var(--text)}.chip.selected{background:#d8a94a33;border-color:var(--gold);color:var(--gold-2)}.chip.granted{border-color:var(--green);color:#9fd8aa}.chip:disabled{opacity:.45;cursor:not-allowed}.badge{display:inline-block;font-size:.72rem;font-weight:600;padding:.1em .5em;border-radius:999px;background:#ffffff14;border:1px solid var(--border-2);color:var(--text-dim);margin-left:.3em;vertical-align:middle;text-transform:none}.badge.gold{background:#d8a94a38;border-color:var(--gold);color:var(--gold-2)}.badge.green{background:#5aa66a33;border-color:var(--green);color:#9fd8aa}.badge.red{background:#c9483b33;border-color:var(--red);color:#f0a198}.badge.blue{background:#4f8fc033;border-color:var(--blue);color:#a9cdea}.row{display:flex;align-items:center}.row.gap,.gap{gap:8px}.row.center{align-items:center}.wrap{flex-wrap:wrap}.grow{flex:1}.stack{display:flex;flex-direction:column;gap:12px}.stack-tight{display:flex;flex-direction:column;gap:6px}.narrow{max-width:520px}.muted{color:var(--muted)}.small{font-size:.82rem}.center-text{text-align:center}.pre{white-space:pre-wrap}.hint{margin-top:4px}.error-text{color:#f0a198;font-size:.88rem}.ok-text{color:#9fd8aa}.empty{color:var(--muted);padding:18px;text-align:center;border:1px dashed var(--border-2);border-radius:var(--radius)}.center-screen{min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px}.banner{padding:8px 14px;font-size:.88rem}.banner.error{background:#c9483b2e;border-bottom:1px solid var(--red);color:#f6c2bb}.spinner{width:28px;height:28px;border:3px solid rgba(255,255,255,.12);border-top-color:var(--gold);border-radius:50%;animation:spin .8s linear infinite;margin:12px auto}.spinner.tiny{width:12px;height:12px;border-width:2px;margin:0;display:inline-block;vertical-align:-1px}@keyframes spin{to{transform:rotate(360deg)}}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#050302b3;display:flex;align-items:center;justify-content:center;z-index:100;padding:16px}.modal{background:var(--panel);border:1px solid var(--border-2);border-radius:10px;box-shadow:var(--shadow);width:min(560px,100%);max-height:calc(100vh - 32px);display:flex;flex-direction:column}.modal.wide{width:min(980px,100%)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px 10px;border-bottom:1px solid var(--border)}.modal-head h2{margin:0}.modal-body{padding:16px 18px;overflow:auto}.modal-foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--border);flex-wrap:wrap}.char-avatar{width:44px;height:44px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);border:2px solid rgba(255,255,255,.25);flex:none}.char-avatar.small{width:32px;height:32px;font-size:.8rem}.char-avatar.tiny{width:22px;height:22px;font-size:.62rem;border-width:1px}.char-avatar.big{width:72px;height:72px;font-size:1.4rem}.char-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none}.char-dot.big{width:18px;height:18px}.dice-row{display:flex;gap:4px}.dice-row.inline{display:inline-flex;align-items:center}.die{min-width:28px;height:28px;padding:0 4px;border-radius:6px;background:var(--parchment);color:var(--ink);font-weight:700;display:inline-flex;align-items:center;justify-content:center;border:1px solid #b59a68}.die.small{min-width:22px;height:22px;font-size:.78rem}.die.dropped{opacity:.35;text-decoration:line-through}.die.crit{background:#ffe08a;border-color:var(--gold);box-shadow:0 0 8px #ffd26499}.die.fumble{background:#f2b1a8;border-color:var(--red)}.toggle{flex-direction:row;align-items:center;gap:8px;color:var(--text);cursor:pointer;font-size:.9rem}.hpbar{position:relative;height:16px;background:#120e0b;border:1px solid var(--border-2);border-radius:4px;overflow:hidden}.hpbar-fill{height:100%;transition:width .4s}.hpbar-fill.good{background:linear-gradient(180deg,#5fbf72,#3d8d4f)}.hpbar-fill.warn{background:linear-gradient(180deg,#e3b23c,#b5862a)}.hpbar-fill.bad{background:linear-gradient(180deg,#e0574a,#a53a30)}.hpbar-text{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:600;text-shadow:0 1px 2px #000}.toast{position:fixed;bottom:18px;left:50%;transform:translate(-50%);background:#3a1d18;border:1px solid var(--red);color:#f6c2bb;padding:10px 16px;border-radius:8px;box-shadow:var(--shadow);z-index:200;max-width:min(560px,90vw);cursor:pointer}.panel{background:#221d18eb;border:1px solid var(--border);border-radius:10px;padding:16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;flex-wrap:wrap}.panel-head h2{margin:0}.panel-title{font-size:.8rem;text-transform:uppercase;letter-spacing:.12em;color:var(--text-dim);margin:0 0 8px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:10px 20px;border-bottom:1px solid var(--border);background:#13100de6}.topbar-right{display:flex;align-items:center;gap:12px}.brand-inline{font-family:var(--font-title);font-size:1.15rem;color:var(--gold-2);display:flex;gap:8px;align-items:center}.brand-sigil{color:var(--gold)}.ability-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin:8px 0}.ability-cell{background:var(--bg-2);border:1px solid var(--border);border-radius:6px;text-align:center;padding:4px 2px}.ability-cell.prof{border-color:var(--gold)}.ab-name{font-size:.68rem;color:var(--text-dim);letter-spacing:.08em}.ab-score{font-size:1.15rem;font-weight:700}.ab-mod{font-size:.8rem;color:var(--gold-2)}.ab-save{color:var(--muted);font-size:.65rem}.spell-card{background:var(--bg-2);border:1px solid var(--border);border-radius:6px;padding:6px 8px;text-align:left;color:var(--text);font:inherit}.spell-card summary{cursor:pointer}.spell-card.pick{cursor:pointer;display:flex;flex-direction:column;gap:2px}.spell-card.pick.selected{border-color:var(--gold);background:#d8a94a1f}.spell-card.pick:disabled{opacity:.45;cursor:not-allowed}.spell-head{display:flex;justify-content:space-between;gap:6px}.kind{font-size:.66rem;text-transform:uppercase;letter-spacing:.06em;padding:0 .4em;border-radius:4px;background:#ffffff14;color:var(--text-dim)}.kind-attack{color:#f0a198}.kind-save{color:#e8c27a}.kind-heal{color:#9fd8aa}.kind-auto{color:#c7a5ec}.slot-pips{display:inline-flex;gap:3px;margin-left:4px}.pip{width:10px;height:10px;border-radius:50%;border:1px solid var(--gold);background:transparent}.pip.full{background:var(--gold)}.cond-list{display:flex;flex-wrap:wrap;gap:3px}.cond{font-size:.7rem;padding:0 .45em;border-radius:4px;background:#4f8fc033;border:1px solid rgba(79,143,192,.5);color:#bcd8ee}.cond.bad{background:#c9483b33;border-color:var(--red);color:#f6c2bb}.cond.gold{background:#d8a94a33;border-color:var(--gold);color:var(--gold-2)}.live-pill{color:#fff;background:#b3261e;border-radius:999px;padding:.1em .6em;font-size:.75rem;font-weight:700;letter-spacing:.08em;animation:pulse 2s ease-in-out infinite}@keyframes pulse{50%{opacity:.65}}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:#3b3229;border-radius:6px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-track{background:transparent}.settings-who{display:none}@media (max-width: 600px){.topbar{gap:8px}.topbar .brand-inline{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.topbar-right{gap:6px;flex-shrink:0}.topbar .signed-in,.topbar .topbar-label{display:none}.settings-who{display:block;grid-column:1 / -1}}.auth-screen{min-height:100%;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:radial-gradient(ellipse at 50% 20%,rgba(216,169,74,.12),transparent 60%)}.auth-card{width:min(400px,100%);background:var(--panel);border:1px solid var(--border-2);border-radius:12px;padding:26px 24px;box-shadow:var(--shadow)}.brand{text-align:center;margin-bottom:18px}.brand h1{font-size:1.8rem;color:var(--gold-2);margin:4px 0}.brand .brand-sigil{font-size:2rem}.lobby{min-height:100%}.lobby-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;padding:16px 20px 32px;max-width:1400px;margin:0 auto}.lobby-grid .settings-panel{grid-column:1 / -1;max-width:640px}@media (max-width: 900px){.lobby-grid{grid-template-columns:1fr;padding:12px}}.game-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.game-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:8px;background:var(--bg-2);cursor:pointer;transition:border-color .12s}.game-row:hover{border-color:var(--gold)}.game-row.my-turn{border-color:var(--gold);box-shadow:inset 3px 0 0 var(--gold)}.game-name{font-family:var(--font-title);font-size:1.02rem}.game-row-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}.status-pill{font-size:.75rem;padding:.1em .6em;border-radius:999px;border:1px solid var(--border-2);color:var(--text-dim)}.status-pill.active{border-color:var(--green);color:#9fd8aa}.status-pill.lobby{border-color:var(--blue);color:#a9cdea}.countdown{font-variant-numeric:tabular-nums;font-size:.82rem;color:var(--text-dim)}.countdown.overdue{color:var(--red-2)}.char-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(340px,100%),1fr));gap:10px}.char-card .badge{white-space:nowrap}.char-card .row.small{flex-wrap:wrap;row-gap:4px}.char-card-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none}.game-row-actions{display:flex;gap:6px}.game-row-actions .btn{font-size:.74rem;padding:2px 8px}.char-card{display:flex;gap:10px;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--bg-2);align-items:flex-start}.char-card-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.char-name{font-family:var(--font-title);font-size:1rem}.char-stats{display:flex;flex-wrap:wrap;gap:0 10px;white-space:nowrap;color:var(--text-dim)}.key-chip{font-family:ui-monospace,Consolas,monospace;background:var(--bg-2);border:1px solid var(--border-2);border-radius:6px;padding:.2em .6em}.settings-panel form{margin-top:10px}.picker-list{display:flex;flex-direction:column;gap:6px;max-height:220px;overflow:auto}.picker-item{font:inherit;display:flex;align-items:center;gap:8px;padding:6px 10px;text-align:left;border-radius:6px;background:var(--bg-2);border:1px solid var(--border);color:var(--text);cursor:pointer}.picker-item.selected{border-color:var(--gold);background:#d8a94a1f}.create-game{display:flex;flex-direction:column;gap:12px}.create-game fieldset{border:1px solid var(--border);border-radius:8px;padding:10px 14px 12px;margin:0;display:flex;flex-direction:column;gap:10px}.create-game legend{font-family:var(--font-title);color:var(--gold-2);padding:0 6px}.field{display:flex;flex-direction:column;min-width:0}.engine-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}.engine{font:inherit;text-align:left;display:flex;flex-direction:column;gap:2px;padding:8px 10px;border:1px solid var(--border-2);border-radius:8px;background:var(--bg-2);color:var(--text);cursor:pointer}.engine.selected{border-color:var(--gold);background:#d8a94a1f}.engine:disabled{opacity:.4;cursor:not-allowed}.issue-list{margin:6px 0 0;padding-left:18px}.issue-list li{margin-bottom:6px}.creator{min-height:100%;display:flex;flex-direction:column}.stepper{display:flex;gap:4px;padding:10px 20px;overflow-x:auto;border-bottom:1px solid var(--border)}.step{font:inherit;font-size:.85rem;display:flex;align-items:center;gap:6px;background:none;border:1px solid transparent;border-radius:999px;padding:.3em .8em .3em .35em;color:var(--muted);cursor:pointer;white-space:nowrap}.step-num{width:22px;height:22px;border-radius:50%;border:1px solid var(--border-2);display:inline-flex;align-items:center;justify-content:center;font-size:.75rem}.step.done{color:var(--text-dim)}.step.done .step-num{background:#5aa66a40;border-color:var(--green)}.step.active{color:var(--gold-2);border-color:var(--gold)}.step.active .step-num{background:var(--gold);color:#1a1209;border-color:var(--gold)}.creator-body{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;padding:16px 20px;max-width:1300px;width:100%;margin:0 auto}@media (max-width: 900px){.creator-body{grid-template-columns:1fr;padding:12px}}.creator-main{min-width:0}.creator-preview{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:14px;align-self:start;position:sticky;top:12px}.creator-preview .ability-grid{grid-template-columns:repeat(3,1fr)}.creator-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-top:1px solid var(--border);background:#13100df2;position:sticky;bottom:0}.choice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;margin-bottom:12px}.choice{font:inherit;text-align:left;display:flex;flex-direction:column;gap:4px;padding:10px 12px;background:var(--panel);border:1px solid var(--border);border-radius:8px;color:var(--text);cursor:pointer}.choice strong{font-family:var(--font-title);font-size:1rem}.choice:hover{border-color:var(--border-2)}.choice.selected{border-color:var(--gold);background:#d8a94a1a;box-shadow:0 0 0 1px var(--gold) inset}.detail-box{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:12px;margin-top:8px}.feature{margin:4px 0}.feature summary{cursor:pointer}.ability-table{border-collapse:collapse;margin-top:10px}.ability-table th{text-align:left;padding:6px 14px 6px 0;font-family:var(--font-title);color:var(--gold-2)}.ability-table td{padding:6px 12px 6px 0}.ability-table .score{display:inline-block;min-width:2.2em;text-align:center;font-weight:700;font-size:1.05rem}.roll-sets{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:10px 0}.roll-set{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:8px}.roll-total{font-size:1.4rem;font-weight:700;color:var(--gold-2)}.chip-grid{display:flex;flex-wrap:wrap;gap:6px}.spell-pick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px;margin-bottom:12px}.swatch{width:28px;height:28px;border-radius:50%;border:2px solid transparent;cursor:pointer}.swatch.selected{border-color:#fff;box-shadow:0 0 0 2px var(--gold)}.review{display:flex;gap:16px;align-items:flex-start;background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:16px;margin-bottom:12px}.game-screen{height:100%;display:flex;flex-direction:column;overflow:hidden}.game-header{display:flex;align-items:center;gap:12px;padding:8px 14px;border-bottom:1px solid var(--border);background:#13100df2;flex-wrap:wrap}.game-title{min-width:0}.game-title h1{margin:0;font-size:1.15rem;color:var(--gold-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.phase-cluster{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.phase-pill{font-size:.8rem;font-weight:600;padding:.2em .7em;border-radius:999px;border:1px solid var(--border-2);background:var(--panel-2)}.phase-pill.exploration{border-color:var(--green);color:#9fd8aa}.phase-pill.combat{border-color:var(--red);color:#f6c2bb;background:#c9483b26}.phase-pill.shop{border-color:var(--gold);color:var(--gold-2)}.phase-pill.roll{border-color:#b48ee0;color:#d9c4f2}.phase-pill.dm{color:var(--text-dim)}.dm-busy{font-size:.82rem;color:var(--text-dim);display:inline-flex;align-items:center;gap:6px}.header-actions{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.invite{font-size:.85rem;color:var(--text-dim)}.live-toggle{position:relative}.invite-popover{width:min(320px,calc(100vw - 32px))}.invite-popover input{flex:1;min-width:0}.btn.live{border-color:#b3261e;color:#ffb3ab}.btn.live-on{background:#b3261e;border-color:#e0675a;color:#fff}.popover{position:absolute;right:0;top:calc(100% + 6px);z-index:50;background:var(--panel);border:1px solid var(--border-2);border-radius:8px;box-shadow:var(--shadow);padding:10px;display:flex;flex-direction:column;gap:6px;width:260px}.game-grid{flex:1;min-height:0;display:grid;grid-template-columns:300px minmax(0,1fr) 420px;gap:0}.game-left,.game-center,.game-right{min-height:0;min-width:0}.game-left{border-right:1px solid var(--border);overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:12px}.game-center{display:flex;flex-direction:column;padding:8px 10px 10px}.game-right{border-left:1px solid var(--border);display:flex;flex-direction:column}@media (max-width: 1300px){.game-grid{grid-template-columns:260px minmax(0,1fr) 360px}}@media (max-width: 1050px){.game-screen{height:auto;min-height:100%;overflow:visible}.game-grid{grid-template-columns:1fr}.game-left,.game-right{border:none}.game-center{order:-1}.map-area{height:55vh}.game-right{min-height:60vh}}.map-tabs{margin-bottom:6px}.map-tabs .shop-tab{margin-left:auto;color:var(--gold-2)}.map-area{flex:1;min-height:0;position:relative;border:1px solid var(--border);border-radius:8px;overflow:hidden;background:#0d0b09}.map-wrap{position:absolute;top:0;right:0;bottom:0;left:0}.map-wrap canvas{display:block}.map-empty{height:100%;display:flex;align-items:center;justify-content:center}.map-overlay{position:absolute;display:flex;gap:6px;pointer-events:none}.map-overlay>*{pointer-events:auto}.map-overlay.top-left{top:8px;left:8px;flex-wrap:wrap}.map-overlay.bottom-right{bottom:8px;right:8px;background:#13100dbf;border:1px solid var(--border);border-radius:8px;padding:2px}.map-overlay.bottom-left{bottom:8px;left:8px;right:120px}.map-chip.small{font-size:.72rem;color:var(--muted, #b9ad98);border-radius:8px}.map-chip{background:#13100dd1;border:1px solid var(--border-2);border-radius:999px;padding:.2em .7em;font-size:.82rem}.target-menu{position:absolute;z-index:20;background:var(--panel);border:1px solid var(--red);border-radius:8px;box-shadow:var(--shadow);padding:6px;min-width:200px;display:flex;flex-direction:column;gap:2px}.target-menu-head{display:flex;justify-content:space-between;align-items:center;padding:2px 4px 4px}.menu-item{font:inherit;text-align:left;background:none;border:1px solid transparent;border-radius:6px;color:var(--text);padding:5px 8px;cursor:pointer}.menu-item:hover:not(:disabled){background:#c9483b26;border-color:var(--red)}.menu-item:disabled{opacity:.4;cursor:not-allowed}.party-panel{display:flex;flex-direction:column;gap:8px}.party-card{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:8px;display:flex;flex-direction:column;gap:6px;cursor:pointer}.party-card.selected{border-color:var(--gold)}.party-card.down{border-color:var(--red)}.party-card.dead{opacity:.6}.party-card-top{display:flex;align-items:center;gap:8px}.party-card-name{flex:1;min-width:0}.party-card-ac{width:34px;height:38px;flex:none;display:flex;align-items:center;justify-content:center;font-weight:700;background:var(--bg-2);border:1px solid var(--border-2);border-radius:6px 6px 16px 16px}.party-card-foot{display:flex;align-items:center;gap:6px;min-height:18px}.party-card-foot .cond-list{flex:1}.status{font-size:.72rem;font-weight:600;padding:0 .5em;border-radius:999px}.status.ok{color:#9fd8aa;background:#5aa66a2e}.status.wait{color:var(--gold-2);background:#d8a94a26}.status.muted{color:var(--muted)}.sheet-tabs{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:6px 8px 10px}.small-tabs{margin-bottom:6px}.small-tabs button{padding:.4em .55em;font-size:.82rem}.count{background:var(--gold);color:#1a1209;border-radius:999px;padding:0 .4em;font-size:.7rem;font-weight:700}.viewing-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}.viewing-row select{flex:1;font-size:.85rem;padding:.3em .5em}.sheet-stats{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;margin:8px 0}.stat{text-align:center;background:var(--bg-2);border:1px solid var(--border);border-radius:6px;padding:3px 0}.stat-val{font-weight:700;font-size:.92rem}.stat-label{font-size:.62rem;color:var(--muted);text-transform:uppercase}.xpbar{height:5px;background:var(--bg-2);border-radius:3px;overflow:hidden;margin-top:2px}.xpbar>div{height:100%;background:var(--gold)}.char-sheet .ability-grid{grid-template-columns:repeat(3,1fr)}.skill-list{display:grid;grid-template-columns:1fr;gap:1px;font-size:.82rem}.skill{display:flex;justify-content:space-between;color:var(--text-dim)}.skill.prof{color:var(--text)}.attack-row{display:flex;flex-direction:column;padding:3px 0;border-bottom:1px solid var(--border)}.inv-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.gold{color:var(--gold-2);font-weight:600}.inv-item{display:flex;flex-wrap:wrap;gap:6px;padding:6px 0;border-bottom:1px solid var(--border)}.inv-item.equipped .inv-main strong{color:#9fd8aa}.inv-main{flex:1;min-width:0}.inv-actions{display:flex;flex-direction:column;gap:3px}.give-row{width:100%;display:flex;flex-wrap:wrap;gap:4px}.slot-row{display:flex;flex-wrap:wrap;gap:10px;margin:6px 0}.slot-group{display:inline-flex;align-items:center;gap:2px}.spell-list{display:flex;flex-direction:column;gap:4px}.quest,.npc{background:var(--bg-2);border:1px solid var(--border);border-radius:6px;padding:6px 8px}.quest.done{opacity:.7}.story-feed{flex:1;min-height:0;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px}.log-narration{background:linear-gradient(180deg,var(--parchment),var(--parchment-2));color:var(--ink);font-family:var(--font-story);font-size:1.12rem;line-height:1.55;padding:12px 16px;border-radius:6px;box-shadow:0 2px 10px #00000059,inset 0 0 30px #785a2826}.log-narration p:last-child{margin-bottom:0}.log-npc{padding-left:10px;border-left:3px solid var(--gold)}.npc-name{font-family:var(--font-title);font-size:.8rem;color:var(--gold-2)}.log-npc blockquote{margin:2px 0 0;font-family:var(--font-story);font-size:1.08rem;font-style:italic}.log-action{align-self:flex-end;max-width:85%;background:#4f8fc024;border:1px solid rgba(79,143,192,.4);border-radius:10px 10px 2px;padding:6px 10px;font-size:.9rem}.action-author{font-weight:600;color:#a9cdea}.log-roll{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:.85rem;color:var(--text-dim);padding:4px 8px;border-radius:6px;background:#ffffff08}.roll-total-inline{font-weight:700;color:var(--text);margin-left:4px}.log-combat{font-size:.85rem;color:#f0c4bd;padding:2px 8px;border-left:2px solid var(--red)}.log-event{font-size:.85rem;color:var(--gold-2);text-align:center}.log-system{font-size:.78rem;color:var(--muted);text-align:center;font-style:italic}.log-writing{color:var(--text-dim);font-family:var(--font-story);font-style:italic;font-size:1.05rem}.quill{display:inline-block;animation:write 1.2s ease-in-out infinite}@keyframes write{50%{transform:translate(3px,-2px) rotate(-8deg)}}.composer{border-top:1px solid var(--border);padding:10px 12px 12px;background:#1b1713f5;display:flex;flex-direction:column;gap:8px;max-height:55%;overflow-y:auto}.composer.combat{max-height:65%}.dm-prompt{font-family:var(--font-story);font-size:1.05rem;color:var(--parchment);border-left:3px solid var(--gold);padding-left:10px}.others{display:flex;flex-direction:column;gap:3px;font-size:.85rem}.other-action{color:var(--text-dim)}.speaker-note{font-size:.85rem;color:var(--gold-2)}.quick-chips{display:flex;flex-wrap:wrap;gap:4px}.composer-row{display:flex;align-items:center;gap:8px}.dest-chip{display:inline-flex;align-items:center;gap:4px;background:#d8a94a26;border:1px solid var(--gold);color:var(--gold-2);border-radius:999px;padding:.15em .3em .15em .7em;font-size:.82rem}.roll-list{display:flex;flex-direction:column;gap:8px}.roll-req{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;background:var(--panel);border:1px solid var(--border-2);border-radius:8px;padding:8px 10px}.roll-req.done{border-color:var(--border)}.roll-req-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.roll-result{display:flex;align-items:center;gap:8px}.big-num{font-size:1.3rem;color:var(--gold-2)}.ready-list{display:flex;flex-wrap:wrap;gap:4px}.ready-pill{font-size:.8rem;padding:.1em .6em;border-radius:999px;border:1px solid var(--border-2);color:var(--text-dim)}.ready-pill.ok{border-color:var(--green);color:#9fd8aa}.turn-banner{font-family:var(--font-title);color:var(--text-dim)}.turn-banner.mine{color:var(--gold-2)}.budget{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.budget-chip{font-size:.8rem;padding:.1em .6em;border-radius:999px;border:1px solid var(--green);color:#9fd8aa}.budget-chip.used{border-color:var(--border-2);color:var(--muted);text-decoration:line-through}.target-line{display:flex;align-items:center;gap:6px;font-size:.9rem}.action-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}.btn.action{flex-direction:column;align-items:flex-start;white-space:normal;text-align:left;width:100%}.btn.action.spell{border-color:#b48ee080}.spell-action{display:flex;flex-direction:column;gap:2px}.slot-select{font-size:.75rem;padding:.1em .3em}.char-switcher{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.switch-chip{font:inherit;font-size:.82rem;display:inline-flex;align-items:center;gap:5px;background:var(--bg-2);border:1px solid var(--border-2);color:var(--text-dim);border-radius:999px;padding:.15em .6em .15em .2em;cursor:pointer}.switch-chip.selected{border-color:var(--gold);color:var(--gold-2);background:#d8a94a26}.shop-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}.shop-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:14px}@media (max-width: 760px){.shop-grid{grid-template-columns:1fr}}.shop-col{display:flex;flex-direction:column;min-width:0}.shop-col-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}.shop-col-head h3{margin:0}.small-input{width:140px;padding:.3em .5em;font-size:.85rem}.cat-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}.shop-list{max-height:52vh;overflow-y:auto;border:1px solid var(--border);border-radius:8px;padding:0 8px}.shop-item{display:flex;gap:8px;align-items:center;padding:7px 0;border-bottom:1px solid var(--border)}.shop-item:last-child{border-bottom:none}.shop-buy{display:flex;align-items:center;gap:6px;flex:none}.price{color:var(--gold-2);font-weight:600;font-size:.85rem;white-space:nowrap}.qty{width:52px;padding:.25em .4em}.tv{height:100%;display:flex;flex-direction:column;background:radial-gradient(ellipse at top,#2a2118,#0e0b08 70%);overflow:hidden;font-size:18px}.tv-error{font-size:1.4rem;color:#f6c2bb;padding:40px;text-align:center}.tv-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 28px;border-bottom:1px solid var(--border)}.tv-title{font-family:var(--font-title);font-size:2rem;color:var(--gold-2)}.tv-sub{color:var(--text-dim);font-size:1.1rem}.tv-phase{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end}.phase-pill.big,.live-pill.big{font-size:1.1rem;padding:.25em .9em}.tv-turn{font-family:var(--font-title);font-size:1.3rem}.tv-countdown{font-size:1.4rem;font-variant-numeric:tabular-nums;color:var(--gold-2)}.tv-grid{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px;padding:16px 28px}.tv-map{position:relative;border:1px solid var(--border-2);border-radius:12px;overflow:hidden;background:#0d0b09;min-height:0}.tv-side{display:flex;flex-direction:column;gap:14px;min-height:0;overflow:hidden}.tv-narration{flex:1;min-height:0;overflow:hidden;background:linear-gradient(180deg,var(--parchment),var(--parchment-2));color:var(--ink);border-radius:10px;padding:20px 26px;font-family:var(--font-story);font-size:1.6rem;line-height:1.5;box-shadow:0 6px 30px #00000080,inset 0 0 50px #785a282e;display:flex;flex-direction:column;justify-content:flex-end}.typewriter p{margin:0 0 .6em}.caret{animation:pulse .8s steps(2) infinite;color:#7a5a2a}.tv-writing{font-family:var(--font-story);font-style:italic;font-size:1.5rem;color:var(--text-dim)}.tv-prompt{font-family:var(--font-story);font-size:1.4rem;color:var(--parchment);border-left:4px solid var(--gold);padding-left:14px}.tv-rolls{display:flex;flex-direction:column;gap:8px}.tv-roll{display:flex;align-items:center;gap:12px;background:var(--panel);border:1px solid var(--border-2);border-radius:10px;padding:8px 14px;font-size:1.15rem}.tv-roll.done{border-color:var(--green)}.tv-roll.fail{border-color:var(--red)}.tv-roll-label{flex:1}.tv-roll-result strong{font-size:1.5rem;color:var(--gold-2)}.tv-recent{display:flex;flex-direction:column;gap:6px;font-size:1rem;max-height:30%;overflow:hidden}.tv-shop{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--gold);border-radius:10px;padding:16px 20px}.tv-shop h2{font-size:1.8rem;color:var(--gold-2)}.tv-shop-list{flex:1;min-height:0;overflow:hidden;display:grid;grid-template-columns:1fr 1fr;gap:4px 20px;align-content:start}.tv-shop-item{display:flex;justify-content:space-between;font-size:1.15rem;border-bottom:1px solid var(--border);padding:3px 0}.tv-ready{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.ready-pill.big{font-size:1.1rem;padding:.2em .9em}.tv-party{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;padding:0 28px 18px}.tv-card{background:var(--panel);border:2px solid var(--border);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}.tv-card.active{border-color:var(--gold);box-shadow:0 0 20px #d8a94a59}.tv-card.down{border-color:var(--red)}.tv-card.dead{opacity:.55}.tv-card .hpbar{height:24px}.tv-card .hpbar-text{font-size:.95rem}.tv-card-top{display:flex;align-items:center;gap:12px}.tv-card-name{flex:1;min-width:0}.tv-name{font-family:var(--font-title);font-size:1.3rem}.tv-ac{width:52px;height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--bg-2);border:1px solid var(--border-2);border-radius:8px 8px 22px 22px;font-size:1.5rem;font-weight:700;line-height:1}.tv-ac small{font-size:.6rem;color:var(--muted)}.tv-abilities{display:flex;justify-content:space-between;font-size:1rem}.tv-abilities small{color:var(--muted);font-size:.7rem}.tv-slots{display:flex;gap:12px;flex-wrap:wrap}.tv-slots .pip{width:14px;height:14px}.tv .cond{font-size:.9rem}@media (max-width: 1000px){.tv-grid{grid-template-columns:1fr}.tv-map{height:50vh}}.scene-label{position:absolute;transform:translate(-50%,-130%);pointer-events:none;white-space:nowrap;font-size:.72rem;padding:1px 6px;border-radius:8px;background:#0d0b09d1;border:1px solid rgba(216,169,74,.45);color:var(--gold-2)}.map-overlay.top-right{top:8px;right:8px}.char-avatar.zoomable{cursor:zoom-in}.portrait-lightbox{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px;background:#080605db;cursor:zoom-out}.portrait-lightbox figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:10px}.portrait-lightbox img{width:min(640px,88vw,78vh);height:auto;aspect-ratio:1;object-fit:cover;border-radius:12px;border:1px solid rgba(216,169,74,.5);box-shadow:0 10px 40px #0009}.portrait-lightbox figcaption{color:var(--gold-2);font-weight:700;font-size:1.1rem}.levelup-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--gold-2);background:linear-gradient(180deg,#f0c66b,#c6902e);color:#2b1d08;font-weight:700;font-size:.75rem;padding:2px 8px;border-radius:999px;cursor:pointer;box-shadow:0 0 #f0c66b99;animation:levelup-pulse 1.8s ease-out infinite}.levelup-badge:hover{filter:brightness(1.08)}@keyframes levelup-pulse{0%{box-shadow:0 0 #f0c66b99}70%{box-shadow:0 0 0 8px #f0c66b00}to{box-shadow:0 0 #f0c66b00}}.levelup-banner{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;margin-bottom:8px;border:1px solid var(--gold);border-radius:var(--radius);background:#d8a94a1f;color:var(--gold-2);font-weight:600}.levelup section{margin-bottom:18px}.levelup h3{margin:0 0 8px}.levelup-done{text-align:center;padding:12px 0}.levelup-done .big-num{font-family:var(--font-title);font-size:2rem;color:var(--gold-2)}.badge.tiny{font-size:.65rem;padding:0 5px;margin-left:3px;vertical-align:middle}.badge.rarity-uncommon{border-color:#3f8f4f;color:#8fdc9c}.badge.rarity-rare{border-color:#3a6fb0;color:#9cc4f5}.badge.rarity-very-rare{border-color:#7b48b8;color:#cba6f5}.badge.rarity-legendary{border-color:#c07a1e;color:#f5c77a}.badge.rarity-common{color:var(--text-dim)}.cond.conc{border-color:#3b6c94;color:#9fd0ff;background:#4f8fc01f}.conc-line{margin:6px 0;color:#9fd0ff}.slot-group.pact .pip.full{background:#9b6be0;border-color:#c9a8ff}.tiny-text{font-size:.65rem}.row-between{display:flex;align-items:center;justify-content:space-between;gap:8px}.prepare-editor{border:1px solid var(--border-2);border-radius:var(--radius);padding:8px;background:var(--panel-2)}.prepare-list{display:flex;flex-direction:column;gap:4px;max-height:260px;overflow-y:auto;margin-bottom:8px}.prepare-item{display:flex;gap:8px;align-items:flex-start;padding:4px 6px;border-radius:6px;cursor:pointer}.prepare-item.on{background:#d8a94a1f}.prepare-item input{margin-top:3px}.feature-actions{display:flex;flex-direction:column;gap:6px;margin:8px 0}.feature-group{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.feature-group-label{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);min-width:62px}.feature-btn.armed,.btn.action.armed{outline:2px solid #ffb15a;outline-offset:1px}.aim-banner{display:flex;align-items:center;gap:8px;padding:6px 10px;margin:6px 0;border:1px solid #c97a2e;border-radius:var(--radius);background:#ff8c321f;font-size:.85rem}.chip-sep{width:1px;align-self:stretch;background:var(--border-2);margin:0 2px}.chip.rest.selected{border-color:#6f8fd8;background:#6f8fd833;color:#dfe8ff}.shop-item.service{border-left:3px solid var(--blue)}.price s{margin-right:4px}.ruleset-badge{display:inline-block;margin-left:6px;padding:0 6px;border-radius:999px;font-size:.68rem;font-weight:600;letter-spacing:.02em;vertical-align:middle;border:1px solid var(--border-2);color:var(--muted, #b9ad98)}.ruleset-badge.r2024{border-color:#78aae699;color:#a9c8f0}.ruleset-pick{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 12px;margin-bottom:14px;border:1px solid var(--border);border-radius:8px;background:var(--panel)}.ruleset-pick .label{margin:0}.ruleset-pick .muted{flex-basis:100%}.asi-label{width:24px;display:inline-flex;align-items:center}.badge.mastery{margin-left:6px;border-color:#78aae680;color:#a9c8f0}.exhaustion-line{display:flex;align-items:center;gap:8px;color:#f0b6ad;margin:4px 0}.exh-pips{display:inline-flex;gap:3px}.exh-pips .pip{width:9px;height:9px;border-radius:50%;border:1px solid #c9483b}.exh-pips .pip.full{background:#c9483b}.edited-tag{margin-left:6px;font-size:.7rem;padding:0 5px;border-radius:4px;border:1px dashed var(--border-2);color:var(--muted, #b9ad98)}.cond.away{border-color:#78aae68c;color:#a9c8f0}.spectator-list{padding:4px 2px}.banner.spectating{background:#78aae61f;border-bottom:1px solid rgba(120,170,230,.45);color:#cfe0f6}.composer.spectating{padding:10px 12px}.away-control{position:relative}.away-on{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.away-pop{margin-top:6px;padding:10px;border:1px solid var(--border-2);border-radius:8px;background:var(--panel);display:flex;flex-direction:column;gap:8px}.away-pop input[type=datetime-local]{width:100%;margin-top:4px}.notify-settings{margin-top:18px;padding-top:12px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:10px}.notify-block{border:1px solid var(--border);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}.notify-block.disabled{opacity:.6}.toggle{display:inline-flex;align-items:center;gap:6px;cursor:pointer}.feed-wrap{flex:1;min-height:0;display:flex;flex-direction:column}.feed-tabs{padding:6px 12px 0;margin-bottom:0}.log-wrap{display:flex;flex-direction:column;gap:10px}.new-divider,.day-divider{display:flex;align-items:center;gap:8px;font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--gold)}.new-divider:before,.new-divider:after,.day-divider:before,.day-divider:after{content:"";flex:1;height:1px;background:#c9a22773}.day-divider{color:var(--muted, #b9ad98);margin:6px 0}.day-divider:before,.day-divider:after{background:var(--border)}.story-history{display:flex;flex-direction:column;gap:10px}.catch-up{margin:8px 12px 0;flex-shrink:0;max-height:40%;overflow-y:auto;border:1px solid rgba(201,162,39,.55);background:#c9a22714;border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}.catch-up-recap{font-family:var(--font-story);font-size:1.02rem}.catch-up-recap p{margin:0 0 6px}.mobile-body,.mobile-composer,.mobile-tabbar{display:none}@media (max-width: 760px){html,body{overflow-x:hidden}.game-screen.mobile{height:100vh;height:100dvh;min-height:0;overflow:hidden}.game-screen.mobile .game-header{padding:6px 10px;gap:6px}.game-screen.mobile .header-actions{width:100%;margin-left:0;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}.game-screen.mobile .header-actions>*{flex-shrink:0}.mobile-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.mobile-body>.game-left{border:none;padding:10px;overflow-y:auto;flex:1}.mobile-body>.game-right{border:none;flex:1;min-height:0}.mobile-body>.game-center{flex:1;min-height:0;padding:6px}.mobile-body>.game-center .map-area{height:auto;flex:1}.mobile-composer{display:block;flex-shrink:0;max-height:46vh;overflow-y:auto;border-top:1px solid var(--border)}.mobile-composer .composer{max-height:none;border-top:none}.mobile-composer:empty{display:none}.mobile-tabbar{display:flex;flex-shrink:0;border-top:1px solid var(--border-2);background:#13100dfa;padding-bottom:env(safe-area-inset-bottom,0)}.mobile-tabbar button{flex:1;position:relative;min-height:52px;font:inherit;background:none;border:none;color:var(--muted, #b9ad98);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}.mobile-tabbar button.active{color:var(--gold);box-shadow:inset 0 2px 0 var(--gold)}.mt-icon{font-size:1.15rem;line-height:1}.mt-label{font-size:.72rem}.mt-badge{position:absolute;top:6px;right:calc(50% - 22px);min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--gold);color:#1a1612;font-size:.66rem;font-weight:700;display:flex;align-items:center;justify-content:center}.btn,.chip,.menu-item,.seg button,.tabs button,.step,.picker-item,.icon-btn{min-height:40px}.btn.tiny,.btn.small{min-height:36px;padding-left:.8em;padding-right:.8em}.icon-btn{min-width:40px}input,select,textarea{font-size:16px}.quick-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.quick-chips>*{flex-shrink:0}.composer-row{flex-wrap:wrap}.modal-backdrop{padding:0;align-items:stretch}.modal,.modal.wide{width:100%;max-height:none;height:100%;height:100dvh;border-radius:0;border:none}.modal-head{padding:10px 14px;position:sticky;top:0}.modal-body{padding:12px 14px;flex:1}.modal-foot{padding:10px 14px calc(10px + env(safe-area-inset-bottom,0))}.lobby-grid{padding:10px;gap:12px}.topbar{padding-left:12px;padding-right:12px}.stepper{padding:8px 10px}.creator-body{padding:10px}.creator-preview{position:static;order:-1}.creator-foot{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0))}.choice-grid,.spell-pick-grid{grid-template-columns:1fr}.ability-table td,.ability-table th{padding:4px}.game-row{flex-wrap:wrap}.target-menu{max-width:calc(100% - 16px)}}.header-more{display:none}@media (max-width: 760px){.game-screen.mobile .game-header{position:relative;flex-wrap:wrap;align-items:center;padding:6px 8px;row-gap:2px}.game-screen.mobile .game-title{flex:1;min-width:0}.game-screen.mobile .game-title h1{font-size:1.05rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.game-screen.mobile .game-title .muted{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.75rem}.game-screen.mobile .phase-cluster{order:3;width:100%;flex-wrap:nowrap;overflow-x:auto;gap:6px;font-size:.8rem}.game-screen.mobile .header-more{display:inline-flex;order:2}.game-screen.mobile .header-actions:not(.open){order:4;width:auto;overflow:visible;padding:0}.game-screen.mobile .header-actions:not(.open)>:not(.keep){display:none}.game-screen.mobile .header-actions.open{position:absolute;top:100%;right:8px;left:auto;width:auto;max-width:calc(100vw - 16px);z-index:60;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:10px;background:#13100dfa;border:1px solid var(--border-2);border-radius:10px;box-shadow:0 8px 24px #00000080;overflow:visible}.game-screen.mobile .header-actions.open .popover{position:static}.game-screen.mobile .feed-tabs{align-items:center}.feed-tab-tools{margin-left:auto;display:inline-flex;gap:6px;padding-right:6px}.feed-tab-tools .autoread-toggle,.feed-tab-tools .sound-chip{padding:2px 8px;min-height:30px;font-size:.9rem}.mobile-composer{max-height:none}.mobile-composer.open{max-height:62dvh;display:flex;flex-direction:column;overflow:hidden}.mobile-composer.open>.composer{overflow-y:auto;min-height:0}.composer-handle{flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:30px;background:none;border:none;color:var(--muted, #b9ad98);font:inherit;font-size:.75rem;cursor:pointer}.composer-handle .grip{width:36px;height:4px;border-radius:2px;background:var(--border-2)}.composer-bar{width:100%;display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 12px;background:#13100df5;border:none;color:var(--text);font:inherit;text-align:left;cursor:pointer}.composer-bar-text{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.92rem}.composer-bar-btn{flex-shrink:0;padding:6px 14px;border-radius:8px;border:1px solid var(--border-2);font-weight:600;font-size:.88rem}.composer-bar.urgent{background:linear-gradient(90deg,#d8a94a2e,#13100df5)}.composer-bar.urgent .composer-bar-text{color:var(--gold-2);font-weight:600}.composer-bar.urgent .composer-bar-btn{background:var(--gold);border-color:var(--gold);color:#1a1612}}.menu-label{display:none}@media (max-width: 760px){.game-screen.mobile .header-actions.open .menu-label{display:inline}.game-screen.mobile .header-actions.open .icon-btn{width:auto;justify-content:flex-start;padding:6px 10px}.game-screen.mobile .travel-hint{display:none}}@media (max-width: 760px){.game-screen.mobile .map-tabs button:disabled{display:none}}.atmos{position:relative;isolation:isolate}.scene-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;pointer-events:none;overflow:hidden}.scene-backdrop.subtle{opacity:.45}.scene-layer{position:absolute;top:0;right:0;bottom:0;left:0}.scene-layer.entering{animation:scene-fade 1.5s ease both}@keyframes scene-fade{0%{opacity:0}to{opacity:1}}.scene-vignette{position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(ellipse at 50% 45%,transparent 45%,rgba(0,0,0,.55) 100%)}.scene-backdrop.night .scene-vignette{background:radial-gradient(ellipse at 50% 45%,transparent 35%,rgba(0,0,0,.7) 100%)}.feed-wrap.atmos .story-feed{background:transparent}.feed-wrap.atmos .feed-tabs{background:#0f0c098c}.sky-strip{display:block;width:100%}.feed-sky{position:relative;flex:none;border-bottom:1px solid rgba(255,255,255,.06)}.feed-sky-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:flex-end;justify-content:space-between;gap:8px;padding:4px 8px;pointer-events:none}.feed-sky-overlay>*{pointer-events:auto}.sky-caption{font-size:.72rem;color:#fffaebeb;text-shadow:0 1px 3px rgba(0,0,0,.9);text-transform:capitalize;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.tv-header{position:relative;overflow:hidden;isolation:isolate}.tv-header .tv-sky{position:absolute;top:0;right:0;bottom:0;left:0;height:100%!important;z-index:-1;opacity:.6}.tv-header-text .tv-sub,.tv-header-text .tv-title{text-shadow:0 2px 6px rgba(0,0,0,.85)}.tv.atmos{background:#0e0b08}.sound-chip,.autoread-toggle{font:inherit;font-size:.75rem;border:1px solid rgba(255,255,255,.25);background:#0f0c09b8;color:var(--text);border-radius:999px;padding:2px 9px;cursor:pointer;white-space:nowrap}.sound-chip:hover,.autoread-toggle:hover{border-color:var(--gold)}.sound-chip:not(.on){border-color:var(--gold);color:var(--gold-2);animation:chip-pulse 2.4s ease-in-out infinite}@keyframes chip-pulse{50%{box-shadow:0 0 0 3px #d8a94a40}}.autoread-toggle.on{border-color:var(--green);color:#bfe8c8}.sound-chip.big,.autoread-toggle.big{font-size:1.05rem;padding:6px 16px}.sound-pop-wrap{position:relative}.sound-pop{position:absolute;right:0;top:calc(100% + 6px);z-index:60;width:min(320px,86vw);background:var(--panel);border:1px solid var(--border-2);border-radius:var(--radius);box-shadow:var(--shadow);padding:10px 12px;display:flex;flex-direction:column;gap:8px;font-size:.85rem}.feed-sky .sound-pop{top:auto;bottom:calc(100% + 6px)}.feed-sky-overlay .sound-pop{top:calc(100% + 6px);bottom:auto}.audio-settings{display:flex;flex-direction:column;gap:8px}.audio-label{min-width:56px;color:var(--text-dim);font-size:.85rem}@media (prefers-reduced-motion: reduce){.sound-chip:not(.on){animation:none}}.log-narration{position:relative}.speak-btn{float:right;margin:-4px -6px 4px 8px;border:none;background:#2b201614;color:var(--ink);border-radius:50%;width:28px;height:28px;cursor:pointer;font-size:.9rem;opacity:.55;transition:opacity .15s}.log-narration:hover .speak-btn,.speak-btn:focus-visible,.speak-btn.on{opacity:1}.speak-btn.on{background:#963c1e2e}@media (hover: none){.speak-btn{opacity:.85}}.d20-icon{flex:none;overflow:visible}.d20-body{fill:#2b2440;stroke:#8f84c8;stroke-width:3;stroke-linejoin:round}.d20-edges{fill:none;stroke:#c8beff73;stroke-width:2;stroke-linejoin:round}.d20-edges polygon{fill:#ffffff0f}.d20-num{fill:#fff;font-weight:800;font-family:var(--font-ui)}.d20-icon.crit .d20-body{fill:#5a4310;stroke:var(--gold-2)}.d20-icon.crit .d20-num{fill:#ffe9a8}.d20-icon.fumble .d20-body{fill:#4a1612;stroke:var(--red-2)}.log-roll.crit{background:#d8a94a1a}.log-roll.fumble{background:#c9483b1a}.die.dropped{opacity:.45;text-decoration:line-through}.dice-overlay{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:80;cursor:pointer;max-width:calc(100vw - 24px)}.dice-stage{display:flex;flex-direction:column;align-items:center;gap:10px;background:#14100cf0;border:1px solid var(--border-2);border-radius:16px;padding:12px 12px 14px;box-shadow:var(--shadow);animation:dice-in .25s ease-out both}.dice-overlay.tv .dice-stage{padding:22px 26px 26px;gap:16px;border-radius:22px;font-size:1.6rem}.dice-table{border-radius:12px;overflow:hidden;background:radial-gradient(ellipse at 50% 35%,rgba(255,255,255,.08),transparent 60%),repeating-linear-gradient(45deg,rgba(0,0,0,.05) 0 2px,transparent 2px 5px),#1f4a33;box-shadow:inset 0 0 0 6px #4a2f1a,inset 0 0 0 8px #2b1b0e,inset 0 10px 30px #00000073}.dice-table canvas{display:block}.dice-overlay .dice-info{align-items:center!important;text-align:center}@keyframes dice-in{0%{opacity:0;transform:scale(.85)}}.dice-die{position:relative;perspective:500px;display:flex}.dice-stage.tumble .dice-die .d20-icon{animation:d20-tumble 1s cubic-bezier(.2,.6,.3,1) both}.dice-stage.land .dice-die .d20-icon{animation:d20-land .35s ease-out both}@keyframes d20-tumble{0%{transform:translate(-40px,-60px) rotateX(0) rotateY(0) rotate(0) scale(.7)}35%{transform:translate(10px,8px) rotateX(400deg) rotateY(200deg) rotate(120deg) scale(1.05)}55%{transform:translate(-6px,-18px) rotateX(560deg) rotateY(320deg) rotate(200deg) scale(1)}75%{transform:translate(4px,2px) rotateX(680deg) rotateY(380deg) rotate(300deg) scale(1)}to{transform:translate(0) rotateX(720deg) rotateY(360deg) rotate(360deg) scale(1)}}@keyframes d20-land{0%{transform:scale(1.15)}to{transform:scale(1)}}.dice-stage.crit{border-color:var(--gold-2);box-shadow:0 0 0 2px #f0c66b66,0 0 40px #f0c66b73,var(--shadow)}.dice-stage.fumble{border-color:var(--red-2);box-shadow:0 0 30px #c9483b66,var(--shadow)}.dice-stage.fumble.land .dice-die .d20-icon{animation:d20-shake .4s ease-out both}@keyframes d20-shake{20%{transform:translate(-5px) rotate(-4deg)}40%{transform:translate(5px) rotate(3deg)}60%{transform:translate(-3px) rotate(-2deg)}to{transform:none}}.dice-rays{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;animation:rays-spin 4s linear infinite}.dice-rays i{position:absolute;left:50%;top:50%;width:3px;height:75%;margin-left:-1.5px;transform-origin:50% 0;background:linear-gradient(#ffdc82e6,#ffdc8200);animation:ray-burst .6s ease-out both}@keyframes ray-burst{0%{opacity:0;height:0}}@keyframes rays-spin{to{transform:rotate(360deg)}}.dice-crack{position:absolute;top:8%;right:8%;bottom:8%;left:8%;width:84%;height:84%;pointer-events:none}.dice-crack path{fill:none;stroke:#ff6a5a;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:120;stroke-dashoffset:120;filter:drop-shadow(0 0 3px rgba(255,60,40,.8));animation:crack-draw .45s ease-out forwards}@keyframes crack-draw{to{stroke-dashoffset:0}}.dice-info{display:flex;flex-direction:column;gap:4px;min-width:0}.dice-overlay.tv .dice-info,.dice-overlay.game .dice-info{align-items:flex-start}.dice-overlay.tv .dice-info{align-items:center}.dice-label{font-size:.85rem;color:var(--text-dim);display:flex;align-items:center;gap:6px}.dice-overlay.tv .dice-label{font-size:1.4rem}.dice-total{font-size:1.05rem;font-variant-numeric:tabular-nums}.dice-total strong{font-size:1.6em;color:var(--gold-2)}.dice-total.shown{animation:dice-in .25s ease-out both}.dice-dc,.dice-mod{color:var(--text-dim)}.dice-verdict-row{display:flex;gap:6px;flex-wrap:wrap}.dice-flag,.dice-verdict{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:2px 8px;border-radius:999px}.dice-overlay.tv .dice-flag,.dice-overlay.tv .dice-verdict{font-size:1.1rem}.dice-flag.crit{background:#f0c66b33;color:var(--gold-2)}.dice-flag.fumble{background:#c9483b38;color:#ffb3a9}.dice-verdict.ok{background:#5aa66a38;color:#bfe8c8}.dice-verdict.bad{background:#c9483b38;color:#ffb3a9}@media (prefers-reduced-motion: reduce){.dice-stage,.dice-stage .d20-icon,.dice-rays,.dice-rays i,.dice-total.shown,.scene-layer.entering{animation:none!important}.dice-crack path{animation:none;stroke-dashoffset:0}}.char-avatar.portrait{overflow:hidden;padding:0;position:relative}.char-avatar.portrait img,.char-avatar.portrait .crest{width:100%;height:100%;display:block;object-fit:cover}.char-avatar.huge{width:112px;height:112px}.portrait-editor{display:flex;align-items:center;gap:10px}.portrait-actions{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.char-card .portrait-editor{flex-direction:column;align-items:center;gap:4px}.char-card .portrait-actions{align-items:center}.char-card .portrait-actions .btn.tiny{font-size:.68rem;padding:1px 6px}.sheet-header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:8px}.sheet-header .portrait-editor{flex:none}.sheet-header-name{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;flex:1 1 130px;overflow-wrap:anywhere}.sheet-name{font-family:var(--font-title);font-size:1.15rem;color:var(--gold-2)}.tv-card .char-avatar.big{width:64px;height:64px}.custom-tag{background:#7f6ec838;color:#d4ccff;border:1px solid rgba(160,145,230,.4)}.feature.custom summary{display:list-item}.chip-x{border:none;background:transparent;color:var(--muted);cursor:pointer;font-size:.95rem;line-height:1;padding:0 4px;margin-left:4px}.chip-x:hover{color:var(--red-2)}.custom-picker{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:4px}.custom-attached{display:flex;flex-wrap:wrap;gap:4px}.custom-chip{font-size:.75rem;display:inline-flex;align-items:center;gap:4px;white-space:nowrap;max-width:100%}.char-card .custom-chip small{display:none}.custom-pop{position:absolute;top:calc(100% + 4px);left:0;z-index:50;width:min(320px,80vw);max-height:320px;overflow-y:auto;background:var(--panel);border:1px solid var(--border-2);border-radius:var(--radius);box-shadow:var(--shadow);padding:8px}.custom-pick-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:4px}.custom-pick{width:100%;text-align:left;font:inherit;font-size:.85rem;color:var(--text);background:var(--panel-2);border:1px solid var(--border);border-radius:6px;padding:6px 8px;cursor:pointer}.custom-pick:hover{border-color:var(--gold)}.tiny-text{font-size:.72rem}.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.my-content .custom-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}.custom-row{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:6px 8px;background:var(--panel-2);border:1px solid var(--border);border-radius:6px}.custom-row details{flex:1;min-width:0}.custom-row summary{cursor:pointer}.custom-form{background:var(--panel-2);border:1px solid var(--border);border-radius:var(--radius);padding:10px;margin:8px 0}.custom-form .field{display:flex;flex-direction:column;gap:3px}.custom-form .field.narrow input{width:90px}.custom-form textarea{width:100%}.import-ruleset{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.import-custom{margin:4px 0;padding-left:18px}.import-custom li{margin:2px 0}.token-card{position:absolute;z-index:20;background:var(--panel);border:1px solid var(--border-2);border-radius:8px;box-shadow:var(--shadow);padding:8px 10px;min-width:180px;max-width:min(260px,calc(100% - 16px));display:flex;flex-direction:column;gap:4px;font-size:.88rem}.token-card-head{display:flex;align-items:center;gap:6px}.token-card-stats{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center}.combat-ref{display:flex;flex-direction:column;gap:6px;margin-top:6px;padding:8px;border:1px solid var(--border);border-radius:var(--radius);background:#0000002e;font-size:.82rem}.combat-ref-wrap>summary{cursor:pointer;color:var(--text-dim);margin-top:4px}.ref-section{display:flex;flex-direction:column;gap:2px}.ref-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim)}.ref-label .muted{text-transform:none;letter-spacing:0}.ref-row{display:flex;flex-wrap:wrap;gap:2px 8px}.ref-feats{display:flex;flex-wrap:wrap;gap:4px}.ref-chip{font-size:.78rem;padding:.1em .55em;border-radius:999px;border:1px solid var(--border-2);white-space:nowrap}.ref-chip.used{color:var(--muted);text-decoration:line-through}.roll-lines{flex-basis:100%;color:var(--text-dim);margin-top:2px}.roll-result{flex-wrap:wrap}.place-card{position:absolute;z-index:20;top:8px;left:8px;width:min(300px,calc(100% - 16px));background:var(--panel);border:1px solid var(--border-2);border-radius:8px;box-shadow:var(--shadow);padding:10px 12px;display:flex;flex-direction:column;gap:6px}.place-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.place-card-title{font-family:Cinzel,Georgia,serif;font-weight:600;font-size:1.05rem}.place-card-desc{margin:0;font-size:.86rem;line-height:1.4}.place-card-shops{display:flex;flex-wrap:wrap;gap:4px}.place-card-shops .chip.static{cursor:default;font-size:.76rem}.rules-term{text-decoration:underline dotted rgba(216,169,74,.7);text-underline-offset:3px;cursor:help}.rules-term:hover,.rules-term:focus-visible{color:var(--gold-2);outline:none}.hover-info{cursor:help}.hover-info:not(.ref-chip){text-decoration:underline dotted rgba(255,255,255,.35);text-underline-offset:3px}.rules-pop{position:fixed;z-index:1000;width:max-content;max-width:min(320px,calc(100vw - 16px));max-height:min(60vh,420px);overflow-y:auto;padding:10px 12px;background:var(--panel);color:var(--text);border:1px solid var(--border-2);border-radius:var(--radius);box-shadow:var(--shadow);font-size:.84rem;line-height:1.45;text-align:left;font-weight:400;cursor:auto}.rules-pop.wide{max-width:min(420px,calc(100vw - 16px))}.rules-pop-title{font-family:var(--font-title);color:var(--gold-2);font-size:.95rem;margin-bottom:4px}.spell-details .pre{margin-top:6px}.clamp3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.spell-card.pick.disabled{opacity:.45;cursor:not-allowed}.spell-card.pick:focus-visible{outline:2px solid var(--gold);outline-offset:1px}.link-btn{align-self:flex-start;background:none;border:0;padding:2px 0;color:var(--gold-2);cursor:pointer;font:inherit}.link-btn:hover{text-decoration:underline}.roll-need{margin:4px 0 6px;color:var(--text-2, inherit);line-height:1.45}.story-summary{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:12px 14px;margin-bottom:10px}.story-summary h3{margin:0 0 6px;font-family:var(--font-title);color:var(--gold-2)}.story-summary p{margin:0 0 10px;line-height:1.6}.story-full-log{margin-top:10px}.dice-table.pair{display:flex}.dice-slot{transition:opacity .4s,filter .4s}.dice-slot.dropped{opacity:.35;filter:grayscale(.8)}.dice-adv{color:var(--gold-2);margin-bottom:2px}.token-card-art{display:block;width:100%;max-width:180px;aspect-ratio:1;object-fit:cover;border-radius:8px;margin:0 auto 6px;border:1px solid var(--border-2)}.paint-portrait{margin-top:6px;display:flex;flex-direction:column;gap:6px;width:100%}.paint-portrait textarea{width:100%;font:inherit;font-size:.85rem;background:var(--bg-2);color:var(--text);border:1px solid var(--border-2);border-radius:var(--radius);padding:6px 8px;resize:vertical}.npc.with-face{display:flex;gap:10px;align-items:flex-start}.npc.with-face .npc-text{flex:1;min-width:0}.dice-layer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;pointer-events:none;overflow:hidden}.dice-layer .dice-canvas{position:absolute;top:0;right:0;bottom:0;left:0;display:block}.dice-caption{position:absolute;transform:translate(-50%);pointer-events:auto;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;min-width:200px;max-width:min(420px,calc(100vw - 24px));padding:10px 16px 12px;background:#14100ce6;border:1px solid var(--border-2);border-radius:14px;box-shadow:var(--shadow);animation:dice-in .25s ease-out both}.dice-caption.crit{border-color:var(--gold-2);box-shadow:0 0 0 2px #f0c66b66,0 0 40px #f0c66b73,var(--shadow)}.dice-caption.fumble{border-color:var(--red-2);box-shadow:0 0 30px #c9483b66,var(--shadow)}.dice-layer.tv .dice-caption{font-size:1.6rem;padding:18px 26px 22px;max-width:70vw}.dice-caption .dice-total{font-size:1.15rem}.dice-tray .field{margin-bottom:10px}.dice-tray-count{min-width:2ch;text-align:center;font-size:1.2rem}.dice-tray .toggle{margin-top:12px}.voice-tester textarea{width:100%;font:inherit;background:var(--bg-2);color:var(--text);border:1px solid var(--border-2);border-radius:var(--radius);padding:8px 10px;margin-bottom:8px}.voice-tester .field{margin-bottom:8px}.voice-tester input[type=range]{width:100%}.token-card{max-width:min(300px,calc(100% - 16px));max-height:calc(100% - 16px);overflow-y:auto}.token-card .token-card-art{max-width:220px;cursor:zoom-in}.token-card-sub{color:var(--gold-2)}.token-card-line{color:var(--text);line-height:1.35}.chat-panel{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}.chat-scroll{flex:1;min-height:0;overflow-y:auto;padding:10px 14px;display:flex;flex-direction:column;gap:2px}.chat-note{text-align:center;padding:4px 0 10px}.chat-older{align-self:center;margin-bottom:8px}.chat-empty{text-align:center;padding:24px 0}.chat-msg{padding:6px 10px;margin-top:8px;border-radius:var(--radius);background:#221d18d9;border:1px solid var(--border);max-width:92%;align-self:flex-start}.chat-msg.grouped{margin-top:2px}.chat-msg.mine{background:#d8a94a1f;border-color:#d8a94a59}.chat-meta{display:flex;align-items:baseline;gap:8px;margin-bottom:2px}.chat-meta strong{color:var(--gold-2);font-size:.86rem}.chat-text{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);line-height:1.4}.chat-actions{margin-left:6px;opacity:0;transition:opacity .15s}.chat-msg:hover .chat-actions,.chat-msg:focus-within .chat-actions{opacity:1}@media (hover: none){.chat-actions{opacity:.7}}.chat-actions button{background:none;border:none;color:var(--text-dim);cursor:pointer;padding:0 4px;font-size:.85rem}.chat-actions button:hover{color:var(--gold-2)}.chat-edit textarea,.chat-compose textarea{width:100%;resize:none;font:inherit;background:var(--bg-2);color:var(--text);border:1px solid var(--border-2);border-radius:var(--radius);padding:8px 10px}.chat-edit .row{margin-top:4px}.chat-err{padding:4px 14px;cursor:pointer}.chat-compose{flex-shrink:0;padding:8px 12px 10px;border-top:1px solid var(--border);background:#13100deb}.chat-compose-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}.mobile .chat-compose textarea{font-size:16px}
