/* A bright game cabinet: quiet centre, playful depth, one action family. */
.automatic-hint .hint-box{max-width:420px;margin:8px auto 4px;padding:10px 12px;font-size:14px;line-height:1.4;text-align:left;overflow-wrap:anywhere}
.actions #hintButton{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px}
.actions #hintButton small{font-size:10px;line-height:1.2}
:root{--teal:#27CFE2;--lemon:#FFEDD9;--coral:#EE438A;--sage:#FFAD80;--ink:#24304B;--burgundy:#24304B}
body{background:linear-gradient(160deg,#EEFCFE,#FFF0E5 52%,#FFE8F1)}
.world-cubes{opacity:1}.ambient-glow:before{background:radial-gradient(circle,#ffad8038,transparent 68%)}.ambient-glow:after{background:radial-gradient(circle,#27cfe226,transparent 68%)}
.screen-header{background:#fffaf8ec;border-bottom:1px solid #ffffff;border-radius:0 0 20px 20px;box-shadow:0 4px 16px #24304b08}.game-top{border:0;padding:0 6px}.game-top .round-icon{border:2px solid #fff;background:linear-gradient(#fff,#FFE4EF);box-shadow:0 3px 0 #f2bdcf;color:#9D1C54}
.top-points{background:linear-gradient(#fff,#FFF0E5);border:2px solid #fff;border-radius:22px;box-shadow:0 3px 0 #E6BDAE;padding:6px 14px}.top-points span{color:#C82769}.top-points strong,.top-points small{color:#24304B}.language-select{background:#fff;border-color:#eac7d4;color:#24304B;font-size:13px;height:40px}
.adventure-card{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:88px;margin:14px 0 12px;padding:10px 14px;border:3px solid #fff;border-radius:25px;background:linear-gradient(115deg,#FFD0BD,#FFAD80 65%,#FFB7B9);box-shadow:inset 0 2px 0 #ffffff66,0 5px 0 #DD8A72,0 9px 18px #dd8a721c;color:#24304B;text-align:left;overflow:hidden;cursor:pointer}
.adventure-card:before{content:"";position:absolute;right:16px;top:-32px;width:145px;height:145px;border:15px solid #ee438a20;transform:rotate(45deg);border-radius:32px;pointer-events:none}.adventure-card:hover{filter:brightness(1.025)}
.adventure-avatar{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 64px;width:64px;height:64px;background:#fff9f5;border:3px solid #fff;border-radius:50%;box-shadow:0 3px 0 #dd8a7255}.adventure-avatar>span{display:flex;gap:1px;height:13px}.adventure-avatar svg{width:14px;height:18px;display:block;overflow:visible}
.adventure-copy{position:relative;display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.adventure-copy>strong{font:700 17px var(--display);line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.adventure-goal{font-size:12px;line-height:1.3;overflow-wrap:anywhere}.adventure-copy small{font-size:11px;line-height:1.2;color:#553D45}.adventure-arrow{position:relative;font:700 28px var(--display);color:#AE205B}
.adventure-copy progress{display:block;width:100%;height:11px;border:2px solid #fff;border-radius:10px;appearance:none;overflow:hidden;background:#B2636433;color:#15A6BF}.adventure-copy progress::-webkit-progress-bar{background:#B2636433}.adventure-copy progress::-webkit-progress-value{background:linear-gradient(#8DEFFA,#1DBCD3);border-radius:7px;box-shadow:inset 0 2px 0 #ffffff66}.adventure-copy progress::-moz-progress-bar{background:linear-gradient(#8DEFFA,#1DBCD3);border-radius:7px}
.play-screen{gap:12px}.stage{padding:10px 10px 0;border:2px solid #ffffffa6;border-radius:30px;background:radial-gradient(ellipse at 50% 40%,#ffffffd9,#fff8f580 67%,#ffffff22);box-shadow:inset 0 2px 0 #fff,0 8px 24px #ee438a08}.stage-title{margin-top:2px}.stage-title h1{color:#24304B;font-size:clamp(21px,4.5vw,27px);font-weight:700}.stage-title p{font-size:14px;color:#60677A}.pyramid:before{background:#ee438a12}.row-marker{color:#C82769}.pyramid-row.active-row:before{background:#27cfe20c;border-color:#27cfe250;box-shadow:0 0 24px #27cfe21c}
.pyramid[data-layers]{--tile:min(var(--cube-cap),calc((100vw - 80px - (var(--row-count) - 1)*10px)/var(--row-count)),max(26px,calc((100dvh - 430px)/var(--row-count) - 10px)));margin-bottom:5px;padding:18px 0 14px}
.tile.unknown,.tile.entered{--block-fill:#27CFE2;--block-ink:#24304B}.tile.unknown.selected-tile{--block-fill:#FFEDD9;--block-ink:#24304B}.pyramid-row:nth-child(4n + 3){--block-fill:#27CFE2;--block-ink:#24304B}.pyramid-row:nth-child(4n + 2){--block-fill:#EE438A;--block-ink:#24304B}.tile.correct{--block-fill:#FFAD80;--block-ink:#24304B}.letter-rack .letter-btn small{background:#fff;color:#9D1C54;border:1px solid #e8bbcd}
.game-controls{background:#fffcf9ee;border:2px solid #fff;border-radius:25px;padding:12px 10px 15px;box-shadow:0 5px 0 #e8cad580,0 9px 24px #ee438a0c}.letter-rack{margin-bottom:4px}.actions{gap:6px;padding:9px 0 0;border-top:1px solid #eac7d455}.actions .primary,.actions .secondary,.actions .erase,.actions .solution-button,.actions .pick-challenge{background:linear-gradient(#CE2D70,#B91F5E);border:1px solid #ae205b;box-shadow:inset 0 2px 0 #ffffff55,0 4px 0 #931B4E,0 6px 8px #c8276915;color:#fff;font-weight:600;min-height:68px;height:68px}.actions .primary:hover:enabled,.actions .secondary:hover:enabled,.actions .pick-challenge:hover:enabled{background:linear-gradient(#D9347B,#C82769);box-shadow:inset 0 2px 0 #ffffff55,0 4px 0 #931B4E}.actions .erase small,.solution-button .solution-cost{color:#fff;font-size:11px}.actions button:disabled{opacity:.5}
.feedback,.feedback.success{background:#fff5ed;border-color:#ffad8080;color:#24304B}.meaning-list span{background:#fff;color:#24304B}.reward-layer.current,.challenge-clock{background:#FFE4EF;border-color:#EE438A;color:#24304B}.reward-layer{background:#ffffffdb;border-color:#eac7d4}.reward-heading{font-size:12px}.maker-credit{margin-top:10px;font-size:12px}.maker-credit span{font-size:12px}
.welcome-screen{border:3px solid #fff;border-radius:30px;background:linear-gradient(150deg,#fff9f5f5,#ffedf4e8);box-shadow:0 6px 0 #e8cad566,0 12px 36px #ee438a0d}.welcome-points{background:linear-gradient(115deg,#FFD0BD,#FFAD80);border:2px solid #fff;border-radius:23px;box-shadow:0 4px 0 #dd8a7280}.welcome-points strong{color:#24304B}.welcome-points small,.welcome-points span{color:#553D45}.played-modes{background:#fff;border-color:#eac7d4}.welcome-screen .primary{background:linear-gradient(#CE2D70,#B91F5E);color:#fff;box-shadow:0 4px 0 #931B4E}
/* The intro stacks actual cubes, then swirls in a hurricane before the title. */
.intro-cube,.intro-row:nth-child(n) .intro-cube{width:48px;height:58px;background:none;box-shadow:none;border-radius:0}.intro-cube svg{display:block;width:100%;height:100%;overflow:visible}.intro-pyramid{gap:2px}.intro-row{gap:3px}
.intro-vortex{width:280px;height:210px;border:0;border-radius:0;animation:intro-storm 1.35s 1.8s linear both;pointer-events:none}.intro-vortex i{position:absolute;inset:0;border:6px solid #27cfe280;border-left-color:transparent;border-bottom-color:#EE438A60;border-radius:50%;transform:rotate(-24deg);box-shadow:0 0 15px #ffffffaa}.intro-vortex i:nth-child(2){inset:18px 12px;transform:rotate(24deg);border-color:#EE438A70;border-right-color:transparent}.intro-vortex i:nth-child(3){inset:38px 30px;transform:rotate(-32deg);border-color:#FFAD80cc;border-left-color:transparent}.intro-vortex i:nth-child(4){inset:64px 70px;transform:rotate(18deg);border-color:#fff;border-bottom-color:transparent}
@keyframes intro-storm{0%{transform:translate(-50%,-50%) rotate(0) scale(.4);opacity:0}20%{opacity:1}75%{opacity:1}100%{transform:translate(-50%,-50%) rotate(540deg) scale(2);opacity:0}}
@media(max-width:600px){.adventure-card{margin:10px 0 12px;min-height:83px;padding:8px 10px;gap:10px}.adventure-avatar{flex-basis:54px;width:54px;height:54px}.adventure-copy>strong{font-size:16px}.stage{padding:9px 6px 0;border-radius:26px}.game-controls{padding:10px 7px 14px}.actions .primary,.actions .secondary,.actions .erase,.actions .solution-button,.actions .pick-challenge{height:70px;min-height:70px;font-size:12px}.intro-name h1{letter-spacing:-1px}}
@media(max-width:360px){.adventure-card{gap:7px}.adventure-goal{font-size:11px}.adventure-copy small{font-size:10px}.actions{gap:4px}.actions .primary,.actions .secondary,.actions .erase,.actions .solution-button,.actions .pick-challenge{height:74px;min-height:74px;font-size:11px}.actions .erase small,.solution-button .solution-cost{font-size:10px}}
@media(max-height:700px) and (max-width:600px){.adventure-card{min-height:73px;margin:8px 0 10px;padding:7px 10px}.adventure-avatar{flex-basis:48px;width:48px;height:48px}.adventure-copy{gap:2px}.stage-title h1{font-size:21px}.stage{padding-top:7px}.pyramid[data-layers]{padding:14px 0 9px}.play-screen{gap:9px}}
@media(min-width:900px),(min-width:480px) and (orientation:landscape) and (max-height:700px){.adventure-card{max-width:600px;margin:13px auto 7px;min-height:80px}.play-screen{grid-template-columns:minmax(0,1.1fr) minmax(220px,1fr);grid-template-areas:"stage controls";grid-template-rows:auto;align-items:center;gap:20px}.pyramid[data-layers]{--tile:min(var(--cube-cap),calc((50vw - 95px - (var(--row-count) - 1)*10px)/var(--row-count)),max(26px,calc((100dvh - 310px)/var(--row-count) - 10px)))}.game-controls{grid-area:controls;align-self:center}.stage{grid-area:stage}}
@media(orientation:landscape) and (max-height:500px){.adventure-card{max-width:none;min-height:58px;padding:5px 12px;margin:5px 0}.adventure-avatar{flex-basis:42px;width:42px;height:42px}.adventure-copy{display:grid;grid-template-columns:1fr 1.3fr;gap:2px 12px;align-items:center}.adventure-copy>strong{font-size:14px}.adventure-copy progress{grid-column:2;grid-row:2}.adventure-copy small{grid-column:1;grid-row:2;font-size:10px}.adventure-goal{font-size:11px}.play-screen{padding-top:7px}.stage-title h1{font-size:20px}.actions .primary,.actions .secondary,.actions .erase,.actions .solution-button,.actions .pick-challenge{height:62px;min-height:62px}.intro-cube,.intro-row:nth-child(n) .intro-cube{width:32px;height:40px}}
@media(prefers-reduced-motion:reduce){.intro-vortex{display:none;animation:none}.intro-name{animation:none}}

.rising-cube{filter:drop-shadow(0 7px 6px #24304b19)}.pyramid-base{background:#ee438a30;box-shadow:0 7px 24px #24304b18}.game-top .round-icon:hover{background:#FFE4EF}.mode-tabs,.settings-card .mode-tabs{background:#ee438a0b}.settings-dialog .select option{background:#FFF9F5}.status-dot{box-shadow:0 0 8px #27cfe244}

.round-reward{margin:0 0 12px;text-align:center;font-size:12px;color:#60677A}.account-signin{display:flex;align-items:center;justify-content:center;min-height:48px;margin:22px auto 14px;border-radius:14px;text-decoration:none;font-weight:600;padding:12px 18px}.account-signout{display:inline-block;margin:12px auto 0;font-size:13px}.account-methods{font-size:13px;line-height:1.6}.account-welcome{text-align:center}body #main>#languageControls{display:flex;justify-content:flex-end;padding:14px 4px 0}

.adventure-copy>.adventure-title{display:flex;align-items:center;gap:8px}.adventure-title>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.adventure-title>.adventure-level{flex-shrink:0;font:600 11px var(--body);color:#9D1C54;background:#fff9f5cc;border:1px solid #fff;border-radius:8px;padding:3px 6px}.level-up-note{font-weight:600;color:#9D1C54;background:#ffe4ef;border-radius:10px;padding:9px;margin:10px 0}

.meaning-source{font-size:11px;color:#60677A;margin:12px 0 6px}

.letter-count-note{margin:0 0 7px;text-align:center;font-size:13px;line-height:1.45;color:#60677A}.letter-rack .letter-btn .letter-count{position:absolute;top:-3px;right:-4px;z-index:8;min-width:26px;height:24px;padding:2px 4px;display:grid;place-items:center;border-radius:9px;border:2px solid #fff;background:#C82769;color:#fff;font:700 13px/1 var(--body);box-shadow:0 2px 5px #24304b20}.letter-btn:disabled .letter-count{background:#fff;color:#60677A;border-color:#eac7d4}.letter-rack{padding-top:8px}

/* Keep letter-use counters above the WebGL cube canvas. */
.letter-rack.webgl-ready .bank-row{position:relative;z-index:3}.letter-rack.webgl-ready .letter-btn .letter-count{visibility:visible;pointer-events:none}
.password-field{position:relative}.account-form .password-field input{padding-right:58px}.account-form .password-toggle{position:absolute;top:50%;right:5px;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:10px;border:0;border-radius:10px;background:transparent;color:#C82769}.password-toggle svg{width:24px;height:24px}.password-toggle:hover{background:#FFE4EF}

.password-control{display:grid;gap:7px}

/* Solved-word lookup stays beside the pyramid, outside the five play actions. */
.pyramid-tools{display:flex;justify-content:flex-end;min-height:0;margin:0 0 .25rem;position:relative;z-index:3}

.meanings-button{min-height:38px;padding:.45rem .8rem;font-size:15px;border-radius:14px}

.meanings-dialog{max-height:calc(100dvh - 2rem);overflow:auto}
#solvedMeanings{margin:1rem 0;display:grid;gap:.6rem}
.solved-meaning{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;align-items:center;padding:.7rem;border-radius:12px;background:rgba(30,170,180,.08)}
.solved-meaning dt{display:grid;gap:.15rem;min-width:0}
.solved-meaning dt small{font-size:14px;opacity:.75}
.solved-meaning dt strong{overflow-wrap:anywhere;color:inherit}
.solved-meaning dd{margin:0;font-size:17px;overflow-wrap:anywhere}

.stage .meanings-button{background:#D72C74;color:#fff;border:1px solid #B81F5F;box-shadow:inset 0 2px 0 #ffffff40,0 3px 0 #A51E54;opacity:1;min-height:44px}
.stage .meanings-button:disabled{background:#A65075;color:#fff;border-color:#8E3C60;box-shadow:none;opacity:1;cursor:default}
.stage .meanings-button:not(:disabled):hover{background:#BD1F60}
