/* ==========================================================================
   Ninekey page: the playful, retro member of the family.
   Loaded after site.css. Everything that moves uses transform/opacity only.
   ========================================================================== */

/* ---- hero ---------------------------------------------------------------- */
.nk-hero { background: linear-gradient(172deg, #263550 0%, #1a2538 55%, #131c2b 100%); color: #eef2e2; position: relative; overflow: hidden; border-radius: 0 0 36px 36px; }
.nk-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(180, 197, 145, .16) 1.2px, transparent 1.3px); background-size: 14px 14px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); pointer-events: none; }
.nk-page .site-head { background: #263550; color: #eef2e2; --line-strong: rgba(238, 242, 226, .4); --focus: #f0c46e; }
.nk-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: clamp(20px, 5vw, 56px) 0; }
.nk-name { font-family: var(--pix); font-size: .98rem; color: var(--lcd); margin-bottom: 20px; }
.nk-hero h1 { font-family: var(--dot); font-weight: 400; letter-spacing: 0; font-size: clamp(1.9rem, 9.6vw, 4rem); line-height: 1.16; color: var(--lcd); text-wrap: initial; }
.nk-hero h1 span { display: block; }
.nk-lede { margin-top: 24px; font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.6; max-width: 31em; color: #d5dccb; }
.nk-hero .btn-row { margin-top: 34px; }
.nk-hero .btn { --btn-face: var(--lcd); --btn-edge: #7f9160; --btn-ink: #1b2230; }
.nk-hero .btn-quiet { --btn-face: #2c3b59; --btn-edge: #0e1522; --btn-ink: #eef2e2; }
.nk-hero .btn-quiet .btn-face { box-shadow: inset 0 0 0 1.5px rgba(238, 242, 226, .28); }
.nk-hero :focus-visible { outline-color: #f0c46e; }

/* 9-4-2 spells W-H-A */
.spell { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; }
.spell-key { width: 82px; height: 54px; border-radius: 14px; background: #7f8894; }
.spell-key span { display: flex; align-items: center; justify-content: center; gap: 7px; height: 100%; border-radius: 14px; background: linear-gradient(#c3cad3, #aeb6c0); color: #1b2230; font-family: var(--cond); font-weight: 700; font-size: 1.6rem; line-height: 1; transform: translateY(-4px); }
.spell-key small { font-size: .7rem; letter-spacing: .1em; font-weight: 600; display: inline-flex; align-items: center; opacity: .95; }
.spell-key small b { font-weight: 800; background: #1b2230; color: #e6ebf2; padding: 2px 3px 1px; border-radius: 3px; margin-inline: 1px; letter-spacing: 0; }
.spell-out { display: inline-flex; align-items: center; gap: 10px; }
.spell-arrow { color: var(--lcd); font-size: 18px; margin-inline: 2px; }
.spell .lcd-chip { font-size: 1rem; padding: 12px 14px 11px; }
.js .spell-key span { animation: spellpress .5s var(--ease) both; animation-delay: calc(.9s + var(--i) * .32s); }
.js .spell .lcd-chip { animation: spellpop .6s var(--spring) both; animation-delay: 2.1s; }
.js .spell-arrow { animation: spellfade .4s var(--ease) both; animation-delay: 1.95s; }
@keyframes spellpress { 0%, 100% { transform: translateY(-4px); } 40% { transform: translateY(0); } }
@keyframes spellpop { from { opacity: 0; transform: scale(.6); } }
@keyframes spellfade { from { opacity: 0; transform: translateX(-8px); } }

.nk-hero-phone { display: flex; justify-content: center; height: clamp(360px, 92vw, 470px); }
.nk-hero-phone .phone { --phone-w: 300px; align-self: flex-start; }
.js .nk-hero-phone .phone-in { animation: phonein 1.1s var(--ease) both .15s; }
@keyframes phonein { from { opacity: 0; transform: translateY(60px) rotate(3deg); } }
@media (min-width: 900px) {
  .nk-hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: start; padding-top: 44px; }
  .nk-hero-phone { height: 600px; justify-content: flex-end; padding-right: 20px; }
  .nk-hero-phone .phone { --phone-w: 340px; }
  .nk-hero-text { padding-bottom: 72px; }
}

/* ---- try it: coach + device ---------------------------------------------- */
.nk-try { scroll-margin-top: 12px; }
.nk-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; justify-items: center; }
.nk-devicecol { width: 100%; max-width: 420px; position: relative; }

.coach { width: 100%; max-width: 420px; background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 24px; padding: 18px 20px 20px; scroll-margin-top: 12px; }
.coach-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; min-height: 16px; }
.coach-count { font-family: var(--pix); font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.coach-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; flex: 1; }
.coach-bar i { height: 8px; border-radius: 2px; background: var(--paper-3); position: relative; overflow: hidden; }
.coach-bar i::after { content: ""; position: absolute; inset: 0; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.coach-bar i.on::after { transform: scaleX(1); }
.coach-title { font-size: 1.35rem; line-height: 1.2; }
.coach-text { margin-top: 8px; color: var(--ink-2); font-size: 1rem; line-height: 1.55; }
.coach-media { display: none; margin-top: 16px; border-radius: 14px; overflow: hidden; }
.coach-media img { width: 100%; border-radius: 14px; }
.coach-media .pair { display: grid; gap: 8px; }
.coach-state { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-family: var(--pix); font-size: .86rem; line-height: 1.35; padding: 10px 12px; border-radius: 10px; background: var(--paper-3); color: var(--ink); }
.coach-state .dots { display: inline-flex; gap: 4px; }
.coach-state .dots i { width: 6px; height: 6px; background: currentColor; animation: wait 1.2s var(--ease) infinite; animation-delay: calc(var(--i) * .18s); }
@keyframes wait { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.coach-state.is-done { background: var(--lcd); color: var(--lcd-ink); animation: donepop .5s var(--spring); }
.coach-state .pix { font-size: 15px; }
@keyframes donepop { from { transform: scale(.94); } }
.coach-btns { display: flex; flex-wrap: wrap; gap: 14px 12px; align-items: center; margin-top: 18px; }
.coach .btn-face { min-height: 46px; padding: 10px 18px; font-size: .98rem; }
.coach .btn { border-radius: 14px; }
.coach .btn-face { border-radius: 14px; }
.coach-link { background: none; border: 0; padding: 10px 4px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: .2em; font-size: .98rem; }
.coach-link:hover { text-decoration-color: currentColor; }
.coach [hidden] { display: none !important; }
.coach.is-swap .coach-body { animation: coachswap .4s var(--ease); }
@keyframes coachswap { from { opacity: 0; transform: translateX(14px); } }

@media (min-width: 980px) {
  .nk-stage { grid-template-columns: minmax(0, 340px) minmax(0, 720px); justify-content: space-between; align-items: start; gap: 36px; }
  .nk-devicecol { max-width: 720px; }
  .coach { position: sticky; top: 20px; }
  .coach-media { display: block; }
}

/* ---- the device ---------------------------------------------------------- */
.nk {
  --body: #263550; --body2: #141d2c; --bezel: #0b111c;
  --lcd: #a9bd82; --lcd-hi: #bccd9a; --ink: #222d19; --glow: none;
  --key: #aab2bd; --key-hi: #c0c7d0; --key-edge: #6f7884; --key-ink: #1b2230;
  --ok: #2a3b5c; --ok-ink: #f1f4ea; --callc: #1d8a4c; --hangc: #c2392f;
  position: relative; display: grid; gap: 12px; padding: 14px; border-radius: 34px;
  background: linear-gradient(176deg, var(--body), var(--body2));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .14), inset 0 0 0 1.5px rgba(255, 255, 255, .05), 0 34px 60px -28px rgba(13, 20, 33, .6), 0 12px 22px -12px rgba(13, 20, 33, .45);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.nk[data-skin="glass"] { --body: #25284a; --body2: #19172f; --bezel: #2e3150; --lcd: #081029; --lcd-hi: #13224f; --ink: #c2e6fe; --glow: 0 0 9px rgba(140, 200, 255, .55); --key: #383a5a; --key-hi: #474a70; --key-edge: #14152a; --key-ink: #eaf6ff; --ok: #56608f; --callc: #6fe3a2; --hangc: #ff8b84; }
.nk[data-skin="mono"] { --body: #f3f3f1; --body2: #d6d6d3; --bezel: #c4c4c1; --lcd: #dcdcd8; --lcd-hi: #ecece8; --ink: #161616; --key: #f1f1ef; --key-hi: #ffffff; --key-edge: #b3b3af; --key-ink: #151515; --ok: #171717; --callc: #151515; --hangc: #151515; }
.nk[data-skin="frost"] { --body: #e2ecf6; --body2: #c5d6e7; --bezel: #b5cadf; --lcd: #cedfee; --lcd-hi: #e3edf7; --ink: #0e3358; --key: #e9f0f7; --key-hi: #fbfdff; --key-edge: #a3b9cf; --key-ink: #16344f; --ok: #2b5d8f; --callc: #16344f; --hangc: #16344f; }
.nk[data-skin="noir"] { --body: #1c1c1c; --body2: #0a0a0a; --bezel: #2c2c2c; --lcd: #030303; --lcd-hi: #121212; --ink: #ffffff; --glow: 0 0 8px rgba(255, 255, 255, .4); --key: #1f1f1f; --key-hi: #2e2e2e; --key-edge: #000000; --key-ink: #f7f7f7; --ok: #3a3a3a; --callc: #7be0a4; --hangc: #ff8b84; }
.nk[data-skin="amber"] { --body: #201e1b; --body2: #0f0e0d; --bezel: #2b2824; --lcd: #070503; --lcd-hi: #1a1108; --ink: #ffb23e; --glow: 0 0 9px rgba(255, 160, 40, .55); --key: #262321; --key-hi: #35312d; --key-edge: #050505; --key-ink: #ffc266; --ok: #4a3413; --ok-ink: #ffc266; --callc: #ffc266; --hangc: #ffc266; }
.nk[data-skin="ice"] { --body: #56606c; --body2: #353c46; --bezel: #171b21; --lcd: #03070d; --lcd-hi: #0b1626; --ink: #a6dcff; --glow: 0 0 9px rgba(120, 200, 255, .5); --key: #5a636e; --key-hi: #6d7682; --key-edge: #262b32; --key-ink: #eff8ff; --ok: #20272f; --callc: #8ff0b6; --hangc: #ff9a93; }
.nk[data-skin="rose"] { --body: #efccd7; --body2: #dba9ba; --bezel: #a9728a; --lcd: #ecd2da; --lcd-hi: #f6e6eb; --ink: #5a1e36; --key: #f4e7ec; --key-hi: #fff7fa; --key-edge: #bf8fa1; --key-ink: #5a1e36; --ok: #8c3d5c; --callc: #5a1e36; --hangc: #5a1e36; }
.nk[data-skin="hifi"] { --body: #53341f; --body2: #2e1c10; --bezel: #0e0b08; --lcd: #030606; --lcd-hi: #0a1716; --ink: #8cf5e4; --glow: 0 0 9px rgba(110, 240, 220, .5); --key: #cfc2a5; --key-hi: #e7dbc0; --key-edge: #7f7257; --key-ink: #2a2016; --ok: #2a1a10; --ok-ink: #e7dbc0; --callc: #1f6b42; --hangc: #a8362d; }

.nk-top { position: relative; overflow: hidden; border-radius: 22px; }
.nk-pad { display: grid; gap: 10px; align-content: start; }

/* shelf: a drawer that slides, never resizes */
.nk-shelf { position: relative; height: 40px; z-index: 4; margin-bottom: 20px; }
.nk-shelf-panel { position: absolute; left: 0; right: 0; top: 0; height: 142px; transform: translateY(-102px); transition: transform .5s var(--spring); will-change: transform; background: radial-gradient(120% 100% at 50% 30%, var(--lcd-hi), var(--lcd)); color: var(--ink); text-shadow: var(--glow); border-radius: 18px; box-shadow: inset 0 0 0 3px var(--bezel); font-family: var(--pix); }
.nk-shelf.is-open .nk-shelf-panel { transform: none; }
.nk-shelf.is-drag .nk-shelf-panel { transition: none; }
.nk-shelf-big { position: absolute; left: 14px; right: 14px; top: 12px; height: 92px; display: grid; align-content: space-between; opacity: 0; transition: opacity .3s var(--ease); }
.nk-shelf.is-open .nk-shelf-big, .nk-shelf.is-drag .nk-shelf-big { opacity: 1; }
.nk-shelf-row { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.nk-shelf-row span { display: inline-flex; gap: 6px; align-items: center; }
.nk-shelf-main { display: flex; align-items: center; gap: 12px; }
.nk-shelf-time { font-family: var(--dot); font-size: 30px; line-height: 1; white-space: nowrap; }
.nk-shelf-sub { font-size: 12px; line-height: 1.35; }
.nk-shelf-sub small { font-size: 11px; opacity: .75; }
.nk-shelf-bar { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 9px; }
.nk-shelf-bar i { background: currentColor; opacity: .22; }
.nk-shelf-bar i.on { opacity: 1; }
.nk-shelf-slim { position: absolute; left: 14px; right: 14px; bottom: 0; height: 40px; display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.nk-shelf-slim .pix { font-size: 13px; }
.nk-shelf-mini { margin-left: auto; width: 54px; height: 6px; border-radius: 3px; background: color-mix(in srgb, currentColor 25%, transparent); overflow: hidden; }
.nk-shelf-mini i { display: block; height: 100%; background: currentColor; border-radius: 3px; transform-origin: left; }
.nk-shelf-tab { position: absolute; left: 50%; bottom: -17px; width: 76px; height: 20px; margin-left: -38px; border: 0; padding: 0; background: var(--bezel); border-radius: 0 0 11px 11px; display: flex; gap: 5px; align-items: center; justify-content: center; cursor: grab; touch-action: none; color: var(--lcd-hi); }
.nk-shelf-tab::before { content: ""; position: absolute; inset: -10px -14px -12px; }
.nk-shelf-tab i { width: 5px; height: 5px; background: currentColor; opacity: .8; }
.nk-shelf.is-open .nk-shelf-tab { cursor: grab; }
.nk-shelf-tab.is-hint { animation: tabhint 1.3s var(--ease) infinite; }
@keyframes tabhint { 0%, 100% { transform: none; } 45% { transform: translateY(7px); } }

/* LCD */
.nk-lcd { position: relative; height: 244px; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 95% at 50% 38%, var(--lcd-hi), var(--lcd)); box-shadow: inset 0 0 0 5px var(--bezel), inset 0 0 26px rgba(0, 0, 0, .16); color: var(--ink); text-shadow: var(--glow); font-family: var(--pix); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 14px 16px 10px; }
.nk-lcd::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px); background-size: 4px 4px; pointer-events: none; border-radius: inherit; }
.nk-status { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: .3em; height: 16px; }
.nk-status .pix { font-size: 12px; }
.nk.is-tour .nk-status span { letter-spacing: .02em; background: var(--ink); color: var(--lcd-hi); text-shadow: none; padding: 3px 8px 2px; border-radius: 4px; font-size: 12px; line-height: 1; white-space: nowrap; }
.nk-view { grid-row: 2; grid-column: 1; min-height: 0; transition: opacity .22s var(--ease), transform .3s var(--ease); }
.nk-idle { display: grid; place-content: center; justify-items: center; gap: 10px; }
.nk-clock { font-family: var(--dot); font-size: clamp(54px, 17vw, 68px); line-height: 1; letter-spacing: .02em; }
.nk-date { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; }
.nk-dial { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; padding-top: 6px; opacity: 0; transform: translateY(8px); visibility: hidden; }
.nk.is-shelf .nk-idle { transform: translateY(40px) scale(.72); }
.nk[data-mode="dial"] .nk-idle, .nk[data-mode="apps"] .nk-idle { opacity: 0; transform: scale(.94); visibility: hidden; }
.nk[data-mode="dial"] .nk-dial, .nk[data-mode="apps"] .nk-dial { opacity: 1; transform: none; visibility: visible; }
.nk-typed { display: flex; align-items: flex-end; gap: 4px; height: 38px; }
.nk-cap { display: grid; justify-items: center; min-width: 27px; padding: 2px 2px 3px; border-bottom: 2px solid currentColor; animation: capin .22s var(--spring); }
.nk-cap b { font-family: var(--dot); font-weight: 400; font-size: 21px; line-height: 1; }
.nk-cap small { font-size: 9px; line-height: 1; margin-top: 3px; letter-spacing: .04em; }
@keyframes capin { from { transform: translateY(9px) scale(.7); opacity: 0; } }
.nk-count { margin-left: auto; font-size: 12px; padding-bottom: 5px; white-space: nowrap; }
.nk-typed-hint { font-size: 12px; padding-bottom: 6px; line-height: 1.35; }
.nk-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 3px 4px; }
.nk-app { display: flex; align-items: center; padding: 0 5px; font-size: 13px; line-height: 1; border-radius: 4px; white-space: nowrap; overflow: hidden; transition: opacity .18s var(--ease), transform .25s var(--spring); }
.nk-app .l { padding: 3px 0 2px; }
.nk-app .l.hit { background: var(--ink); color: var(--lcd-hi); text-shadow: none; padding-inline: .5px; }
.nk-app.is-dim { opacity: .26; transform: scale(.94); }
.nk-app.is-top { box-shadow: inset 0 0 0 1.5px currentColor; }
.nk-app.is-go { background: var(--ink); color: var(--lcd-hi); text-shadow: none; transform: scale(1.06); }
.nk-app.is-go .l.hit { background: none; color: inherit; }

.nk-soft { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 1.5px dashed color-mix(in srgb, currentColor 40%, transparent); padding-top: 7px; font-size: 14px; height: 30px; position: relative; z-index: 3; }
.nk-soft span { cursor: pointer; padding: 4px 0; }
.nk-soft span:last-child { text-align: right; }
.nk-soft span:nth-child(2) { text-align: center; }

/* opening an app */
.nk-fx { position: absolute; inset: 5px; border-radius: 17px; background: var(--ink); color: var(--lcd-hi); text-shadow: none; display: grid; place-content: center; justify-items: center; gap: 6px; opacity: 0; transform: scale(.25); pointer-events: none; z-index: 5; }
.nk-fx.is-on { animation: fxopen 1.9s var(--ease) both; }
@keyframes fxopen { 0% { opacity: 0; transform: scale(.2); } 16% { opacity: 1; transform: scale(1.03); } 22% { transform: scale(1); } 84% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
.nk-fx-letter { font-family: var(--dot); font-size: 76px; line-height: 1; }
.nk-fx.is-on .nk-fx-letter { animation: fxletter .7s var(--spring) both .12s; }
@keyframes fxletter { from { transform: scale(.3) rotate(-18deg); opacity: 0; } }
.nk-fx-name { font-size: 18px; }
.nk-fx-note { font-size: 12px; opacity: .75; }
.nk-fx i { position: absolute; left: 50%; top: 44%; width: 7px; height: 7px; margin: -3px; background: currentColor; opacity: 0; }
.nk-fx.is-on i { animation: spark .8s var(--ease) both .2s; }
@keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateX(30px) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(104px) scale(.4); } }

/* set-as-home question + small messages */
.nk-ask { position: absolute; inset: 5px 5px 44px; border-radius: 17px 17px 0 0; background: radial-gradient(120% 95% at 50% 38%, var(--lcd-hi), var(--lcd)); display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 16px; z-index: 2; animation: askin .35s var(--ease); }
.nk-ask[hidden] { display: none; }
.nk-ask b { font-family: var(--dot); font-weight: 400; font-size: 26px; line-height: 1.1; }
.nk-ask span { font-size: 13px; line-height: 1.5; }
@keyframes askin { from { opacity: 0; transform: translateY(10px); } }
.nk-toast { position: absolute; left: 12px; right: 12px; bottom: 46px; padding: 8px 10px; border-radius: 6px; background: var(--ink); color: var(--lcd-hi); text-shadow: none; font-size: 12px; line-height: 1.4; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity .2s var(--ease), transform .3s var(--spring); pointer-events: none; z-index: 4; }
.nk-toast.is-on { opacity: 1; transform: none; }

/* keys */
.key { position: relative; border: 0; padding: 0; border-radius: 15px; background: var(--key-edge); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; font-family: var(--cond); color: var(--key-ink); min-width: 0; }
.key-face { display: flex; align-items: center; justify-content: center; gap: 7px; height: 100%; border-radius: 15px; background: linear-gradient(var(--key-hi), var(--key)); transform: translateY(-4px); transition: transform .12s var(--ease); will-change: transform; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.key.is-down .key-face { transform: translateY(0); transition-duration: .03s; }
.key:focus-visible, .nk-shelf-tab:focus-visible { outline: 3px solid #ffd27a; outline-offset: 2px; box-shadow: 0 0 0 7px #131c2b; border-radius: 15px; }
.nk-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 9px; }
.nk-keys .key { height: 52px; }
.nk-keys b { font-size: 27px; font-weight: 700; line-height: 1; }
.nk-keys small { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; min-width: 34px; text-align: left; }
.nk-keys .pix { font-size: 15px; opacity: .8; }
.nk-navkeys { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); grid-template-rows: 40px 40px; grid-template-areas: "sl dp sr" "ca dp ha"; gap: 10px 9px; margin-top: 4px; }
.key-sl { grid-area: sl; } .key-sr { grid-area: sr; } .key-ca { grid-area: ca; } .key-ha { grid-area: ha; }
.key-soft i { width: 26px; height: 3px; border-radius: 2px; background: currentColor; }
.key-ca .pix { color: var(--callc); font-size: 17px; }
.key-ha .pix { color: var(--hangc); font-size: 22px; }
.nk-dpad { grid-area: dp; position: relative; border-radius: 26px; background: var(--key-edge); }
.nk-dpad-face { position: absolute; inset: 0; border-radius: 26px; background: linear-gradient(var(--key-hi), var(--key)); transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); color: var(--key-ink); }
.nk-dpad-face .pix { position: absolute; font-size: 9px; opacity: .7; }
.nk-dpad-face .u { top: 5px; left: 50%; margin-left: -4.5px; } .nk-dpad-face .d { bottom: 5px; left: 50%; margin-left: -4.5px; }
.nk-dpad-face .l { left: 6px; top: 50%; margin-top: -4.5px; } .nk-dpad-face .r { right: 6px; top: 50%; margin-top: -4.5px; }
.key-ok { position: absolute; inset: 15px 20px 19px; border-radius: 15px; background: rgba(0, 0, 0, .45); z-index: 1; }
.key-ok .key-face { background: var(--ok); color: var(--ok-ink, #f1f4ea); font-weight: 700; font-size: 15px; letter-spacing: .08em; border-radius: 15px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); transform: translateY(-3px); }
.key-ok.is-down .key-face { transform: translateY(0); }
.key.is-hint::after { content: ""; position: absolute; inset: -9px -5px -5px; border-radius: 19px; border: 3px solid var(--amber); animation: hint 1.1s var(--ease) infinite; pointer-events: none; }
@keyframes hint { 0% { opacity: 1; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.14); } }
.key.is-wrong .key-face { animation: wrong .3s var(--ease); }
@keyframes wrong { 30% { transform: translate(-4px, -4px); } 65% { transform: translate(4px, -4px); } }

/* wide layout: screen beside keypad */
@media (min-width: 980px) {
  .nk { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 18px; padding: 20px; border-radius: 40px; align-items: stretch; }
  .nk-top { display: grid; grid-template-rows: auto 1fr; }
  .nk-lcd { height: auto; min-height: 318px; padding: 18px 20px 12px; }
  .nk-app { font-size: 15px; }
  .nk-clock { font-size: 84px; }
  .nk-keys .key { height: 58px; }
  .nk-navkeys { grid-template-rows: 44px 44px; margin-top: 0; }
  .nk-pad { align-content: center; gap: 12px; }
  .nk-cap b { font-size: 24px; }
  .nk-fx-letter { font-size: 96px; }
}
@media (max-width: 359px) { .nk-keys small { display: none; } .nk { padding: 10px; } }

/* confetti */
.nk-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 9; overflow: visible; }
.nk-confetti i { position: absolute; left: 50%; top: 32%; width: 9px; height: 9px; margin: -4px; background: var(--c); opacity: 0; animation: confetti 1.15s cubic-bezier(.15, .8, .3, 1) both; animation-delay: var(--t); }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); } }

/* under the device */
.nk-under { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.nk-sound { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: transparent; cursor: pointer; font-size: .95rem; }
.nk-sound .pix { font-size: 17px; }
.nk-sound .on, .nk-sound[aria-pressed="true"] .off { display: none; }
.nk-sound[aria-pressed="true"] .on { display: block; }
.nk-sound[aria-pressed="true"] { background: var(--lcd); color: var(--lcd-ink); border-color: transparent; }
.nk-tip { color: var(--ink-2); font-size: .95rem; flex: 1 1 220px; line-height: 1.45; }
.skins-label { margin-top: 22px; font-size: .98rem; color: var(--ink-2); }
.skins { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding: 4px 4px 12px; margin-inline: -4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.skin { flex: none; width: 86px; border: 0; padding: 0; background: none; cursor: pointer; text-align: center; font-size: .82rem; line-height: 1.2; color: var(--ink-2); scroll-snap-align: start; position: relative; }
.skin img { width: 86px; height: auto; border-radius: 9px / 10px; outline: 2.5px solid transparent; outline-offset: 2px; transition: transform .25s var(--spring); }
.skin:hover img { transform: translateY(-3px); }
.skin:active img { transform: scale(.95); }
.skin[aria-pressed="true"] img { outline-color: var(--amber); }
.skin[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.skin span { display: block; margin-top: 7px; }
.skin:focus-visible { outline-offset: 5px; }
.skins-arrow { display: none; font-size: 13px; margin-left: 8px; color: var(--amber); vertical-align: -1px; }
.skins-label.is-hint { color: var(--ink); font-weight: 600; }
.skins-label.is-hint .skins-arrow { display: inline-block; animation: arrowbob .9s var(--ease) infinite; }
@keyframes arrowbob { 50% { transform: translateY(5px); } }
@media (min-width: 980px) { .skins { flex-wrap: wrap; overflow: visible; } }
.nk-try { padding-bottom: clamp(24px, 4vw, 48px); }

/* ---- feature rows -------------------------------------------------------- */
.feat { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 6vw, 72px); align-items: center; padding-block: clamp(44px, 7vw, 88px); }
.feat h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); max-width: 14em; }
.feat-text > p { margin-top: 18px; color: var(--ink-2); font-size: 1.12rem; max-width: 32em; }
.feat-list { margin-top: 22px; display: grid; gap: 12px; max-width: 32em; }
.feat-list li { position: relative; padding-left: 26px; }
.feat-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; background: var(--amber); }
.feat-art { position: relative; display: flex; justify-content: center; min-width: 0; }
@media (min-width: 900px) {
  .feat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .feat.flip .feat-text { order: 2; }
}
.duo { position: relative; width: min(100%, 400px); aspect-ratio: 400 / 540; }
.duo-a, .duo-b { position: absolute; width: 62%; }
.duo-a { left: 0; top: 9%; }
.duo-b { right: 0; top: 0; }
.duo .phone { --phone-w: 100%; }
.duo-a .phone { transform: rotate(-5deg); }
.duo-b .phone { transform: rotate(4deg); }

.decks { position: relative; width: min(100%, 460px); display: grid; gap: 14px; }
.deck { border-radius: 20px; overflow: hidden; box-shadow: 0 18px 30px -18px rgba(13, 20, 33, .5); transition: transform .5s var(--spring); }
.deck img { width: 100%; }
.decks .deck:nth-child(1) { transform: rotate(-2.5deg) translateX(-3%); }
.decks .deck:nth-child(2) { transform: rotate(1.8deg) translateX(4%); }
.decks .deck:nth-child(3) { transform: rotate(-1.2deg) translateX(-1%); }
.decks .deck:hover { transform: rotate(0) scale(1.03); }

.spec { width: min(100%, 420px); background: radial-gradient(120% 95% at 50% 30%, var(--lcd-hi), var(--lcd)); color: var(--lcd-ink); border-radius: 28px; padding: 28px 26px; font-family: var(--pix); box-shadow: 0 0 0 10px var(--navy-deep), 0 0 0 11.5px rgba(255, 255, 255, .08), inset 0 0 26px rgba(0, 0, 0, .14), 0 30px 50px -24px rgba(13, 20, 33, .55); }
.spec-title { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; margin-bottom: 18px; }
.spec dl { display: grid; gap: 0; }
.spec dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 13px 0; border-top: 1.5px dashed rgba(35, 46, 26, .4); }
.spec dt { font-size: 14px; }
.spec dd { font-family: var(--dot); font-size: 22px; line-height: 1; text-align: right; }

/* ---- shelf band ---------------------------------------------------------- */
.band { background: var(--paper-2); border-block: 1.5px solid var(--line); }
.shelf-grid { display: flex; gap: 16px; overflow-x: auto; padding: 6px var(--gutter) 22px; margin-inline: calc(var(--gutter) * -1); scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin; }
.shelf-card { flex: none; width: min(82vw, 380px); scroll-snap-align: start; }
.shelf-card img { width: 100%; border-radius: 18px; box-shadow: 0 14px 24px -16px rgba(13, 20, 33, .5); transition: transform .4s var(--spring); }
.shelf-card:hover img { transform: translateY(-5px); }
.shelf-card figcaption { margin-top: 12px; font-size: .98rem; color: var(--ink-2); }
.shelf-card figcaption b { color: var(--ink); font-weight: 600; }
.tag-pro { display: inline-block; font-family: var(--pix); font-size: .72rem; line-height: 1; padding: 5px 7px 4px; border-radius: 6px; background: var(--amber); color: var(--amber-ink); vertical-align: 2px; margin-left: 6px; }
@media (min-width: 980px) { .shelf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; gap: 26px 20px; } .shelf-card { width: auto; } }

/* ---- themes -------------------------------------------------------------- */
.lineup { display: flex; gap: 18px; overflow-x: auto; padding: 10px var(--gutter) 26px; margin-inline: calc(var(--gutter) * -1); scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin; }
.lineup figure { flex: none; width: min(62vw, 250px); scroll-snap-align: center; }
.lineup .phone { --phone-w: 100%; transition: transform .5s var(--spring); }
.lineup figure:hover .phone { transform: translateY(-10px); }
.lineup figcaption { margin-top: 16px; text-align: center; }
.lineup figcaption b { display: block; font-size: 1.15rem; font-weight: 600; }
.lineup figcaption span { color: var(--ink-2); font-size: .95rem; }
@media (min-width: 1100px) { .lineup { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; gap: 22px; } .lineup figure { width: auto; } .lineup figure:nth-child(even) { margin-top: 44px; } }
.colours { margin-top: clamp(36px, 6vw, 64px); display: grid; gap: 24px; }
.colours h3 { font-size: 1.5rem; }
.colours p { color: var(--ink-2); margin-top: 8px; max-width: 34em; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.tiles figure { text-align: center; font-size: .9rem; color: var(--ink-2); }
.tiles img { width: 100%; border-radius: 8% / 12%; margin-bottom: 6px; transition: transform .35s var(--spring); }
.tiles figure:hover img { transform: scale(1.05) rotate(-1.5deg); }
@media (min-width: 900px) { .colours { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; } .tiles { justify-self: end; width: 100%; } }
.pro-note { margin-top: clamp(32px, 5vw, 56px); display: grid; gap: 16px; }
.pro-card { background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 22px; padding: 22px 24px; }
.pro-card h3 { font-size: 1.3rem; }
.pro-card p { margin-top: 8px; color: var(--ink-2); }
@media (min-width: 760px) { .pro-note { grid-template-columns: 1fr 1fr; } }

/* ---- closing call -------------------------------------------------------- */
.getit { text-align: center; background: linear-gradient(172deg, #263550, #131c2b); color: #eef2e2; border-radius: 36px; padding: clamp(40px, 8vw, 84px) 24px; position: relative; overflow: hidden; }
.getit h2 { font-family: var(--dot); font-weight: 400; letter-spacing: 0; color: var(--lcd); font-size: clamp(1.9rem, 7vw, 3.2rem); line-height: 1.2; }
.getit p { margin: 16px auto 0; max-width: 30em; color: #d5dccb; }
.getit .btn { margin-top: 34px; --btn-face: var(--lcd); --btn-edge: #7f9160; --btn-ink: #1b2230; }
.getit :focus-visible { outline-color: #f0c46e; }
.getit small { display: block; margin-top: 22px; font-family: var(--pix); font-size: .8rem; color: #a9b4c4; }

@media (prefers-reduced-motion: reduce) {
  .nk-shelf-panel, .key-face, .nk-app, .nk-view { transition: none !important; }
  .nk-fx.is-on { animation: fxcalm 1.9s linear both !important; animation-duration: 1.9s !important; }
  @keyframes fxcalm { 0%, 100% { opacity: 0; transform: none; } 6%, 92% { opacity: 1; transform: none; } }
  .nk-fx i, .nk-confetti { display: none; }
  .key.is-hint::after { animation: none !important; opacity: 1; }
  .decks .deck, .duo .phone { transform: none; }
}
