:root {
  color-scheme: light;
  --forest:#173d30; --deep:#102d25; --gold:#bd995c; --cream:#fff2d6; --paper:#fffaee; --ink:#283c30;
  --rust:#a8493a; --green:#245344; --muted:#665c49; --line:#ddc8a4;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink); background:var(--deep);
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; display:flex; flex-direction:column; background:radial-gradient(ellipse at 42% 2%,#235242 0%,var(--forest) 38%,var(--deep) 100%); }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; cursor:pointer; }
button:focus-visible,a:focus-visible { outline:3px solid #e7af45; outline-offset:3px; }
button[hidden] { display:none; }
a { color:inherit; }
h1,h2 { font-family:Georgia,"Times New Roman",serif; letter-spacing:-.028em; margin:0; }
p { line-height:1.55; }
.topbar { background:#102f26; color:#f8e9c2; border-bottom:1px solid #537258; box-shadow:0 6px 24px #081c1730; }
.top-inner { max-width:1370px; margin:auto; min-height:70px; padding:0 clamp(14px,4vw,36px); display:flex; align-items:center; justify-content:space-between; gap:7px; }
.brand { display:flex; align-items:center; gap:9px; color:#f9e6b6; text-decoration:none; font-family:Georgia,serif; font-size:clamp(1.05rem,3vw,1.52rem); font-weight:bold; white-space:nowrap; }
.awning { width:32px; height:32px; background:url('./assets/icon-192.png') center/contain no-repeat; border-radius:7px; flex:none; }
.top-actions { display:flex; align-items:center; gap:7px; }
.top-button { color:#f8e9c2; background:#1b4335; border:1px solid #667857; min-height:42px; border-radius:7px; padding:5px 12px; font-size:.875rem; font-weight:650; white-space:nowrap; }
.top-button:hover { background:#2a5542; }
#game { width:100%; max-width:1330px; margin:0 auto; padding:clamp(12px,3vw,28px); flex:1; }
.bottom { width:min(100%,1330px); margin:auto; color:#c2cbaa; padding:10px clamp(14px,4vw,30px) 18px; display:flex; justify-content:space-between; gap:10px; font-size:.84rem; }
.welcome { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); min-height:480px; width:min(1080px,100%); margin: clamp(8px,4vh,48px) auto; border:3px solid var(--gold); border-radius:18px; overflow:hidden; background:var(--cream); box-shadow:0 18px 48px #071b16a0; }
.welcome-art { min-height:440px; background:url('./assets/cover.webp') center/cover no-repeat; border-right:3px solid var(--gold); }
.welcome-side { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; padding:clamp(25px,6vw,65px); background:radial-gradient(ellipse at top,#fffbee,var(--cream)); }
.welcome h1 { font-size:clamp(2.7rem,6.1vw,5.25rem); color:#194b38; line-height:.97; margin:11px 0 0; }
.welcome h1 span { display:block; }
.kicker { text-transform:uppercase; font-weight:750; letter-spacing:.13em; font-size:.82rem; color:#8c402f; }
.welcome-side p { font-size:1.02rem; margin:18px 0 22px; max-width:28ch; }
.welcome-side .button { margin-bottom:9px; width:100%; }
.home-meta { margin-top:12px; font-size:.9rem; color:var(--muted); line-height:1.5; }
.home-meta b { padding:0 4px; color:#945c2d; }
.status-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:1px 0 16px; }
.round-info { display:flex; align-items:center; gap:8px; color:#fff1cf; flex:none; }
.round-clock { display:grid; place-items:center; border:1px solid #9a9d69; border-radius:50%; font-size:1.65rem; width:39px; height:39px; background:#275143; line-height:1; }
.round-info strong { display:block; font-size:.98rem; }
.round-dots { display:flex; gap:4px; margin-top:4px; }
.round-dots i { width:6px; height:6px; background:#64816c; border-radius:50%; }
.round-dots .done { background:#f2bf62; }
.scores { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.score { min-height:47px; display:flex; align-items:center; gap:6px; border-radius:8px; border:1px solid #64816a; padding:5px 8px; color:#f5e8c8; background:#17372e; }
.score.active { border:1px solid #e0b766; background:#2a5342; }
.score strong,.score span:not(.marker) { display:block; font-size:.84rem; line-height:1.3; }
.score span:not(.marker) { color:#dfcfaa; }
.marker { width:22px; height:22px; display:inline-grid; place-items:center; background:var(--player); border:1px solid #fff2c5; outline:1px solid #44362aa0; border-radius:5px; box-shadow:0 2px 2px #30231845; flex:none; }
.marker img { width:80%; height:80%; }
.game-grid { display:grid; grid-template-columns:minmax(0,1.52fr) minmax(320px,1fr); gap:clamp(14px,2.4vw,28px); align-items:start; }
.market-board { display:grid; grid-template-columns:repeat(11,minmax(0,1fr)); grid-template-rows:repeat(11,minmax(0,1fr)); width:100%; aspect-ratio:1; border:5px solid #d0ad72; background:#e1c390; border-radius:12px; overflow:hidden; box-shadow:0 12px 30px #081d1690,inset 0 0 0 1px #8f693e; gap:1px; }
.board-center { grid-area:2/2/11/11; position:relative; overflow:hidden; background:#9db37d; }
.board-center > img { display:block; width:100%; height:100%; object-fit:cover; }
.board-sign { position:absolute; top:5%; left:50%; transform:translateX(-50%); white-space:nowrap; border:2px solid #9d6a39; border-radius:18px 18px 15px 15px; background:var(--cream); color:#1e4b38; font-family:Georgia,serif; font-weight:bold; font-size:clamp(.85rem,2.8vw,2.4rem); padding:.15em .55em .28em; box-shadow:0 3px 0 #673a245b; }
.tile { padding:1px; position:relative; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:0; min-width:0; overflow:hidden; border:0; background:#f8edcf; color:#2f3d2c; border-radius:1px; text-align:center; }
.tile-label { font-weight:720; font-size:clamp(.48rem,.8vw,.74rem); line-height:1.1; max-width:99%; }
.goods-icon { display:inline-block; object-fit:contain; flex:none; vertical-align:middle; }
.tile > .goods-icon { width:57%; height:52%; max-width:34px; }
.event-icon { height:26px; width:26px; display:inline-grid; place-items:center; border-radius:50%; color:#544324; background:#f4d791; font-size:1.1rem; font-weight:800; line-height:1; }
.tile > .event-icon { height:49%; max-height:27px; width:auto; aspect-ratio:1; font-size:clamp(.55rem,1.6vw,1.15rem); }
.tile-fruit { background:#f4e3bf; } .tile-veg { background:#e0eab8; } .tile-meat { background:#f2d8d0; }
.tile-fish { background:#d9e8e4; } .tile-bread { background:#f6e5ad; } .tile-dairy { background:#e3e7d3; } .tile-pantry { background:#f3dec0; }
.tile-fee,.tile-spill { background:#f0d7b4; } .tile-tip,.tile-bonus { background:#efd49c; }
.tile-gate { background:#d7e4bf; } .tile-sell { background:#eee2bc; }
.tile.possible { z-index:1; background:#ffe79e; box-shadow:inset 0 0 0 3px #8f5528; }
.tile.possible:hover { background:#ffd978; }
.tile.current-tile { box-shadow:inset 0 0 0 2px #875725; }
.tile-markers { position:absolute; right:1px; top:1px; display:flex; flex-wrap:wrap; justify-content:flex-end; max-width:100%; }
.tile-markers .marker { width:clamp(10px,1.35vw,19px); height:clamp(10px,1.35vw,19px); border-radius:3px; margin:-.5px; }
.board-foot { display:flex; justify-content:space-between; align-items:center; color:#e4d8b8; font-size:.87rem; gap:8px; margin-top:6px; }
.text-button { border:0; background:transparent; color:inherit; border-bottom:1px solid currentColor; padding:5px 1px; font-weight:700; font-size:.875rem; min-height:36px; }
.turn-panel,.orders-section,.basket-section { border:1px solid var(--gold); border-radius:12px; background:var(--paper); overflow:hidden; box-shadow:0 6px 17px #091a153b; }
.play-column { display:flex; flex-direction:column; gap:12px; min-width:0; }
.turn-top { min-height:39px; padding:5px 13px; display:flex; align-items:center; gap:7px; background:#e8d8ae; color:#244638; font-size:.87rem; font-weight:750; }
.turn-coins { margin-left:auto; display:flex; gap:5px; align-items:center; white-space:nowrap; }
.turn-coins img { width:22px; height:22px; }
.turn-body { padding:13px 15px; }
.turn-body h2 { font-size:clamp(1.35rem,2.2vw,1.9rem); }
.turn-body p { margin:4px 0 11px; }
.turn-body .last-action { border-top:1px solid #e7d8ba; padding:8px 0 0; margin:11px 0 0; font-size:.83rem; color:#625642; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; border-radius:8px; padding:8px 13px; border:1px solid transparent; font-weight:750; font-size:.96rem; line-height:1.2; text-align:center; }
.button.primary { color:#fff5da; background:#205744; border-color:#174532; box-shadow:0 2px 0 #15392b; }
.button.primary:hover { background:#2d6b53; }
.button.secondary { color:#294e3e; background:#fff1cf; border-color:#b9a375; }
.button.secondary:hover { background:#f3e0af; }
.button.small { padding:7px 9px; }
.button.small img { width:23px; height:23px; }
.roll-row,.action-buttons { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.roll-row .button { min-width:min(146px,100%); }
.dice-pair { display:flex; gap:6px; }
.die { width:37px; height:37px; background:#fff0d0; border:1px solid #ad8b59; border-radius:8px; box-shadow:0 2px 0 #b5925e; display:grid; place-items:center; grid-template:repeat(3,1fr)/repeat(3,1fr); padding:4px; flex:none; }
.die i { background:#3a3324; width:5px; height:5px; border-radius:50%; }
.move-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.choice { display:flex; gap:8px; align-items:center; border:1px solid #b09561; min-height:59px; background:#fff2d3; border-radius:8px; padding:6px; color:var(--ink); text-align:left; box-shadow:0 2px 0 #c4a873; }
.choice:hover { background:#f8e4ac; }
.choice .die { width:31px; height:31px; border-radius:6px; }
.move-text { flex:1; min-width:0; }
.move-text strong,.move-text span,.move-text small { display:block; line-height:1.2; }
.move-text strong { font-size:.91rem; }
.move-text span,.move-text small { margin-top:3px; font-size:.83rem; color:#55483a; }
.section-title { display:flex; justify-content:space-between; align-items:baseline; gap:6px; margin:0 0 7px; }
.section-title h2 { font-size:1.25rem; }
.section-title span { font-size:.84rem; font-weight:650; color:#65523c; white-space:nowrap; }
.orders-section,.basket-section { padding:10px; }
.orders { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.order-card { border:1px solid #b99b63; border-radius:8px; overflow:hidden; background:#fff1d2; }
.order-card.order-ready { border:2px solid #42714b; }
.portrait { width:100%; height:clamp(68px,8vw,126px); display:block; object-fit:cover; object-position:50% 43%; border-bottom:2px solid #be9b66; }
.order-content { padding:6px; }
.order-heading { display:flex; justify-content:space-between; gap:5px; align-items:center; font-size:.84rem; }
.order-heading span { color:#875d20; letter-spacing:.035em; }
.order-goods { display:flex; flex-wrap:wrap; gap:3px; margin-top:6px; }
.requirement { position:relative; display:block; }
.requirement img { width:26px; height:26px; }
.requirement.have img { opacity:.62; }
.requirement i { position:absolute; right:-2px; bottom:0; display:grid; place-items:center; width:12px; height:12px; font-style:normal; font-size:9px; font-weight:800; color:white; background:#236345; border-radius:50%; }
.ready-label { color:#24583d; margin-top:5px; font-size:.82rem; font-weight:800; }
.basket { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.basket-chip { display:flex; flex-direction:column; align-items:center; border-radius:6px; background:#f0e5ce; color:#665642; padding:3px 1px; font-size:.83rem; line-height:1.1; }
.basket-chip img { width:min(26px,100%); height:26px; }
.basket-chip.stocked { background:#e2ead6; color:#284c3b; font-weight:800; }
.mobile-route,.mobile-log { display:none; }
.finish { max-width:790px; margin:clamp(20px,7vh,75px) auto; background:var(--cream); border:3px solid var(--gold); border-radius:16px; text-align:center; padding:clamp(22px,6vw,55px); box-shadow:0 20px 34px #081b1770; }
.finish h1 { font-size:clamp(2.2rem,7vw,4.6rem); margin:6px 0; }
.finish .scores { justify-content:center; margin:28px 0 20px; }
dialog { width:min(650px,calc(100% - 24px)); max-height:calc(100% - 30px); background:var(--paper); border:2px solid var(--gold); border-radius:13px; padding:22px; color:var(--ink); overflow:auto; box-shadow:0 20px 60px #05151080; }
dialog::backdrop { background:#071e17b5; }
.dialog-close { position:absolute; right:10px; top:9px; width:38px; height:38px; border-radius:7px; background:#fff1d0; border:1px solid #bfa879; color:var(--ink); font-size:1.3rem; }
dialog h2 { padding-right:38px; font-size:clamp(1.4rem,4vw,2rem); }
.rules,.history { padding-inline-start:24px; }
.rules li,.history li { line-height:1.55; margin:8px 0; }
.rules-note { background:#f2e7ca; padding:8px 10px; border-radius:6px; }
.board-dialog { width:min(790px,calc(100% - 20px)); }
.board-scroll { overflow:auto; padding:8px 0 4px; }
.board-scroll .market-board { min-width:450px; }
.board-scroll .tile-label { font-size:.66rem; }
@media (max-width: 760px) {
  .top-inner { min-height:60px; padding-inline:10px; }
  .top-button { padding-inline:8px; }
  #game { padding:11px; }
  .welcome { grid-template-columns:minmax(0,1fr); min-height:0; margin:5px auto; }
  .welcome-art { min-height:0; height:min(71vw,360px); background-position:center 24%; border:0; border-bottom:2px solid var(--gold); }
  .welcome-side { padding:18px 23px 21px; }
  .welcome h1 { margin-top:7px; font-size:2.73rem; }
  .welcome-side p { margin:10px 0 13px; max-width:none; }
  .home-meta { margin-top:4px; }
  .game-grid { grid-template-columns:minmax(0,1fr); }
  .game-grid .board-column { display:none; }
  .mobile-route { display:block; margin-bottom:9px; }
  .route-header { display:flex; align-items:center; justify-content:space-between; color:#f9ecc9; font-size:.88rem; font-weight:750; }
  .route-tiles { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
  .route-tile { position:relative; min-height:55px; border-radius:6px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; font-size:.74rem; font-weight:740; text-align:center; color:#2d392b; min-width:0; padding:2px; }
  .route-tile .goods-icon,.route-tile .event-icon { width:23px; height:23px; }
  .route-current { outline:2px solid #efb95f; outline-offset:-2px; }
  .route-tile .marker { position:absolute; top:2px; right:2px; width:14px; height:14px; border-radius:3px; }
  .mobile-log { display:block; color:#f9ecc9; text-align:right; }
  .status-bar { margin-bottom:4px; align-items:center; }
  .scores { gap:3px; }
  .score { padding:3px 5px; min-height:33px; gap:4px; }
  .score .marker { width:13px; height:13px; }
  .score strong,.score span:not(.marker) { font-size:.73rem; }
  .round-info { gap:5px; }
  .round-info strong { font-size:.84rem; }
  .round-clock { width:25px; height:25px; font-size:1rem; }
  .round-dots { gap:2px; }
  .round-dots i { width:4px; height:4px; }
  .portrait { height:clamp(75px,22vw,130px); }
}
@media (min-width:761px) and (max-width:1000px) {
  .game-grid { grid-template-columns:minmax(0,1.22fr) minmax(300px,1fr); gap:13px; }
  .tile-label { font-size:.52rem; }
}
@media (max-width:380px) {
  .brand { gap:3px; }
  .brand .awning { width:26px; height:26px; }
  .top-button { font-size:.78rem; padding-inline:5px; }
  .round-clock { display:none; }
  .move-text span { font-size:.76rem; }
}
.language-select { color:#f8e9c2; background:#1b4335; border:1px solid #667857; min-height:42px; border-radius:7px; padding:4px 7px; font:inherit; font-size:.875rem; font-weight:650; }
.language-select:focus-visible { outline:3px solid #e7af45; outline-offset:3px; }
.top-inner .brand { min-width:0; }
.tile-label { overflow-wrap:anywhere; }
@media (max-width:760px) {
  .language-select { max-width:87px; }
  .top-actions { gap:4px; }
  .route-tile > span { overflow-wrap:anywhere; }
}
@media (max-width:390px) {
  .language-select { max-width:80px; font-size:.76rem; padding-inline:4px; }
}
.top-inner { padding-left:max(clamp(10px,4vw,36px),env(safe-area-inset-left)); padding-right:max(clamp(10px,4vw,36px),env(safe-area-inset-right)); }
.topbar { padding-top:env(safe-area-inset-top); }
#game { padding-bottom:max(clamp(11px,3vw,28px),env(safe-area-inset-bottom)); }
.settings-button { display:inline-flex; align-items:center; gap:5px; }
.settings-button span:first-child { font-size:1.15rem; line-height:1; }
.settings-dialog .setting-row { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:57px; border-bottom:1px solid #e6d7b5; font-weight:700; }
.settings-dialog .language-select { max-width:none; min-width:105px; }
.settings-dialog .setting-toggle { min-width:94px; }
.settings-dialog .action-buttons { margin-top:17px; }
.game-inventory { display:flex; flex-direction:column; gap:12px; }
.phone-panels { display:none; }
@media (max-width:760px) {
  .settings-button { min-width:42px; justify-content:center; }
  #settings-label { display:none; }
  .in-match .bottom { display:none; }
  .in-match .top-inner { min-height:50px; }
  .phone-panels { display:flex; gap:6px; }
  .phone-panel { flex:1; color:#f8eaca; background:#1b4335; border:1px solid #698063; border-radius:7px; padding:6px; font-size:.86rem; font-weight:730; min-height:42px; }
  .phone-panel[aria-pressed=true] { background:#eed9a5; color:#234736; border-color:#cca66a; }
  .game-grid[data-phone-panel=orders] .basket-section,
  .game-grid[data-phone-panel=basket] .orders-section { display:none; }
  .play-column { gap:8px; }
  .turn-body { padding:9px 11px; }
  .turn-body p { margin:2px 0 7px; }
  .turn-body .last-action { margin-top:8px; padding-top:6px; }
  .route-tile { min-height:48px; }
  .portrait { height:clamp(52px,13dvh,108px); }
  .order-goods { gap:2px; }
  .requirement img { width:24px; height:24px; }
}
@media (max-width:360px) {
  .top-inner .brand { gap:1px; }
  .brand { font-size:1rem; }
  .top-button { min-height:39px; padding-inline:5px; }
}
@media (min-width:761px) and (max-height:510px) and (pointer:coarse) {
  .in-match .top-inner { min-height:45px; }
  .in-match #game { padding:10px; }
  .in-match .market-board { max-width:calc(100dvh - 105px); }
  .in-match .game-grid { grid-template-columns:minmax(0,1.1fr) minmax(290px,1fr); gap:12px; }
}
.tv-mode .top-inner { max-width:1500px; }
.tv-mode #game { max-width:1500px; padding:20px max(3.2vw,24px) 25px; }
.tv-mode .top-inner,.tv-mode .bottom { padding-inline:max(3.2vw,24px); }
.tv-mode .game-grid { grid-template-columns:minmax(0,1.26fr) minmax(295px,1fr); gap:20px; }
.tv-mode .game-grid .board-column { display:block; }
.tv-mode .game-grid .market-board { width:min(100%,calc(100vh - 150px)); margin-inline:auto; }
.tv-mode .mobile-route,.tv-mode .phone-panels,.tv-mode .mobile-log { display:none; }
.tv-mode .game-inventory .orders-section,.tv-mode .game-inventory .basket-section { display:block; }
.tv-mode .tile-label { font-size:clamp(.53rem,1vw,.88rem); }
.tv-mode .button,.tv-mode .choice { min-height:49px; }
.tv-mode button:focus,.tv-mode select:focus,.tv-mode a:focus { outline:4px solid #ffd46b; outline-offset:3px; position:relative; z-index:2; }
.tv-mode .tile:focus { outline-offset:-4px; background:#ffe08b; }
.tv-mode .welcome { margin-top:0; }
@media (max-width:700px) {
  .tv-mode .game-grid { grid-template-columns:minmax(0,1fr); }
  .tv-mode .game-grid .board-column { display:none; }
  .tv-mode .mobile-route,.tv-mode .phone-panels,.tv-mode .mobile-log { display:flex; }
  .tv-mode .mobile-route { flex-direction:column; }
  .tv-mode .game-grid[data-phone-panel=orders] .basket-section,
  .tv-mode .game-grid[data-phone-panel=basket] .orders-section { display:none; }
}
@media (max-width:760px) and (max-height:690px) {
  .welcome-art { height:min(67vw,36vh); height:min(67vw,36dvh); }
  .welcome-side { padding-block:14px; }
  .welcome h1 { font-size:clamp(2rem,8vw,2.7rem); }
  .in-match #game { padding-top:7px; }
  .in-match .top-inner { min-height:46px; }
  .route-header .text-button { min-height:31px; }
  .route-tile { min-height:43px; }
  .turn-body .last-action { margin-top:5px; padding-top:4px; }
  .phone-panel { min-height:37px; }
  .portrait { height:clamp(45px,10dvh,76px); }
  .orders-section,.basket-section { padding:7px; }
  .mobile-log .text-button { min-height:30px; }
}

@media (max-width:760px) {
  .game-grid[data-phone-panel=turn] .game-inventory,
  .game-grid[data-phone-panel=orders] .turn-panel,
  .game-grid[data-phone-panel=basket] .turn-panel { display:none; }
  .phone-history { flex:0 0 42px; }
  .turn-body .last-action { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .status-bar { display:grid; grid-template-columns:minmax(0,1fr); gap:4px; }
  .status-bar .scores { justify-content:stretch; }
  .status-bar .score { flex:1; min-width:0; }
}
@media (min-width:701px) {
  .tv-mode .game-grid .turn-panel,.tv-mode .game-grid .orders-section,.tv-mode .game-grid .basket-section { display:block; }
  .tv-mode .game-grid .game-inventory { display:flex; }
}

.brand-initials,.compact-score { display:none; }
.brand .brand-wordmark { overflow:hidden; text-overflow:ellipsis; }
@media (max-width:760px) and (orientation:portrait) {
  .at-home:not(.tv-mode) body { min-height:100vh; min-height:100dvh; }
  .at-home:not(.tv-mode) .top-inner { min-height:52px; gap:8px; }
  .at-home:not(.tv-mode) .brand { gap:6px; }
  .at-home:not(.tv-mode) .brand-wordmark { font-size:1rem; line-height:.98; overflow:visible; }
  .at-home:not(.tv-mode) .brand-wordmark span { display:block; }
  .at-home:not(.tv-mode) .top-actions { flex-shrink:0; }
  .at-home:not(.tv-mode) .top-button { min-height:44px; }
  .at-home:not(.tv-mode) .bottom { display:none; }
  .at-home:not(.tv-mode) #game { display:flex; padding:0; }
  .at-home:not(.tv-mode) .welcome {
    display:flex; flex:1; flex-direction:column; min-width:0;
    margin:0; border:0; border-radius:0; box-shadow:none; background:#173d30;
  }
  .at-home:not(.tv-mode) .welcome-art {
    flex:1; min-height:105px; height:auto; border:0;
    background:#416950 var(--home-art) center 53% / cover no-repeat;
  }
  .at-home:not(.tv-mode) .welcome-side {
    align-items:center; gap:8px; margin-top:-1px; text-align:center;
    border-top:2px solid var(--gold); border-radius:20px 20px 0 0;
    padding:clamp(10px,2.1dvh,22px) max(16px,env(safe-area-inset-right))
      max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  .at-home:not(.tv-mode) .welcome .kicker { display:none; }
  .at-home:not(.tv-mode) .welcome h1 {
    font-size:clamp(2.35rem,9.3vw,4.6rem); margin:0; line-height:.9;
  }
  .at-home:not(.tv-mode) .welcome-side p {
    max-width:42ch; margin:2px 0; line-height:1.35;
  }
  .at-home:not(.tv-mode) .welcome-side .button {
    width:min(100%,420px); margin:0; overflow-wrap:anywhere;
  }
  .at-home:not(.tv-mode) .home-meta { margin:0; font-size:.8rem; }
}
@media (max-width:760px) and (orientation:portrait) and (max-height:640px) {
  .at-home:not(.tv-mode) .welcome-side { gap:6px; }
  .at-home:not(.tv-mode) .welcome h1 { font-size:clamp(2.05rem,8.5vw,3rem); }
  .at-home:not(.tv-mode) .welcome-side p { font-size:.9rem; }
}
@media (max-width:760px) and (orientation:portrait) {
  html.in-match:not(.tv-mode) { background:#173d30; }
  html.in-match:not(.tv-mode) body { min-height:100vh; min-height:100dvh; }
  .in-match:not(.tv-mode) #game {
    display:flex; flex-direction:column; padding:0;
  }
  .in-match:not(.tv-mode) .game-shell {
    flex:1; display:flex; flex-direction:column; width:100%;
  }
  .in-match:not(.tv-mode) .topbar { background:#12382d; }
  .in-match:not(.tv-mode) .top-inner { gap:8px; min-height:52px; }
  .in-match:not(.tv-mode) .top-actions { flex-shrink:0; }
  .in-match:not(.tv-mode) .top-button { min-height:44px; }
  .in-match:not(.tv-mode) .status-bar {
    display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;
    gap:6px; margin:0; padding:8px 11px; background:#184436; box-shadow:0 2px 6px #081c1730;
  }
  .in-match:not(.tv-mode) .status-bar .scores { gap:4px; flex:1; min-width:0; }
  .in-match:not(.tv-mode) .status-bar .score { border-color:#547760; background:#17382e; }
  .in-match:not(.tv-mode) .status-bar .score.active { border-color:#edc477; background:#315845; }
  .in-match:not(.tv-mode) .round-info strong { white-space:nowrap; }
  .in-match:not(.tv-mode) .mobile-route {
    flex:1 0 clamp(126px,27vh,360px); flex-basis:clamp(126px,27dvh,360px);
    min-height:126px; display:flex; flex-direction:column; justify-content:space-between;
    position:relative; isolation:isolate; margin:0; padding:9px 10px 12px;
    background:#416950 var(--market-art) center 53% / cover no-repeat;
  }
  .in-match:not(.tv-mode) .mobile-route::before {
    content:""; position:absolute; inset:0; z-index:-1;
    background:linear-gradient(180deg,#0b291ccb 0%,transparent 34%,transparent 56%,#102d23de 100%);
  }
  .in-match:not(.tv-mode) .route-header { color:#fff9e7; gap:7px; }
  .in-match:not(.tv-mode) .route-header > span,
  .in-match:not(.tv-mode) .route-header .text-button {
    background:#12392ddd; border:1px solid #d5bb7f; border-radius:20px; padding:4px 10px;
  }
  .in-match:not(.tv-mode) .route-header .text-button { min-height:36px; }
  .in-match:not(.tv-mode) .route-tiles { align-items:stretch; gap:5px; }
  .in-match:not(.tv-mode) .route-tile {
    border:1px solid #d7bc85; border-radius:9px; min-height:51px; padding:4px 2px;
    box-shadow:0 3px 4px #17291b60;
  }
  .in-match:not(.tv-mode) .route-current { outline:3px solid #ffd678; outline-offset:-2px; }
  .in-match:not(.tv-mode) .route-tile .marker { width:17px; height:17px; }
  .in-match:not(.tv-mode) .game-grid {
    display:block; padding:11px 11px max(9px, env(safe-area-inset-bottom));
    background:radial-gradient(ellipse at 50% 0,#fdf5db,#f7e9c9);
    border-top:2px solid #d5aa64; border-radius:17px 17px 0 0; margin-top:-1px; position:relative;
  }
  .in-match:not(.tv-mode) .play-column { gap:8px; }
  .in-match:not(.tv-mode) .phone-panels { order:3; gap:3px; padding:4px; border-radius:12px; background:#153d2f; }
  .in-match:not(.tv-mode) .phone-panel { border:0; min-height:44px; background:transparent; color:#f9edce; }
  .in-match:not(.tv-mode) .phone-panel[aria-pressed=true] { background:#f4dfaa; color:#163f30; }
  .in-match:not(.tv-mode) .phone-history { flex:0 0 39px; }
  .in-match:not(.tv-mode) .turn-panel { border-radius:12px; box-shadow:0 3px 9px #8f683f36; }
  .in-match:not(.tv-mode) .turn-top { background:#eee2bc; }
  .in-match:not(.tv-mode) .turn-body .primary { flex:1; }
  .in-match:not(.tv-mode) .roll-row .primary { flex:1; }
  .in-match:not(.tv-mode) .turn-body .action-buttons { gap:7px; }
  .in-match:not(.tv-mode) .orders-section,.in-match:not(.tv-mode) .basket-section { box-shadow:0 3px 9px #8f683f36; }
  .in-match:not(.tv-mode) .portrait { height:clamp(48px,12dvh,118px); }
  .in-match:not(.tv-mode) .basket-chip { padding:5px 1px; font-size:.95rem; }
}
@media (max-width:460px) and (orientation:portrait) {
  .in-match:not(.tv-mode) .brand-wordmark { display:none; }
  .in-match:not(.tv-mode) .brand-initials { display:inline; font-size:1.04rem; letter-spacing:.03em; }
  .in-match:not(.tv-mode) .status-bar .score { justify-content:center; padding:3px; }
  .in-match:not(.tv-mode) .status-bar .score-details,
  .in-match:not(.tv-mode) .status-bar .score .marker { display:none; }
  .in-match:not(.tv-mode) .compact-score { display:flex; align-items:center; gap:3px; min-width:0; }
  .in-match:not(.tv-mode) .score .score-initial {
    background:var(--player); color:#fff7dc; display:grid; place-items:center;
    border-radius:4px; font-weight:800; min-width:21px; height:21px; padding:0 2px;
  }
  .in-match:not(.tv-mode) .score .score-stars { color:#ffe7ab; white-space:nowrap; font-size:.72rem; }
}
@media (max-width:760px) and (orientation:portrait) and (max-height:690px) {
  .in-match:not(.tv-mode) .top-inner { min-height:47px; }
  .in-match:not(.tv-mode) .status-bar { padding-block:5px; }
  .in-match:not(.tv-mode) .mobile-route { flex-basis:104px; min-height:104px; padding-top:6px; padding-bottom:8px; }
  .in-match:not(.tv-mode) .route-header .text-button { min-height:30px; }
  .in-match:not(.tv-mode) .route-tile { min-height:43px; }
  .in-match:not(.tv-mode) .game-grid { padding-top:8px; }
  .in-match:not(.tv-mode) .phone-panel { min-height:40px; }
  .in-match:not(.tv-mode) .turn-top { min-height:33px; }
  .in-match:not(.tv-mode) .turn-body h2 { font-size:1.26rem; }
  .in-match:not(.tv-mode) .turn-body p { font-size:.88rem; }
}
