.table{background:#e8d9af;--map-height:clamp(360px,calc((100vw - clamp(330px,29vw,440px) - 60px)*.47),680px)}
.table .table-header{padding:8px 20px;gap:18px;background:#f2e5c3;border-bottom:1px solid #aa8f58;flex-wrap:wrap}
.table .table-header h1{font-size:1.5rem;min-width:0;overflow-wrap:anywhere}
.table .table-header nav{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.table .wordmark{width:auto;min-width:112px;transform:none}
.table .wordmark b{font-size:1.25rem}
.village-status{display:flex;align-items:center;justify-content:space-between;gap:8px 24px;padding:8px 20px;flex-wrap:wrap}
.table .supplies{padding:0;gap:12px 22px;justify-content:flex-start;flex:1}
.table .supply{gap:6px}
.table .supply img{width:34px;height:34px}
.table .supply strong{font-size:1.4rem;font-variant-numeric:tabular-nums}
.table .supply span{font-size:.83rem}
.table .calendar{gap:12px;padding:4px 10px;font-size:.83rem;box-shadow:0 2px 0 #ad9258;transform:rotate(-1deg)}
.table .calendar b{font-size:1.4rem}
.table .players{justify-content:flex-end;padding:0;gap:8px 16px}
.table .player{font-size:.9rem;gap:5px}
.table .player-initial{width:30px;height:30px}
.action-strip{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:16px;min-height:64px;margin-bottom:8px;padding:7px 20px;background:#fff5db;border-block:1px solid #aa8f58;box-shadow:0 3px 5px #68543314}
#turn-banner{display:flex;flex:1;min-width:0;align-items:baseline;gap:12px;border-left:4px solid #31553d;padding-left:12px}
#turn-banner strong{font-size:1rem;white-space:nowrap;color:#284a33}
#turn-banner>span{font-size:.95rem;line-height:1.4}
.table-navigation{display:flex;gap:2px;align-items:center}
.table-navigation a{min-height:44px;display:flex;align-items:center;gap:7px;padding:8px 12px;color:#40351f;text-decoration:underline;text-underline-offset:5px;font-weight:800;border-radius:4px}
.table-navigation a:hover{background:#e9ddb9}
.table-navigation a:focus-visible{outline:3px solid #963b2b;outline-offset:1px}
.table-navigation a span,.card-tray-heading h2 span{font-family:'Nunito Sans',sans-serif;font-size:.82rem;font-weight:700;color:#665333}
.action-strip #undo{margin-left:auto;font-size:.85rem}
.table .play-area,.table[data-phase=story] .play-area,.table[data-phase=setup] .play-area{grid-template-columns:minmax(0,1fr) clamp(330px,29vw,440px);padding:0 20px;gap:20px;align-items:start;flex:none}
.table[data-phase=placement] .play-area{grid-template-columns:minmax(0,1fr) clamp(275px,23vw,350px)}
.table .board-heading{height:48px;margin:0 0 8px;flex-wrap:nowrap}
.table .board-heading h2{font-size:1.35rem;margin:0}
.table .map-controls{flex-wrap:nowrap;gap:4px}
.table .map-controls button{min-height:44px;padding:7px 10px;white-space:nowrap}
.table .map-viewport{height:var(--map-height);min-height:0;border-radius:7px;background:#b7b888;box-shadow:inset 0 0 0 1px #768253,inset 0 4px 18px #52653630}
.table .story-stage{align-self:start;padding:0 5px 12px;max-height:min(calc(100dvh - 213px),max(510px,var(--map-height)));margin-top:56px;scrollbar-gutter:stable;scroll-padding:12px}
.table .story-sheet{transform:none;border-radius:4px 11px 9px 4px;padding:24px;box-shadow:2px 3px 0 #c1a675,4px 6px 0 #f6e7bf,5px 8px 8px #7e674322}
.table .story-sheet h2{font-size:clamp(1.7rem,2.1vw,2.3rem);line-height:1.15;overflow-wrap:anywhere}
.table .story-text p{font-size:1.12rem;line-height:1.65}
.table .story-top{align-items:start}
.table .page-label{margin-bottom:12px}
.table .story-choices{gap:9px;margin-top:20px}
.table .story-choice{padding:12px;min-height:58px;border-radius:5px 8px 7px 5px}
.table .story-top button{min-height:44px}
.table .sticker-choices{grid-template-columns:1fr 1fr}
.table .sticker-choice img{max-height:200px}
.table .milestones{padding:6px 0;justify-content:flex-end}
.table .milestones:empty{display:none}
.table .milestones button{font-size:.8rem;min-height:44px;padding:6px 12px}
.table .card-tray{margin:12px 20px 0;padding-top:16px;border-top:1px solid #b6a06e;scroll-margin-top:80px}
.card-tray-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px 24px;flex-wrap:wrap}
.table .card-tray h2{font-size:1.4rem;margin:0}
.card-tray-heading h2 span{margin-left:8px}
.card-tray-heading p{font-size:.88rem;margin:0;color:#5b4c30}
.table .card-fan{gap:18px;padding:18px 7px 16px;align-items:start}
.table .catalog-card{flex:0 0 185px;width:185px;transform:rotate(calc(var(--fan)*.5deg));border-radius:4px}
.table .catalog-card>span{font-size:.9rem;text-align:left;line-height:1.35;padding:8px 2px;overflow-wrap:anywhere}
.table .catalog-card:hover:not(:disabled){transform:translateY(-5px);background:none}
.table .catalog-card:is(:hover,:focus-visible)>img{animation:none}
.table .table-footer{padding:14px 20px 20px;gap:8px;margin-top:auto}
.table .table-footer button{font-size:.85rem}
#map-section,#story-stage{scroll-margin-top:82px}
#card-peek{position:fixed;z-index:90;width:300px;padding:10px;background:#fff5d9;border:1px solid #8b7247;border-radius:7px;box-shadow:0 10px 30px #302b2450;pointer-events:none}
#card-peek[hidden]{display:none}
#card-peek img{display:block;width:100%;height:min(440px,66dvh);object-fit:contain}
#card-peek span{display:block;font-weight:800;padding:8px 2px 0}
.component-dialog .dialog-heading{position:sticky;top:0;z-index:3}
.music-source{display:grid;grid-template-rows:44px 44px;align-items:start;gap:2px;width:220px;max-width:100%;flex:0 0 220px;margin-inline:6px}
.music-source label{margin:0;max-width:100%}
.music-source-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.music-source select{width:138px;max-width:100%;min-height:44px;padding:6px 10px;font-size:.85rem;background:#fff6df;border-color:#806c43;cursor:pointer}
.radio-caption{display:flex;align-items:center;gap:6px;width:220px;max-width:100%;height:44px;font-size:.72rem;line-height:1.3;color:#5b4c30}
.radio-caption output{flex:0 1 auto;min-width:0;overflow-wrap:anywhere}
.radio-caption a,.radio-caption button{flex-shrink:0}
.radio-caption a{color:#31553d;text-underline-offset:3px;min-height:44px;display:inline-flex;align-items:center}
.radio-caption [hidden]{display:none}
.radio-caption button{min-height:44px;padding:3px 5px;font-size:.72rem}
.radio-caption:has(output:empty) a[hidden]{display:none}
@media(min-width:801px){
  .table[data-phase=yearEnd] .play-area,.table[data-phase=finished] .play-area{grid-template-columns:minmax(0,1fr)}
  .table[data-phase=yearEnd] .story-stage,.table[data-phase=finished] .story-stage{margin-top:0;max-height:85%;padding:6px}
}
@media(max-width:1100px){
  .table .table-header nav{width:100%;justify-content:flex-start}
  .table .table-header h1{text-align:right}
  .village-status{gap:8px 16px}
  .table .supplies{gap:10px 16px}
  .action-strip{gap:8px}
  #turn-banner{flex-direction:column;gap:2px}
  .table .play-area,.table[data-phase=story] .play-area,.table[data-phase=setup] .play-area{grid-template-columns:minmax(0,1fr) 330px;gap:14px;padding:0 14px}
  .table[data-phase=placement] .play-area{grid-template-columns:minmax(0,1fr) 275px}
  .table .board-heading h2{font-size:1.15rem}
  .table .story-sheet{padding:20px}
}
@media(max-width:1000px){
  .table .table-header{padding:8px 12px;gap:8px 12px}
  .table .table-header h1{font-size:1.3rem}
  .table .table-header nav{justify-content:center;gap:3px}
  .table .table-header nav>.quiet{font-size:.85rem;padding:6px}
  .village-status{padding:8px 12px;gap:8px}
  .table .supplies{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px 8px;flex-basis:100%}
  .table .supply{gap:4px;min-width:0}
  .table .supply img{width:30px;height:30px}
  .table .supply>span:not(.heart){position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .table .supply.happiness{grid-column:1/2}
  .table .supply:nth-child(6)>span{position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal;font-size:.8rem}
  .table .supply:nth-child(6){grid-column:2/3}
  .table .calendar{grid-column:3/5;justify-content:center;font-size:.8rem;gap:8px}
  .table .players{width:100%;justify-content:flex-start;gap:6px 14px}
  .table .player{min-height:32px}
  .action-strip{flex-wrap:wrap;padding:7px 12px;gap:3px 8px;margin-bottom:4px}
  #turn-banner{flex:1 1 230px;gap:1px;padding-left:9px}
  #turn-banner strong{font-size:.95rem}
  #turn-banner>span{font-size:.85rem}
  .table-navigation{flex:1;order:2}
  .table-navigation a{padding:7px 12px;font-size:.88rem}
  .action-strip #undo{order:3}
  .table .play-area,.table[data-phase=story] .play-area,.table[data-phase=setup] .play-area,.table[data-phase=placement] .play-area{display:flex;flex-direction:column;padding:0 10px;gap:0}
  .table .map-section{width:100%}
  .table .board-heading{height:auto;min-height:48px;flex-wrap:wrap;gap:4px;margin-bottom:5px}
  .table .board-heading h2{font-size:1.2rem}
  .table .map-controls button{font-size:.8rem;padding:6px 8px;min-height:44px}
  .table .map-viewport{height:clamp(230px,62vw,430px);min-height:0;max-height:none}
  .table[data-phase=placement] .map-viewport{height:48dvh;min-height:300px;max-height:530px}
  .table .story-stage{width:100%;max-height:none;overflow-x:clip;overflow-y:visible;scrollbar-gutter:auto;margin:12px 0 0;padding:0 4px 12px}
  .table .story-sheet{width:100%;min-width:0;max-width:none;padding:22px}
  .table .story-sheet h2{font-size:1.85rem}
  .table .story-text p{font-size:1.12rem}
  .table .card-tray{margin:12px 14px 0}
  .card-tray-heading{gap:3px}
  .card-tray-heading p{font-size:.82rem}
  .table .catalog-card{flex-basis:160px;width:160px}
  .table .card-fan{gap:14px}
  .table .table-footer{padding:12px;gap:6px}
  #map-section,#story-stage,.table .card-tray{scroll-margin-top:130px}
  #card-peek{display:none}
  .table[data-phase=yearEnd] .story-stage,.table[data-phase=finished] .story-stage{position:relative;inset:auto;width:100%;margin-top:12px;max-height:none}
}
@media(max-width:360px){
  .table .table-header nav{justify-content:flex-start}
  .table .table-header nav>.paper-button{flex:1}
  .table .supply:nth-child(6)>span{font-size:.7rem}
  .table .calendar{font-size:.75rem;padding-inline:5px}
  .table .story-sheet{padding:20px 17px}
  .table .story-sheet h2{font-size:1.65rem}
}
@media(prefers-reduced-motion:reduce){.table .play-area{transition:none}.table .catalog-card{transform:none}}
.calm .table .play-area{transition:none}
.calm .table .catalog-card{transform:none}
