/* A shared touch layout; all artwork and game coordinates remain owned by each game. */
#cc-play-tools{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;box-sizing:border-box;padding:4px max(6px,env(safe-area-inset-right)) 4px max(6px,env(safe-area-inset-left));padding-top:max(4px,env(safe-area-inset-top));background:#171f31;color:#fff0d0;border-bottom:2px solid #b1814c;font:600 14px/1.2 system-ui,sans-serif;letter-spacing:normal}
#cc-play-tools[hidden]{display:none!important}
#cc-play-tools button,#cc-play-tools a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;box-sizing:border-box;margin:0;padding:7px 8px;flex:0 1 auto;border:1px solid #edc67e;border-radius:6px;background:#24354a;color:#fff0d0;font:inherit;letter-spacing:normal;text-decoration:none;white-space:nowrap;cursor:pointer;touch-action:manipulation}
#cc-play-tools button:hover,#cc-play-tools a:hover{background:#344c65;color:#fff0d0}
#cc-play-tools :focus-visible{outline:3px solid #9ce6ff;outline-offset:-4px}
.cc-play-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html.cc-mobile-play{scroll-padding-top:var(--cc-play-bar,54px)}
html.cc-mobile-play body{margin:0;min-height:100dvh}
html.cc-mobile-play body[data-cc-game=road] #room-site-header,html.cc-mobile-play body[data-cc-game=coach]>.room-site-header{display:none}
html.cc-mobile-play :is(.app-shell,.main-shell,.workspace){min-width:0}
html.cc-mobile-play body[data-cc-game=road] .app-shell,html.cc-mobile-play body[data-cc-game=coach] .app-shell{display:block;min-height:calc(100dvh - var(--cc-play-bar,54px))}
html.cc-mobile-play body[data-cc-game=road] .workspace,html.cc-mobile-play body[data-cc-game=coach] .main-shell{margin-left:0;width:100%}
html.cc-mobile-play body[data-cc-game=road] .rail,html.cc-mobile-play body[data-cc-game=coach] .sidebar{display:none}
html.cc-mobile-play.cc-game-menu-open body[data-cc-game=road] .rail,html.cc-mobile-play.cc-game-menu-open body[data-cc-game=coach] .sidebar{display:flex;position:static;inset:auto;flex-direction:column;width:100%;height:auto;padding:8px;box-sizing:border-box}
html.cc-mobile-play.cc-game-menu-open :is(.rail,.sidebar) .brand,html.cc-mobile-play.cc-game-menu-open .sidebar :is(.coming,.nav-label,.sidebar-bottom){display:none}
html.cc-mobile-play.cc-game-menu-open :is(.rail,.sidebar) nav{display:flex;flex-wrap:wrap;gap:6px;overflow:visible}
html.cc-mobile-play.cc-game-menu-open :is(.rail,.sidebar) nav :is(button,a){min-height:44px;min-width:44px;flex:1 1 110px;white-space:normal}
html.cc-mobile-play body[data-cc-game=road] .topbar{height:auto;min-height:36px;padding:4px 10px}
html.cc-mobile-play body[data-cc-game=road] .wordmark{font-size:17px}
html.cc-mobile-play body[data-cc-game=road] .wordmark span{display:none}
html.cc-mobile-play body[data-cc-game=road] .page{padding:12px max(10px,env(safe-area-inset-right)) 24px max(10px,env(safe-area-inset-left))}
html.cc-mobile-play body[data-cc-game=road] .play-layout{display:flex;flex-direction:column;width:100%;max-width:none;gap:14px}
html.cc-mobile-play body[data-cc-game=road] .board-column{width:100%;max-width:720px;margin-inline:auto;order:0}
html.cc-mobile-play body[data-cc-game=road] .game-aside{width:100%;max-width:720px;margin-inline:auto;order:1}
html.cc-mobile-play body[data-cc-game=road] .illustrated-window{order:2;width:100%;max-width:720px;margin-inline:auto}
html.cc-mobile-play body[data-cc-game=road] .illustrated-study .game-aside{display:block}
html.cc-mobile-play body[data-cc-game=road] .illustrated-study .play-layout{padding:8px;gap:12px}
html.cc-mobile-play body[data-cc-game=road] .game-heading{margin-bottom:10px}
html.cc-mobile-play body[data-cc-game=road] .board-frame{max-width:none;width:100%;box-sizing:border-box}
html.cc-mobile-play body[data-cc-game=coach] main{padding:12px max(10px,env(safe-area-inset-right)) 24px max(10px,env(safe-area-inset-left))}
html.cc-mobile-play body[data-cc-game=coach] .topbar{padding:8px 10px;min-height:54px}
html.cc-mobile-play body[data-cc-game=coach] :is(.review-grid,.practice-grid){grid-template-columns:minmax(0,1fr);gap:18px}
html.cc-mobile-play body[data-cc-game=coach] :is(.board-section,.practice-grid>.board-frame){width:100%;max-width:720px;margin-inline:auto}
html.cc-mobile-play body[data-cc-game=coach] .board-frame{max-width:100%;box-sizing:border-box}
html.cc-mobile-play body[data-cc-game=coach] .page-heading{margin-block:12px}
html.cc-mobile-play body[data-cc-game=cellar] .mast{padding:6px max(10px,env(safe-area-inset-left));gap:8px}
html.cc-mobile-play body[data-cc-game=cellar] .mast .brand{display:none}
html.cc-mobile-play body[data-cc-game=cellar] .mast .tools{display:flex;width:100%;gap:8px}
html.cc-mobile-play body[data-cc-game=cellar] .tools button{flex:1;min-height:44px}
html.cc-mobile-play body[data-cc-game=cellar] #game{max-width:none;padding:12px max(10px,env(safe-area-inset-right)) 24px max(10px,env(safe-area-inset-left))}
html.cc-mobile-play body[data-cc-game=cellar] .interaction{grid-template-columns:minmax(0,1fr);padding:10px;gap:12px}
html.cc-mobile-play body[data-cc-game=cellar] .workbench{min-width:0;padding:0}
html.cc-mobile-play body[data-cc-game=cellar] .cabinet-wrap{width:100%;max-width:680px}
html.cc-mobile-play body[data-cc-game=cellar] .study{height:clamp(420px,68svh,600px);min-height:420px}
html.cc-mobile-play body[data-cc-game=cellar] .companion .portrait{max-height:100px}
html.cc-mobile-play body[data-cc-game=hold]{height:auto;overflow:auto}
html.cc-mobile-play:has(body[data-cc-game=hold]){height:auto;overflow:auto}
html.cc-mobile-play body[data-cc-game=hold] #game{height:auto;min-height:calc(100dvh - var(--cc-play-bar,54px));max-width:none;padding:8px max(8px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));gap:8px}
html.cc-mobile-play body[data-cc-game=hold] #game>header{flex-wrap:wrap;gap:8px}
html.cc-mobile-play body[data-cc-game=hold] #game>header>a{display:none}
html.cc-mobile-play body[data-cc-game=hold] h1{font-size:24px}
html.cc-mobile-play body[data-cc-game=hold] .resources{margin-left:auto;gap:6px;font-size:14px}
html.cc-mobile-play body[data-cc-game=hold] .battle-layout{container-type:normal;display:flex;flex-direction:column;align-items:stretch;flex:none;gap:10px;min-height:0}
html.cc-mobile-play body[data-cc-game=hold] #battlefield{order:0;width:100%;min-width:0;height:auto;max-height:none;aspect-ratio:1280/840;flex:none;align-self:center}
html.cc-mobile-play body[data-cc-game=hold] .workshop{order:1;width:100%;gap:10px}
html.cc-mobile-play body[data-cc-game=hold] .adviser{order:2;max-height:none;width:100%;display:flex;flex-direction:row;align-items:center;gap:12px}
html.cc-mobile-play body[data-cc-game=hold] .adviser img{width:64px;height:76px}
html.cc-mobile-play body[data-cc-game=hold] .adviser :is(.legend,#layout-name,#guidance){display:none}
html.cc-mobile-play body[data-cc-game=hold] #tools{display:flex;flex-wrap:wrap;gap:6px;overflow:visible}
html.cc-mobile-play body[data-cc-game=hold] #tools button{flex:1 1 100px;min-height:48px;font-size:13px;line-height:1.3;padding:6px}
html.cc-mobile-play body[data-cc-game=hold] :is(#map-view,.replay button,#selection-actions button,.orders button){min-height:44px;font-size:13px}
html.cc-mobile-play body[data-cc-game=hold] :is(#selection-name,#selection-stats,#mode-current,#phase,#notice){font-size:14px;line-height:1.4}
html.cc-mobile-play body[data-cc-game=hold] footer{height:auto;min-height:54px}
@media(orientation:landscape) and (min-width:700px){html.cc-mobile-play body[data-cc-game=hold] .battle-layout{display:grid;grid-template-columns:minmax(0,1fr) 190px;align-items:start}html.cc-mobile-play body[data-cc-game=hold] #battlefield{grid-column:1;grid-row:1}html.cc-mobile-play body[data-cc-game=hold] .workshop{grid-column:2;grid-row:1}html.cc-mobile-play body[data-cc-game=hold] .adviser{grid-column:1/-1;grid-row:2}html.cc-mobile-play body[data-cc-game=hold] #tools button{flex-basis:80px}}

html.cc-mobile-play body[data-cc-game=cellar] .mast{display:none}
html.cc-mobile-play.cc-game-menu-open body[data-cc-game=cellar] .mast{display:flex}
html.cc-mobile-play.cc-game-menu-open body[data-cc-game=coach] .sidebar-bottom{display:block;padding:8px;margin:0}
html.cc-mobile-play.cc-game-menu-open body[data-cc-game=coach] .sidebar-bottom p{display:none}

html.cc-mobile-play body{padding-bottom:env(safe-area-inset-bottom)}

html.cc-mobile-play body[data-cc-game=road] .illustrated-study :is(.player-strip small,.ledger-title,.empty-ledger,.board-caption){color:#51493e}
html.cc-mobile-play body[data-cc-game=road] .illustrated-study .player-strip :is(strong,small){font-size:14px}

/* One obvious launch action; secondary display settings only appear with Menu. */
#cc-play-tools .cc-play-intro{flex:1 0 100%;padding:4px 6px}
#cc-play-tools .cc-play-intro strong{display:block;font:700 21px/1.2 Georgia,serif;color:#fff0d0}
#cc-play-tools .cc-play-intro p{font:400 14px/1.4 system-ui,sans-serif;color:#fff0d0;margin:4px 0 2px}
#cc-play-tools [data-cc-full],#cc-mode-launch [data-cc-full]{background:#e3ac48;color:#171f31;border:2px solid #f8d99c;font:800 19px/1.2 system-ui,sans-serif;min-height:58px;flex:1 0 100%;white-space:normal;padding:10px 16px}
#cc-play-tools [data-cc-full]:hover,#cc-mode-launch [data-cc-full]:hover{background:#f5c76f;color:#171f31}
#cc-play-tools>[data-cc-menu],#cc-play-tools>a{flex:1 1 80px}
#cc-play-tools [hidden],#cc-mode-launch[hidden]{display:none!important}
#cc-play-tools.cc-play-started .cc-play-intro{display:none}
#cc-play-tools.cc-play-started [data-cc-full]{flex:2 1 130px;min-height:44px;font-size:15px;padding:7px 8px}
#cc-play-tools.cc-play-started>a,#cc-play-tools.cc-play-started>[data-cc-menu]{flex:1 1 55px}
#cc-mode-launch{margin:0 0 18px;padding:0 0 14px;border-bottom:1px solid #b1814c}
#cc-mode-launch [data-cc-full]{display:block;width:100%;box-sizing:border-box;cursor:pointer;border-radius:6px}
#cc-mode-launch p{font:400 14px/1.4 system-ui,sans-serif;margin:8px 0;color:#fff0d0}
#cc-mode-launch [data-cc-full]:focus-visible{outline:3px solid #171f31;outline-offset:3px}

/* Clean game view uses this browser tab; no installation or save-container switch. */
html.cc-clean-play{min-height:100%;background:#171f31}
html.cc-clean-play body{width:100%;min-height:100dvh;box-sizing:border-box;margin:0;scroll-padding-top:var(--cc-play-bar,54px)}
html.cc-clean-play #cc-play-tools{z-index:40}
html.cc-clean-play #cc-play-tools>a,html.cc-clean-play #cc-play-tools .cc-play-intro{display:none}
html.cc-clean-play #cc-play-tools>[data-cc-full],html.cc-clean-play #cc-play-tools>[data-cc-menu]{flex:1 1 100px;min-height:44px;font-size:15px}
html.cc-clean-play body:has(.app-shell) .cc-analytics-footer{margin-left:0}
html.cc-clean-play body[data-cc-game=cellar] .build-note{display:none}

html.cc-clean-play body[data-cc-game=road] .page,html.cc-clean-play body[data-cc-game=coach] main,html.cc-clean-play body[data-cc-game=cellar] #game{padding-inline:max(4px,env(safe-area-inset-left),env(safe-area-inset-right))}
@media(orientation:portrait){html.cc-clean-play body[data-cc-game=road] .board-column,html.cc-clean-play body[data-cc-game=road] .game-aside,html.cc-clean-play body[data-cc-game=coach] :is(.board-section,.practice-grid>.board-frame){max-width:none}}
