/* ===== Cubroid Education — block theme ===== */
:root{
  --red:#e8453c; --yellow:#ffc21a; --blue:#1f8bf0; --green:#34b25a;
  --blue-bg:#eaf4fe;
  --ink:#1b2433; --ink2:#56627a; --ink3:#8b93a3;
  --cream:#fff9ee; --paper:#fff; --line:#ece4d4; --line2:#f3eee3;
  --r:22px;
  --font-body:"Pretendard Variable","Pretendard",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Noto Sans SC",Roboto,sans-serif;
  --font-head:"Nunito","Pretendard Variable","Pretendard",-apple-system,"Noto Sans JP","Noto Sans SC",sans-serif;
}
/* Pretendard dynamic-subset lacks many Latin accents (á ó ì ą ś ệ ư …) -> non-CJK pages use Inter (Pretendard's Latin base) */
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)):not(:lang(hi)):not(:lang(ar)):not(:lang(th)){
  --font-body:"Inter","Pretendard Variable","Pretendard",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --font-head:"Nunito","Inter","Pretendard Variable",-apple-system,sans-serif;
}
/* Devanagari (hi) / Arabic (ar): own Google fonts (build.mjs FONT_EXTRA) */
html:lang(hi){ --font-body:"Hind","Inter",-apple-system,"Segoe UI",sans-serif; --font-head:"Baloo 2","Nunito","Hind",sans-serif; }
html:lang(ar){ --font-body:"Cairo",-apple-system,"Segoe UI",sans-serif; --font-head:"Baloo Bhaijaan 2","Cairo",sans-serif; }
html:lang(hi) h1, html:lang(hi) h2, html:lang(hi) h3{ line-height:1.45; }
html:lang(ar) h1, html:lang(ar) h2, html:lang(ar) h3{ letter-spacing:0; line-height:1.5; } /* letter-spacing breaks Arabic joining */
/* Thai (th): Inter/Nunito have no Thai glyphs; Thai stacks vowels/tone marks -> taller lines */
html:lang(th){ --font-body:"Noto Sans Thai","Inter",-apple-system,"Segoe UI",sans-serif; --font-head:"Mitr","Nunito","Noto Sans Thai",sans-serif; }
html:lang(th) body{ line-height:1.75; }
html:lang(th) h1, html:lang(th) h2, html:lang(th) h3{ font-weight:600; letter-spacing:0; line-height:1.5; }
/* Traditional Chinese (zh-Hant): system TC fonts so glyph shapes follow Taiwan/HK standard, not the SC font */
html:lang(zh-Hant){ --font-body:"Pretendard Variable","Pretendard",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  --font-head:"Nunito","Pretendard Variable",-apple-system,"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif; }
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{ margin:0; background:var(--cream); color:var(--ink); font-family:var(--font-body); line-height:1.6; }
h1,h2,h3{ font-family:var(--font-head); font-weight:900; letter-spacing:-.01em; line-height:1.25; }
img{ max-width:100%; display:block; }
a{ color:var(--blue); text-decoration:none; }
button{ font:inherit; }
.wrap{ max-width:1080px; margin:0 auto; padding:0 16px; }
.muted{ color:var(--ink3); font-size:.9rem; font-weight:600; font-family:var(--font-body); }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
:focus-visible{ outline:3px solid var(--blue); outline-offset:3px; border-radius:8px; }

/* ---------- cube: rounded square with 3x3 studs ---------- */
.cube{ --c:var(--blue); --s:48px;
  display:inline-flex; align-items:center; justify-content:center; flex:none;
  width:var(--s); height:var(--s); border-radius:24%;
  background-color:var(--c);
  background-image:radial-gradient(circle, rgba(255,255,255,.42) 0 16%, transparent 18%);
  background-size:33.34% 33.34%;
  box-shadow:inset 0 calc(var(--s) * -.1) 0 rgba(0,0,0,.18);
  color:#fff; font-family:var(--font-head); font-weight:900; font-size:calc(var(--s) * .46); line-height:1; }
.cube.xs{ --s:16px; } .cube.sm{ --s:26px; } .cube.big{ --s:64px; }
.c-red{ --c:var(--red); } .c-yellow{ --c:var(--yellow); } .c-blue{ --c:var(--blue); } .c-green{ --c:var(--green); }
.cube.num{ --c:var(--accent,var(--blue)); background-image:none; padding-bottom:calc(var(--s) * .08); }
.cube.ghost{ background:transparent; box-shadow:none; border:2px dashed #cfc6b3; color:#b9b09c; }

/* ---------- block card & buttons ---------- */
.block-card{ background:var(--paper); border:2px solid var(--line); border-radius:var(--r); box-shadow:0 5px 0 var(--line); }
a.block-card{ color:var(--ink); transition:transform .12s, box-shadow .12s; }
a.block-card:hover{ transform:translateY(-3px); box-shadow:0 8px 0 var(--line); }
a.block-card:active{ transform:translateY(2px); box-shadow:0 2px 0 var(--line); }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:46px; padding:10px 20px;
  border-radius:14px; border:2px solid var(--line); background:#fff; color:var(--ink); font-weight:800; cursor:pointer; text-align:center; }
.btn.small{ min-height:38px; padding:6px 14px; font-size:.9rem; }
.btn.big{ min-height:56px; padding:12px 28px; font-size:1.1rem; }
.btn-ghost{ box-shadow:0 4px 0 var(--line); }
.btn-ghost:hover{ background:var(--line2); }
.btn-cube{ background:var(--c, var(--blue)); border-color:transparent; color:#fff;
  box-shadow:0 4px 0 color-mix(in srgb, var(--c, var(--blue)) 68%, #000);
  transition:transform .08s, box-shadow .08s, filter .15s; }
.btn-cube:hover{ filter:brightness(1.05); color:#fff; }
.btn-cube:active, .btn-ghost:active{ transform:translateY(3px); box-shadow:0 1px 0 color-mix(in srgb, var(--c, #d8cfbc) 68%, #000); }
.btn-cube.c-yellow{ color:#4a3300; }
.btn-cube.c-yellow:hover{ color:#4a3300; }
.btn-cube.c-white{ --c:#fff; color:var(--ink); border-color:var(--line); box-shadow:0 4px 0 var(--line); }
.btn-cube.c-white:hover{ color:var(--ink); background:var(--line2); }
.btn-cube[disabled]{ opacity:.45; cursor:default; }
.link-btn{ background:none; border:0; color:var(--blue); font-weight:800; cursor:pointer; padding:6px 4px; }
.tag{ display:inline-block; font-size:.8rem; font-weight:800; color:#fff; background:var(--accent,var(--blue)); padding:3px 12px; border-radius:20px; }

/* ---------- header ---------- */
.top{ background:var(--blue); color:#fff; position:sticky; top:0; z-index:20; }
.top-in{ display:flex; align-items:center; justify-content:space-between; gap:12px; height:60px; }
.logo{ display:flex; align-items:center; gap:10px; color:#fff; font-weight:800; min-width:0; }
.logo img{ height:26px; width:auto; flex:none; }
.logo span{ font-size:.95rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stripe{ display:grid; grid-template-columns:repeat(4,1fr); height:5px; }
.stripe i:nth-child(1){ background:var(--red); } .stripe i:nth-child(2){ background:var(--yellow); }
.stripe i:nth-child(3){ background:#0f6fcf; } .stripe i:nth-child(4){ background:var(--green); }
.top-right{ display:flex; align-items:center; gap:8px; flex:none; }
.classic-link{ color:#fff; font-size:.85rem; font-weight:700; white-space:nowrap; padding:7px 10px;
  border-radius:12px; background:rgba(255,255,255,.12); }
.classic-link:hover{ color:#fff; background:rgba(255,255,255,.24); }
.lang{ flex:none; }
.lang select{ appearance:none; background:rgba(255,255,255,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 10px center;
  color:#fff; border:2px solid rgba(255,255,255,.35); border-radius:12px; padding:6px 28px 6px 12px; font:inherit; font-size:.9rem; font-weight:700; cursor:pointer; }
.lang option{ color:var(--ink); }
.crumb{ font-size:.9rem; color:var(--ink3); padding:16px 0 6px; font-weight:600; }

/* ---------- home ---------- */
.home-hero{ background:var(--blue-bg);
  background-image:radial-gradient(circle, rgba(31,139,240,.10) 0 3px, transparent 4px); background-size:28px 28px; }
.home-hero-in{ display:grid; gap:24px; padding-top:36px; padding-bottom:40px; align-items:center; }
.home-copy h1{ font-size:2rem; margin:0 0 12px; }
.home-copy p{ margin:0 0 22px; color:var(--ink2); font-size:1.05rem; }
.hero-cubes{ --hs:62px; display:grid; grid-template-columns:repeat(3,var(--hs)); grid-template-rows:repeat(3,var(--hs)); gap:8px; justify-content:center; }
.hero-cubes .cube{ --s:var(--hs); grid-column:var(--x); grid-row:var(--y); animation:drop .55s cubic-bezier(.2,.9,.3,1.3) backwards; animation-delay:calc((var(--x) + (4 - var(--y)) * 2) * 70ms); }
@keyframes drop{ from{ transform:translateY(-40px); opacity:0; } }
.sec{ font-size:1.35rem; margin:32px 0 16px; display:flex; align-items:center; gap:10px; }
.course-grid{ display:grid; gap:18px; grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr)); padding-bottom:40px; }
.course-card{ display:block; overflow:hidden; }
.course-img{ aspect-ratio:16/10; overflow:hidden; background:var(--line2); border-bottom:2px solid var(--line); }
.course-img img{ width:100%; height:100%; object-fit:cover; }
.course-body{ padding:16px 18px 18px; }
.course-body h3{ margin:10px 0 4px; font-size:1.3rem; }
.course-body p{ margin:0 0 12px; color:var(--ink2); font-size:.95rem; }

/* progress */
.progress{ display:flex; align-items:center; gap:10px; }
.progress .bar{ flex:1; height:10px; background:var(--line2); border-radius:6px; overflow:hidden; }
.progress .bar i{ display:block; height:100%; width:var(--p,0%); background:var(--green); border-radius:6px; transition:width .6s; }
.progress-label{ font-size:.85rem; font-weight:800; color:var(--ink2); white-space:nowrap; }

/* ---------- course ---------- */
.course-head{ background:color-mix(in srgb, var(--accent) 10%, var(--cream)); padding-bottom:22px; border-bottom:2px solid var(--line); }
.course-head h1{ margin:10px 0 6px; font-size:1.9rem; }
.course-head p{ margin:0 0 14px; color:var(--ink2); }
.course-head .progress{ max-width:420px; }
.tile-grid{ display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); padding:22px 0 44px; }
.tile{ display:flex; flex-direction:column; gap:8px; padding:10px; min-width:0; }
.tile-img{ position:relative; aspect-ratio:1; border-radius:14px; overflow:hidden; background:var(--line2); display:flex; align-items:center; justify-content:center; }
.tile-img img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.tile-img .cube.num{ --s:36px; position:absolute; top:8px; inset-inline-start:8px; z-index:1; }
.tile b{ font-size:.92rem; line-height:1.35; padding:0 2px; }
.tile .check{ display:none; position:absolute; top:8px; inset-inline-end:8px; z-index:1; background:var(--green); color:#fff; width:30px; height:30px; border-radius:50%; align-items:center; justify-content:center; font-weight:900; box-shadow:0 2px 0 rgba(0,0,0,.2); }
.tile.is-done .check{ display:flex; }
.tile.is-done{ border-color:var(--green); box-shadow:0 5px 0 color-mix(in srgb, var(--green) 45%, var(--line)); }
.tile.locked{ background:transparent; border:2px dashed var(--line); border-radius:var(--r); color:var(--ink3); }
.tile.locked .tile-img{ background:transparent; }
.tile.locked .cube.num{ position:static; --s:44px; }
.tile.locked .muted{ font-size:.8rem; padding:0 2px; }

/* ---------- mission ---------- */
.m-cover{ display:grid; grid-template-columns:minmax(0,1fr); gap:18px; padding:20px; margin-top:6px; }
.m-cover > *{ min-width:0; }
.m-title-row{ display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.m-title-row h1{ margin:0; font-size:1.6rem; }
.lead{ font-size:1.1rem; font-weight:600; margin:0 0 10px; }
.goal{ margin:0 0 16px; color:var(--ink2); padding:8px 14px; background:var(--line2); border-radius:12px; border-inline-start:5px solid var(--accent,var(--blue)); }
.m-cover-img{ margin:0; background:var(--line2); border-radius:16px; overflow:hidden; }
.m-cover-img img{ width:100%; aspect-ratio:4/3; object-fit:cover; }
.m-cover-img figcaption{ font-size:.85rem; color:var(--ink3); padding:8px 12px; font-weight:600; }

.stages{ position:sticky; top:65px; z-index:15; background:color-mix(in srgb, var(--cream) 88%, transparent); backdrop-filter:blur(8px); border-bottom:2px solid var(--line); margin-top:18px; }
.stages-in{ display:flex; gap:8px; padding-top:10px; padding-bottom:10px; overflow-x:auto; scrollbar-width:none; }
.stage{ display:flex; align-items:center; gap:8px; white-space:nowrap; padding-block:7px; padding-inline:9px 14px; border-radius:14px; background:#fff; border:2px solid var(--line); color:var(--ink); font-weight:800; font-size:.92rem; }
.stage.is-active.s-red{ border-color:var(--red); background:color-mix(in srgb, var(--red) 10%, #fff); }
.stage.is-active.s-yellow{ border-color:var(--yellow); background:color-mix(in srgb, var(--yellow) 18%, #fff); }
.stage.is-active.s-blue{ border-color:var(--blue); background:color-mix(in srgb, var(--blue) 10%, #fff); }

.panel{ --pc:var(--blue); background:#fff; border:2px solid var(--line); border-top:6px solid var(--pc); border-radius:var(--r); box-shadow:0 5px 0 var(--line); padding:20px; margin:20px 0; scroll-margin-top:130px; }
.panel-red{ --pc:var(--red); } .panel-yellow{ --pc:var(--yellow); } .panel-blue{ --pc:var(--blue); } .panel-green{ --pc:var(--green); }
.panel h2{ font-size:1.3rem; margin:0 0 16px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.panel-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.panel-head h2{ margin:0; }

.blocks{ list-style:none; padding:0; margin:0; display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); }
.blocks li{ background:var(--cream); border:2px solid var(--line2); border-radius:16px; padding:12px 10px; display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; }
.blk-img{ height:78px; display:flex; align-items:center; justify-content:center; }
.blk-img img{ max-height:78px; width:auto; object-fit:contain; }
.blk-count{ font-family:var(--font-head); font-weight:900; font-size:1.25rem; }

/* build: step player (js) / grid (no-js, all, print) */
.steps{ list-style:none; padding:0; margin:0; display:grid; gap:14px; grid-template-columns:minmax(0,1fr); }
.steps li{ min-width:0; position:relative; }
.steps img{ width:100%; height:auto; }
.steps li.has-no img{ border:5px solid var(--yellow); border-radius:18px; }
.step-no{ position:absolute; top:-8px; inset-inline-start:-8px; z-index:1; min-width:46px; height:46px; padding:0 8px; border-radius:23px;
  background:var(--yellow); color:#fff; font-family:var(--font-head); font-weight:900; font-size:1.5rem;
  display:flex; align-items:center; justify-content:center; box-shadow:0 2px 0 rgba(0,0,0,.15); }
.steps li.has-no{ padding-top:8px; padding-inline-start:8px; }
.js .player:not(.all) .steps{ display:block; }
.js .player:not(.all) .steps li{ display:none; }
.js .player:not(.all) .steps li.is-current{ display:block; animation:fade .25s; max-width:720px; margin:0 auto; }
@keyframes fade{ from{ opacity:.3; transform:translateX(var(--dir,12px)); } }
.player-ui{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px; }
.player-ui .btn{ min-width:110px; }
.step-count{ font-family:var(--font-head); font-size:1.2rem; color:var(--ink2); white-space:nowrap; }
.step-count b{ font-size:1.8rem; color:var(--ink); }
.step-dots{ display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:14px; }
.step-dots button{ width:18px; height:18px; border-radius:5px; border:0; padding:0; background:var(--line); cursor:pointer; }
.step-dots button.seen{ background:color-mix(in srgb, var(--yellow) 55%, #fff); }
.step-dots button.now{ background:var(--yellow); box-shadow:inset 0 -3px 0 rgba(0,0,0,.18); transform:scale(1.2); }
html:not(.js) .player-ui, html:not(.js) .step-dots, html:not(.js) [data-step-toggle]{ display:none; }
.player.all .player-ui, .player.all .step-dots{ display:none; }

.task{ font-size:1.15rem; font-weight:700; margin:0 0 12px; background:var(--blue-bg); border-radius:16px; border-end-start-radius:4px; padding:14px 16px; }
.note{ margin:0 0 18px; background:#fff3c4; border-radius:12px; padding:10px 14px; color:#6b4e00; font-weight:600; }
.use-grid{ display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.use{ display:flex; align-items:center; gap:10px; background:var(--cream); border:2px solid var(--line2); border-radius:14px; padding-block:8px; padding-inline:8px 14px; min-width:0; max-width:100%; }
/* wide app-menu images must shrink on phones, or a long label (pl "Menu aplikacji") overflows */
.use img{ height:64px; width:auto; max-width:62%; object-fit:contain; object-position:left center; }
.use span{ font-weight:800; font-size:.95rem; }
/* several blocks to use (1-4 images) side by side; label wraps below on narrow screens */
.use-blocks{ flex-wrap:wrap; }
.use .use-imgs{ display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.use .use-imgs img{ max-width:none; }
.screen{ width:100%; max-width:640px; border-radius:14px; border:2px solid var(--line2); }

.solution{ margin-top:18px; border:2px dashed var(--line); border-radius:16px; background:var(--cream); }
.solution summary{ cursor:pointer; padding:12px 16px; font-weight:800; color:var(--blue); list-style:none; }
.solution summary::-webkit-details-marker{ display:none; }
.solution summary::before{ content:"\25B6"; display:inline-block; margin-inline-end:8px; font-size:.75em; transition:transform .15s; }
.solution[open] summary::before{ transform:rotate(90deg); }
.solution img{ width:100%; max-width:640px; margin:0 16px; border-radius:12px; border:2px solid var(--line2); }
.solution p{ margin:12px 16px 16px; color:var(--ink2); }
@media print{ .solution{ display:none; } }
/* 어드밴스드 MODULE / THINKING */
.module,.thinking{ margin:0 0 16px; border-radius:16px; padding:12px 16px 14px; }
.module{ background:#fff; border:2px solid #ffe08a; }
.thinking{ background:#effaf1; border:2px solid #bfe8c9; }
.module h3,.thinking h3{ margin:0 0 10px; font-size:1rem; font-weight:900; }
.module h3{ color:#9a6b00; } .thinking h3{ color:#1f7a3c; }
.mod-list{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:10px 18px; }
.mod-list li{ display:flex; align-items:center; gap:8px; min-width:0; }
.mod-list img{ height:56px; width:auto; max-width:120px; object-fit:contain; flex:none; }
.mod-list span{ display:flex; flex-direction:column; line-height:1.3; min-width:0; }
.mod-list b{ font-weight:800; } .mod-list span{ color:var(--ink2); font-size:.92rem; }
.thinking > *{ margin:0 0 10px; } .thinking > :last-child{ margin-bottom:0; }
.th-check{ font-weight:700; padding-inline-start:1.5em; position:relative; }
.th-check::before{ content:"\2714"; position:absolute; inset-inline-start:0; color:var(--green); }
.th-p{ color:var(--ink2); }
.th-tag{ display:inline-block; background:var(--blue); color:#fff; font-weight:800; border-radius:999px; padding:3px 12px; font-size:.92rem; }
.th-box{ background:#fff; border:2px solid #cfe9d6; border-radius:12px; padding:10px 14px; display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; }
.th-box b{ flex-basis:100%; color:#1f7a3c; }
.th-box img{ height:auto; max-height:120px; max-width:min(320px,100%); width:auto; }
.th-box ul{ margin:0; padding-inline-start:1.2em; flex:1 1 220px; min-width:0; }
.th-num{ margin:0; padding-inline-start:1.6em; }
.th-steps{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.th-steps li{ background:var(--blue); color:#fff; font-weight:700; border-radius:8px; padding:4px 10px; font-size:.9rem; }
.th-steps li + li::before{ content:"\2192"; position:absolute; inset-inline-start:-17px; top:50%; transform:translateY(-50%); color:var(--blue); font-weight:900; }
[dir=rtl] .th-steps li + li::before{ content:"\2190"; }
.th-steps li + li{ position:relative; margin-inline-start:16px; }
.th-imgs{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); gap:10px; }
.th-imgs.small{ grid-template-columns:repeat(auto-fit,minmax(min(90px,100%),1fr)); }
.th-imgs figure{ margin:0; text-align:center; min-width:0; }
.th-imgs img{ width:100%; max-height:180px; object-fit:contain; border-radius:10px; }
.th-imgs.small img{ max-height:90px; }
.th-imgs figcaption{ font-size:.88rem; color:var(--ink2); margin-top:4px; line-height:1.35; }
.th-cols{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:10px; }
.th-col{ background:#fff; border:2px solid #cfe9d6; border-radius:12px; padding:10px 12px; min-width:0; }
.th-col b{ display:block; margin-bottom:6px; } .th-col img{ max-width:100%; max-height:120px; object-fit:contain; display:block; margin:0 auto 6px; }
.th-col p{ margin:0; font-size:.92rem; color:var(--ink2); }

.finish{ text-align:center; padding:28px 20px; }
.finish .cube{ margin:0 auto 10px; }
.finish h2{ justify-content:center; font-size:1.6rem; margin-bottom:6px; }
.finish p{ color:var(--ink2); margin:0 0 18px; }
.btn-done.is-done::before{ content:"\2713"; }
.pager{ display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:18px; }

/* ---------- right-to-left (ar) ---------- */
[dir=rtl] .lang select{ background-position:left 10px center; padding:6px 12px 6px 28px; }
[dir=rtl] .use img{ object-position:right center; }
[dir=rtl] .solution summary::before{ content:"\25C0"; }
[dir=rtl] .solution[open] summary::before{ transform:rotate(-90deg); }

/* ---------- previous-site notice (home) ---------- */
.notice-back{ position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center;
  padding:16px; background:rgba(27,36,51,.45); }
.notice-back[hidden]{ display:none; }
.notice{ width:100%; max-width:440px; padding:24px 22px 22px; text-align:center; }
.notice-cubes{ display:flex; justify-content:center; gap:6px; margin-bottom:12px; }
.notice h2{ margin:0 0 8px; font-size:1.3rem; }
.notice p{ margin:0 0 18px; color:var(--ink2); }
.notice-btns{ display:flex; flex-direction:column; gap:10px; }
@media print{ .notice-back{ display:none !important; } }

/* ---------- footer ---------- */
.foot{ color:var(--ink3); font-size:.85rem; padding:28px 0 40px; border-top:2px solid var(--line); background:#fff; margin-top:20px; }
.foot .wrap{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.foot-cubes{ display:flex; gap:4px; }
.lang-list{ list-style:none; padding:40px 0; display:flex; flex-wrap:wrap; gap:10px; }
.lang-list a{ display:block; padding:10px 16px; border:2px solid var(--line); border-radius:12px; background:#fff; }

/* ---------- responsive ---------- */
@media (max-width:420px){
  .logo span{ display:none; }
  .classic-link{ font-size:.8rem; padding:6px 8px; }
  .player-ui .btn{ min-width:0; padding:10px 14px; }
}
@media (min-width:720px){
  .home-hero-in{ grid-template-columns:1.3fr 1fr; padding-top:60px; padding-bottom:64px; }
  .home-copy h1{ font-size:2.6rem; }
  .hero-cubes{ --hs:92px; gap:10px; }
  .m-cover{ grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); align-items:center; padding:28px; }
  .m-title-row h1{ font-size:2.1rem; }
  .panel{ padding:26px 28px; }
  .player.all .steps, html:not(.js) .steps{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (min-width:1000px){
  .player.all .steps, html:not(.js) .steps{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* ---------- print = replaces the old PDF ---------- */
@media print{
  .top, .foot, .stages, .crumb, [data-print], .player-ui, .step-dots, [data-step-toggle], .finish{ display:none !important; }
  body{ background:#fff; }
  .block-card, .panel{ box-shadow:none; border-width:1px; margin:0 0 12px; }
  .m-cover{ grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); }
  .js .player .steps, .steps{ display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .js .player .steps li{ display:block !important; }
  .steps li, .blocks li, .use{ break-inside:avoid; }
  .coding{ break-before:page; }
}

/* 필요한 블록 묶음 제목, 조립 단계 이름표 */
.blk-group{ margin:14px 0 8px; font-size:1rem; font-weight:900; color:var(--ink2); }
.blk-group:first-of-type{ margin-top:4px; }
.steps li{ position:relative; }
.step-note{ position:absolute; inset-inline-end:12px; top:12px; background:var(--blue); color:#fff; font-weight:800; font-size:.9rem; border-radius:999px; padding:4px 12px; box-shadow:0 2px 0 rgba(0,0,0,.15); }
