/* Cubora — shared styles */
:root {
  --bg: #f6f7fb; --bg2: #ffffff; --bg3: #eef0f6; --text: #16181d; --muted: #5d6474; --line: #dfe3ec;
  --accent: #2558e0; --accent-2: #1a45b8; --accent-text: #ffffff; --ok: #16a34a; --warn: #d97706; --bad: #dc2626;
  --shadow: 0 10px 30px rgba(20, 30, 60, .08); --radius: 14px; --cv-plastic: #15171c;
  --c-U:#f4f4f2; --c-R:#d7262b; --c-F:#14a24d; --c-D:#f3cd12; --c-L:#f6821f; --c-B:#1f62d6; --c-X:#9aa0ad;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1116; --bg2: #171a21; --bg3: #1f232d; --text: #eceef3; --muted: #9aa3b5; --line: #2a2f3b;
  --accent: #5b8cff; --accent-2: #3d6ff0; --shadow: 0 10px 30px rgba(0,0,0,.35); --cv-plastic: #0a0b0e;
} }
:root[data-theme="dark"] {
  --bg: #0f1116; --bg2: #171a21; --bg3: #1f232d; --text: #eceef3; --muted: #9aa3b5; --line: #2a2f3b;
  --accent: #5b8cff; --accent-2: #3d6ff0; --shadow: 0 10px 30px rgba(0,0,0,.35); --cv-plastic: #0a0b0e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); } h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin-top: 1.6em; } h3 { font-size: 1.1rem; margin-top: 1.2em; }
p { margin: 0 0 1em; } code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
kbd { background: var(--bg3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .9rem; } .center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.logo svg { width: 28px; height: 28px; }
nav.main { display: flex; gap: 4px; margin-left: auto; }
nav.main a { padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
nav.main a:hover { background: var(--bg3); text-decoration: none; } nav.main a.active { background: var(--accent); color: var(--accent-text); }
.theme-btn { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; font-size: 1.1rem; }
.btn.burger { display: none; }
@media (max-width: 760px) {
  nav.main { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 12px; }
  nav.main.open { display: flex; } .btn.burger { display: inline-flex; margin-left: auto; }
}

/* generic */
main { padding: 26px 0 60px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--accent); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } .btn.primary:hover { background: var(--accent-2); }
.btn.lg { padding: 12px 20px; font-size: 1.05rem; } .btn.sm { padding: 6px 10px; font-size: .88rem; } .btn.icon { width: 40px; padding: 0; }
.btn.danger { color: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; } @media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bg3); color: var(--muted); }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.alert { padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: .95rem; }
.alert.bad { border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.alert.info { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
details.faq { border-top: 1px solid var(--line); padding: 12px 0; } details.faq summary { cursor: pointer; font-weight: 600; } details.faq p { margin: 10px 0 0; color: var(--muted); }
.prose { max-width: 780px; } .prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: .35em; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; } table.tbl th, table.tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); } table.tbl th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
input[type=range] { accent-color: var(--accent); }
select, input[type=text], textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; } footer a { color: var(--muted); }

