/* Maiolica: glazed ceramic tiles, cobalt sea and Sicilian citrus. */
:root{--paper:#fff5dc;--ink:#143771;--muted:#56708b;--teal:#086fad;--line:#c8dae4;--cell:#1d5390}
body{background-color:var(--paper);background-image:radial-gradient(circle at 4% 20%,#ffdc7460 0,transparent 31%),radial-gradient(circle at 95% 65%,#60c9ce40 0,transparent 30%);font-family:'DM Sans',sans-serif}
header{max-width:1280px;padding:21px 36px;border-bottom:2px solid #1c6dae18}.brand{font-family:Outfit,sans-serif;font-size:36px;font-weight:800;letter-spacing:-1.4px;color:#164689;text-shadow:0 2px 0 white}.brand .mark{width:36px;height:36px;padding:5px;gap:3px;grid-template-columns:repeat(2,1fr);background:#fff;border:2px solid #2269ac;border-radius:9px;transform:rotate(-10deg);box-shadow:0 3px 0 #194c8025}.brand .mark i{height:auto;background:#168bc1;border-radius:50% 2px}.brand .mark i:nth-child(2){background:#ffbd30}.brand .mark i:nth-child(3){background:#ff7452}.brand .mark i:last-child{background:#16b5aa}.edition{color:#226395;font-weight:800;letter-spacing:1.5px}.icon-button{background:#fffaf0;border:2px solid #bad7e5;box-shadow:0 3px 0 #bad7e5;color:#226395}.icon-button:hover{background:#ffdf79}
main{max-width:1190px;grid-template-columns:1fr 500px;gap:66px;padding-top:35px;align-items:start}.intro{position:sticky;top:30px;padding-top:36px}.eyebrow{color:#c85832;font-weight:800}.dot{background:#ffbb28;width:9px;height:9px;box-shadow:0 0 0 4px #ffbd3026}h1{font-size:74px;font-weight:800;letter-spacing:-3px;line-height:1.01;color:#164689;margin:25px 0 20px;text-shadow:0 3px 0 #fff}h1 em{color:#eb6941}.intro>p{font-size:16px;color:#46698c;max-width:340px;line-height:1.7}.rules{gap:12px;margin-top:24px}.rule{font-size:13px;font-weight:600;color:#254a77}.rule b{width:29px;height:29px;border:2px solid #fff;background:#fbc846;color:#174884;border-radius:10px;box-shadow:0 2px 0 #e5ad31}.pulse-card{border:0;border-radius:16px;background:#fffdf2;padding:17px 20px;border-bottom:4px solid #f0d293;transform:rotate(-1deg)}.pulse-card strong{font-size:14px;color:#db633b}.pulse-card p{color:#52698a}.sicilian-art{width:270px;height:140px;position:relative;margin:30px 0 5px}.decor-tile{position:absolute;width:98px;height:98px;border:5px solid #fff9df;border-radius:17px;box-shadow:0 7px 0 #19478220,0 13px 20px #19478215;display:grid;place-items:center;font-size:54px}.decor-tile:nth-child(1){background:#ffc738;left:8px;top:15px;transform:rotate(-13deg)}.decor-tile:nth-child(2){background:#078abc;left:86px;top:0;transform:rotate(8deg);z-index:2;color:white}.decor-tile:nth-child(3){background:#f77855;left:169px;top:25px;transform:rotate(16deg);font-size:49px}.decor-tile:after{content:'';position:absolute;inset:5px;border:2px solid #ffffff50;border-radius:9px;pointer-events:none}
.game{max-width:500px;background:#fffdf3;border:2px solid #fff;border-radius:30px;padding:22px;box-shadow:0 9px 0 #d8e6e5,0 20px 55px #14437718}.community-bar{margin-bottom:10px}.community-bar button{font-weight:700;color:#236b9f}.mode-controls select{background:#eaf5f9;border:2px solid #cde3ed;font-weight:700;border-radius:12px}.mode-description{color:#536b82;font-size:11px}.scores{background:#eaf5fb;border-radius:17px;padding:14px 16px;border-bottom:3px solid #c6e1ed;margin:0 0 18px}.score-label{color:#406893;font-size:9px}.score-number{font-size:39px;font-weight:800;color:#174c91;text-shadow:0 2px 0 white}.best .score-number{color:#df7531;font-size:30px}.session-label{background:#fff8df;color:#a76018;border:1px solid #f2d789;font-size:9px;font-weight:700;padding:6px 9px}.board{background:#103f78;border:4px solid #267dbc;padding:9px;border-radius:18px;gap:5px;box-shadow:0 6px 0 #0a2e59,inset 0 2px 8px #001b5040}.cell{background:#215891;border-radius:6px;box-shadow:inset 0 2px 3px #092d5a35,inset 0 -1px 0 #75bbdd20}.cell.filled,.mini-cell{background:linear-gradient(145deg,#ffffff38,transparent 48%),var(--color);box-shadow:inset 0 3px 0 #ffffff75,inset 0 -4px 0 #00000020,0 1px 2px #00265855;border:1px solid #ffffff40}.cell.filled:after{content:'';position:absolute;inset:25%;border:1px solid #ffffff50;transform:rotate(45deg);border-radius:3px;pointer-events:none}.cell.ghost{opacity:.8;background:var(--preview);box-shadow:inset 0 0 0 2px #fff}.cell.invalid{background:#ff806a}.cell.line-preview{outline:3px solid #fff4a0;filter:brightness(1.15)}.toast{background:#ffcc3c;color:#153f78;border:3px solid #fff2b4;font-weight:800;box-shadow:0 5px 0 #d89920}
.tray-heading{margin-top:25px}.tray-heading span{color:#1d6297;font-size:10px}.tray-heading small{color:#537a94}.piece{background:#eaf3f5;border:2px solid #c8e0e7;border-bottom-width:4px;border-radius:15px;min-height:110px}.piece:hover:not(:disabled){background:#fff0c6;border-color:#edcb6d}.piece.selected{background:#fff0bd;border-color:#eab63b;box-shadow:0 0 0 2px #ffd85160}.piece.used{background:#f3f7f5;border-color:#dfe9e8}.mini-cell{border-radius:5px}.rotation-controls>span{color:#4d718f}.rotate-button{background:#ffcc3f;color:#194378;font-weight:800;border-bottom:3px solid #dea525}.rotate-button:not(:disabled):hover{background:#ffda6c}.rotate-button:disabled{background:#edf0e6;color:#899aaa;border-color:#dce1d8}.rotate-button kbd{border-color:#b58c32}.piece-timer{background:#fff7d9;color:#8c481d;font-weight:800}.mode-clock{color:#256499;font-weight:700}.mode-clock progress{accent-color:#f5b923}.mode-clock.urgent{color:#d34e34}
.sicily-summary{background:#fff0be;border:2px solid #f5d472;box-shadow:0 3px 0 #e9cb7f}.sicily-summary button{background:#f9bf32;border-bottom:3px solid #d79c25;font-weight:800;color:#1c4574}.sicily-summary button span{color:#425c71}.sicily-summary small{color:#92652c}.points-shop{background:#eff7ff;border:2px solid #c9deed;color:#285988}.points-shop strong{background:#fff0b7;padding:4px 8px;border-radius:7px;color:#9f6408}.benefits button{border:2px solid #c7e0e9;border-bottom-width:4px;background:#eef9fc;color:#25678c;font-weight:700}.benefits button:hover:not(:disabled){background:#d4f0f4}.ad-slot{background:#f6f8f5;border-color:#cedcd9}.game-bottom{align-items:start;gap:12px}.status{line-height:1.5}.reset{white-space:nowrap;font-weight:700}.award-message{background:#e0f3d7;border:2px solid #badaac;color:#316532}
footer{border-top:2px solid #1c6dae18;max-width:1190px;align-items:center}.publisher{background:white}footer>span{color:#57738c}.modal{background:#fff8e7;border:4px solid white;border-radius:25px;box-shadow:0 8px 0 #d1dfdf,0 25px 80px #092d5740}.modal h2{color:#194988;font-weight:800}.modal .eyebrow{color:#e97739}.modal .primary{background:#ffcb3c;color:#1c487e;border-bottom:4px solid #dc9e21;font-weight:800}.modal .extra{background:#eef6f8;border:2px solid #c4deea;color:#28648c}.modal .big{color:#176bae}.demo-note{background:#f0ebd9}.sicily-card{background:#eef4f5;border:2px solid #d2e1e6}.sicily-card.earned{background:#fff0ba;border:2px solid #e8bb4c}.sicily-card h3{color:#205185}.sicily-card progress{accent-color:#f0b624}.overlay{background:#072b6690}.username-input{border:2px solid #c7dfea;background:white;color:#21507d}button:active:not(:disabled){filter:brightness(.97)}
@media(max-width:850px){header{padding:16px 20px}.brand{font-size:30px}.brand .mark{width:30px;height:30px}main{display:block;max-width:520px;padding:18px 12px 22px}.intro{position:static;padding:0 8px}.intro h1{font-size:34px;letter-spacing:-1px;margin:0 0 8px}.intro h1 br{display:none}.intro>p{font-size:12px;line-height:1.5;max-width:none;margin-bottom:19px}.sicilian-art{display:none}.game{padding:16px 12px;border-radius:23px}.scores{padding:12px}.score-number{font-size:34px}.best .score-number{font-size:27px}.board{gap:4px;padding:7px;border-width:3px}.piece{min-height:100px}.mode-description{margin-bottom:12px}footer{margin-top:0}}@media(max-width:380px){header{padding:14px}.brand{font-size:27px;gap:8px}.intro h1{font-size:29px}.game{padding:12px 9px}.board{gap:3px;padding:6px}.piece{padding:7px;min-height:92px}.mode-controls{gap:7px}.mode-controls select{font-size:11px;padding:8px}.scores{padding:10px}.mode-controls label{min-width:0}.scores .score-number{font-size:30px}}

.new-game-top{display:flex;justify-content:flex-end;margin:0 2px 15px}.new-game-top .reset{min-height:44px;padding:10px 19px;border:2px solid #f0b832;border-bottom:4px solid #dba020;border-radius:12px;background:#ffcc3f;color:#194378;font-size:13px;font-weight:800;box-shadow:0 3px 0 #fff1bd}.new-game-top .reset:hover{background:#ffdc70;text-decoration:none}

/* The banner stays separate from the restart control; No Ads hides it. */
.new-game-top{align-items:center;justify-content:space-between;gap:20px}
.new-game-top .top-ad-slot{flex:1;min-width:0;margin:0;padding:12px 8px;min-height:56px;background:#f1f5f5;border:1px dashed #9bbacb;border-radius:9px;font-size:8px;letter-spacing:1px}
.new-game-top .top-ad-slot span{font-size:9px;letter-spacing:0;margin-top:5px}
.new-game-top .reset{flex-shrink:0}
@media(max-width:380px){.new-game-top{gap:14px}.new-game-top .reset{padding:10px 12px}.new-game-top .top-ad-slot{font-size:7px}.new-game-top .top-ad-slot span{font-size:8px}}

.board.settling{pointer-events:none}.cell.gravity-fall{animation:ceramic-fall .45s cubic-bezier(.35,0,.7,1) both;z-index:2}@keyframes ceramic-fall{0%{transform:translateY(var(--fall-from))}78%{transform:translateY(0)}90%{transform:translateY(-5px)}100%{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.cell.gravity-fall{animation:none}}

/* Touch controls: avoid gesture ambiguity and keep the rotation target reachable. */
.piece,.rotate-button{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.rotation-controls{gap:8px}.rotate-button{min-width:120px;min-height:52px;justify-content:center;font-size:15px}
@media(max-width:850px){.intro{display:none}.rotation-controls{position:sticky;bottom:8px;bottom:max(8px,env(safe-area-inset-bottom));z-index:10;background:#fff8e7;padding:8px;border:2px solid #e8dcb7;border-radius:15px;box-shadow:0 4px 16px #19437820}.rotation-controls>span{font-size:11px;line-height:1.4}.tray-heading small{font-size:9px;letter-spacing:0}.piece{min-height:88px}.mini-cell,.mini-empty{width:16px;height:16px}.modal{max-height:85dvh;overflow-y:auto}.username-input{font-size:16px}}

/* Midnight ceramic backdrop, inspired by the owner's reference. */
body{background-color:#0b1d40;background-image:url("assets/midnight-pattern.svg");background-size:96px 96px;color:#e9f1ff}
header{border-bottom-color:#284269}.brand{color:#fff4d9;text-shadow:0 3px 0 #040f28}.edition{color:#a8bfdf}
.intro h1{color:#f5f7ff;text-shadow:0 4px 0 #06132d}.intro h1 em{color:#ffd064}.intro .eyebrow{color:#7dd9dc}.intro>p,.intro .rule{color:#c0d2eb}
.game{box-shadow:0 10px 0 #06142d,0 24px 64px #020a2280;color:#143771}
.board{background:#10264d;border-color:#2b4b7d;box-shadow:0 6px 0 #081832,inset 0 2px 8px #06152d80}
.cell:not(.filled):not(.ghost):not(.invalid){background:#19396b;box-shadow:inset 0 1px 0 #33568a40}
footer{border-top-color:#284269}footer>span{color:#a8bfdf}

/* Larger playing surface, with more room for each tile on phones. */
@media(min-width:851px){main{max-width:1320px;grid-template-columns:minmax(260px,1fr) minmax(0,640px);gap:48px}.game{max-width:640px}}
@media(max-width:850px){main{max-width:660px;padding:12px 6px 20px}.game{max-width:640px;margin-inline:auto;padding:14px 7px}.board{padding:5px;gap:3px;border-width:2px;border-radius:14px}.cell{border-radius:5px}}
@media(max-width:380px){main{padding-inline:3px}.game{padding-inline:5px}.board{padding:4px;gap:2px}}

/* Keep the next pieces and rotation together above the board. */
.tray-heading{margin-top:8px}.rotation-controls{margin-bottom:14px}
@media(max-width:850px){.rotation-controls{position:static}}

/* Score follows the board, in the former piece tray position. */
.board-wrap + .scores{margin-top:18px;margin-bottom:18px}

/* Collection house ad beside New game; separate touch targets. */
.new-game-top{gap:16px;align-items:center}
.new-game-top .etna-ad{display:flex;align-items:center;gap:10px;position:relative;min-height:94px;padding:22px 12px 12px;background:#eeece3;border:0;border-radius:16px;text-align:left;letter-spacing:0;color:#243553}
.new-game-top .etna-ad[hidden]{display:none}
.etna-ad .ad-label{position:absolute;right:10px;top:6px;font-size:8px;letter-spacing:1px;color:#627394}
.etna-ad-icon{width:44px;height:52px;flex-shrink:0;border-radius:12px;background:linear-gradient(135deg,#852711,#f99b25)}
.etna-ad-copy{flex:1;min-width:0}.etna-ad-copy strong{font-size:13px;line-height:1.25;display:block}.etna-ad-copy p{font-size:10px;line-height:1.4;margin:4px 0 0;color:#526381}
.etna-ad-link{flex-shrink:0;min-height:44px;padding:9px 11px;border:0;border-radius:10px;background:#3068eb;color:white;font-size:11px;font-weight:800}
@media(max-width:540px){.new-game-top .etna-ad{flex-wrap:wrap;gap:8px;padding:22px 10px 10px}.etna-ad-icon{width:30px;height:38px;border-radius:9px}.etna-ad-copy strong{font-size:11px}.etna-ad-copy p{display:none}.etna-ad-link{width:100%}.new-game-top .reset{padding-inline:10px;font-size:11px}.new-game-top{gap:12px}}

/* Phone-first board: compact top controls, settings after the grid. */
.board{grid-template-columns:repeat(10,minmax(0,1fr))}.board-wrap + .community-bar{margin-top:16px}
@media(max-width:850px){header{padding:8px 12px}.brand{font-size:25px}main{padding-top:6px}.game{padding-top:8px}.new-game-top{margin-bottom:7px}.new-game-top .etna-ad{min-height:54px;padding:16px 8px 6px;gap:5px;flex-wrap:nowrap}.etna-ad-icon{display:none}.etna-ad-copy strong{font-size:10px}.etna-ad-link{width:auto;font-size:10px;padding:6px;min-height:36px}.tray-heading{margin:7px 2px 5px}.tray,.piece{min-height:58px}.piece{padding:6px}.mini-cell,.mini-empty{width:12px;height:12px}.mini-grid{gap:2px}.rotation-controls{padding:0;border:0;box-shadow:none;margin:5px 0 8px}.rotate-button{min-height:38px;min-width:100px;padding:4px 10px;font-size:12px}.rotation-controls>span{font-size:10px}.board{gap:3px;padding:4px}.community-bar{margin-bottom:8px}.scores{margin-top:10px}}

.game.holding-piece{touch-action:none;-webkit-user-select:none;user-select:none}.board{-webkit-touch-callout:none;user-select:none}

/* Full-width promotion; aligned rotate and restart controls. */
.new-game-top{display:block;margin-inline:0}.new-game-top .etna-ad{width:100%}
.rotation-controls{display:grid;grid-template-columns:1fr 1fr;align-items:stretch;gap:8px}
.rotation-controls>span{grid-column:1/-1}
.rotation-controls .rotate-button,.rotation-controls .reset{display:flex;align-items:center;justify-content:center;min-height:44px;margin:0;padding:8px 12px;border:2px solid #f0b832;border-bottom:4px solid #dba020;border-radius:11px;background:#ffcc3f;color:#194378;font-size:13px;font-weight:800;text-decoration:none;white-space:nowrap}
.rotation-controls .rotate-button:disabled{background:#edf0e6;color:#899aaa;border-color:#dce1d8}
.rotation-controls .reset:hover{background:#ffdc70;text-decoration:none}
@media(max-width:850px){.new-game-top .etna-ad{flex-wrap:nowrap}.etna-ad-copy p{display:block;font-size:10px}.rotation-controls{gap:5px 8px}.rotation-controls>span{font-size:10px}}

/* Touch-only instruction, centered above the action buttons. */
#rotation-tip{display:none;text-align:center;width:100%}
@media(hover:none) and (pointer:coarse){#rotation-tip{display:block}}

.profile-label{color:#35577c}.profile-details{margin-top:12px;text-align:left;color:#526381;font-size:11px}.profile-details summary{cursor:pointer;min-height:32px;display:list-item}.profile-details p{font-size:11px;line-height:1.5;margin:6px 0}.modal #profile-error:empty{display:none}

/* Phone viewport: balanced gutters and a square board that fits below controls. */
@media(max-width:850px){
 main{width:100%;max-width:580px;margin-inline:auto;padding:10px max(14px,env(safe-area-inset-right)) 24px max(14px,env(safe-area-inset-left));min-width:0}
 .game{width:100%;max-width:540px;margin-inline:auto;padding:12px clamp(10px,3vw,18px);min-width:0;border-radius:24px}
 .board-wrap{width:min(100%,max(240px,calc(100svh - 270px)));margin:10px auto 0}
 .board{width:100%;gap:clamp(2px,.65vw,4px);padding:5px;border-width:2px}
 .tray-heading{gap:8px;flex-wrap:wrap}.tray-heading span{font-size:9px;letter-spacing:1px}.tray-heading small{font-size:9px}
 .tray{gap:7px}.piece{min-width:0;min-height:54px;padding:5px}
 .rotation-controls{margin-bottom:6px}.rotation-controls>span{line-height:1.4}
 .new-game-top .etna-ad{min-height:54px}.etna-ad-copy p{display:none}
 .community-bar{flex-wrap:wrap;gap:8px}.mode-controls{min-width:0}.mode-controls label{min-width:0}
}

/* Honor the mode's hidden state despite the flex label styling. */
.mode-controls #pace-label[hidden]{display:none}

/* Quiet publisher wordmark on the game's dark footer. */
footer .publisher{background:transparent;padding:0;border:0;border-radius:0;box-shadow:none;color:#fff}
footer .publisher-name{font-size:22px;font-weight:700;letter-spacing:-.6px;color:#fff}
@media(max-width:600px){footer{flex-wrap:wrap;justify-content:center;gap:16px;padding:22px 16px}footer>span{flex-basis:100%;text-align:center;font-size:9px}}

/* Publisher is the single home link, always aligned left. */
footer{justify-content:space-between}footer .publisher{margin-right:auto}

/* Glossy toy tiles: rounded bevels, corner reflections and raised bases. */
.cell.filled,.mini-cell{
 position:relative;border:0;border-radius:23%;
 background:radial-gradient(ellipse at 7% 3%,#ffffff85 0 19%,transparent 21%),radial-gradient(circle at 50% 46%,#ffffff60 0 11%,transparent 13%),radial-gradient(ellipse at 99% 100%,#063c5540 0 24%,transparent 26%),linear-gradient(180deg,#ffffff20,transparent 55%),var(--color);
 box-shadow:inset 0 3px 0 #ffffff65,inset 0 -5px 0 #082b4a35,0 2px 2px #00132f50;
}
.cell.filled:after{content:none}.mini-cell{box-shadow:inset 0 2px 0 #ffffff65,inset 0 -3px 0 #082b4a35,0 2px 1px #00132f30}
.piece{background:#11264a;border-color:#2b4c79;box-shadow:inset 0 1px 0 #ffffff0a}
.piece:hover:not(:disabled){background:#19365a;border-color:#659bcc}
.piece.selected{background:#25344b;border-color:#ffd044;box-shadow:0 0 0 3px #ffd04426,inset 0 1px 0 #ffffff15}
.piece.used{background:#11213b;border-color:#2a3d5e}
.piece:active:not(:disabled) .mini-grid{transform:translateY(2px) scale(.96)}
.cell.filled:active{filter:brightness(1.12)}
@media(prefers-reduced-motion:no-preference){.piece .mini-grid{transition:transform .12s ease}.piece.rotated .mini-grid{animation:turn-pop .2s ease-out}}

/* Three tactile game-mode buttons instead of a system dropdown. */
.mode-controls{flex-wrap:wrap;align-items:end;gap:14px}.mode-picker{flex:1 1 100%;min-width:0}.mode-picker-title{display:block;font-size:12px;font-weight:800;color:#315987;margin:4px 0 10px}.mode-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding-bottom:5px}
.mode-choice{--mode-face:#d7f3e9;--mode-edge:#80bdac;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:98px;padding:10px 4px;border:2px solid #ffffffb0;border-radius:16px;background:linear-gradient(#ffffff45,transparent),var(--mode-face);color:#204677;box-shadow:0 5px 0 var(--mode-edge),0 7px 10px #17385b15;transition:transform .12s,box-shadow .12s}
.mode-choice[data-mode="rush"]{--mode-face:#ffe5a0;--mode-edge:#d6aa48}.mode-choice[data-mode="flow"]{--mode-face:#dcd7ff;--mode-edge:#a096d6}.mode-choice>span{font-size:24px;line-height:1.1}.mode-choice strong{font-size:14px}.mode-choice small{font-size:9px;color:#395777}.mode-choice[aria-pressed="true"]{outline:3px solid #2964a6;outline-offset:2px;transform:translateY(3px);box-shadow:0 2px 0 var(--mode-edge)}.mode-choice:active{transform:translateY(5px);box-shadow:0 0 0 var(--mode-edge)}.mode-choice:focus-visible{outline:3px solid #d24f28;outline-offset:3px}
@media(max-width:380px){.mode-buttons{gap:8px}.mode-choice{min-height:88px}.mode-choice strong{font-size:12px}.mode-choice small{font-size:8px}}
@media(prefers-reduced-motion:reduce){.mode-choice{transition:none}}

/* The selected mode owns its timing panel; side banners are demos. */
.pace-panel{flex:1 1 100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,1.35fr) minmax(0,1fr);gap:12px;align-items:stretch;padding:12px 0 0;border-top:3px solid #d6aa48;margin-top:4px}
.pace-panel[hidden]{display:none}.pace-panel[data-mode="flow"]{border-top-color:#a096d6}
.mode-controls #pace-label{display:flex;align-items:center;text-align:center;justify-content:center;gap:8px;padding:12px 6px;background:#fff0c8;border:2px solid #e8c367;border-radius:15px;box-shadow:0 4px 0 #d6aa4840;position:relative}
#pace-label:before{content:'';position:absolute;top:-21px;border:8px solid transparent;border-bottom-color:#d6aa48}
.pace-panel[data-mode="flow"] #pace-label{background:#ece7ff;border-color:#b5a9e1}.pace-panel[data-mode="flow"] #pace-label:before{border-bottom-color:#a096d6}
#pace-title{font-size:12px;font-weight:800;color:#294d7a}#pace-explanation{font-size:9px;color:#526381;line-height:1.4}#mode-pace{width:100%;text-align:center;min-height:44px;background:#fffdf5}
.pace-ad{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:8px;padding:10px 5px;border:1px dashed #93a9bb;border-radius:12px;background:#edf2f3;color:#567085;min-width:0}.pace-ad[hidden]{display:none}.pace-ad small{font-size:7px;letter-spacing:1px}.pace-ad strong{font-size:10px;line-height:1.4}.pace-ad>span{font-size:8px}.pace-panel:has(.pace-ad[hidden]){grid-template-columns:minmax(130px,220px);justify-content:center}
@media(max-width:380px){.pace-panel{gap:6px;grid-template-columns:minmax(0,1fr) minmax(116px,1.5fr) minmax(0,1fr)}.pace-ad strong{font-size:9px}#pace-title{font-size:11px}.mode-controls #mode-pace{font-size:11px;padding:8px 3px}}

/* Compact leaderboard: podium colors, clear scores and optional rules. */
.modal:has(.rank-panel){width:min(480px,calc(100vw - 28px));padding:24px;max-height:88dvh;overflow:auto}
.rank-panel{display:none}
.modal:has(.rank-panel) h2{font-size:clamp(25px,6vw,34px);line-height:1.1;margin:12px 0 18px}
.modal:has(.rank-panel) .eyebrow{font-size:10px;letter-spacing:3px}
.modal:has(.rank-panel) .profile-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.modal:has(.rank-panel) .username-input{padding:11px 14px;border-radius:14px;font-size:15px;font-weight:700;background:#eef5fa}
.rank-rules{font-size:12px;color:#4b6480;text-align:start;margin:10px 0}
.rank-rules summary{cursor:pointer;padding:6px 0}
.modal:has(.rank-panel) #rank-status{font-size:11px;margin:10px 0;color:#4e6581}
.modal:has(.rank-panel) .rankings{display:grid;gap:8px;margin:12px 0;padding:0}
.modal:has(.rank-panel) .rankings li{display:flex;align-items:center;gap:9px;padding:12px 10px;border:1px solid #ccdeed;border-bottom:4px solid #bbd0e3;border-radius:14px;background:#edf5fc;color:#173e70;font-size:14px;text-align:start}
.modal:has(.rank-panel) .rankings li:first-child{background:#fff0b8;border-color:#e9bd49}
.modal:has(.rank-panel) .rankings li:nth-child(2){background:#e8eff8;border-color:#b3c6dd}
.modal:has(.rank-panel) .rankings li:nth-child(3){background:#ffe7d6;border-color:#e4b494}
.rank-position{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:9px;background:#fff9;box-shadow:0 2px 0 #163c6d18;font-weight:800}
.modal:has(.rank-panel) .rank-name{flex:1;min-width:0;overflow-wrap:anywhere;font-weight:700}
.rank-bot{font:700 9px/1 Arial,sans-serif;color:#466281;background:#fff9;border-radius:5px;padding:4px}
.modal:has(.rank-panel) .rankings strong{font-size:19px;color:#173e70;font-variant-numeric:tabular-nums}
.modal:has(.rank-panel) .rank-own{padding:12px;background:#194988;color:white;border-radius:12px;font-size:14px;margin:12px 0}
.modal:has(.rank-panel) .primary{margin-top:16px;padding:13px;font-size:16px}
@media(max-width:380px){.modal:has(.rank-panel){padding:18px}.modal:has(.rank-panel) .rankings li{gap:6px;font-size:12px}.modal:has(.rank-panel) .rankings strong{font-size:16px}}

.account-actions{display:grid;gap:10px}.account-actions .extra{margin:0;width:100%;min-height:48px}.account-actions button:disabled{opacity:.5;cursor:not-allowed}#account-status{font-size:13px;color:#315377}

/* One shared navigation row under the game. */
footer.game-footer{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:nowrap}
footer.game-footer .legal-links{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:22px;font:12px/1.6 Arial,Helvetica,sans-serif;color:#afbedb}
footer.game-footer .legal-links a{font:inherit;color:inherit;white-space:nowrap;text-decoration:underline;text-underline-offset:3px}
@media(max-width:900px){footer.game-footer{flex-wrap:wrap;justify-content:center}footer.game-footer .legal-links{justify-content:center;flex-wrap:wrap;gap:12px 18px}}

/* House promotions: Revolving destinations, no advertiser placeholders. */
.new-game-top .etna-ad{background:linear-gradient(115deg,#142442,#253c60);color:#fff;border:1px solid #405b80;box-shadow:0 4px 0 #09152e}
.etna-ad .ad-label{color:#c4fa72;font-weight:700;letter-spacing:.3px}
.etna-ad .etna-ad-icon{background:url('assets/favicon.svg') center/contain no-repeat;width:48px;height:48px}
.etna-ad-copy p{color:#b6c5e8}.etna-ad .etna-ad-link{background:#c4fa72;color:#132339;box-shadow:0 3px 0 #779e3b}
.pace-ad.revolving-promo{border:1px solid #405b80;border-bottom:4px solid #0b1730;background:linear-gradient(145deg,#182a48,#243e5c);color:#fff;padding:12px 8px;gap:10px}
.revolving-promo small{color:#c4fa72;font-weight:700;letter-spacing:0}
.revolving-promo button{font:700 10px/1.4 Arial,sans-serif;color:#132339;background:#c4fa72;border:0;border-radius:8px;padding:8px;min-height:38px;max-width:100%;cursor:pointer}
.revolving-promo button:hover,.etna-ad-link:hover{filter:brightness(1.08)}
.revolving-promo button:focus-visible{outline:3px solid #56c8f2;outline-offset:3px}
