/* Crystal Shift 2048 — standalone game */
.cz-page,.cz-page *{box-sizing:border-box}
.cz-page{max-width:1240px;margin:auto;padding:18px 14px 55px;color:#ecf6ff;font:500 16px/1.52 system-ui,-apple-system,"Segoe UI",sans-serif}
.cz-page h1,.cz-page h2,.cz-page h3{color:#ffefc1!important;line-height:1.2!important}
.cz-page h1{font-size:clamp(31px,4.4vw,48px)!important;margin:10px 0!important}
.cz-page a{color:#aaf4e2!important}
.cz-page p{color:#c6d9eb}
.cz-kicker{font-size:12px;letter-spacing:.1em;text-transform:uppercase;font-weight:950;color:#abedcd}
.cz-intro{font-size:16px;max-width:920px;margin:0 0 16px!important}
#cz-game{position:relative;overflow:hidden;border-radius:23px;border:2px solid #829dca;border-bottom:7px solid #25385c;background:radial-gradient(ellipse at 33% 0%,#495d87,#1a2f4e 70%,#122039);padding:16px;box-shadow:0 14px 27px #0008}
#cz-game:fullscreen{width:100vw;max-width:none;height:100dvh;overflow:auto;border:0;border-radius:0;margin:0}
.cz-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.cz-brand{display:flex;align-items:center;gap:10px}
.cz-brand-icon{width:49px;height:49px;display:grid;place-items:center;border:2px solid #e7f2cc;border-bottom:5px solid #627f9f;border-radius:14px;background:linear-gradient(135deg,#f9d5ac,#b2acf0);font-size:27px}
.cz-brand strong{display:block;color:#fff2bc;font-size:23px;font-weight:1000;line-height:1.06}
.cz-brand small{display:block;font-size:12px;color:#badbdc;font-weight:850;margin-top:3px}
.cz-stats{display:flex;flex-wrap:wrap;gap:6px}
.cz-chip{background:#2b486a;border:1px solid #809fbe;border-bottom:3px solid #213c60;border-radius:10px;padding:7px 10px;font-size:12px;font-weight:850}
.cz-chip b{font-size:16px;color:#ffedac;font-variant-numeric:tabular-nums}
.cz-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,260px);gap:16px}
.cz-main{min-width:0;display:flex;flex-direction:column;align-items:center;gap:10px}
.cz-board-shell{width:min(100%,570px);position:relative;border:2px solid #b4d6d1;border-bottom:6px solid #436681;border-radius:21px;padding:14px;background:linear-gradient(145deg,#315173,#152844);box-shadow:inset 0 2px 16px #07142970,0 13px 20px #0006}
.cz-grid{--cz-size:4;width:100%;display:grid;grid-template-columns:repeat(var(--cz-size),minmax(0,1fr));gap:10px;aspect-ratio:1;touch-action:none;user-select:none;outline:none}
.cz-cell{display:grid;place-items:center;min-width:0;aspect-ratio:1;border-radius:13px;background:#0b243c94;box-shadow:inset 0 3px 6px #0005;color:transparent;font-size:clamp(15px,4vw,36px);font-weight:1000;line-height:1;letter-spacing:-.05em;font-variant-numeric:tabular-nums}
.cz-tile{border:2px solid #ffffff6b;box-shadow:inset 0 4px #ffffff4a,0 5px 0 #0b1c3055,0 7px 10px #071a3155;color:#26384a;text-shadow:0 1px #ffffff55;animation:czPop .15s ease-out}
.cz-value-2{background:linear-gradient(150deg,#d7ffe7,#89d5c6)}
.cz-value-4{background:linear-gradient(150deg,#bbf7f5,#6cbbda)}
.cz-value-8{background:linear-gradient(150deg,#ffeeb5,#e9bc76)}
.cz-value-16{background:linear-gradient(150deg,#ffc7ab,#f09078)}
.cz-value-32{background:linear-gradient(150deg,#ffb8cd,#e989ad)}
.cz-value-64{background:linear-gradient(150deg,#dfc1ff,#af8bde)}
.cz-value-128{background:linear-gradient(150deg,#c4b6ff,#8386de);color:white;text-shadow:0 2px #465c7e}
.cz-value-256{background:linear-gradient(150deg,#abecf3,#4a91bc);color:white;text-shadow:0 2px #375e80}
.cz-value-512{background:linear-gradient(150deg,#cefac0,#76bf83);color:#153b39}
.cz-value-1024{background:linear-gradient(150deg,#ffddac,#db9482);color:white;text-shadow:0 2px #865e62}
.cz-value-2048{background:linear-gradient(135deg,#fff7b8,#f1c35e);color:#5a3a26}
.cz-grid[style*="5"] .cz-cell{font-size:clamp(14px,3vw,27px)}
.cz-progress{width:min(100%,570px);height:10px;border:1px solid #6d96b6;background:#0e2440;border-radius:99px;overflow:hidden}
.cz-progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#74cae0,#c0f6c9);transition:width .24s}
.cz-message{position:absolute;top:12px;left:50%;z-index:12;max-width:85%;transform:translate(-50%,-15px);opacity:0;pointer-events:none;border:2px solid #fff4bb;border-bottom:4px solid #9b7e54;background:#ffecc3;color:#30415c;border-radius:12px;padding:8px 12px;text-align:center;font-size:13px;font-weight:950;transition:opacity .17s,transform .17s}
.cz-message.show{opacity:1;transform:translate(-50%,0)}
.cz-directions{display:grid;grid-template-areas:". up ." "left down right";grid-template-columns:repeat(3,minmax(0,82px));gap:7px;align-items:center;justify-content:center}
.cz-directions #cz-up{grid-area:up}.cz-directions #cz-down{grid-area:down}.cz-directions #cz-left{grid-area:left}.cz-directions #cz-right{grid-area:right}
.cz-arrow{display:grid;place-items:center;min-height:50px;border:2px solid #9db9cb;border-bottom:5px solid #2f4b63;border-radius:12px;background:linear-gradient(#4a7894,#305470);color:white;font:950 24px system-ui;cursor:pointer;touch-action:manipulation}
.cz-arrow:active{transform:translateY(2px)}.cz-arrow:focus-visible{outline:3px solid #ffe8a4}
.cz-arrow.cz-suggest{box-shadow:0 0 0 3px #fff0a8,0 0 16px #fff0a9;background:linear-gradient(#ffdca0,#f0a970);color:#483b31;animation:czHint .65s ease-in-out infinite alternate}
.cz-side{display:flex;flex-direction:column;gap:11px}
.cz-panel{background:linear-gradient(145deg,#2c4b69,#1a2d4b);border:1px solid #61829d;border-bottom:4px solid #243954;border-radius:16px;padding:14px}
.cz-panel h2{font-size:19px!important;margin:0 0 8px!important}
.cz-panel p{font-size:13px;color:#c8dbe8;line-height:1.55;margin:0 0 9px}
.cz-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cz-btn{display:inline-flex;justify-content:center;align-items:center;min-height:44px;border:2px solid #8eb5c6;border-bottom:4px solid #29435f;border-radius:11px;background:linear-gradient(#5884a1,#30577a);color:#fff!important;font:850 13px/1.2 system-ui;cursor:pointer;padding:8px 7px;text-align:center;touch-action:manipulation}
.cz-btn:disabled{opacity:.44;cursor:default}.cz-btn:hover:not(:disabled){filter:brightness(1.12)}.cz-btn:active:not(:disabled){transform:translateY(2px)}.cz-btn:focus-visible{outline:3px solid #ffedb2;outline-offset:2px}
.cz-btn-primary{background:linear-gradient(#eeffd2,#a2e8c6);color:#254a3d!important;border-color:#efffd1;border-bottom-color:#508e7b}
.cz-btn-hint{background:linear-gradient(#ffe9b6,#e3b780);color:#51433b!important;border-color:#fff1bf;border-bottom-color:#ab815c}
.cz-wide{grid-column:1/-1}
.cz-tip{color:#c8dfe5;font-size:13px;padding:13px;border:1px solid #7392a6;border-radius:12px;background:#152e49}
.cz-tip strong{color:#ffe6a8}
.cz-overlay{position:absolute;inset:0;z-index:25;display:grid;place-items:center;padding:12px;background:#081a32df;backdrop-filter:blur(5px)}
.cz-overlay[hidden]{display:none!important}
.cz-dialog,.cz-level-dialog{width:min(96%,490px);max-height:calc(100dvh - 35px);overflow:auto;border:3px solid #c7efd9;border-bottom:8px solid #417489;border-radius:23px;background:linear-gradient(150deg,#456b89,#263d5e 70%,#1b2e4c);text-align:center;padding:25px;box-shadow:0 20px 38px #0009}
.cz-dialog-icon{font-size:64px;line-height:1.1}
.cz-dialog h2,.cz-level-dialog h2{font-size:clamp(23px,3vw,33px)!important;margin:12px 0 8px!important}
.cz-dialog p,.cz-level-dialog p{color:#d2e8ee;font-size:15px;line-height:1.55}
.cz-dialog-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:17px}
.cz-dialog-actions .cz-btn{min-width:136px}
.cz-level-dialog{width:min(96%,650px)}
.cz-level-top{display:flex;align-items:center;justify-content:space-between}
.cz-level-top h2{margin:0!important;font-size:24px!important}
.cz-chapters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:15px 0}
.cz-chapter{border:1px solid #aed5d3;border-radius:9px;background:#3a6081;color:#fff;min-height:44px;cursor:pointer;font:900 12px system-ui}
.cz-chapter.active{background:#b8edcc;color:#1c4c47}
.cz-level-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.cz-level{min-height:54px;border-radius:9px;border:1px solid #92bacb;border-bottom:3px solid #244567;background:#3b6487;color:white;font:900 16px system-ui;cursor:pointer;display:grid;place-items:center}
.cz-level:disabled{opacity:.4;cursor:default}.cz-level.active{outline:3px solid #ffe4a2}.cz-level small{font-size:9px;color:#ffeabb}
.cz-guide{margin:30px auto 0;max-width:920px}
.cz-guide li{margin:8px 0;color:#c2d9e9}
@keyframes czPop{from{transform:scale(.88);opacity:.7}to{transform:scale(1);opacity:1}}
@keyframes czHint{from{filter:brightness(1)}to{filter:brightness(1.18)}}
@media(max-width:850px){.cz-layout{grid-template-columns:minmax(0,1fr) 220px;gap:9px}.cz-panel{padding:10px}}
@media(max-width:720px){
.cz-page{padding:8px 5px 40px}.cz-page h1{font-size:29px!important}.cz-intro{font-size:14px}
#cz-game{padding:7px;border-radius:13px;border-bottom-width:5px}.cz-brand-icon{width:40px;height:40px;font-size:23px}.cz-brand strong{font-size:18px}.cz-brand small{font-size:10px}
.cz-stats{width:100%;justify-content:space-between;gap:4px}.cz-chip{font-size:10px;padding:5px 7px}.cz-chip b{font-size:13px}
.cz-layout{display:flex;flex-direction:column;gap:8px}.cz-main,.cz-side{width:100%}
.cz-board-shell{max-width:520px;border-radius:13px;padding:7px}.cz-grid{gap:5px}.cz-cell{border-radius:8px;font-size:clamp(14px,5.5vw,28px)}.cz-tile{border-width:1px}.cz-grid[style*="5"] .cz-cell{font-size:clamp(12px,4.4vw,22px)}
.cz-directions{grid-template-columns:repeat(3,minmax(0,72px));gap:5px}.cz-arrow{min-height:42px;font-size:21px;border-radius:9px}
.cz-side{gap:8px}.cz-panel{padding:10px}.cz-panel h2{font-size:16px!important;margin-bottom:6px!important}.cz-panel p{font-size:12px}
.cz-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.cz-btn{min-height:40px;padding:6px 3px;border-radius:9px;font-size:11px}.cz-wide{grid-column:1/-1}.cz-tip{font-size:12px}
.cz-dialog,.cz-level-dialog{padding:17px;border-radius:17px}.cz-dialog-icon{font-size:50px}
.cz-chapters{gap:4px}.cz-chapter{min-height:38px;font-size:10px}.cz-level-grid{gap:4px}.cz-level{min-height:43px;font-size:13px}
}
@media(max-width:370px){.cz-chip{padding:4px 5px;font-size:9px}.cz-chip b{font-size:12px}.cz-grid{gap:3px}.cz-cell{font-size:16px}}
@media(prefers-reduced-motion:reduce){.cz-tile,.cz-arrow.cz-suggest{animation:none}}
