/* Shared materials for the gathering room, tabletop, and dossiers. */
:root { --bg:#10120f; --panel:#1c1e17; --panel2:#292b20; --line:#514b35; --text:#eee7d6; --dim:#b7ae98; --accent:#dfbb75; --accent2:#8d9e69; --ok:#91c583; --danger:#f17f72; }
button:focus-visible,select:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid #f4d28e; outline-offset:3px; }
#screen-lobby { background:linear-gradient(#090d0bbb,#11150ec9),url('branding/gathering-hall.jpg') center / cover fixed; padding:30px 20px; }
#screen-lobby .lobby-card { width:min(1120px,100%); max-height:none; overflow:visible; padding:30px; margin:0 auto auto; background:#14170edb; border:1px solid #a17d454f; border-radius:8px; box-shadow:0 25px 90px #0009; }
.gathering-header { display:flex; align-items:center; gap:20px; padding-bottom:18px; border-bottom:1px solid #9b7d454f; }
.gathering-header > img { width:82px; height:82px; object-fit:contain; mix-blend-mode:screen; border-radius:50%; }
.gathering-header h2 { color:#efcf92; font-size:34px; font-weight:400; margin:0; }
.gathering-header .hint { margin-bottom:0; }
.invitation-plaque { margin-left:auto; padding:12px 20px; border:1px solid #b39457; background:linear-gradient(135deg,#50412a,#282619); text-align:center; border-radius:3px; box-shadow:inset 0 0 0 3px #171a11; }
.invitation-plaque > span { display:block; color:#d7c392; font-size:8px; letter-spacing:1.5px; margin-bottom:6px; }
.invitation-plaque .code-badge { background:transparent; color:#ffe4aa; padding:0; margin:0; font-size:24px; }
.share-hint { font-size:11px; color:#bcb39f; overflow-wrap:anywhere; }
.share-link { color:#dac18c; }
#screen-lobby .seats { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:24px 0; }
#screen-lobby .seat { padding:18px; border:1px solid #74613c; background:radial-gradient(ellipse at top,#3a3521,#191e15 75%); border-radius:5px; min-width:0; text-align:center; box-shadow:0 6px 18px #0004; }
.seat-portrait { display:flex; justify-content:center; margin:0 0 12px; }
#screen-lobby .seat-portrait img { float:none; width:88px; height:88px; border:2px solid #d3ae66; padding:3px; box-shadow:0 0 0 4px #77613f3d; }
.portrait-seal { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; width:64px; height:64px; flex:0 0 64px; border-radius:50%; border:2px solid #ad9057; color:#e6c78c; background:radial-gradient(circle,#49432b,#1d251a 70%); box-shadow:inset 0 0 0 4px #131a15; vertical-align:middle; }
.portrait-seal b { font:26px Georgia,serif; }
.portrait-seal small { font-size:8px; text-transform:uppercase; letter-spacing:.6px; }
.seat-portrait .portrait-seal { width:88px; height:88px; flex-basis:88px; }
.seat-portrait .portrait-seal b { font-size:36px; }
#screen-lobby .pname { color:#f0dbac; font:20px Georgia,serif; overflow-wrap:anywhere; line-height:1.4; }
#screen-lobby .pmeta { line-height:1.8; margin-top:7px; font-size:11px; }
.ai-badge { background:#405038; color:#e6edcf; font:9px 'Segoe UI',sans-serif; letter-spacing:1px; border:1px solid #778466; }
#screen-lobby .seat-actions { justify-content:center; margin-top:14px; }
#screen-lobby .seat-actions button { font-size:10px; padding:5px 8px; }
#screen-lobby .seat.empty { background:#11160f8f; border-style:dashed; border-color:#6b684753; color:#b5a581; flex-direction:column; gap:7px; min-height:205px; }
.seat.empty svg { width:52px; height:52px; color:#aa8f56; }
.seat.empty strong { font:17px Georgia,serif; font-weight:400; }
.seat.empty > span { font-size:11px; }
#screen-lobby .seat.dm-seat { grid-column:1/-1; display:flex; align-items:center; gap:15px; text-align:left; padding:10px 20px; min-height:0; background:linear-gradient(90deg,#3a2a19,#181d14); }
#screen-lobby .dm-seat img { width:54px; height:54px; border:none; float:none; mix-blend-mode:screen; }
.dm-seat .forge-eyebrow { font-size:8px; }
.charter-heading { margin:28px 0 20px; }
.charter-heading h2 { font:28px Georgia,serif; color:#e9cc95; margin:0; }
#host-controls > .field:has(#premise) { padding:20px; border:1px solid #ab8b535f; border-radius:4px; background:linear-gradient(115deg,#493d26,#2e3020); }
#premise { background:#161b1380; border-color:#92805c; min-height:85px; line-height:1.65; }
.charter-choices { border:0; margin:20px 0; padding:0; display:grid; gap:10px; }
.charter-choices legend { margin-bottom:12px; color:#cdbc9b; font-size:12px; }
.tone-choices { grid-template-columns:repeat(5,minmax(0,1fr)); }
.difficulty-seals { grid-template-columns:repeat(3,minmax(0,1fr)); }
.charter-choice { position:relative; min-width:0; cursor:pointer; }
.charter-choice input { position:absolute; width:1px; height:1px; opacity:0; }
.choice-tile { display:flex; flex-direction:column; justify-content:flex-end; min-height:130px; padding:14px 10px; background-size:cover; background-position:center; border:1px solid #6e6345; border-radius:4px; transition:transform .2s,border-color .2s; }
.choice-tile strong { color:#f0dfbb; font:16px Georgia,serif; }
.choice-tile > span { color:#c5bba6; font-size:10px; margin-top:7px; line-height:1.4; }
.charter-choice input:checked + .choice-tile { border:2px solid #f0ca7e; padding:13px 9px; box-shadow:0 0 15px #e4b65920; }
.charter-choice input:checked + .choice-tile::before { content:'◆ SELECTED'; color:#f2cf8c; font-size:8px; letter-spacing:1px; margin-bottom:8px; }
.charter-choice input:focus-visible + .choice-tile { outline:3px solid #f3dca7; outline-offset:3px; }
.charter-choice:hover .choice-tile { transform:translateY(-2px); border-color:#ddbf83; }
.difficulty-seals .choice-tile { min-height:90px; align-items:center; justify-content:center; background:radial-gradient(ellipse,#3b3c28,#1e241a); }
.table-advanced,.import-box { border-top:1px solid #7a684047; padding:14px 0; }
.table-advanced summary { color:#cfbb91; cursor:pointer; font-size:12px; }
#btn-start { background:linear-gradient(#dbb873,#ab7a35); color:#21190d; border:1px solid #efcf90; border-radius:4px; font-size:16px; padding:15px; }
#btn-leave-lobby { margin-top:18px; font-size:12px; }
/* Keep the map itself unobstructed; decoration belongs on its frame. */
.map-pane { position:relative; border:7px solid #332c1d; box-shadow:inset 0 0 0 1px #a78b50; background:#101810; }
.map-header { background:linear-gradient(#342e21,#202419); border-bottom:1px solid #9c8151; color:#efd3a0; gap:8px; padding:12px; flex-wrap:wrap; }
#scene-title { flex:1; min-width:130px; font-size:17px; }
.code-badge { background:#5c5131; color:#f2dfb6; border:1px solid #927e4d; }
.side-pane { width:420px; border-left:3px double #a1844c; background:linear-gradient(90deg,#29261b,#1a1d16 8%,#1a1d16); }
.tabs { background:#151b13; border-color:#73613e; }
.tab { color:#bfb294; font-size:12px; }
.tab.active { background:#393b27; color:#f2d393; border-color:#d5ae63; }
.chronicle-heading { flex-shrink:0; padding:17px 16px; margin:0 0 12px; border:1px solid #82704166; background:linear-gradient(90deg,#151910f2,#182318a6),url('branding/hero-door.jpg') center 40%/cover; border-radius:3px; }
.chronicle-heading .forge-eyebrow { font-size:8px; letter-spacing:1.5px; }
.chronicle-heading h2 { margin:0; color:#e4cea1; font:22px Georgia,serif; }
.transcript { scroll-behavior:auto; }
.msg { border-radius:3px; line-height:1.65; padding:13px; font-size:14px; }
.msg.dm { background:linear-gradient(120deg,#393222,#2c2c1e); border-left:2px solid #d5b16d; color:#f3e4c5; font-family:Georgia,serif; font-size:15px; }
.msg.companion { background:#222e21; border-color:#92a474; }
.msg.player { background:#272e29; border-left:2px solid #899f95; }
.msg .who { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:9px; font:10px 'Segoe UI',sans-serif; letter-spacing:1px; }
.msg .who > img,.msg .who .portrait-seal { width:28px; height:28px; flex-basis:28px; object-fit:cover; border-radius:50%; }
.msg .who .portrait-seal b { font-size:14px; }.msg .who .portrait-seal small { display:none; }
.new-entry { animation:journal-entry .25s ease-out; }
.roll-flash { padding:18px; border:1px solid #caa158; border-radius:5px; background:radial-gradient(#484025,#191d14); font:26px Georgia,serif; text-align:center; animation:roll-reveal .4s ease-out; }
.combat-bar { background:#1c2117; border-color:#927a47; }
.init-pill.current { display:inline-flex; gap:8px; align-items:center; background:#413e26; border-color:#edc879; color:#ffe1a1; box-shadow:0 0 12px #e4b96140; }
.init-pill .portrait-seal,.init-pill img { width:26px; height:26px; flex:0 0 26px; object-fit:cover; border-radius:50%; }.init-pill .portrait-seal b { font-size:14px; }.init-pill .portrait-seal small { display:none; }
#tabletop-events { position:absolute; bottom:20px; left:20px; max-width:calc(100% - 40px); pointer-events:none; display:flex; flex-direction:column; gap:8px; }
.tabletop-event { padding:9px 14px; background:#141a12ee; border:1px solid #a88c53; border-radius:4px; font-size:13px; box-shadow:0 3px 15px #0006; animation:journal-entry .2s ease-out; }
.tabletop-event.damage { color:#ffb1a0; }.tabletop-event.healing { color:#b9e2a2; }
/* Dossiers and spell cards */
.sheet { background:linear-gradient(130deg,#353322,#20281c); border-radius:4px; border-color:#79643b; padding:16px; }
.sheet .head > div > b { font:20px Georgia,serif; color:#edd09a; }
.sheet .head .portrait-seal { width:60px; height:60px; }
.statgrid { gap:6px; margin:12px 0; }.statgrid div { background:#121b12; border:1px solid #73663c; border-radius:3px; padding:8px 0; color:#bfb499; font-size:10px; }.statgrid b { color:#f0d4a3; font:21px Georgia,serif; margin-top:4px; }
.hpbar { height:10px; border:1px solid #1b2216; }.hpbar i { background:linear-gradient(90deg,#567743,#a8ca76); }.hpbar i.low { background:linear-gradient(90deg,#973c2a,#f5906b); }
.xpbar i { background:linear-gradient(90deg,#85703d,#e5bf73); }
button.ability { padding:10px; border-radius:3px; background:#1c251a; text-align:left; line-height:1.5; }button.ability.spell { background:#262b30; border-color:#687888; }button.ability.spell .uses { color:#b9ccd9; }
.modal-card { width:620px; padding:30px; border-radius:6px; border:1px solid #a88b50; background:linear-gradient(115deg,#34301f,#1c251a 60%); }
.sheet-top { padding:0 0 20px; border-bottom:1px solid #8c744249; align-items:center; }.sheet-top h2 { color:#edcf92; font:28px Georgia,serif; padding-right:15px; }.sheet-top img,.sheet-top .portrait-seal { width:100px; height:100px; flex:0 0 100px; object-fit:cover; }.sheet-top .portrait-seal b { font-size:38px; }
.dossier-health { margin:16px 0; display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; }.dossier-health > span { color:#c0b38e; font-size:10px; letter-spacing:2px; }.dossier-health > strong { font-size:12px; color:#d5e3be; }.dossier-health .hpbar { width:100%; margin:0; }
.sheet-ability { border:1px solid #766844; background:#242e21; margin:7px 0; padding:12px; border-radius:4px; line-height:1.6; }.sheet-ability b { color:#efd7a9; }.sheet-ability .pmeta { color:#c1c0aa; }
.travel-pack { margin:20px 0; padding:15px; border:1px solid #856943; background:linear-gradient(120deg,#3c2d20,#24271b); border-radius:5px; }.travel-pack summary { cursor:pointer; color:#e1c394; font:18px Georgia,serif; }.travel-pack .inventory { margin-top:15px; }.item { border-radius:3px; padding:8px 10px; background:#141e14; }
.dm-desk-heading { border-bottom:1px solid #947a424f; padding:10px 0; }.dm-desk-heading h2 { color:#ecd19a; font:25px Georgia,serif; margin:7px 0; }.dm-desk-heading .forge-eyebrow { font-size:8px; }
.dm-desk-nav { display:flex; gap:5px; flex-wrap:wrap; padding:10px 0; }
.dm-desk-section { border:1px solid #79644166; padding:14px; background:#242a1ce0; margin:10px 0; border-radius:4px; scroll-margin-top:10px; }.dm-desk-section > h3 { margin:0 0 12px; font-size:17px; }
.dm-inbox-row { border:1px solid #ae935166; background:linear-gradient(120deg,#4b432a,#353821); border-radius:2px; padding:12px; box-shadow:0 4px 9px #0003; }
.dm-desk-section input,.dm-desk-section textarea,.dm-desk-section select { background:#111a12; }
@keyframes journal-entry { from { opacity:.4; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
@keyframes roll-reveal { from { opacity:.3; transform:scale(.92) rotate(-3deg); } to { opacity:1; transform:scale(1) rotate(0); } }
@media(max-width:860px) { .side-pane { width:100%; border-left:0; border-top:2px solid #8c7548; }.map-pane { border-width:4px; }.chronicle-heading { padding:8px 12px; }.chronicle-heading h2 { font-size:17px; }.chronicle-heading .forge-eyebrow { display:none; }.gathering-header { flex-wrap:wrap; }.gathering-header h2 { font-size:27px; }.gathering-header > img { width:58px; height:58px; }.invitation-plaque { margin-left:0; }.tone-choices { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:540px) { #screen-lobby { padding:12px 8px; }#screen-lobby .lobby-card { padding:17px; }.gathering-header { gap:12px; }.gathering-header > div:not(.invitation-plaque) { flex:1; }.gathering-header .forge-eyebrow { font-size:8px; letter-spacing:1px; }.invitation-plaque { width:100%; display:flex; justify-content:space-between; align-items:center; }.invitation-plaque > span { margin:0; }#screen-lobby .seats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }#screen-lobby .seat { padding:12px 9px; }#screen-lobby .pname { font-size:17px; }.seat-portrait .portrait-seal,#screen-lobby .seat-portrait img { width:66px; height:66px; flex-basis:66px; }.tone-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }.difficulty-seals { gap:6px; }.difficulty-seals .choice-tile { padding:10px 5px; min-height:100px; text-align:center; }.difficulty-seals .charter-choice input:checked + .choice-tile { padding:9px 4px; }.choice-tile strong { font-size:14px; }.choice-tile > span { font-size:9px; }.modal-card { padding:22px 16px; }.sheet-top img,.sheet-top .portrait-seal { width:70px; height:70px; flex-basis:70px; }.sheet-top h2 { font-size:22px; }.statgrid { gap:3px; }.statgrid b { font-size:17px; } }
@media(prefers-reduced-motion:reduce) { .new-entry,.roll-flash,.tabletop-event { animation:none; }.choice-tile { transition:none; }.hpbar i,.xpbar i { transition:none; } }

/* Illustrated campaign tones stay inside the host's adventure charter. */
.tone-choices { grid-template-columns:repeat(6,minmax(0,1fr)); gap:20px; margin:30px 0; padding:24px 0; border-top:1px solid #a4864e55; border-bottom:1px solid #a4864e55; }
.tone-choices legend { padding:0 14px 0 0; color:#efcf92; font:clamp(24px,3vw,32px)/1.2 Georgia,serif; }
.tone-intro { grid-column:1/-1; margin:0; color:#c8bda7; font-size:13px; line-height:1.6; }
.tone-change-note { grid-column:1/-1; grid-row:4; margin:0; padding:13px 16px; border:1px solid #8d9e6940; border-radius:4px; background:#8d9e690d; color:#c5c6ab; font-size:12px; line-height:1.7; text-align:center; }
.tone-choices .charter-choice { grid-column:span 2; display:block; margin:0; }
.tone-choices .charter-choice:nth-last-child(2) { grid-column:2/span 2; }
.tone-choices .choice-tile { position:relative; isolation:isolate; overflow:hidden; display:block; height:290px; padding:0; border:2px solid #897044; border-radius:6px; background:#15170f; box-shadow:0 10px 24px #0005; transition:transform .2s,border-color .2s,box-shadow .2s; }
.tone-choices .choice-tile > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 35%; transition:transform .4s; }
.tone-choices .choice-tile::after { content:''; position:absolute; inset:0; z-index:0; background:linear-gradient(transparent 32%,#11130e80 52%,#11130ef5 80%,#11130e); }
.tone-choices .tone-copy { position:absolute; bottom:0; left:0; right:0; z-index:1; padding:20px; margin:0; display:flex; flex-direction:column; gap:9px; }
.tone-choices .tone-copy strong { color:#f5dfb3; font:23px/1.15 Georgia,serif; }
.tone-choices .tone-copy > span { color:#d1c5af; font:12px/1.6 'Segoe UI',sans-serif; }
.tone-choices .tone-selected { position:absolute; top:12px; right:12px; z-index:1; margin:0; padding:7px 10px; border:1px solid #e4bd74; border-radius:3px; background:#282114f2; color:#ffe2a4; font-size:10px; letter-spacing:.5px; opacity:0; }
.tone-choices input:checked + .choice-tile { padding:0; border:2px solid #f0ca7e; box-shadow:0 0 0 3px #e4b65920,0 10px 24px #0006; }
.tone-choices input:checked + .choice-tile::before { content:none; }
.tone-choices input:checked + .choice-tile .tone-selected { opacity:1; }
.tone-choices .charter-choice:hover .choice-tile { transform:translateY(-3px); border-color:#ffe0a1; box-shadow:0 10px 28px #d9a04e20; }
.tone-choices .charter-choice:hover img { transform:scale(1.035); }
.storyteller-choice { display:block; cursor:pointer; }
.tone-choices .choice-tile > .tone-portrait { opacity:0; transition:opacity .45s ease,transform .4s; }
.tone-choices .storyteller-card.show-storyteller .tone-portrait,
.tone-choices .storyteller-choice input:focus-visible + .choice-tile .tone-portrait { opacity:1; }
@media (hover:hover) and (pointer:fine) {
  .tone-choices .storyteller-card:hover .tone-portrait { opacity:1; }
}
.storyteller-reveal { display:block; margin:10px auto 0; padding:6px 12px; color:#efcf92; background:transparent; border:1px solid #897044; border-radius:4px; font:12px/1.5 'Segoe UI',sans-serif; cursor:pointer; }
.storyteller-reveal:focus-visible { outline:3px solid #ffe0a1; outline-offset:3px; }
@media (prefers-reduced-motion:reduce) {
  .tone-choices .choice-tile > .tone-portrait { transition:none; }
}
.tone-choices input:focus-visible + .choice-tile { outline:3px solid #ffe0a1; outline-offset:4px; }
@media(max-width:860px) {
  .tone-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .tone-choices .charter-choice,.tone-choices .charter-choice:nth-last-child(2) { grid-column:auto; }
  .tone-choices .charter-choice:last-child { grid-column:1/-1; width:calc((100% - 16px)/2); justify-self:center; }
  .tone-change-note { grid-row:5; }
}
@media(max-width:540px) {
  .tone-choices { grid-template-columns:minmax(0,1fr); padding:18px 0; gap:14px; }
  .tone-choices .charter-choice:last-child { grid-column:auto; width:100%; }
  .tone-choices .choice-tile { height:280px; }
  .tone-choices .tone-copy { padding:18px; }
  .tone-change-note { grid-row:7; text-align:left; }
}
@media(prefers-reduced-motion:reduce) { .tone-choices .choice-tile,.tone-choices .choice-tile > img { transition:none; }.tone-choices .charter-choice:hover .choice-tile,.tone-choices .charter-choice:hover img { transform:none; } }
