:root { --ink:#e7f4f4; --muted:#8ca6ac; --bg:#07131f; --line:#214659; --aqua:#52f0d1; --yellow:#ffd85c; --coral:#ff8f76; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at 50% -10%,#153e54 0,#091c2a 35%,var(--bg) 68%); color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif; letter-spacing:-.02em; }
button,input { font:inherit; }
body:not(.playing) .shell { display:none; }
.start-screen { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; padding:48px 24px 11vh; text-align:center; }
.start-brand { display:flex; align-items:center; gap:12px; font-size:clamp(64px,12vw,120px); font-weight:900; letter-spacing:-.09em; }
.start-brand .brand-mark { width:clamp(42px,6vw,64px); height:clamp(42px,6vw,64px); border-radius:18px 18px 18px 5px; }
.start-brand .brand-mark:after { width:11px; height:11px; top:13px; left:13px; box-shadow:15px 6px 0 #08202a; }
.start-screen p { color:var(--muted); font-size:17px; margin:16px 0 28px; }
.start-button { border:0; border-radius:14px; padding:16px 44px; background:var(--aqua); color:#062029; font-size:17px; font-weight:900; cursor:pointer; box-shadow:0 0 35px #52f0d133; transition:transform .15s,filter .15s; }
.start-button:hover { transform:translateY(-2px); filter:brightness(1.08); }
.playing .start-screen { display:none; }
.playing .shell { width:min(720px,calc(100% - 36px)); }
.playing main { display:block; }
.playing .intro { display:none; }
.playing .game { min-height:calc(100vh - 132px); display:flex; flex-direction:column; justify-content:center; }
.playing .letters { width:min(100%,520px); margin-left:auto; margin-right:auto; }
.playing .composer-label { width:min(100%,420px); margin-left:auto; margin-right:auto; }
.playing footer { display:none; }
.shell { width:min(1120px,calc(100% - 36px)); margin:0 auto; padding:28px 0 48px; }
header { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:40px; }
.brand { display:flex; align-items:center; gap:12px; font-weight:900; font-size:26px; letter-spacing:-.06em; }
.brand-mark { width:32px; height:32px; border-radius:11px 11px 11px 3px; background:var(--aqua); transform:rotate(-10deg); position:relative; box-shadow:0 0 30px #52f0d155; }
.brand-mark:after { content:''; position:absolute; width:8px; height:8px; border-radius:50%; background:#08202a; top:9px; left:9px; box-shadow:10px 4px 0 #08202a; }
.tag { color:var(--muted); font-size:13px; letter-spacing:.08em; text-transform:uppercase; font-weight:800; }
main { display:grid; grid-template-columns:1fr 1.05fr; gap:28px; align-items:start; }
.intro { padding:24px 0; }
h1 { font-size:clamp(50px,7vw,94px); line-height:.88; margin:0 0 22px; letter-spacing:-.09em; max-width:540px; }
h1 em { color:var(--aqua); font-style:normal; }
.lede { font-size:18px; line-height:1.5; color:#b1c9cc; max-width:440px; margin:0 0 28px; }
.rules { display:flex; gap:10px; flex-wrap:wrap; }
.rule { padding:10px 13px; color:#b5cdd0; border:1px solid var(--line); border-radius:12px; background:#0c2230a6; font-size:13px; }
.rule strong { color:var(--aqua); margin-right:5px; }
.game { position:relative; background:linear-gradient(145deg,#102d3e,#0b1e2b); border:1px solid #285369; border-radius:24px; padding:22px; box-shadow:0 22px 70px #0005, inset 0 1px #ffffff0d; }
.countdown-overlay { display:none; position:fixed; inset:0; z-index:20; place-items:center; color:#3d2818; text-shadow:4px 4px 0 #e7c37e; pointer-events:none; }
.counting-down .countdown-overlay { display:grid; }
.topline { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.eyebrow { color:var(--muted); font-size:12px; letter-spacing:.12em; text-transform:uppercase; font-weight:800; }
.score { font-size:14px; color:var(--yellow); font-weight:850; }
.timer-wrap { margin-bottom:22px; }
.timer-row { display:flex; justify-content:space-between; align-items:end; margin-bottom:8px; }
.timer { font-size:44px; line-height:1; font-weight:900; letter-spacing:-.07em; }
.timer small { font-size:13px; color:var(--muted); letter-spacing:0; margin-left:6px; }
.progress { height:7px; border-radius:20px; background:#06141f; overflow:hidden; }
.progress > span { display:block; width:100%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--aqua),#a3ffe8); transition:width .3s linear; }
.reverse-points { margin:-8px auto 18px; color:#ffe28b; text-align:center; font-weight:900; }
.letters { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:22px; }
.letters { display:flex; justify-content:center; margin-bottom:22px; }
.camel-meter { display:flex; flex-direction:column; align-items:center; gap:10px; }
.playing .camel-meter { transform:translateY(90px); }
.camel-art { position:relative; width:768px; height:732px; image-rendering:pixelated; }
.camel-sprite,.camel-layer { position:absolute; left:0; top:0; width:128px; height:122px; transform:scale(6); transform-origin:top left; image-rendering:pixelated; pointer-events:none; }
.camel-sprite { z-index:1; }
.camel-layer { z-index:3; }
.camel-background { position:absolute; z-index:2; display:block; image-rendering:pixelated; pointer-events:none; }
.flash-background { display:none; }
.regular-background.empty-regular { display:none; }
.flash-background.warning-flash { display:block; animation:background-flash .7s steps(2,end) infinite; }
.flash-background.empty-flash { display:block; }
.reverse-mode .flash-background { display:none !important; }
.reverse-mode .regular-background.empty-regular { display:block; }
.reverse-mode .camel-stat.dry-letter { color:#3d2818; }
@keyframes background-flash { 0%,49% { opacity:0; } 50%,100% { opacity:1; } }
.camel-fill-clip { position:absolute; z-index:3; overflow:hidden; image-rendering:pixelated; }
.camel-fill-sprite { display:block; width:auto; height:auto; image-rendering:pixelated; }
.camel-legend { position:absolute; left:0; top:240px; z-index:4; width:768px; height:52px; pointer-events:none; }
.camel-stat { position:absolute; top:0; display:flex; flex-direction:column; align-items:center; gap:3px; color:#3d2818; font-size:20px; font-weight:900; text-transform:uppercase; transform:translateX(-50%); text-shadow:2px 2px 0 #d8b274; }
.camel-stat:nth-child(1) { left:237px; }
.camel-stat:nth-child(2) { left:384px; }
.camel-stat:nth-child(3) { left:537px; }
.camel-stat small { color:#3d2818; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.camel-stat.dry-letter { color:#ff6b6b; }
.letter-card { border:1px solid var(--line); border-radius:16px; padding:14px; background:#0a1e2c; position:relative; overflow:hidden; }
.letter-card.vowel { border-color:#5d5560; }
.letter-card.dry-letter { border-color:#ff5f5f; box-shadow:0 0 0 2px #ff5f5f33, inset 0 0 24px #ff5f5f12; }
.letter-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:13px; }
.letter { font-size:35px; font-weight:900; color:var(--aqua); text-transform:uppercase; letter-spacing:-.08em; }
.vowel .letter { color:var(--yellow); }
.kind { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.1em; }
.water-track { height:78px; border-radius:11px; background:#07151f; overflow:hidden; position:relative; display:flex; align-items:end; }
.water { width:100%; height:100%; background:linear-gradient(180deg,#75fff0,#20b9c0); transition:height .8s ease; position:relative; }
.water:after { content:''; position:absolute; top:-4px; left:-10%; width:120%; height:8px; background:#b6fff2aa; border-radius:50%; }
.vowel .water { background:linear-gradient(180deg,#ffe783,#f09c54); }
.water-label { position:absolute; inset:0; display:grid; place-items:center; color:#06151c; font-size:15px; font-weight:900; mix-blend-mode:screen; text-shadow:0 1px #fff8; }
.composer-label { display:flex; justify-content:space-between; color:var(--muted); text-transform:uppercase; font-size:11px; letter-spacing:.11em; font-weight:800; margin-bottom:9px; }
.composer { display:grid; grid-template-columns:repeat(6,1fr); gap:7px; margin-bottom:14px; }
.composer { width:min(100%,420px); margin-left:auto; margin-right:auto; }
.slot { min-width:0; height:50px; border:0; background:#071723 url('sprites/text_box.png') center/100% 100% no-repeat; border-radius:0; color:var(--ink); text-align:center; font-size:25px; font-weight:850; text-transform:lowercase; outline:none; image-rendering:pixelated; }
.slot:focus { border-color:var(--aqua); box-shadow:0 0 0 3px #52f0d122; }
.slot.dry-letter { border-color:#ff5f5f; color:#ff7b7b; box-shadow:0 0 0 3px #ff5f5f22; }
.slot[disabled] { opacity:.35; }
.composer-note { color:var(--muted); text-align:center; font-size:12px; margin:8px 0 0; }
.message { min-height:24px; margin-top:14px; font-size:14px; color:var(--muted); }
.message.good { color:var(--aqua); } .message.bad { color:var(--coral); }
.game-over-modal { position:fixed; inset:0; z-index:10; display:none; place-items:center; padding:20px; background:transparent; backdrop-filter:none; }
.game-over-modal.open { display:grid; }
.selection-modal { position:fixed; inset:0; z-index:15; display:none; place-items:center; padding:20px; background:transparent; }
.selection-modal.open { display:grid; }
.selection-card { width:432px; height:732px; padding:0; }
.selection-canvas { position:relative; width:144px; height:244px; transform:scale(3); transform-origin:top left; background:url('sprites/selection_menu/selection_menu_background.png') center/144px 244px no-repeat; image-rendering:pixelated; }
.selection-canvas h2 { position:absolute; left:0; top:16px; width:144px; height:16px; margin:0; display:flex; justify-content:center; align-items:center; color:#f5e6c5; font-weight:400; }
.selection-canvas h2 .sprite-text { transform:scale(.67); transform-origin:center; }
.selection-options { position:absolute; left:12px; top:47px; width:120px; display:flex; flex-direction:column; gap:5px; }
.selection-mode-button { position:relative; width:120px; height:27px; padding:2px 4px; display:flex; align-items:center; justify-content:center; border:4px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:4px; border-image-outset:0; border-image-repeat:stretch; background:transparent; color:#3d2818; cursor:pointer; image-rendering:pixelated; transition:transform .12s steps(2,end),filter .12s steps(2,end); }
.selection-mode-button.unavailable-mode { filter:grayscale(1); opacity:.48; cursor:not-allowed; }
.selection-mode-button.unavailable-mode:hover { transform:none; filter:grayscale(1) brightness(1.12); }
.selection-mode-button.unavailable-mode:hover::after { content:'currently not available'; position:absolute; left:50%; top:100%; z-index:3; width:max-content; margin-top:5px; padding:4px 6px; border:1px solid #f5e6c5; background:#302b25; color:#f5e6c5; font:10px/1 monospace; white-space:nowrap; transform:translateX(-50%); image-rendering:pixelated; }
.selection-mode-button:hover { transform:translateY(-2px); filter:brightness(1.12); }
.selection-cancel-button { position:absolute; left:12px; bottom:12px; width:120px; height:27px; padding:2px 4px; display:flex; align-items:center; justify-content:center; border:4px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:4px; border-image-outset:0; border-image-repeat:stretch; background:transparent; color:#3d2818; cursor:pointer; image-rendering:pixelated; transition:transform .12s steps(2,end),filter .12s steps(2,end); }
.selection-cancel-button:hover { transform:translateY(-2px); filter:brightness(1.12); }
.selection-cancel-button .sprite-text { transform:scale(.9); transform-origin:center; }
.selection-mode-button .sprite-text { transform:translateY(-2px); transform-origin:center; }
.game-over-card { width:432px; height:732px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.modal-canvas { position:relative; width:144px; height:244px; transform:scale(3); transform-origin:top left; background:url('sprites/game_end modal/sandstorm/sandstorm_modal_background.png') center/144px 244px no-repeat; image-rendering:pixelated; }
.modal-canvas h2 { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.modal-stat { position:absolute; display:flex; flex-direction:column; align-items:center; justify-content:center; width:46px; height:35px; color:#f5e6c5; text-align:center; }
.modal-score { left:17px; top:15px; }
.modal-highscore { left:81px; top:15px; }
.modal-stat span, .modal-stat strong { display:block; min-height:12px; font-weight:400; line-height:1; }
.modal-stat strong { margin-top:4px; font-size:11px; color:#fff2d2; }
.modal-stat > span, .modal-stat > strong { width:100%; display:flex; align-items:center; justify-content:center; text-align:center; }
.modal-canvas .sprite-text { transform:scale(.67); transform-origin:center; }
.modal-trophy { position:absolute; left:16px; top:80px; width:32px; height:32px; object-fit:contain; image-rendering:pixelated; animation:trophy-flash-in .9s steps(6,end) both; }
.trophy-bronze { --trophy-glow:#d88943; }
.trophy-silver { --trophy-glow:#e9f7ff; }
.trophy-gold { --trophy-glow:#ffe36b; }
@keyframes trophy-flash-in { 0% { opacity:0; filter:brightness(4) drop-shadow(0 0 0 transparent); } 25% { opacity:1; filter:brightness(2.5) drop-shadow(0 0 2px var(--trophy-glow)); } 55% { filter:brightness(1.5) drop-shadow(0 0 4px var(--trophy-glow)); } 100% { opacity:1; filter:brightness(1) drop-shadow(0 0 2px var(--trophy-glow)) drop-shadow(0 0 5px color-mix(in srgb, var(--trophy-glow) 55%, transparent)); } }
.chart-indicators { position:absolute; inset:0; pointer-events:none; }
.chart-indicator { position:absolute; left:22px; display:flex; align-items:center; justify-content:center; width:16px; height:10px; color:#f5e6c5; transform:translate(-50%,-50%); }
.chart-indicator:nth-child(1) { top:192px; }
.chart-indicator:nth-child(2) { top:176px; }
.chart-indicator:nth-child(3) { top:160px; }
.chart-indicator:nth-child(4) { top:144px; }
.chart-indicator:nth-child(5) { top:128px; }
.chart-indicator .sprite-text { transform:scale(.67); transform-origin:center; }
.word-chart { position:absolute; left:32px; top:128px; width:64px; height:63px; display:flex; align-items:end; justify-content:flex-start; gap:0; padding:0; margin:0; border:0; }
.chart-column { position:relative; flex:0 0 16px; width:16px; height:63px; display:flex; flex-direction:column; justify-content:end; align-items:center; gap:0; }
.chart-bar-wrap { width:16px; height:63px; display:flex; align-items:end; justify-content:center; }
.chart-bar { width:8px; min-height:0; background:#fff; transform:scaleY(0); transform-origin:bottom; animation:chart-rise .95s steps(12,end) forwards; animation-delay:calc(var(--chart-index, 0) * .3s); }
@keyframes chart-rise { from { transform:scaleY(0); opacity:.35; } to { transform:scaleY(1); opacity:1; } }
.modal-action { position:absolute; top:217px; display:flex; align-items:center; justify-content:center; width:46px; height:14px; padding:0; border:4px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:4px; border-image-outset:0; border-image-repeat:stretch; background:transparent; color:#f5e6c5; cursor:pointer; image-rendering:pixelated; transition:transform .15s ease,filter .15s ease; }
.modal-action:hover { transform:translateY(-2px); filter:brightness(1.08); }
.modal-leaderboard { left:17px; }
.modal-main-menu { left:81px; }
.chart-count { position:absolute; left:50%; bottom:calc(var(--bar-height) + 2px); display:flex; align-items:center; justify-content:center; width:16px; white-space:nowrap; color:#f5e6c5; font-size:13px; font-weight:850; transform:translateX(-50%); }
.chart-label { position:absolute; top:65px; display:flex; align-items:center; justify-content:center; width:16px; height:8px; color:#f5e6c5; transform:translateX(-50%); }
.chart-label { left:8px; }
.chart-count .sprite-text { transform:scale(.67); transform-origin:center; }
.chart-label .sprite-text { transform:scale(.67); transform-origin:center; }
.log { margin-top:24px; border-top:1px solid var(--line); padding-top:15px; }
.log-head { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.1em; font-weight:800; margin-bottom:10px; }
.entries { display:flex; gap:7px; flex-wrap:wrap; min-height:26px; }
.entry { padding:5px 8px; background:#15384a; border-radius:7px; color:#d7eeee; font-size:13px; }
.entry b { color:var(--yellow); margin-left:4px; }
footer { margin-top:40px; color:#557784; font-size:12px; display:flex; justify-content:space-between; }
@media (max-width:760px) { .shell{width:min(100% - 24px,600px);padding-top:18px;} header{margin-bottom:22px;} main{grid-template-columns:1fr;gap:10px;} .intro{padding:8px 0 16px;} h1{font-size:62px;max-width:360px;} .lede{font-size:16px;margin-bottom:18px;} .game{padding:16px;border-radius:20px;} footer{margin-top:24px;} }

/* Sandstorm game view */
body { background:#c99655; color:#3d2818; overflow:hidden; }
.sandstorm-field { position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; background:#c99655; image-rendering:pixelated; }
.sandstorm-overlay { position:fixed; inset:0; z-index:1; overflow:hidden; pointer-events:none; opacity:.42; mix-blend-mode:screen; image-rendering:pixelated; }
.sandstorm-overlay::before { content:''; position:absolute; inset:-25%; background:repeating-linear-gradient(164deg,transparent 0 18px,rgba(255,226,164,.55) 18px 20px,transparent 20px 42px); transform:translateX(-8%); animation:sand-gust 6s steps(12,end) infinite; }
.sandstorm-overlay::after { content:''; position:absolute; inset:0; background-image:radial-gradient(circle at 12% 18%,#ffe6ad 0 2px,transparent 2px),radial-gradient(circle at 67% 31%,#f4c77d 0 1px,transparent 1px),radial-gradient(circle at 38% 74%,#ffe0a0 0 2px,transparent 2px),radial-gradient(circle at 86% 66%,#e7b66c 0 1px,transparent 1px); background-size:137px 113px,89px 71px,173px 149px,121px 97px; animation:dust-drift 4.5s steps(9,end) infinite; }
@keyframes sand-gust { 0% { transform:translate(-12%,4%); } 100% { transform:translate(12%,-4%); } }
@keyframes dust-drift { 0% { transform:translateX(-3%); } 100% { transform:translateX(5%); } }
.background-sky, .background-dunes { position:absolute; inset:0; background-position:center; background-repeat:no-repeat; background-size:100% 100%; image-rendering:pixelated; }
.background-sky { z-index:1; }
.background-sky::before, .background-sky::after { content:''; position:absolute; inset:0; background-position:center; background-repeat:no-repeat; background-size:100% 100%; image-rendering:pixelated; transition:opacity 1.25s ease-in-out; }
.background-sky::before { background-image:url('sprites/background/day_background.png'); opacity:1; }
.background-sky::after { background-image:url('sprites/background/night_background.png'); opacity:0; }
.background-dunes { z-index:3; }
.background-dunes::before, .background-dunes::after { content:''; position:absolute; inset:0; background-position:center; background-repeat:no-repeat; background-size:100% 100%; image-rendering:pixelated; transition:opacity 1.25s ease-in-out; }
.background-dunes::before { background-image:url('sprites/background/dune_background.png'); opacity:1; }
.background-dunes::after { background-image:url('sprites/background/dune_night_background.png'); opacity:0; }
.celestial-layer { position:absolute; inset:0; z-index:2; overflow:hidden; }
.celestial-orb { position:absolute; left:-15%; top:80%; width:288px; height:290px; image-rendering:pixelated; transform:translate(-50%,-50%); }
.sun-orb { filter:drop-shadow(0 0 22px rgba(255,190,65,.82)) drop-shadow(0 0 58px rgba(255,176,42,.42)); }
.moon-orb { filter:drop-shadow(0 0 18px rgba(255,255,255,.9)) drop-shadow(0 0 48px rgba(232,244,255,.55)); }
.background-ready:not(.night-mode) .sun-orb { left:50%; top:43%; }
.background-ready:not(.night-mode) .moon-orb { left:-15%; top:80%; }
.night-mode .background-sky::before { opacity:0; }
.night-mode .background-sky::after { opacity:1; }
.night-mode .background-dunes::before { opacity:0; }
.night-mode .background-dunes::after { opacity:1; }
.night-mode .sun-orb { left:115%; top:80%; }
.night-mode .moon-orb { left:50%; top:43%; }
.sandstorm-field::before { display:none; }
.sand-layer { position:absolute; left:-15%; width:130%; height:18%; opacity:.32; background:repeating-linear-gradient(176deg,transparent 0 7px,#ffe0a0 7px 9px,transparent 9px 18px); filter:blur(.3px); animation:sand-drift 6s linear infinite; }
.sand-layer-one { top:18%; transform:rotate(-5deg); }
.sand-layer-two { top:44%; opacity:.2; transform:rotate(4deg) scale(1.2); animation-duration:9s; animation-direction:reverse; }
.sand-layer-three { top:72%; opacity:.24; transform:rotate(-2deg) scale(1.4); animation-duration:12s; }
@keyframes sand-drift { from { translate:-8% 0; } to { translate:8% 0; } }
@keyframes sand-flicker { 0%,100% { transform:translate(0,0); } 50% { transform:translate(6px,-3px); } }
.sandstorm-field::after { content:''; position:absolute; inset:-20%; opacity:.28; background:repeating-linear-gradient(168deg,transparent 0 24px,#ffe6ad 25px 27px,transparent 28px 52px); mix-blend-mode:screen; animation:wind-sweep 5s linear infinite; }
.sandstorm-field::after, .sand-layer { display:none; }
@keyframes sun-haze { 0%,100% { opacity:.58; } 50% { opacity:.82; } }
@keyframes wind-sweep { from { transform:translateX(-9%) translateY(2%); } to { transform:translateX(9%) translateY(-2%); } }
.start-screen { position:relative; z-index:2; color:#3d2818; background:transparent; }
.menu-controls { position:absolute; top:28px; left:28px; z-index:4; display:flex; flex-direction:column; gap:2px; }
.menu-control { width:64px; height:64px; padding:0; border:0; background:transparent; cursor:pointer; image-rendering:pixelated; transition:transform .15s,filter .15s; }
.menu-control img { display:block; width:64px; height:64px; object-fit:fill; image-rendering:pixelated; }
.menu-control:hover { transform:scale(1.08); filter:brightness(1.15); }
.menu-control:focus-visible { outline:3px solid #ffe0a2; outline-offset:3px; }
.menu-control:active { transform:scale(.96); }
.leaderboard { display:none; position:absolute; top:235px; left:28px; z-index:4; width:450px; color:#3d2818; text-align:left; opacity:.7; }
.leaderboard-open .start-brand, .leaderboard-open .start-screen > p, .leaderboard-open .home-actions { display:none; }
.leaderboard-open .leaderboard { display:block; left:50%; top:50%; transform:translate(-50%,-50%); }
.account-panel { display:none; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:4; width:min(560px,calc(100% - 48px)); color:#3d2818; }
.account-open .start-brand, .account-open .start-screen > p, .account-open .home-actions, .account-open .leaderboard { display:none; }
.account-open .account-panel { display:flex; flex-direction:column; align-items:stretch; }
.account-signup-view { display:none; }
.google-setup-view { display:none; }
.account-panel.signup-open .account-login-view { display:none; }
.account-panel.signup-open .account-signup-view { display:block; }
.account-panel.google-setup-open .account-login-view, .account-panel.google-setup-open .account-signup-view { display:none; }
.account-panel.google-setup-open .google-setup-view { display:block; }
.account-authenticated-view { display:none; }
.account-panel.authenticated .account-login-view, .account-panel.authenticated .account-signup-view, .account-panel.authenticated .google-setup-view { display:none; }
.account-panel.authenticated .account-authenticated-view { display:block; }
.account-login-view .friends-tools { display:none; }
.account-panel h2 { margin:0 0 24px; text-align:center; min-height:28px; }
.account-row { display:flex; flex-direction:column; align-items:stretch; margin-bottom:16px; }
.account-panel label { align-self:flex-start; min-height:32px; margin:0 0 8px; text-align:left; }
.account-label-line { display:flex; align-items:center; gap:8px; min-height:32px; margin-bottom:8px; }
.account-label-line label { margin:0; }
.account-label-line > span { min-height:20px; }
.account-input-wrap { position:relative; display:block; width:100%; }
.account-field { position:relative; z-index:1; width:100%; height:58px; margin:0; padding:8px 14px; border:16px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:16px; border-image-outset:0; border-image-repeat:stretch; background:transparent; color:transparent !important; -webkit-text-fill-color:transparent !important; caret-color:#3d2818; outline:none; image-rendering:pixelated; font:1px/1 monospace; text-indent:0; text-shadow:none; }
.account-field-glyph { position:absolute; inset:0; z-index:3; display:flex; align-items:center; padding:0 16px; overflow:hidden; pointer-events:none; color:#3d2818; }
.account-field-glyph .sprite-text { transform:translateY(-2px); transform-origin:left center; }
.account-field:focus { outline:3px solid #ffe0a2; outline-offset:3px; }
.account-action { min-height:58px; margin-top:2px; padding:8px 18px; border:16px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:16px; border-image-outset:0; border-image-repeat:stretch; background:transparent; color:#3d2818; cursor:pointer; image-rendering:pixelated; }
.login-action { align-self:center; width:55%; min-height:48px; margin-bottom:18px; }
.signup-action { margin-top:18px; }
.signup-submit { margin-top:2px; }
.back-login { width:55%; align-self:center; min-height:48px; margin-top:18px; }
.account-status { min-height:26px; margin-top:14px; text-align:center; color:#5c3c22; }
.google-action { margin-top:12px; font:12px/1 monospace; }
.friends-tools { margin-top:18px; padding-top:14px; border-top:2px solid #3d2818; }
.friend-code-label { min-height:22px; text-align:center; }
.friend-code { margin:4px auto 14px; color:#3d2818; font:22px/1 monospace; letter-spacing:.12em; text-align:center; }
.friend-code-entry { width:100%; height:48px; padding:8px 12px; border:8px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:8px; background:transparent; color:transparent !important; -webkit-text-fill-color:transparent !important; caret-color:#3d2818; outline:none; text-align:center; text-transform:uppercase; image-rendering:pixelated; font:0/0 monospace; text-indent:-9999px; }
.friend-add-button { width:100%; min-height:44px; margin-top:8px; }
.account-action:hover { filter:brightness(1.08); }
.account-tabs { display:flex; gap:8px; margin:0 0 22px; }
.account-tabs button { flex:1; min-height:46px; padding:8px 12px; border:10px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:10px; background:transparent; color:#3d2818; cursor:pointer; image-rendering:pixelated; }
.account-tabs button.active { filter:brightness(1.15); }
.account-page-section[hidden] { display:none; }
.account-save-button { width:100%; }
.account-logout-button { width:100%; margin-top:34px; }
.trophy-summary-title, .friends-list-title { margin-top:24px; color:#5c3c22; text-align:center; }
.trophy-summary { display:flex; justify-content:center; gap:32px; margin-top:12px; }
.trophy-total { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:5px; min-width:58px; color:#3d2818; }
.trophy-total img { display:block; width:64px; height:64px; max-width:none; object-fit:fill; image-rendering:pixelated; }
.trophy-total:nth-child(1) img, .trophy-total:nth-child(2) img { margin-top:32px; }
.trophy-total:nth-child(3) img { width:96px; height:96px; }
.friends-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; max-height:180px; overflow:auto; }
.friend-list-entry { min-height:38px; padding:8px 12px; border:8px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:8px; background:transparent; color:#3d2818; text-align:center; }
.home-actions { display:flex; width:100%; align-items:center; justify-content:center; gap:12px; transform:translateY(-120px); }
.menu-text-button { display:flex; align-items:center; justify-content:center; text-align:center; min-width:150px; height:64px; padding:8px 18px; border:16px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:16px; border-image-outset:0; border-image-repeat:stretch; background:transparent; color:#3d2818; cursor:pointer; image-rendering:pixelated; transition:transform .15s ease,filter .15s ease; }
.how-to-play-button { min-width:190px; }
.menu-text-button:hover { transform:translateY(-4px); filter:brightness(1.08); }
.leaderboard-season { display:flex; gap:14px; align-items:center; min-height:26px; margin-bottom:12px; font-size:18px; }
.leaderboard-tabs { display:flex; gap:8px; margin-bottom:12px; }

/* Mobile layout: preserve pixel scaling while fitting narrow viewports. */
@media (max-width:600px) {
  body { overflow-x:hidden; }
  .start-screen { min-height:100svh; padding:32px 12px 8vh; }
  .menu-controls { top:12px; left:12px; gap:0; }
  .menu-control, .menu-control img { width:48px; height:48px; }
  .home-actions { flex-wrap:wrap; gap:8px; transform:translateY(-72px); }
  .menu-text-button, .how-to-play-button { min-width:0; width:calc(50% - 4px); height:56px; padding:6px 8px; border-width:12px; }
  .playing .shell { width:100%; padding:0; }
  .playing .game { min-height:100svh; padding:8px; border:0; border-radius:0; }
  .playing .camel-meter { width:100%; overflow:hidden; transform:none; gap:4px; }
  .camel-art { --camel-scale:min(1, calc((100vw - 16px) / 768)); left:50%; width:768px; height:calc(732px * var(--camel-scale)); transform:translateX(-50%) scale(var(--camel-scale)); transform-origin:top center; flex:0 0 auto; }
  .camel-stat { font-size:18px; }
  .camel-stat small { font-size:10px; }
  .composer-label { width:100%; font-size:9px; letter-spacing:.06em; text-align:center; }
  .composer { width:100%; max-width:420px; gap:4px; margin-bottom:8px; }
  .slot { height:44px; font-size:22px; }
  .composer-note { font-size:10px; }
  .message { margin-top:8px; font-size:12px; }
  .selection-card, .game-over-card { --modal-scale:min(1, calc((100vw - 24px) / 432)); transform:scale(var(--modal-scale)); transform-origin:center; flex:0 0 auto; }
  .selection-modal, .game-over-modal { padding:12px; overflow:hidden; }
  .leaderboard { width:calc(100% - 32px); max-height:82svh; overflow:auto; left:16px; top:50%; transform:translateY(-50%); }
  .leaderboard-open .leaderboard { left:16px; transform:translateY(-50%); }
  .account-panel { width:calc(100% - 24px); max-height:88svh; overflow-y:auto; }
  .account-panel h2 { margin-bottom:16px; }
  .account-field { height:52px; border-width:12px; }
  .account-action { min-height:50px; border-width:12px; }
  .trophy-summary { gap:12px; }
  .trophy-total img { width:52px; height:52px; }
  .trophy-total:nth-child(3) img { width:76px; height:76px; }
}
.leaderboard-tabs button { min-width:82px; min-height:30px; padding:4px 8px; border:8px solid transparent; border-image-source:url('sprites/text_box.png'); border-image-slice:4 fill; border-image-width:8px; background:transparent; color:#3d2818; cursor:pointer; image-rendering:pixelated; }
.leaderboard-tabs button.active { filter:brightness(1.2); }
.leaderboard h2, .leaderboard h3 { margin:0 0 9px; min-height:16px; font-size:16px; font-weight:400; line-height:1; }
.leaderboard h3 { margin-top:18px; margin-bottom:8px; font-size:13px; }
.leaderboard-list, .leaderboard-nearby-list { display:flex; flex-direction:column; gap:5px; }
.leaderboard-columns, .leaderboard-row { display:grid; grid-template-columns:40px 1fr 95px 75px; align-items:center; column-gap:7px; min-height:28px; white-space:nowrap; }
.leaderboard-columns { min-height:28px; margin-bottom:3px; font-size:12px; font-weight:400; }
.leaderboard-score-column, .leaderboard-words-column, .leaderboard-score, .leaderboard-words { justify-self:end; }
.leaderboard-row .sprite-text { transform:scale(1); transform-origin:left center; }
.leaderboard-row.current { color:#ffe0a2; text-shadow:1px 1px 0 #4c2d19; }
.leaderboard-row.current .sprite-text { filter:brightness(1.08); }
.leaderboard-nearby-list { gap:5px; margin-top:16px; padding-top:12px; border-top:2px solid #3d2818; }
.leaderboard-row.current .leaderboard-name .sprite-glyph { filter:sepia(1) saturate(5) hue-rotate(70deg) brightness(.8); }
@media (max-width:700px) { .leaderboard { top:215px; left:18px; width:450px; transform:scale(.62); transform-origin:top left; } .leaderboard-open .leaderboard { transform:translate(-50%,-50%) scale(.62); transform-origin:center; } .menu-controls { top:18px; left:18px; } }
.night-mode .sandstorm-field { filter:none; }
.night-mode .start-screen { color:#f3d29a; }
.night-mode .start-screen p { color:#dec18c; }
.start-brand { position:absolute; top:96px; left:50%; transform:translateX(-50%); width:min(330px,calc(100% - 48px)); opacity:.8; }
.logo-sprite { display:block; width:100%; height:auto; image-rendering:pixelated; }
.start-screen p { color:#5c3c22; }
.start-button { background:#4c2d19; color:#ffe0a2; border:3px solid #e0b56d; border-radius:4px; box-shadow:4px 4px 0 #7a4b28; image-rendering:pixelated; }
.start-button:hover { filter:brightness(1.15); }
.playing .shell { position:relative; z-index:2; width:min(760px,calc(100% - 28px)); padding:16px 0 28px; }
.playing main { display:block; }
.playing .game { min-height:100vh; padding:10px 0 18px; background:transparent; border:0; border-radius:0; box-shadow:none; }
.playing .timer-wrap { width:min(100%,560px); margin:0 auto 8px; }
.playing .timer { color:#3d2818; text-shadow:2px 2px 0 #e7c37e; }
.playing .timer small,.playing .eyebrow { color:#5c3c22; }
.playing .progress { background:#6e4528; border:2px solid #e2b76e; height:10px; border-radius:2px; }
.playing .progress > span { background:#55c8eb; box-shadow:inset 0 2px #b5f2ff; }
.playing .camel-stat { color:#3d2818; text-shadow:1px 1px 0 #e7c37e; }
.playing .camel-stat small { color:#5c3c22; text-shadow:none; }
.playing .composer { margin-top:16px; }
.playing .slot { background-color:#ffe0a2; }
.playing .slot:focus { box-shadow:0 0 0 3px #55c8eb,3px 3px 0 #5c3c22; }
.playing .composer { position:fixed; z-index:5; left:50%; bottom:20vh; width:426px; max-width:calc(100% - 28px); grid-template-columns:repeat(6,64px); gap:7px; overflow-x:auto; overflow-y:hidden; padding:3px 0 7px; transform:translateX(-50%); }
.playing .slot { width:64px; height:64px; flex:none; background-size:64px 64px; }
.playing .message { position:fixed; z-index:6; left:50%; bottom:calc(20vh + 125px); width:min(620px,calc(100% - 28px)); min-height:22px; margin:0; transform:translateX(-50%); display:flex; justify-content:center; color:#3d2818; text-shadow:1px 1px 0 #e7c37e; }
.playing .message.bad { color:#7d241d; text-shadow:1px 1px 0 #f0b28c; }
.playing .message.good { color:#185d5e; text-shadow:1px 1px 0 #a9ebd7; }
.sprite-text { display:inline-flex; align-items:center; image-rendering:pixelated; }
.sprite-glyph { display:inline-block; flex:none; background-image:url('sprites/font_meed.png'); background-repeat:no-repeat; image-rendering:pixelated; }
.sprite-space { display:inline-block; flex:none; }
.slot-wrap { position:relative; width:64px; height:64px; }
.slot-wrap .slot { position:absolute; inset:0; }
.slot-glyph { position:absolute; inset:0; z-index:2; display:grid; place-items:center; pointer-events:none; }
.slot-glyph .sprite-text { transform:translate(9px,-7px); }
.slot { color:transparent !important; -webkit-text-fill-color:transparent; text-shadow:none; caret-color:#3d2818; }
.slot:disabled + .slot-glyph { opacity:.35; }
.slot.dry-letter { background-image:url('sprites/text_box_letter_unaccepted.png'); }
.slot.required-letter { background-image:url('sprites/text_box_letter_included.png'); }
.slot.required-letter, .slot.dry-letter { opacity:1 !important; }
.slot.required-letter + .slot-glyph, .slot.dry-letter + .slot-glyph { opacity:1 !important; }
