/* Word Crush: monthly memory verses, one shared ruleset. */
.game-page [hidden]{display:none!important}
#crush-setup-note{margin:6px 0 0;padding:14px 16px;background:#edf6f0;border-left:3px solid #d7a23f;font-size:14px;line-height:1.8;color:#35584c}
.game-page .crush-screen{max-width:1440px;padding:26px 24px}
.crush-screen .game-heading{display:flex;align-items:center;gap:20px;margin-bottom:20px;border-left:5px solid #eeb84f;padding-left:16px}
.crush-screen .game-heading .title{font-size:32px;margin:0;letter-spacing:-1px}
#crush-month{margin:0;font-size:17px;font-weight:700;color:#667278}
#crush-player{margin-left:auto;font-size:14px;color:#667278}
.crush-stage{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(172px,21%) minmax(0,1fr);grid-template-areas:'stats board' 'controls controls' 'guide guide' 'feedback feedback';gap:14px 24px;padding:26px 26px 16px;border:2px solid #209a92;border-radius:24px;background:radial-gradient(ellipse at 48% 0%,#145a59 0,transparent 58%),radial-gradient(ellipse at 70% 100%,#0d5551 0,transparent 55%),#05292e;box-shadow:inset 0 0 0 3px #0d4043,0 8px 24px #062d301f;color:#edf9f4}
.crush-stage .hud{grid-area:stats;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(3,1fr);gap:12px;width:100%;margin:0}
.crush-stage .hud .player-chip{display:none}
.crush-stage .chip{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;padding:12px 8px;background:linear-gradient(145deg,#0c494a,#062b31);border:1px solid #e8c365;border-radius:14px;box-shadow:inset 0 2px 3px #9af9e935,0 0 0 3px #041f26}
.crush-stage .chip .label{font-size:clamp(14px,1.4vw,20px);font-weight:700;color:#e2eeea;margin:0 0 6px}
.crush-stage .chip .value{font-size:clamp(42px,4.3vw,64px);line-height:1.15;letter-spacing:-1px;font-weight:850;color:#ffe29a;text-shadow:0 2px 0 #805b28,0 0 16px #e6c15b35;font-variant-numeric:tabular-nums}
.crush-stage .chip #lives{color:#fff8df;font-size:clamp(32px,3.4vw,48px)}
.crush-progress{height:9px;width:86%;overflow:hidden;border:1px solid #a58e4d;border-radius:8px;background:#072d31;box-shadow:inset 0 2px 3px #001a1e;margin-top:12px}
#crush-time-bar{display:block;width:100%;height:100%;border-radius:8px;background:linear-gradient(#ffe995,#edb02f);box-shadow:0 0 10px #f4cb62;transition:width .1s linear}
.game-page #game-area.crush{grid-area:board;display:grid;grid-template-columns:repeat(var(--crush-columns,6),minmax(0,1fr));gap:7px;align-content:start;height:auto;min-height:0;margin:0;padding:0;border:0;background:transparent;border-radius:8px;overflow:visible;user-select:none;-webkit-user-select:none;touch-action:pan-y}
.crush-tile,.crush-ghost{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:clamp(57px,7.5vh,78px);padding:12px 7px 9px;background-image:var(--tile-art);background-size:100% 130%;background-position:center;background-repeat:no-repeat;color:#122925;border:0;border-radius:12px;font-weight:850;line-height:1.15;isolation:isolate;text-shadow:0 1px 0 #ffffff45}
.crush-word{font-size:clamp(15px,1.7vw,22px);max-width:100%;text-align:center;overflow-wrap:anywhere;letter-spacing:-.7px}
.crush-word.long-word{font-size:clamp(12px,1.15vw,17px);letter-spacing:-.5px}
.crush-color{position:absolute;top:8px;left:12px;font-size:9px;line-height:1;font-weight:800;color:#18392c;opacity:.7}
.color-0{--tile-art:url('word-crush-coral.webp')}
.color-1{--tile-art:url('word-crush-gold.webp')}
.color-2{--tile-art:url('word-crush-jade.webp')}
.color-3{--tile-art:url('word-crush-violet.webp')}
.crush-tile.is-prefix{filter:brightness(1.13);outline:1px solid #fff3aa;outline-offset:-3px}
.crush-tile.is-match{filter:brightness(1.15) drop-shadow(0 0 8px #ffeeb5);outline:2px solid #fff4c2;outline-offset:-2px;z-index:1}
.crush-tile.is-new{animation:crush-arrive .26s ease-out}
.crush-ghost{position:absolute;pointer-events:none;z-index:5}
#crush-burst{position:absolute;top:43%;left:60%;z-index:8;pointer-events:none;white-space:nowrap;color:#fff4be;font-size:64px;font-weight:900;line-height:1;text-shadow:0 3px 0 #9e672d,0 0 20px #f4c447}
.crush-stage .answer-controls{grid-area:controls;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;margin-top:4px}
.crush-stage .input-label{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.game-page .crush-stage #user-input{display:block;min-width:0;width:100%;height:56px;margin:0;padding:12px 16px;background:#fffcf3;color:#24353b;border:2px solid #f1d17a;border-radius:13px;font-size:18px;box-shadow:inset 0 1px 3px #73603925,0 0 0 3px #ffc65825}
.game-page .crush-stage #user-input:focus{outline:2px solid #fff6bd;outline-offset:2px}
.crush-stage #user-input::placeholder{color:#687879;opacity:1;font-size:16px}
.crush-stage .btn-row{margin:0;gap:10px;flex-wrap:nowrap}
.game-page .crush-stage button{min-height:56px;padding:10px 16px;font-size:14px;color:#f6f8e7;white-space:nowrap;border:1px solid #e7c76c;border-radius:12px;background:linear-gradient(#175a58,#0a353c);box-shadow:inset 0 2px 2px #ffffff25}
.game-page .crush-stage button:hover{background:#236862}
#crush-guide{grid-area:guide;margin:0;text-align:center}
#crush-guide p{margin:0;font-size:15px;line-height:1.6;color:#d5e6df}
#crush-guide strong{color:#ffe091;font-weight:750}
#crush-guide .crush-detail{font-size:11px;color:#9cbbb4;margin-top:2px}
.crush-stage #game-feedback{grid-area:feedback;min-height:22px;margin:0;text-align:center;font-size:13px;color:#ffe298}
.game-page #game-area.crush.danger{outline:2px solid #d69458;outline-offset:4px}
.crush-stage:has(.danger) #crush-time-bar{background:#f09b5f}
.game-page #game-area.crush.is-paused .crush-tile{visibility:hidden}
.game-page #game-area.crush.is-paused::after{content:'일시정지 중';position:absolute;inset:0;display:grid;place-items:center;color:#ffe3a0;font-size:26px;font-weight:800}
.crush-stage.is-paused .crush-ghost,.crush-stage.is-paused #crush-burst{visibility:hidden}
#crush-references{text-align:center;margin:16px 0 0;padding-top:12px;border-top:1px solid #dce5e5;font-size:14px;color:#647078}
#crush-result{padding:14px;background:#edf6f0;border-radius:8px;font-size:15px;line-height:1.7}
@keyframes crush-arrive{from{opacity:.4;transform:translateY(-16px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:900px){
 .crush-stage{grid-template-columns:132px minmax(0,1fr);gap:12px 16px;padding:20px 18px 14px}
 .crush-stage .chip .value{font-size:36px}.crush-stage .chip #lives{font-size:30px}
 .crush-stage .chip .label{font-size:13px}.crush-word{font-size:16px}
 .crush-stage .answer-controls{gap:12px}.game-page .crush-stage button{padding:10px 12px}
}
@media(max-width:700px){
 .game-page .crush-screen{padding:22px 12px}
 .crush-screen .game-heading{gap:6px 12px;flex-wrap:wrap;margin-bottom:16px;padding-left:12px}
 .crush-screen .game-heading .title{font-size:26px}
 #crush-month{font-size:13px}#crush-player{font-size:12px}
 .crush-stage{grid-template-columns:minmax(0,1fr);grid-template-areas:'stats' 'board' 'controls' 'guide' 'feedback';gap:14px;padding:16px 10px 12px;border-radius:18px}
 .crush-stage .hud{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto;gap:8px}
 .crush-stage .chip{min-height:88px;padding:10px 4px;border-radius:11px}
 .crush-stage .chip .label{font-size:11px;margin-bottom:3px}
 .crush-stage .chip .value{font-size:30px}.crush-stage .chip #lives{font-size:26px}
 .crush-progress{height:6px;margin-top:7px}
 .game-page #game-area.crush{gap:4px}
 .crush-tile,.crush-ghost{min-height:49px;padding:12px 3px 8px;border-radius:7px}
 .crush-word{font-size:clamp(10px,3vw,16px);letter-spacing:-.6px}
 .crush-word.long-word{font-size:clamp(8px,2.35vw,12px);letter-spacing:-.4px}
 .crush-color{top:7px;left:6px;font-size:7px}
 .crush-stage .answer-controls{grid-template-columns:minmax(0,1fr);gap:12px;margin:0}
 .game-page .crush-stage #user-input{height:52px;font-size:17px;padding:10px 12px}
 .crush-stage #user-input::placeholder{font-size:14px}
 .crush-stage .btn-row{justify-content:center;gap:12px}
 .game-page .crush-stage button{min-height:42px;padding:8px 18px;font-size:13px}
 #crush-guide p{font-size:12px}#crush-guide .crush-detail{font-size:10px}
 .crush-stage #game-feedback{font-size:12px;min-height:20px}
 #crush-burst{left:50%;font-size:46px}#crush-references{font-size:11px;line-height:1.7}
}
@media(prefers-reduced-motion:reduce){.crush-tile.is-new{animation:none}#crush-time-bar{transition:none}}
/* Sequential chains and progressive stages reuse the existing jewel artwork. */
.color-1{--tile-art:url('word-crush-jade.webp');--tile-filter:hue-rotate(65deg) saturate(1.05)}
.color-3{--tile-art:url('word-crush-gold.webp')}
.color-4{--tile-art:url('word-crush-violet.webp')}
.color-5{--tile-art:url('word-crush-coral.webp');--tile-filter:hue-rotate(24deg) saturate(1.15)}
.color-6{--tile-art:url('word-crush-gold.webp');--tile-filter:grayscale(1) brightness(1.35)}
.crush-tile,.crush-ghost{background-image:none}
.crush-tile::before,.crush-ghost::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:var(--tile-art);background-size:100% 130%;background-position:center;background-repeat:no-repeat;filter:var(--tile-filter,none)}
.game-page #game-area.crush{width:100%;max-width:calc(var(--crush-columns,3)*152px);justify-self:center;min-height:350px;align-content:stretch;grid-auto-rows:minmax(clamp(57px,7.5vh,78px),1fr)}
.crush-tile.is-selected{outline:2px solid #fff1aa;outline-offset:-3px;filter:brightness(1.16);opacity:.65}
.crush-tile.is-next:not(.is-match){outline:1px dashed #f9e9b3;outline-offset:-2px}
.crush-order{position:absolute;right:8px;top:7px;display:grid;place-items:center;min-width:20px;height:20px;padding:0 4px;border-radius:10px;background:#153c40;color:#fff3bb;text-shadow:none;font-size:12px;font-weight:800}
@media(max-width:700px){.game-page #game-area.crush{min-height:0;grid-auto-rows:minmax(49px,1fr)}.crush-order{right:5px;top:5px;min-width:15px;height:15px;font-size:9px}}
.crush-stage{overflow:hidden}
.crush-scroll-hint{display:none}
@media(max-width:700px){
 .game-page #game-area.crush{min-width:0;grid-template-columns:repeat(var(--crush-columns,3),minmax(62px,1fr));overflow-x:auto;overflow-y:hidden;touch-action:auto;overscroll-behavior-x:contain;padding-bottom:6px;scrollbar-color:#d4b461 #09383d;scrollbar-width:thin}
 .crush-stage:has(#game-area[data-wide='true']) .crush-scroll-hint{display:block}
}
/* Pre-game instructions and tactile card motion. */
#crush-rules{width:min(660px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:26px 28px;border:1px solid #66b4a6;border-radius:20px;background:#092f35;color:#e7f3ed;box-shadow:0 18px 80px #001b2380;text-align:left;overscroll-behavior:contain}
#crush-rules::backdrop{background:#03191cba;backdrop-filter:blur(3px)}
#crush-rules h2{font-size:24px;line-height:1.4;letter-spacing:-.6px;margin:0 0 8px;color:#fff2c8}
#crush-rules-intro{font-size:14px;color:#b8d4cc;line-height:1.6;margin:0 0 18px}
.crush-rule-demo{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:380px;margin:0 auto 18px}
.crush-demo-tile{position:relative;isolation:isolate;display:grid;place-items:center;min-height:68px;padding:16px 8px 12px;color:#17352e;font-size:16px;font-weight:800;text-align:center;animation:crush-demo-wiggle 2.8s ease-in-out var(--demo-delay,0s) infinite}
.crush-demo-tile::before{content:'';position:absolute;inset:0;z-index:-1;background-image:var(--tile-art);background-size:100% 130%;background-position:center;background-repeat:no-repeat}
.crush-demo-order{position:absolute;right:9px;top:9px;width:18px;height:18px;display:grid;place-items:center;background:#173d3e;color:#fff2bd;border-radius:50%;font-size:11px;line-height:1}
.crush-demo-word{overflow-wrap:anywhere;max-width:100%}
.crush-rule-steps{padding-left:24px;margin:0 0 22px;display:grid;gap:13px}
.crush-rule-steps li{padding-left:4px;font-size:14px;line-height:1.65}
.crush-rule-steps li::marker{font-weight:800;color:#f4d074}
.crush-rule-steps strong{display:block;color:#f2f8f0;font-weight:750}
.crush-rule-steps li span{display:block;color:#bbd4cd;font-size:13px;margin-top:3px}
.crush-rules-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.game-page #crush-rules button{padding:11px 16px;font-size:14px;border:1px solid #75a294;border-radius:9px;background:#16484a;color:#eaf6ef}
.game-page #crush-rules .btn-primary{background:#f1cd70;color:#193c36;border-color:#f1cd70}
#crush-rules button:focus-visible{outline:3px solid #fff4bc;outline-offset:3px}
.crush-tile{animation:crush-idle 3.8s ease-in-out var(--idle-delay,0s) infinite;transform-origin:50% 65%}
.crush-tile.is-new{animation:crush-arrive .26s ease-out,crush-idle 3.8s ease-in-out var(--idle-delay,0s) infinite}
.crush-tile.is-selected{animation:crush-selected-wiggle .85s ease-in-out infinite}
.crush-tile.is-selected.is-ready{animation:crush-ready-wiggle .52s ease-in-out infinite;opacity:.85;box-shadow:0 0 12px #ffe49540}
.crush-stage.is-paused .crush-tile{animation-play-state:paused}
@keyframes crush-idle{0%,100%{translate:0 0;rotate:0deg}35%{translate:0 -2px;rotate:var(--idle-angle,.45deg)}70%{translate:0 1px;rotate:0deg}}
@keyframes crush-selected-wiggle{0%,100%{translate:0 -1px;rotate:-1deg}50%{translate:0 -2px;rotate:1deg}}
@keyframes crush-ready-wiggle{0%,100%{translate:0 -1px;rotate:-1.7deg}50%{translate:0 -2px;rotate:1.7deg}}
@keyframes crush-demo-wiggle{0%,65%,100%{translate:0 0;rotate:0deg}72%,86%{translate:0 -2px;rotate:-2deg}79%,93%{translate:0 -2px;rotate:2deg}}
@media(max-width:700px){
 #crush-rules{padding:22px 20px;max-height:calc(100dvh - 24px)}
 #crush-rules h2{font-size:21px}.crush-rule-demo{gap:5px}.crush-demo-tile{min-height:58px;font-size:14px}
 .crush-rule-steps{gap:12px}.crush-rule-steps li{font-size:13px}.crush-rule-steps li span{font-size:12px}
 .crush-rules-actions{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px}
 .game-page #crush-rules button{padding:11px 10px;font-size:13px}
}
@media(prefers-reduced-motion:reduce){
 .crush-tile,.crush-tile.is-new,.crush-tile.is-selected,.crush-tile.is-selected.is-ready,.crush-demo-tile{animation:none!important;translate:none;rotate:none}
}