/* 3D cube scene */
.cv-scene { --cv-size: 240px; width: calc(var(--cv-size) * 1.75); height: calc(var(--cv-size) * 1.75); max-width: 100%; perspective: calc(var(--cv-size) * 5); display: flex; align-items: center; justify-content: center; user-select: none; cursor: grab; position: relative; }
.cv-scene:active { cursor: grabbing; }
.cv-cube { width: var(--cv-size); height: var(--cv-size); position: relative; transform-style: preserve-3d; }
.cv-cubie { position: absolute; left: calc(var(--cv-size) / 3); top: calc(var(--cv-size) / 3); width: calc(var(--cv-size) / 3); height: calc(var(--cv-size) / 3); transform-style: preserve-3d; }
.cv-face { position: absolute; inset: 0; background: var(--cv-plastic); border: 1px solid var(--cv-plastic); backface-visibility: hidden; border-radius: 8%; }
.cv-sticker { box-shadow: inset 0 0 0 calc(var(--cv-size) / 90) var(--cv-plastic); border-radius: 12%; cursor: pointer; transition: filter .15s; }
.cv-scene.paint .cv-sticker:hover { filter: brightness(1.15); }
.cv-sticker.cv-unknown { background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.15) 6px 12px); }
.cv-sticker.cv-hl { outline: 3px solid #ff2fd3; outline-offset: -3px; animation: cvblink 1s infinite; }
@keyframes cvblink { 50% { outline-color: transparent; } }
.cv-small { --cv-size: 120px; }

/* net editor */
.net { display: grid; grid-template-columns: repeat(4, auto); grid-template-rows: repeat(3, auto); gap: 6px; width: max-content; margin: 0 auto; }
.net .face { display: grid; grid-template-columns: repeat(3, var(--cell, 30px)); gap: 3px; }
.net .face[data-face=U] { grid-column: 2; grid-row: 1; } .net .face[data-face=L] { grid-column: 1; grid-row: 2; } .net .face[data-face=F] { grid-column: 2; grid-row: 2; }
.net .face[data-face=R] { grid-column: 3; grid-row: 2; } .net .face[data-face=B] { grid-column: 4; grid-row: 2; } .net .face[data-face=D] { grid-column: 2; grid-row: 3; }
.net .st { width: var(--cell, 30px); height: var(--cell, 30px); border-radius: 5px; border: 1px solid rgba(0,0,0,.25); cursor: pointer; position: relative; }
.net .st.center { cursor: default; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.net .st.center::after { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: rgba(0,0,0,.55); }
.net .st.hl { outline: 3px solid #ff2fd3; outline-offset: -1px; animation: cvblink 1s infinite; }
.net .st:hover { filter: brightness(1.12); }
.c-U { background: var(--c-U); } .c-R { background: var(--c-R); } .c-F { background: var(--c-F); } .c-D { background: var(--c-D); } .c-L { background: var(--c-L); } .c-B { background: var(--c-B); }
.c-X { background: var(--c-X); background-image: repeating-linear-gradient(45deg, transparent 0 5px, rgba(255,255,255,.25) 5px 10px); }
.palette { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.palette .sw { width: 44px; height: 44px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; position: relative; display: grid; place-items: end center; padding-bottom: 2px; font-size: .72rem; font-weight: 800; color: rgba(0,0,0,.6); }
.palette .sw.sel { border-color: var(--text); box-shadow: 0 0 0 3px var(--bg2), 0 0 0 5px var(--accent); }
.palette .sw .n { position: absolute; top: -8px; right: -8px; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; min-width: 20px; height: 20px; font-size: .7rem; line-height: 18px; text-align: center; padding: 0 4px; }
.palette .sw.full .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.palette .sw.over .n { background: var(--bad); color: #fff; border-color: var(--bad); }

/* solution */
.moves { display: flex; flex-wrap: wrap; gap: 6px; }
.moves .mv { padding: 6px 10px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 1rem; cursor: pointer; min-width: 38px; text-align: center; }
.moves .mv.done { opacity: .45; } .moves .mv.cur { background: var(--accent); color: var(--accent-text); border-color: var(--accent); transform: scale(1.08); }
.bigmove { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; font-family: ui-monospace, Menlo, Consolas, monospace; line-height: 1; }
.playbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.progress { height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* timer */
.timer { font-variant-numeric: tabular-nums; font-size: clamp(3rem, 12vw, 6rem); font-weight: 800; letter-spacing: -.03em; text-align: center; padding: 20px 0; border-radius: var(--radius); cursor: pointer; user-select: none; }
.timer.ready { color: var(--ok); } .timer.inspect { color: var(--warn); } .timer.running { color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.stats .s { background: var(--bg3); border-radius: 10px; padding: 10px; text-align: center; } .stats .s b { display: block; font-size: 1.3rem; } .stats .s span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.scramble { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(1rem, 2.4vw, 1.35rem); font-weight: 700; line-height: 1.7; word-spacing: .3em; }
.solves { max-height: 300px; overflow: auto; }

/* algorithm library */
.alg-grid { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.alg { display: flex; flex-direction: column; gap: 8px; } .alg .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .alg .name { font-weight: 700; }
.alg .alg-text { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; font-size: .95rem; word-spacing: .2em; }
.alg .body { display: flex; gap: 12px; align-items: center; } .alg .body svg { width: 96px; height: 96px; flex: none; }
.alg .demo { display: none; justify-content: center; } .alg.open .demo { display: flex; }
.alg .demo .cv-scene { --cv-size: 110px; width: 190px; height: 190px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; } .tabs .btn.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* learn */
.step { display: grid; grid-template-columns: 1fr 240px; gap: 18px; align-items: start; }
@media (max-width: 760px) { .step { grid-template-columns: 1fr; } }
.step .demo .cv-scene { --cv-size: 130px; width: 220px; height: 220px; margin: 0 auto; }
.step .algline { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 1.05rem; background: var(--bg3); padding: 8px 12px; border-radius: 8px; display: inline-block; }
.notation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.notation-grid .n { background: var(--bg3); border-radius: 10px; padding: 10px; text-align: center; } .notation-grid .n b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.3rem; display: block; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; } .toc a { padding: 6px 10px; border-radius: 8px; background: var(--bg3); color: var(--text); font-size: .9rem; }

/* scanner */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal.open { display: flex; }
.modal .box { background: var(--bg2); border-radius: var(--radius); padding: 18px; width: min(560px, 100%); max-height: 95vh; overflow: auto; }
.cam { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 10px; overflow: hidden; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam .guide { position: absolute; left: 50%; top: 50%; width: 56%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.cam .guide i { border: 2px dashed rgba(255,255,255,.85); border-radius: 6px; }
.cam .guide i.ctr { border-style: solid; border-width: 3px; }
.scan-faces { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; } .scan-faces .f { width: 54px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border: 2px solid var(--line); border-radius: 6px; cursor: pointer; }
.scan-faces .f.cur { border-color: var(--accent); } .scan-faces .f i { aspect-ratio: 1; border-radius: 2px; background: var(--c-X); }

/* hero / seo */
.hero { text-align: center; max-width: 760px; margin: 0 auto 26px; } .hero p { color: var(--muted); font-size: 1.08rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.features .f { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; } .features .f b { display: block; margin-bottom: 4px; }
.kbdlist span { display: inline-block; margin: 0 10px 6px 0; }
[hidden] { display: none !important; } .timer:focus { outline: none; }
.grid2 > * { min-width: 0; }

/* ad units (only rendered when AdSense is configured in site.config.json) */
.ad { margin: 22px auto; min-height: 100px; text-align: center; }
.ad-sidebar { margin: 16px 0; }
.cv-hint { position: absolute; inset: 0; pointer-events: none; transition: opacity .15s; }
.cv-hint svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.cv-cube.cv-turning .cv-hint { opacity: 0; }
.cv-sticker.cv-lay { box-shadow: inset 0 0 0 calc(var(--cv-size) / 90) var(--cv-plastic), inset 0 0 0 calc(var(--cv-size) / 34) rgba(255,255,255,.75); }

/* solver wizard */
.hero-tight { margin-bottom: 16px; } .hero-tight p { margin-bottom: 0; }
.wiz { max-width: 760px; margin: 0 auto; padding: 18px 18px 22px; }
.w-steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.w-steps span { padding: 5px 12px; border-radius: 999px; background: var(--bg3); color: var(--muted); font-size: .85rem; font-weight: 700; }
.w-steps span.on { background: var(--accent); color: var(--accent-text); } .w-steps span.past { color: var(--ok); }
.w-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.w-dot { width: 34px; padding: 3px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 2px solid var(--line); border-radius: 7px; background: var(--bg2); cursor: pointer; }
.w-dot i { aspect-ratio: 1; border-radius: 1px; } .w-dot.cur { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.w-dot.done:not(.cur) { border-color: var(--ok); }
.w-hold { display: flex; gap: 14px; align-items: center; justify-content: center; margin-bottom: 12px; }
.w-holdpic { flex: none; } .w-holdpic svg { display: block; }
.w-holdtext { margin: 0; max-width: 430px; font-size: 1.02rem; } .w-facen { display: block; color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(270px, 74vw); margin: 4px auto 16px; padding: 8px; background: var(--cv-plastic); border-radius: 14px; }
.w-st { aspect-ratio: 1; border: 0; border-radius: 9px; cursor: pointer; padding: 0; transition: transform .08s, filter .15s; }
.w-st:hover { filter: brightness(1.1); } .w-st:active { transform: scale(.94); }
.w-st.center { cursor: default; box-shadow: inset 0 0 0 3px rgba(0,0,0,.25); } .w-st.center:active { transform: none; }
.w-pal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 520px; margin: 0 auto; }
.w-sw { border: 3px solid transparent; border-radius: 12px; min-height: 58px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; padding: 4px 2px; color: #111; }
.w-sw .nm { font-weight: 800; font-size: .82rem; text-transform: capitalize; } .w-sw .n { font-size: .7rem; font-weight: 700; opacity: .75; }
.w-sw.c-B .nm, .w-sw.c-B .n, .w-sw.c-R .nm, .w-sw.c-R .n, .w-sw.c-F .nm, .w-sw.c-F .n { color: #fff; }
.w-sw.sel { border-color: var(--text); box-shadow: 0 0 0 3px var(--bg2), 0 0 0 5px var(--accent); transform: translateY(-2px); }
.w-sw.full { opacity: .45; } .w-sw.full.sel { opacity: 1; } .w-sw.over .n { opacity: 1; background: var(--bad); color: #fff !important; border-radius: 6px; padding: 0 4px; }
@media (max-width: 520px) { .w-pal { grid-template-columns: repeat(3, 1fr); } .w-hold { gap: 10px; } }
#w-palhint { margin: 8px 0 0; } #w-palhint.flash { animation: wflash .9s; color: var(--bad); font-weight: 700; }
@keyframes wflash { 0%, 50% { transform: scale(1.06); } }
.w-nav { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.w-nav .btn { flex: 1; max-width: 240px; } .w-nav .btn.primary { flex: 1.6; }
.w-alt { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.w-chip { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 4px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.25); }
#w-check .net { --cell: min(30px, 6.4vw); }
.w-holdmini { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: .92rem; background: var(--bg3); border-radius: 10px; padding: 6px 12px; margin-bottom: 8px; }
.w-holdmini svg { flex: none; }
.w-play { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
@media (max-width: 700px) { .w-play { grid-template-columns: 1fr; gap: 4px; } }
.w-cube { display: flex; justify-content: center; } .w-cube .cv-scene { cursor: grab; }
.w-count { color: var(--muted); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.w-say { font-size: clamp(1.25rem, 3.4vw, 1.6rem); line-height: 1.3; margin: 6px 0 8px; min-height: 2.6em; }
.w-note .mv { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; }
.w-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; } .w-more summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.wiz.w-solved .w-say { color: var(--ok); }
@media (max-width: 560px) {
  main { padding-top: 14px; }
  .hero-tight { margin-bottom: 10px; } .hero-tight h1 { font-size: 1.45rem; margin-bottom: .2em; } .hero-tight p { font-size: .92rem; }
  .wiz { padding: 12px 12px 16px; }
  .w-steps { gap: 4px; margin-bottom: 10px; flex-wrap: nowrap; } .w-steps span { padding: 4px 8px; font-size: .74rem; white-space: nowrap; }
  .w-dots { gap: 5px; } .w-dot { width: 30px; }
  .w-holdtext { font-size: .95rem; } .w-grid { width: min(240px, 66vw); margin-bottom: 12px; }
  .w-sw { min-height: 50px; }
  .w-say { min-height: 0; } .w-holdmini { font-size: .82rem; }
}
#wiz { scroll-margin-top: 72px; }
.w-cube .cv-scene { height: calc(var(--cv-size) * 1.45); }

/* guided scanner */
.scan-modal .box { width: min(520px, 100%); padding: 14px; }
@media (max-width: 560px) { .scan-modal { padding: 0; } .scan-modal .box { border-radius: 0; max-height: 100vh; height: 100%; } }
.sc-top { display: flex; gap: 10px; align-items: center; margin: 8px 0; } .sc-top svg { display: block; flex: none; } .sc-top p { margin: 0; font-size: .98rem; }
.scan-modal .cam { aspect-ratio: 1; }
.scan-modal .cam .guide { width: 62%; }
.scan-modal .cam .guide i { border: 3px dashed rgba(255,255,255,.8); border-radius: 8px; transition: border-color .15s; }
.scan-modal .cam .guide i.ok { border-style: solid; border-color: rgba(255,255,255,.95); }
.scan-modal .cam .guide i.ctr { border: 4px solid var(--want, #fff); box-shadow: 0 0 0 2px rgba(0,0,0,.5); }
.sc-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(0,0,0,.4); } .sc-bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .1s; }
.cam.snap::after { content: ""; position: absolute; inset: 0; background: #fff; animation: snap .45s ease-out forwards; }
@keyframes snap { from { opacity: .85; } to { opacity: 0; } }
.sc-status { text-align: center; font-weight: 700; padding: 8px; margin-top: 8px; border-radius: 10px; background: var(--bg3); }
.sc-status.go { color: var(--accent); } .sc-status.ok { color: #fff; background: var(--ok); } .sc-status.warn { color: #fff; background: var(--warn); }
.scan-faces .f { background: var(--bg2); } .scan-faces .f.done { border-color: var(--ok); }
.cv-cube.cv-viewanim { transition: transform .4s ease; }
.cv-letters .cv-sticker::after { content: attr(data-l); position: absolute; inset: 0; display: grid; place-items: center; font: 800 calc(var(--cv-size) / 11)/1 system-ui, sans-serif; color: rgba(0,0,0,.6); }

/* wizard v3: start choice, language, check cards, confirm, sticky solve bar, done */
.w-top { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.w-top .w-steps { margin: 0; }
.w-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.w-lang button { border: 0; background: var(--bg2); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 800; padding: 4px 10px; cursor: pointer; }
.w-lang button.on { background: var(--accent); color: var(--accent-text); }
.w-h { text-align: center; font-size: 1.15rem; margin: 4px 0 14px; }
.w-choice { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 480px; margin: 0 auto 12px; padding: 18px 20px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: .15s; }
.w-choice b { font-size: 1.15rem; } .w-choice span { color: var(--muted); font-size: .92rem; }
.w-choice:hover { border-color: var(--accent); } .w-choice.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.w-choice.primary span { color: color-mix(in srgb, var(--accent-text) 85%, transparent); }
.w-resume { display: flex; width: 100%; max-width: 480px; margin: 0 auto 6px; white-space: normal; }
#w-palhint.w-warn { color: var(--bad); font-weight: 700; }
.w-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.w-fc { border: 2px solid var(--line); border-radius: 12px; padding: 8px; position: relative; background: var(--bg2); }
.w-fc.bad { border-color: var(--bad); }
.w-fcn { position: absolute; top: 6px; left: 8px; font-weight: 800; font-size: .8rem; color: var(--muted); }
.w-fcrow { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 12px; }
.w-fcrow img { width: 62px; height: 62px; border-radius: 6px; object-fit: cover; }
.w-mini { display: grid; grid-template-columns: repeat(3, 20px); gap: 2px; padding: 3px; background: var(--cv-plastic); border-radius: 6px; }
.w-mini i { width: 20px; height: 20px; border-radius: 3px; cursor: pointer; position: relative; }
.w-mini i.hl { outline: 3px solid #ff2fd3; outline-offset: -1px; animation: cvblink 1s infinite; }
.w-fcb { display: flex; justify-content: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.w-confirm { background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); border: 2px solid var(--accent); border-radius: 12px; padding: 12px; margin-bottom: 8px; text-align: center; }
.w-confirm p { margin: 0; font-size: 1.02rem; }
.w-holdmini.compact { padding: 4px 10px; font-size: .82rem; }
.w-solvenav { position: sticky; bottom: 0; z-index: 5; }
@media (max-width: 700px) {
  .w-solvenav { background: var(--bg2); margin: 0 -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(0,0,0,.08); }
  .w-solvenav .btn { max-width: none; }
}
.w-done { text-align: center; position: relative; padding-top: 6px; } .w-done h3 { margin: 0 0 4px; font-size: 1.5rem; color: var(--ok); }
.w-confetti { position: absolute; inset: -120px 0 0; pointer-events: none; overflow: hidden; }
.w-confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: wconf 1.8s ease-in forwards; opacity: 0; }
@keyframes wconf { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(320px) rotate(540deg); opacity: 0; } }
.w-settings { display: grid; gap: 8px; margin-top: 12px; font-size: .92rem; } .w-settings label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.w-settings select { padding: 4px 8px; }
.w-letters .w-st::after, .w-letters .w-mini i::after { content: attr(data-l); position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: rgba(0,0,0,.6); }
.w-letters .w-st { position: relative; font-size: 1.2rem; } .w-letters .w-mini i { font-size: .62rem; }
.sc-note { margin: 8px 0; } .sc-photo { width: 48px; height: 48px; border-radius: 6px; vertical-align: middle; }
.w-confirm .w-nav { flex-wrap: wrap; } .w-confirm .w-nav .btn { white-space: normal; flex: 1 1 140px; }
.w-cube .cv-scene { height: calc(var(--cv-size) * 1.6); }
@media (max-width: 560px) {
  .w-top { flex-wrap: nowrap; gap: 6px; } .w-steps span { padding: 4px 7px; font-size: .7rem; } .w-lang button { padding: 4px 7px; font-size: .7rem; }
}

/* ===== home page ===== */
.home-hero { position: relative; margin: -26px -16px 26px; padding: 34px 16px 30px; overflow: hidden;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c-B) 16%, transparent), transparent 60%),
              radial-gradient(100% 80% at 100% 0%, color-mix(in srgb, var(--c-R) 14%, transparent), transparent 55%),
              radial-gradient(90% 90% at 100% 100%, color-mix(in srgb, var(--c-D) 18%, transparent), transparent 60%),
              radial-gradient(90% 90% at 0% 100%, color-mix(in srgb, var(--c-F) 14%, transparent), transparent 60%); border-radius: 0 0 28px 28px; }
.hh-bg { position: absolute; inset: 0; pointer-events: none; }
.hh-float { position: absolute; opacity: .22; animation: hhfloat 9s ease-in-out infinite; }
.hh-float svg { width: 100%; height: auto; display: block; }
@keyframes hhfloat { 50% { translate: 0 -14px; } }
.hh-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: center; max-width: 1080px; margin: 0 auto; }
@media (max-width: 820px) { .hh-grid { grid-template-columns: 1fr; text-align: center; } .hh-demo { order: -1; } }
.hh-kicker { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); padding: 5px 12px; border-radius: 999px; }
.home-hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: 12px 0 10px; letter-spacing: -.03em; }
.hh-grad { display: block; background: linear-gradient(90deg, var(--c-R), var(--c-L) 25%, var(--c-D) 45%, var(--c-F) 65%, var(--c-B)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hh-lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
@media (max-width: 820px) { .hh-lead { margin-left: auto; margin-right: auto; } }
.hh-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 14px; } @media (max-width: 820px) { .hh-cta { justify-content: center; } }
.hh-cta .btn.lg { padding: 14px 22px; font-size: 1.08rem; border-radius: 14px; } .hh-cta .btn.primary { box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.hh-chips { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; } @media (max-width: 820px) { .hh-chips { justify-content: center; } }
.hh-chips li { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .88rem; font-weight: 600; }
.hh-demo { display: flex; flex-direction: column; align-items: center; }
.hh-ring { border-radius: 50%; padding: 6px; background: conic-gradient(var(--c-R), var(--c-L), var(--c-D), var(--c-F), var(--c-B), var(--c-U), var(--c-R)); box-shadow: 0 20px 50px rgba(20,30,60,.18); }
.hh-ring > div { border-radius: 50%; background: var(--bg2); overflow: hidden; }
.hh-cap { margin: 10px 0 0; font-weight: 700; color: var(--muted); min-height: 1.5em; }
@media (max-width: 820px) { .home-hero { padding-top: 20px; } }
.wiz { position: relative; scroll-margin-top: 72px; }
.wiz-stripe { position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, var(--c-R) 0 16.6%, var(--c-L) 0 33.3%, var(--c-D) 0 50%, var(--c-F) 0 66.6%, var(--c-B) 0 83.3%, var(--c-U) 0); }
.w-choice.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--c-F))); }
.home-sec { margin: 46px auto 0; max-width: 1080px; }
.sec-h { text-align: center; font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 20px; } .sec-h span { display: block; font-size: .95rem; color: var(--muted); font-weight: 600; margin-top: 6px; letter-spacing: 0; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } @media (max-width: 820px) { .how { grid-template-columns: 1fr; } }
.how-c { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); border-top: 6px solid var(--k); }
.how-c.c1 { --k: var(--c-R); } .how-c.c2 { --k: var(--c-F); } .how-c.c3 { --k: var(--c-B); }
.how-n { position: absolute; top: -18px; left: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--k); color: #fff; font-weight: 900; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.how-ill { height: 130px; display: grid; place-items: center; margin: 6px 0 8px; background: color-mix(in srgb, var(--k) 9%, transparent); border-radius: 12px; }
.how-ill svg { height: 112px; width: auto; } .how-c h3 { margin: 6px 0; } .how-c p { color: var(--muted); margin: 0; }
.how-arrow { position: relative; display: block; width: 110px; }
.how-arrow::after { content: "↑"; position: absolute; right: 18px; top: 34px; font: 900 44px/1 system-ui; color: #fff; text-shadow: 0 0 0 #111, 0 2px 6px rgba(0,0,0,.6); }
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; } @media (max-width: 900px) { .tips { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 480px) { .tips { grid-template-columns: 1fr; } }
.tip { border-radius: 16px; padding: 16px; background: color-mix(in srgb, var(--k) 12%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--k) 35%, var(--line)); }
.tip.t1 { --k: var(--c-D); } .tip.t2 { --k: var(--c-B); } .tip.t3 { --k: var(--c-F); } .tip.t4 { --k: var(--c-L); }
.tip-i { font-size: 1.8rem; display: block; } .tip h3 { margin: 6px 0 4px; font-size: 1.02rem; } .tip p { margin: 0; color: var(--muted); font-size: .93rem; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } @media (max-width: 900px) { .feats { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 520px) { .feats { grid-template-columns: 1fr; } }
.feat { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.feat > span { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; background: color-mix(in srgb, var(--k) 18%, transparent); margin-bottom: 8px; }
.feat.f1 { --k: var(--c-D); } .feat.f2 { --k: var(--c-F); } .feat.f3 { --k: var(--c-B); } .feat.f4 { --k: var(--c-R); } .feat.f5 { --k: var(--c-L); } .feat.f6 { --k: var(--accent); }
.feat b { display: block; font-size: 1.05rem; } .feat p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
.home-faq { margin: 46px auto 0; }
.home-end { margin: 50px -16px -60px; padding: 34px 16px 50px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--c-B), color-mix(in srgb, var(--c-B) 50%, var(--c-F)) 50%, var(--c-F)); }
.home-end h2 { margin: 10px 0 16px; color: #fff; } .he-cubes { display: flex; justify-content: center; align-items: flex-end; gap: 12px; } .he-cubes span { display: block; }
.he-cubes span svg, [data-iso] svg { width: 100%; height: auto; display: block; } .he-cubes span:nth-child(1), .he-cubes span:nth-child(3) { width: 70px; } .he-cubes span:nth-child(2) { width: 90px; }
.he-btn { background: #fff; color: #15171c; border-color: #fff; font-size: 1.1rem; padding: 14px 24px; border-radius: 14px; } .he-btn:hover { background: #f1f3f8; }
@media (prefers-reduced-motion: reduce) { .hh-float { animation: none; } }
.hh-ring { width: 300px; height: 300px; display: grid; place-items: center; }
.hh-ring > div { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
@media (max-width: 820px) { .hh-ring { width: 230px; height: 230px; } }
@media (max-width: 820px) { .hh-demo { order: 0; margin-top: 4px; } .hh-ring { width: 190px; height: 190px; } .home-hero h1 { font-size: 1.9rem; margin-top: 8px; } .hh-lead { font-size: 1rem; } .hh-kicker { font-size: .7rem; } }

/* ===== mobile audit 17 oct ===== */
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); vertical-align: -4px; }
@media (max-width: 820px) {
  .hh-float { display: none; } /* decorative cubes sat under the kicker and next to the buttons */
  .hh-chips { gap: 6px; } .hh-chips li { font-size: .78rem; padding: 5px 10px; }
  .hh-cta .btn.lg { width: 100%; max-width: 340px; }
}
@media (max-width: 480px) {
  .top .wrap { gap: 10px; }
  .logo { font-size: 1rem; white-space: nowrap; min-width: 0; } .logo svg { width: 24px; height: 24px; flex: none; }
  .hh-kicker { font-size: .64rem; letter-spacing: .03em; padding: 5px 10px; }
  footer .wrap:not(.fcols) { gap: 4px 6px; } footer .wrap:not(.fcols) a { display: inline-block; padding: 9px 8px; }
  #search, #filter-learned { width: 100%; }
}
@media (max-width: 380px) { .logo { font-size: .86rem; letter-spacing: -.03em; gap: 7px; } .logo svg { width: 22px; height: 22px; } .top .wrap { gap: 8px; } .theme-btn { width: 36px; height: 36px; } }

/* audit: links inside running text are underlined (not only by color); reserved space on the timer card (no layout shift) */
.prose p a, .prose li a, .feat p a, .how-c p a, details.faq p a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.scramble { min-height: 3.4em; }
#scr-cube { width: 210px; height: 210px; max-width: 100%; }
.hh-spin { transform-style: preserve-3d; } .hh-spin.on { animation: hhspin 24s linear infinite; }
@keyframes hhspin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .hh-spin { animation: none; } }
h2.h3 { font-size: 1.1rem; margin-top: 1.2em; }
.hh-spin { width: var(--cv-size); height: var(--cv-size); position: relative; }

/* ===== Ratgeber (articles) ===== */
.rg-index .lead { color: var(--muted); font-size: 1.08rem; max-width: 640px; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.rg-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.rg-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.rg-card b { font-size: 1.08rem; line-height: 1.3; } .rg-teaser { color: var(--muted); font-size: .94rem; } .rg-meta { color: var(--muted); font-size: .8rem; margin-top: auto; }
.rg-card.is-ad { background: color-mix(in srgb, var(--warn) 6%, var(--bg2)); }
.rg-cat { align-self: flex-start; font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.rg-ad, .ad-label strong { align-self: flex-start; display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #5d6474; padding: 3px 9px; border-radius: 6px; }
.rg-article { max-width: 760px; margin: 0 auto; }
.rg-article h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); margin: 6px 0 10px; }
.rg-crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 12px; } .rg-crumbs a { color: var(--muted); }
.rg-byline { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.rg-body { max-width: none; font-size: 1.04rem; } .rg-body h2 { margin-top: 1.5em; } .rg-body img { border-radius: 12px; }
.rg-article.is-ad .rg-body { background: color-mix(in srgb, var(--warn) 5%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--warn) 25%, var(--line)); border-radius: 14px; padding: 6px 18px 2px; }
.ad-label { margin: 0 0 6px; } .ad-label strong { font-size: .95rem; }
.ad-disclosure { font-size: .95rem; color: var(--text); background: var(--bg3); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.rg-author { display: flex; gap: 14px; align-items: flex-start; margin: 28px 0 0; padding: 16px; border-radius: 14px; background: var(--bg3); }
.rg-author .rg-av { width: 56px; flex: none; } .rg-author p { margin: 4px 0 0; color: var(--muted); font-size: .94rem; }
.rg-related { margin-top: 30px; } .rg-related h2 { font-size: 1.3rem; }
.rg-box { border-left: 4px solid var(--accent); background: var(--bg3); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 1em 0; }
.rg-table { overflow-x: auto; margin: 1em 0; } .rg-table table { min-width: 520px; }
.sec-h { margin-bottom: 4px; } .sec-sub { text-align: center; color: var(--muted); font-weight: 600; margin: 0 0 20px; }
.hh-still { display: block; width: 46%; } .hh-still svg { width: 100%; height: auto; display: block; }
