/* Table organization follows the inspected BGA references; component art stays native to this game. */
body{background:#ede6d8}
.topbar{min-height:60px;padding:.4rem clamp(.75rem,1.5vw,1.75rem);border-bottom:2px solid #b3a991}
.wordmark{font-size:1.65rem}
.topbar nav button:not(.flag){border-left:1px solid #d3cbbd;border-radius:0;padding-inline:1rem}
.home,.lobby{max-width:1600px;min-height:calc(100dvh - 62px);padding-block:2rem}
.entry{padding-block:1.5rem;border-block:3px solid #a78a43}
.entry h2{font-size:clamp(1.8rem,2.6vw,2.8rem)}
.lobby-controls{padding:1.2rem;background:var(--cream);border:1px solid #b3a991;border-radius:8px;max-width:480px}
.lobby-controls .person{border-bottom:1px solid #d3cbbd;border-radius:0}
.game{max-width:2000px;padding:.65rem clamp(.5rem,1.1vw,1.25rem) 2rem}
.game .action-strip{min-height:72px;padding:.65rem 1rem;border:1px solid #9e9889;border-left:6px solid var(--green);border-radius:5px;box-shadow:0 2px 4px #42331c12}
.game .action-copy strong{font-size:1.08rem;line-height:1.4}
.game .action-buttons{width:auto}
.action-context{display:flex;align-items:center;gap:.8rem;min-width:0}
.game .action-card{width:44px;height:60px;flex:0 0 44px;padding:0;border:0;background:transparent}
.action-card img{display:block;width:100%;height:100%;object-fit:contain;border-radius:3px}
.game .choose-place{font-size:.8rem}
.table-nav{position:sticky;top:var(--action-height,72px);z-index:4;background:#ede6d8;display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:54px;margin-bottom:.5rem;border-bottom:1px solid #bcb29e}
.table-links,.table-tools{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap}
.table-links a{display:inline-flex;align-items:center;min-height:44px;padding:.55rem .8rem;font-size:.88rem;font-weight:700;color:var(--ink);text-decoration:none;border-bottom:3px solid transparent}
.table-links a:hover,.table-links a:focus-visible{border-bottom-color:var(--green);background:var(--cream)}
.table-links a[aria-current]{border-bottom-color:var(--green)}
.table-tools button{font-size:.8rem;border-color:transparent;background:transparent;padding:.45rem .6rem}
.table-tools button:hover{background:var(--cream);border-color:#bcb29e}
.game .table-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:auto auto auto;gap:1rem 1.2rem;align-items:start}
.game .table-layout>.board-area{grid-column:1;grid-row:1;min-width:0;order:initial;scroll-margin-top:90px}
.game .table-layout>.hand-area{grid-column:1;grid-row:2;min-width:0;order:initial;margin:0;padding:1rem 1.1rem;background:#fffdf6;border:1px solid #b3a991;border-top:3px solid #a78a43;border-radius:6px;scroll-margin-top:90px}
.game.knower-wait .hand-area{display:block}
.game .table-layout>.table-sidebar{position:sticky;top:calc(var(--action-height,72px) + var(--nav-height,54px) + 12px);max-height:calc(100dvh - var(--action-height,72px) - var(--nav-height,54px) - 24px);overflow-y:auto;overscroll-behavior:contain;grid-column:2;grid-row:1/4;min-width:0;order:initial;scroll-margin-top:90px;display:flex;flex-direction:column;gap:1rem;padding:2px}
.game .table-layout>.table-cards{grid-column:1;grid-row:3;order:initial;margin:0;padding:1rem 1.1rem;border:1px solid #b3a991;border-radius:6px;background:#f6f0e4;scroll-margin-top:90px}
.game .category-guide{margin:0 0 .6rem;padding:.35rem .8rem .6rem;background:var(--cream);border:1px solid #b3a991;border-radius:6px}
.game .guide-heading h3{font-size:.8rem;font-weight:400;color:var(--muted)}
.game .guide-heading button{padding:.3rem .4rem}
.game .guide-rings{grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;margin:0}
.game .guide-rings>div{display:block;padding:0}
.game .guide-rings p{font-size:.78rem;line-height:1.35;margin:.35rem 0 0}
.game .guide-rings .category{font-size:.8rem}
.game .guide-note{margin-top:.45rem;font-size:.7rem}
.game .camera-controls{margin:.25rem 0 .4rem;gap:.35rem}
.game .zoom-slider{max-width:220px;min-width:100px}
.game .camera-hint{margin:0 0 .45rem;font-size:.74rem}
.game .board-viewport{height:clamp(640px,calc(100dvh - 160px),920px);border-color:#94876d;border-radius:6px;background:#faf6ed}
.game .board-viewport .board-card{pointer-events:auto}
.game .board-area,.game .hand-area,.game .table-cards,.game .table-sidebar{scroll-margin-top:calc(var(--action-height,72px) + var(--nav-height,54px) + 16px)!important}
.game .placement-targets{gap:.35rem;margin-top:.5rem}
.game .placement-targets button{flex:1 1 130px;background:#fffdf6;font-size:.76rem}
.game .placement-targets button[aria-pressed=true]{background:var(--green);color:#fff}
.game .receipt:empty{display:none}
.game .receipt{margin:.5rem 0 0}
.game .hand-heading{padding:0 0 .35rem;flex-wrap:wrap;align-items:start;gap:.6rem}
.game .hand-heading h2{font-size:1.15rem;margin-bottom:.3rem}
.game .hand-heading .fine{font-size:.8rem;line-height:1.4;display:block;max-width:600px}
.game .hand-heading button{padding:.4rem .65rem;font-size:.78rem}
.game .card-size{justify-content:flex-end;gap:.6rem;margin-bottom:.25rem}
.game .hand{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:start;gap:.8rem;padding:.7rem 0 .4rem}
.game .hand .thing-card{width:min(var(--card-size,140px),100%);max-width:var(--card-size,140px);flex-shrink:0}
.game .english-note{font-size:.74rem;text-align:left;max-width:none;margin-top:.3rem}
.game .preview-hint{font-size:.74rem;margin-top:.4rem}
.table-sidebar>section{padding:.85rem;background:var(--cream);border:1px solid #b3a991;border-radius:6px}
.table-sidebar>section:empty{display:none}
.table-sidebar h2{font-size:1rem;margin-bottom:.65rem}
.room-info>div{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.room-info span{font-size:.8rem;color:var(--muted)}
.room-info strong{font-size:1rem;font-variant-numeric:tabular-nums;letter-spacing:.04em}
.room-info p{font-size:.8rem;margin-top:.35rem;color:var(--muted)}
.room-info .table-tools{margin-top:.5rem;justify-content:space-between;border-top:1px solid #d3cbbd;padding-top:.25rem}
.room-info .table-tools button{font-size:.75rem;padding-inline:.35rem}
.game .players-rail{display:flex;flex-direction:column;align-items:stretch;gap:.4rem;padding:0;margin:0 0 .6rem}
.game .players-rail .person{flex:initial;max-width:none;min-width:0;min-height:64px;margin:0;padding:.55rem .45rem .55rem 1.1rem;background:#f4efdf;border-radius:4px}
.game .players-rail .person.active{background:#e6efdf;outline:2px solid #27653e;position:relative}
.game .players-rail .person.active::before{content:'▸';left:0;top:50%;transform:translateY(-50%);font-size:20px;line-height:1;color:var(--green)}
.game .person .initial{display:grid;width:32px;height:32px;font-size:.95rem}
.game .person-name{font-size:.85rem}
.game .person-name>small{font-size:.72rem}
.game .person strong{font-size:1.25rem}
.players-panel>p{font-size:.72rem}
.game .move-recap{gap:.65rem;padding:0}
.game .move-recap .recap-card{width:56px;flex-basis:56px;min-width:56px;align-items:start}
.game .move-recap strong{font-size:.85rem;line-height:1.4}
.game .move-recap p{font-size:.78rem;line-height:1.4}
.game .move-recap .fine{font-size:.74rem}
.game #side-area{padding:.85rem;grid-column:auto;grid-row:auto}
.game .private-rules{display:flex;flex-direction:column;gap:.8rem}
.game .private-rules .rule-card{display:grid;grid-template-columns:68px minmax(0,1fr);text-align:left;align-items:center;gap:.65rem}
.game .private-rules .rule-card img{width:68px}
.game .private-rules .rule-card span{font-size:.8rem;line-height:1.4}
.game #finder-assist .role-tip,.game #knower-assist .role-tip{font-size:.8rem;margin:.5rem 0 .75rem}
.game.is-knower #finder-assist{display:none}
.game .role-examples{font-size:.78rem;padding:.4rem .6rem}
.game .finder-notes{border-top:1px solid #d3cbbd;margin-top:.8rem}
.game .finder-notes summary{font-size:.8rem;padding-block:.75rem}
.game .finder-notes label{font-size:.8rem}
.game .membership-checklist strong{font-size:.8rem}
.game .section-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.game .section-heading h2{font-size:1.1rem}
.game .section-heading .button{font-size:.78rem;padding:.4rem .65rem}
.game .count{font-variant-numeric:tabular-nums;font-size:.9rem;color:var(--muted);margin-left:.4rem}
.game .public-tray{padding:1rem 0}
.game .public-trays{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:0 1.2rem}
.game .tray-cards{gap:.8rem}
.empty-table{padding:1.5rem 0;color:var(--muted)}
.card-preview{position:fixed;z-index:22;width:min(245px,calc(100vw - 24px));padding:8px;background:var(--cream);border:1px solid #8b806a;border-radius:7px;box-shadow:0 8px 24px #30271840;pointer-events:none}
.card-preview img{display:block;width:100%;max-height:calc(100dvh - 90px);object-fit:contain;border-radius:4px}
.card-preview strong{display:block;text-align:center;font-size:.88rem;margin:.4rem 0 .15rem}
@media(min-width:1600px){
  .game .table-layout{grid-template-columns:minmax(0,1fr) 300px;gap:1.2rem 1.5rem}
  .table-sidebar>section{padding:1rem}
  .game .guide-rings p{font-size:.85rem}
}
@media(max-width:1050px){
  .game .table-layout{grid-template-columns:minmax(0,1fr) 245px;gap:1rem}
  .game .board-viewport{height:640px}
  .game .guide-rings{grid-template-columns:1fr;gap:.4rem}
  .game .guide-rings>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:.6rem;align-items:start}
  .game .guide-rings p{margin:0}
  .game .table-nav{gap:.4rem;flex-wrap:wrap;padding-block:.3rem}
  .game .table-links a{padding-inline:.6rem}
  .game .camera-controls .pan-controls{margin-left:auto}
  .game .hand{gap:.6rem}
}
@media(max-width:780px){
  .topbar{flex-wrap:wrap;gap:.3rem .6rem}
  .topbar nav{gap:.1rem}
  .topbar nav button:not(.flag){padding-inline:.55rem;font-size:.75rem}
  .wordmark{font-size:1.4rem}
  .game .table-layout{display:flex;flex-direction:column;gap:1rem}
  .game .table-layout>.board-area{order:1;width:100%}
  .game .table-layout>.hand-area{order:2;width:100%;padding:.8rem}
  .game .table-layout>.table-sidebar{position:static;max-height:none;overflow:visible;padding:0;order:4;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
  .game .table-layout>.table-cards{order:3;width:100%;padding:.8rem}
  .game .table-sidebar #side-area,.game #finder-assist{grid-column:1/-1}
  .game .table-sidebar .room-info{grid-column:1/-1}
  .game .table-nav{align-items:stretch;gap:0;flex-direction:column;min-width:0}
  .game .table-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}
  .game .table-links a{font-size:.76rem;text-align:center;justify-content:center;padding:.4rem .2rem;overflow-wrap:anywhere}
  .game .table-tools{justify-content:flex-end}
  .game .table-tools button{font-size:.75rem;min-height:44px}
  .game .board-viewport{height:clamp(400px,65dvh,620px)}
  .game .category-guide{padding:.3rem .65rem .55rem}
  .game .camera-controls{gap:.3rem}
  .game .camera-controls .pan-controls{flex-basis:auto;justify-content:flex-end}
  .game .zoom-slider{max-width:none;flex:1 1 110px;min-width:80px}
  .game .hand-heading{align-items:start}
  .game .hand-heading>div{flex:1 1 170px}
  .game .card-size{justify-content:flex-start;margin-block:.25rem}
  .game .private-rules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .game .private-rules .rule-card{display:flex;flex-direction:column;align-items:center;text-align:center}
  .game .private-rules .rule-card img{width:85px}
  .game .action-strip{min-height:80px;gap:.5rem;flex-wrap:wrap;padding:.65rem .7rem}
  .game .action-copy strong{font-size:.9rem}
  .game .action-buttons{flex-wrap:wrap}
  .game .action-buttons .choose-place{display:none}
}
@media(max-width:420px){
  .topbar nav{width:100%;justify-content:space-between}
  #connection{margin-left:auto;max-width:none}
  .topbar nav button:not(.flag){max-width:none;white-space:normal}
  .game .action-buttons:has(button){width:100%}
  .game .action-buttons .confirm{flex:1}
  .game .table-sidebar{display:flex!important}
  .game .board-viewport{height:420px}
  .game .placement-targets button{min-width:0}
  .game .camera-controls .pan-controls{flex-basis:100%;justify-content:center;margin:0}
  .game .hand-heading button{font-size:.75rem}
  .game .section-heading h2{font-size:1rem}
  .game .tray-cards,.game .hand{gap:.5rem}
  .game .hand .thing-card,.game .tray-card{width:min(var(--card-size,140px),calc((100% - .5rem)/2));max-width:var(--card-size,140px)}
  .game .private-rules{grid-template-columns:1fr}
  .game .private-rules .rule-card{display:grid;grid-template-columns:68px minmax(0,1fr);text-align:left}
  .game .private-rules .rule-card img{width:68px}
}
