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4QVclWpL3+Hb47OpT4nzl7Q3A50d/Ayv2FhWQvRNmNMTtTrFz17zbzxc2ffYy/x9WowrmnX5OKHZ7T7OR1lxgk6lndpVr8z6q3TK/f+i55nfe69sHUz8lq4/3OWJLz2lpSASE9nmryw0Xn5dnQniRDjk3DXsCvxiWmBsa+FDEQ6tPf3a+eQkiTnjgkx9ci15KEuLuzNXf1W4Ezlk+51MnDRlNm5yZn1lpn3YXB2fqBCK9xzptpz+UX1mRF/eWy+OnEbHtvJkJiBHPifH3xXyla0s5gGQz+KUdp7hpqRk0Hz3Omx9qKfdfgPzCZBlkvFKJ5Hi1kPP7m9jOSl6I7qtuHKicl481sv1hGjAb7KVWWG5e+4PSfdYfZ7Gpcn2nA9kFcQ3FiEKKpGmOXW08WkiP7tkJmNeb+373u/eT6kXsNpKod5l+ggVPcmGF/dRxyXuZJbHL+fYo/FQ5XhsONOaJJUS3wSvcZ2XgrdG3feMQjXvU8rJKpHzTbxa1dK/is3OeB3O7feilwZC08xf2/YOnBPtFHoCYz3P+rKJDEyZ12dn8wDZr7va21NWtdmPmzTntb5dj2AiCbr/tGnzsvFLVvfNPMplRcyzMN386bOUFLCy3x0+i06x7/tBGUGMb0EgenSylNx32SA5/dV262/u1u8j1BmMI8Wjx1/v2TRb38wVjhs2RATJ8+gIPL7vOUqvJOuv1Av+2e14/SeQ4LohTOAdWoOHd9u6UUywIYskDk06nkLjjcykn9O+5v61QdLhsZA7RHKQUj9Jj5cyDuuNlpvIZh8uUS9j677uBGOHctRGbhJhTPSYLxo0e9sIewI0ugXtNDFs6oeNXq8H46fBC9rq3ie+X8KjFbcbAzTQCn2Yg2P9HDNs24A8l3F8oLCKHsG32/o1TRXvSdeKCpQ2Rmu8BFYZMGE/21/mWsXgF4ARoQe9DO/EsYG/SBpnyXqefM/Yqn2grcuQPl1TyvFBgsTgAAAAASUVORK5CYII=")}
/* vitautas.eu — "desk" design system.
   Sections: tokens · fonts · base · motion system · header · hero · quest printer · cards/shelves ·
   tools bench · experiments studio · human · footer · components · page transitions · responsive · reduced motion */

/* ---------- tokens ---------- */
:root {
  --desk: #F2F0E8; --paper: #FBFAF4; --receipt: #FFFEF8; --ink: #171717; --muted: #5F5D55;
  --line: #D9D5C7; --rule: #E4E0D2; --soft: #ECE9DE;
  --lime: #B7FF2A; --violet: #7761FF; --yellow: #FFDC5E; --pink: #FFD3DC; --blue: #CFE8F2; --mint: #CDEFD8;
  --on-color: #171717; --danger: #C2392B;
  --shadow: 0 1px 0 rgba(23,23,23,.06), 0 12px 26px -14px rgba(23,23,23,.35);
  --shadow-lift: 0 2px 0 rgba(23,23,23,.05), 0 22px 36px -16px rgba(23,23,23,.4);
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --sans: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  /* motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.6, 0, .9, .4);
  --ease-spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50%, 1.013 55.4%, 1.011 63.9%, 1.003 78.6%, 1);
  --dur-1: 140ms; --dur-2: 260ms; --dur-3: 520ms; --dur-4: 900ms;
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"], :root:not([data-theme="light"]):has(body) { }
/* dark palette is applied through color-scheme-driven custom properties below */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: #131510; --paper: #1D1F18; --receipt: #FFFEF8; --ink: #F2F0E8; --muted: #A9A79C;
    --line: #35382C; --rule: #2C2F25; --soft: #262921;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 14px 28px -14px rgba(0,0,0,.8);
    --shadow-lift: 0 2px 0 rgba(0,0,0,.4), 0 24px 40px -16px rgba(0,0,0,.9);
  }
}
:root[data-theme="dark"] {
  --desk: #131510; --paper: #1D1F18; --receipt: #FFFEF8; --ink: #F2F0E8; --muted: #A9A79C;
  --line: #35382C; --rule: #2C2F25; --soft: #262921;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 14px 28px -14px rgba(0,0,0,.8);
  --shadow-lift: 0 2px 0 rgba(0,0,0,.4), 0 24px 40px -16px rgba(0,0,0,.9);
}

/* ---------- fonts ---------- */
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2"); unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column; }
html.theming body, html.theming * { transition: background-color var(--dur-3) var(--ease-out), color var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--violet); outline-offset: 3px; border-radius: 6px; transition: outline-offset var(--dur-1) var(--ease-out); }
::selection { background: var(--lime); color: #171717; }
.wrap { width: min(1120px, 100% - 40px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); margin: 0 auto; }
/* Held, drawn-on or dragged objects: no scroll hijack, no text selection, no iOS long-press menu. */
.no-touch-menu { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.no-callout { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.label { font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--lime); color: #171717; padding: 12px 16px; border-radius: 10px; font-weight: 800; text-decoration: none; transition: top var(--dur-2) var(--ease-out); }
.skip:focus { top: 12px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
main { flex: 1; }

/* ---------- motion system ---------- */
@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { scale: .92; } 55% { scale: 1.04; } 100% { scale: 1; } }
@keyframes slam { 0% { opacity: 0; scale: 2.2; rotate: -22deg; } 60% { opacity: .95; scale: .96; rotate: -8deg; } 100% { opacity: .9; scale: 1; rotate: -10deg; } }
@keyframes wiggle { 0%, 100% { rotate: 7deg; } 30% { rotate: 2deg; } 60% { rotate: 10deg; } }
@keyframes sweep { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shimmer { from { translate: -120% 0; } to { translate: 220% 0; } }
@keyframes drop { from { opacity: 0; translate: 0 -40px; rotate: 20deg; } 70% { translate: 0 4px; rotate: 5deg; } to { opacity: 1; translate: 0 0; rotate: 7deg; } }
@keyframes word-in { from { opacity: 0; translate: 0 .6em; filter: blur(4px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
@keyframes bit { 0% { opacity: 1; translate: 0 0; rotate: 0deg; } 100% { opacity: 0; translate: var(--x) calc(var(--y) * -1 + 220px); rotate: var(--r); } }
@keyframes nudge { 50% { translate: 3px -3px; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pulse-ring { from { scale: .8; opacity: .8; } to { scale: 1.6; opacity: 0; } }

/* Entry choreography on page load. Elements opt in with [data-rise]; --i staggers siblings. */
[data-rise] { animation: rise var(--dur-3) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
/* Scroll-driven reveal for anything below the fold; falls back to simply visible. */
.reveal { opacity: 1; }
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 36%; }
}
.pop { animation: pop var(--dur-2) var(--ease-spring); }
.bits { position: fixed; z-index: 90; pointer-events: none; }
.bits i { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: bit var(--d) var(--ease-out) forwards; }

/* ---------- header ---------- */
.masthead { display: flex; align-items: center; gap: 20px; padding: calc(18px + env(safe-area-inset-top, 0px)) 0 18px; border-bottom: 1px solid var(--line); view-transition-name: masthead; }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; letter-spacing: .03em; text-decoration: none; margin-right: 6px; }
.mark .v { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: #171717; color: #F2F0E8; font-size: 19px; letter-spacing: -.04em; border: 1px solid var(--line); transition: rotate var(--dur-2) var(--ease-spring), scale var(--dur-2) var(--ease-spring); }
.mark:hover .v { rotate: -6deg; scale: 1.06; }
.mark .v i { font-style: normal; color: var(--lime); animation: blink 1.4s steps(1) infinite; }
.mark .exe { font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a { position: relative; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; transition: background var(--dur-1) var(--ease-out); }
.nav a:hover { background: var(--soft); }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--ink); scale: 0 1; transform-origin: left; transition: scale var(--dur-2) var(--ease-out); }
.nav a[aria-current]::after { scale: 1 1; }
.langs { display: flex; gap: 2px; }
.langs a { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 10px; text-decoration: none; font: 600 12px var(--mono); transition: background var(--dur-1) var(--ease-out); }
.langs a:hover { background: var(--soft); }
.langs a[aria-current] { background: var(--ink); color: var(--desk); }
.theme { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; transition: rotate var(--dur-3) var(--ease-spring), background var(--dur-1); }
.theme:hover { rotate: 40deg; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .sun { display: none; } :root:not([data-theme="light"]) .theme .moon { display: block; } }
.menu-btn { display: none; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; padding: 52px 0 36px; }
.hello { font-size: 26px; letter-spacing: -.02em; }
.hero h1 { font-size: clamp(52px, 9vw, 104px); line-height: .92; letter-spacing: -.05em; margin: 4px 0 26px; display: flex; flex-wrap: nowrap; }
.hero h1 span { display: inline-block; animation: rise var(--dur-3) var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 80ms); }
.hero h1 .dot { color: var(--violet); }
.thought { font-size: 20px; }
.thought-phrase { display: block; margin-top: 2px; padding: 0 .1em; border: 0; text-align: left; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%) no-repeat 0 0 / 100% 100%; animation: sweep var(--dur-4) var(--ease-out) .5s both; cursor: pointer; }
:root[data-theme="dark"] .thought-phrase { background-image: linear-gradient(transparent 62%, #4d6b12 62%, #4d6b12 94%, transparent 94%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thought-phrase { background-image: linear-gradient(transparent 62%, #4d6b12 62%, #4d6b12 94%, transparent 94%); } }
.thought-phrase .w { display: inline-block; animation: word-in var(--dur-3) var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); white-space: pre; }
.thought small { display: block; margin-top: 10px; font: 500 12px var(--mono); color: var(--muted); }
.lede { color: var(--muted); font-size: 18px; max-width: 34ch; margin-top: 26px; }

/* ---------- quest printer ---------- */
.station { position: relative; max-width: 440px; margin-left: auto; width: 100%; }
.sticker { position: absolute; z-index: 3; right: -18px; top: -22px; rotate: 7deg; background: var(--yellow); color: var(--on-color); padding: 10px 14px; border-radius: 6px; font: 700 12px/1.3 var(--mono); letter-spacing: .06em; box-shadow: var(--shadow); animation: drop var(--dur-4) var(--ease-spring) .4s both; white-space: pre-line; transform-origin: 20% 20%; }
.sticker:hover { animation: wiggle .6s var(--ease-spring); }
.printer { position: relative; z-index: 2; background: #171717; color: #F2F0E8; border-radius: 20px 20px 12px 12px; padding: 20px 20px 16px; box-shadow: var(--shadow-lift); }
.printer .label { color: #A9A79C; }
.printer h2 { font-size: 30px; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 4px; color: #F2F0E8; }
.printer p { margin-bottom: 16px; color: #C9C6BA; }
.printer .light { position: absolute; top: 20px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(183,255,42,.5); }
.printer.busy .light { animation: pulse-ring .7s ease-out infinite; }
.print { width: 100%; min-height: 52px; border: 0; border-radius: 12px; background: var(--lime); color: #171717; font-weight: 800; font-size: 17px; transition: scale var(--dur-1) var(--ease-out), filter var(--dur-1); }
.print:hover { filter: brightness(1.05); }
.print:active { scale: .97; }
.print:disabled { opacity: .6; cursor: progress; }
.slot { position: relative; height: 8px; margin: 16px -6px 0; border-radius: 6px; background: #000; box-shadow: inset 0 2px 3px rgba(255,255,255,.12); overflow: hidden; }
.printer.busy .slot::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(183,255,42,.6), transparent); animation: shimmer .9s linear infinite; }
.feed { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-4) var(--ease-out); margin: -10px 26px 0; position: relative; z-index: 1; }
.feed.out { grid-template-rows: 1fr; }
.feed > div { overflow: hidden; }
.receipt { position: relative; background: var(--receipt); color: #171717; padding: 26px 20px 30px; font: 13px/1.5 var(--mono);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; }
.receipt .head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #B9B5A6; padding-bottom: 8px; margin-bottom: 12px; font-size: 12px; }
.receipt .rarity { font-weight: 800; }
.receipt .rarity[data-rarity="odd"] { color: var(--violet); }
.receipt .rarity[data-rarity="questionable"] { color: #B2560A; }
.receipt .rarity[data-rarity="legendary"] { color: var(--danger); }
.receipt .status { font-size: 11px; letter-spacing: .08em; color: #5F5D55; margin: 0 0 10px; }
.receipt .subject { margin: 0; font-size: 12px; color: #5F5D55; text-transform: uppercase; letter-spacing: .06em; }
.receipt h3 { font: 800 22px/1.2 var(--sans); letter-spacing: -.02em; margin: 4px 0 6px; color: #171717; }
.receipt .how { font: 15px/1.45 var(--sans); margin: 0 0 14px; }
.receipt ol.chain { font: 15px/1.45 var(--sans); margin: 4px 0 14px; padding-left: 20px; }
.receipt ol.chain li + li { margin-top: 6px; }
.receipt dl { margin: 0; border-top: 1px dashed #B9B5A6; border-bottom: 1px dashed #B9B5A6; padding: 8px 0; }
.receipt dl div { display: flex; justify-content: space-between; gap: 12px; }
.receipt dt { color: #5F5D55; }
.receipt dd { margin: 0; font-weight: 700; text-align: right; }
.receipt .outcome { margin: 12px 0 0; padding: 10px 12px; background: #F2F0E8; border-radius: 8px; font: 15px/1.4 var(--sans); }
.receipt .outcome b { display: block; font-size: 20px; letter-spacing: -.02em; }
.receipt .acts { display: flex; gap: 10px; align-items: center; margin-top: 14px; position: relative; }
.receipt .acts button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 10px; font: 700 15px var(--sans); padding: 0 16px; transition: scale var(--dur-1) var(--ease-out); }
.receipt .acts button:active { scale: .97; }
.receipt .accept { flex: 1; border: 0; background: #171717; color: #FFFEF8; }
.receipt .another { border: 1px solid #171717; background: transparent; color: #171717; }
.receipt .tools { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.receipt .barcode { display: block; width: 110px; height: 22px; background: repeating-linear-gradient(90deg, #171717 0 2px, transparent 2px 4px, #171717 4px 5px, transparent 5px 8px, #171717 8px 11px, transparent 11px 13px); }
.receipt .link { border: 0; background: none; padding: 6px 0; font: 600 12px var(--mono); text-decoration: underline; cursor: pointer; }
.receipt details { margin-top: 10px; font-size: 12px; }
.receipt summary { cursor: pointer; }
.stamp-row { display: flex; justify-content: flex-end; height: 34px; margin: 10px 4px -6px 0; }
.stamp { border: 2.5px solid var(--violet); color: var(--violet); border-radius: 8px; padding: 2px 10px; font: 800 15px var(--mono); letter-spacing: .1em; opacity: 0; pointer-events: none; }
.stamp.on { animation: slam var(--dur-3) var(--ease-out) forwards; }
.receipt .backup { margin-top: 12px; border-top: 1px dashed #B9B5A6; padding-top: 10px; font: 13px/1.45 var(--sans); }
.receipt .backup b { display: block; font-size: 15px; margin-bottom: 4px; }
.receipt .backup input { width: 100%; margin: 8px 0 2px; min-height: 40px; border: 1px solid #B9B5A6; border-radius: 8px; background: #F2F0E8; color: #171717; padding: 0 10px; font: 16px var(--mono); }
.receipt .backup-acts { margin: 4px 0; }
.receipt .backup-qr { margin: 8px auto 4px; border-radius: 6px; }
.receipt .backup-hint { color: #5F5D55; font-size: 12px; margin-top: 6px; }
.receipt details .link { display: block; margin-top: 4px; }
/* voice */
.voice-in .w { display: inline-block; white-space: pre; animation: word-in var(--dur-3) var(--ease-out) both; animation-delay: calc(var(--i) * 45ms); }
.receipt .voice-hint { font: 13px/1.4 var(--sans); color: #5F5D55; margin: -8px 0 12px; }
.status-slip { max-width: 420px; margin: 26px 0 0; position: static; }
.receipt .msg { margin-top: 8px; font-size: 12px; color: #5F5D55; min-height: 1em; }
.quest-resume { margin-top: 10px; display: flex; gap: 10px; align-items: center; color: #C9C6BA; font-size: 14px; }
.quest-resume button { border: 1px solid #5F5D55; background: transparent; color: #F2F0E8; border-radius: 8px; padding: 8px 12px; font-weight: 700; }

/* ---------- shelves & index cards ---------- */
section.shelf { padding: 36px 0; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.shelf-head h2 { font-size: 34px; letter-spacing: -.035em; }
.shelf-head a { font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.shelf-head a:hover svg { animation: nudge .5s var(--ease-spring); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--paper); background-image: linear-gradient(var(--pink) 0 0), repeating-linear-gradient(transparent 0 27px, var(--rule) 27px 28px); background-size: 100% 2px, 100% 100%; background-position: 0 46px, 0 50px; background-repeat: no-repeat, repeat; border-radius: 6px; padding: 16px 20px 22px; box-shadow: var(--shadow); min-height: 300px; text-decoration: none; color: inherit; rotate: var(--tilt, 0deg); transition: rotate var(--dur-3) var(--ease-spring), box-shadow var(--dur-2), translate var(--dur-2) var(--ease-out); }
.card:nth-child(3n+1) { --tilt: -1.2deg; } .card:nth-child(3n+2) { --tilt: .9deg; } .card:nth-child(3n+3) { --tilt: -.5deg; }
.card:hover, .card:focus-within { rotate: 0deg; box-shadow: var(--shadow-lift); translate: 0 -4px; }
.card .label { margin-bottom: 18px; }
.card h3, .card h2 { font-size: 24px; line-height: 1.17; letter-spacing: -.025em; margin-bottom: 10px; }
.card p { color: var(--muted); }
.card .play { margin-top: auto; padding-top: 16px; }
.card .preview { margin-top: auto; padding-top: 12px; height: 110px; display: grid; place-items: center; color: var(--muted); }
.card .preview svg { width: 100%; height: 100%; }
a.card .go { position: absolute; right: 16px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--desk); display: grid; place-items: center; transition: scale var(--dur-2) var(--ease-spring); }
a.card:hover .go { scale: 1.12; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips > * { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 8px 14px; font-weight: 600; font-size: 14px; text-decoration: none; transition: background var(--dur-1), translate var(--dur-2) var(--ease-spring); }
.chips a:hover { background: var(--soft); translate: 0 -2px; }

/* ---------- tiles (tools) ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tile { display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: translate var(--dur-2) var(--ease-out), box-shadow var(--dur-2), border-color var(--dur-2); }
.tile:hover { translate: 0 -4px; box-shadow: var(--shadow); border-color: transparent; }
.tile i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #171717; margin-bottom: 26px; transition: rotate var(--dur-3) var(--ease-spring), scale var(--dur-3) var(--ease-spring); }
.tile:hover i { rotate: -8deg; scale: 1.08; }
.tile b { display: block; font-size: 17px; letter-spacing: -.01em; }
.tile span { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 2px; }
details.nerds { margin-top: 16px; }
details.nerds summary { cursor: pointer; font-weight: 700; padding: 10px 0; width: max-content; list-style: none; display: flex; align-items: center; gap: 8px; }
details.nerds summary::-webkit-details-marker { display: none; }
details.nerds summary::before { content: "▸"; display: inline-block; transition: rotate var(--dur-2) var(--ease-spring); }
details.nerds[open] summary::before { rotate: 90deg; }
details.nerds > div { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
details.nerds a { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 10px 14px; text-decoration: none; font: 600 13px var(--mono); transition: background var(--dur-1); }
details.nerds a:hover { background: var(--soft); }
details.nerds[open] > div > a { animation: rise var(--dur-2) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }

/* ---------- page heads ---------- */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -.045em; margin-bottom: 10px; }
.page-head p:not(.label) { color: var(--muted); font-size: 18px; max-width: 50ch; }

/* ---------- tools bench ---------- */
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 22px; view-transition-name: picker; }
.picker a { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 6px 16px 6px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 700; font-size: 15px; text-decoration: none; transition: border-color var(--dur-1), box-shadow var(--dur-1), translate var(--dur-2) var(--ease-out); }
.picker a:hover { translate: 0 -2px; }
.picker a i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #171717; }
.picker a[aria-current] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bench { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 30px; view-transition-name: bench; }
.bench h2 { font-size: 30px; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 20px; }
.bench .hint { color: var(--muted); font-size: 14px; margin-top: 8px; }
.field { margin-bottom: 20px; }
.field > label, .field > .cap { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.field input:not([type=checkbox]):not([type=range]):not([type=file]), .field select, .field textarea { width: 100%; min-height: 56px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--desk); color: var(--ink); font: 700 20px var(--sans); padding: 0 16px; transition: border-color var(--dur-1), box-shadow var(--dur-2) var(--ease-out); }
.field textarea { padding: 14px 16px; font-size: 16px; font-weight: 500; line-height: 1.45; min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(119,97,255,.22); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 14px; font-weight: 600; margin-top: 6px; }
.field .err:empty { display: none; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 56px; height: 56px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--desk); font-size: 24px; font-weight: 700; transition: scale var(--dur-1) var(--ease-out), background var(--dur-1); }
.stepper button:hover { background: var(--soft); }
.stepper button:active { scale: .92; }
.stepper output { min-width: 64px; text-align: center; font-weight: 800; font-size: 26px; }
.segment { display: flex; gap: 8px; flex-wrap: wrap; }
.segment button { min-width: 64px; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--desk); font-weight: 700; transition: background var(--dur-2) var(--ease-out), color var(--dur-2), scale var(--dur-1); }
.segment button:active { scale: .95; }
.segment button[aria-pressed="true"] { background: var(--ink); color: var(--desk); border-color: var(--ink); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--violet); }
.range { display: flex; align-items: center; gap: 14px; }
.range input { flex: 1; accent-color: var(--violet); }
.range output { font: 700 14px var(--mono); min-width: 4ch; text-align: right; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--ink); background: transparent; font-weight: 800; text-decoration: none; transition: scale var(--dur-1) var(--ease-out), background var(--dur-1), color var(--dur-1); }
.btn:active { scale: .97; }
.btn.dark { background: var(--ink); color: var(--desk); }
.btn.dark:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.lime { background: var(--lime); border-color: var(--lime); color: #171717; }
.btn:disabled { opacity: .45; cursor: default; scale: 1; }
.slip { filter: drop-shadow(0 10px 14px rgba(23,23,23,.2)); position: sticky; top: 20px; }
.slip .receipt { padding-bottom: 26px; }
.slip .big { font: 800 26px/1.2 var(--sans); letter-spacing: -.02em; margin: 6px 0 14px; color: #171717; overflow-wrap: anywhere; }
.slip .big.wait { color: #8A877B; font-weight: 600; }
.slip .big.bad { color: var(--danger); font-weight: 600; }
.slip .big.pop { animation: pop var(--dur-2) var(--ease-spring); }
.slip pre { font: 13px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 14px; max-height: 380px; overflow: auto; }
.slip canvas, .slip img { margin: 6px auto 14px; border-radius: 6px; }
.slip .swatch { height: 92px; border-radius: 8px; display: grid; place-items: center; font: 800 22px var(--sans); margin: 6px 0 14px; transition: background var(--dur-2), color var(--dur-2); }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; background: var(--desk); transition: border-color var(--dur-2), background var(--dur-2), scale var(--dur-2) var(--ease-spring); cursor: pointer; }
.drop.over { border-color: var(--violet); background: rgba(119,97,255,.08); scale: 1.01; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { display: block; font-size: 17px; }
.drop span { color: var(--muted); font-size: 14px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }
.compare b { display: block; font-size: 15px; }

/* ---------- experiments studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 480px) 1fr; gap: 44px; align-items: start; margin-top: 26px; view-transition-name: studio; }
.board { background: var(--paper); border-radius: 8px; box-shadow: var(--shadow); padding: 14px; position: relative; }
.board.dotted { background-image: radial-gradient(var(--line) 1.2px, transparent 1.4px); background-size: 22px 22px; }
.board > canvas, .board > svg { width: 100%; height: auto; aspect-ratio: 1; border-radius: 4px; touch-action: none; display: block; }
.score { font-size: clamp(72px, 11vw, 112px); font-weight: 800; letter-spacing: -.05em; line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
.score small { font-size: .4em; letter-spacing: -.02em; margin-left: 4px; }
.verdict { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 10px 0 6px; min-height: 1.3em; }
.verdict.pop { animation: pop var(--dur-2) var(--ease-spring); }
.best { color: var(--muted); font: 600 13px var(--mono); margin: 0; }
details.why { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 8px; }
details.why summary { cursor: pointer; font-weight: 700; padding: 10px 0; width: max-content; }
details.why p { color: var(--muted); margin: 0 0 8px; max-width: 46ch; }
.hold { width: 100%; min-height: 64px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); font-weight: 800; font-size: 18px; touch-action: none; user-select: none; -webkit-user-select: none; position: relative; overflow: hidden; transition: background var(--dur-2), color var(--dur-2), scale var(--dur-1); }
.hold.on { background: var(--violet); border-color: var(--violet); color: #fff; scale: .98; }
/* No visible timer while holding: a slow breathing glow only, so the count stays in your head. */
.hold.on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 rgba(183,255,42,.0); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset 0 0 0 6px rgba(183,255,42,.45); } }
.board .hold { min-height: 120px; font-size: 20px; }
.others { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.others a, .others span { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-weight: 700; font-size: 15px; line-height: 1.3; text-decoration: none; transition: translate var(--dur-2) var(--ease-out), box-shadow var(--dur-2); }
.others a:hover { translate: 0 -3px; box-shadow: var(--shadow); }
.others span { color: var(--muted); }
.others small { display: block; font: 500 12px var(--mono); color: var(--muted); margin-bottom: 6px; }

/* ---------- human ---------- */
.human { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.note { background: var(--yellow); color: var(--on-color); width: 300px; padding: 26px 24px 30px; rotate: -2deg; box-shadow: var(--shadow); font-size: 19px; line-height: 1.4; font-weight: 600; border-radius: 2px 2px 2px 24px; transition: rotate var(--dur-3) var(--ease-spring); }
.note:hover { rotate: 0deg; }
.note a { display: inline-block; margin-top: 12px; font-weight: 800; }
.human p { max-width: 46ch; color: var(--muted); font-size: 18px; }
.prose { max-width: 62ch; font-size: 18px; line-height: 1.6; }
.prose h2 { font-size: 28px; margin: 36px 0 10px; }
.prose p + p { margin-top: 14px; }
.postcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; }
.postcard { background: var(--paper); border-radius: 6px; padding: 22px; box-shadow: var(--shadow); rotate: var(--tilt, 0deg); transition: rotate var(--dur-3) var(--ease-spring); min-height: 180px; }
.postcard:nth-child(1) { --tilt: -1.5deg; } .postcard:nth-child(2) { --tilt: 1deg; background: #DCD6FF; color: #171717; } .postcard:nth-child(3) { --tilt: -.6deg; background: var(--mint); color: #171717; }
.postcard:hover { rotate: 0deg; }
.postcard h3, .postcard h2 { font-size: 22px; margin-bottom: 8px; }
.postcard p { font-size: 15px; opacity: .85; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); margin-top: 28px; padding: 22px 0 calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
footer.site a { color: inherit; }

/* ---------- components ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 80; background: var(--ink); color: var(--desk); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lift); transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out), display var(--dur-2) allow-discrete; }
.toast[hidden] { display: none; opacity: 0; translate: -50% 16px; }
@starting-style { .toast { opacity: 0; translate: -50% 16px; } }
.nojs { background: var(--yellow); color: #171717; padding: 10px 16px; border-radius: 10px; font-size: 14px; margin: 16px 0; }
.result-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.kbd { font: 600 12px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; }
.notfound { padding: 80px 0; }
.notfound h1 { font-size: clamp(40px, 7vw, 80px); letter-spacing: -.05em; margin-bottom: 20px; }
.notfound .code { font: 800 180px/1 var(--sans); letter-spacing: -.08em; color: var(--soft); position: absolute; right: 0; top: 40px; z-index: -1; user-select: none; }

/* ---------- page transitions (cross-document) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: var(--dur-2) var(--ease-in) both fade-out-up; }
::view-transition-new(root) { animation: var(--dur-3) var(--ease-out) both rise; }
::view-transition-old(masthead), ::view-transition-new(masthead), ::view-transition-old(picker), ::view-transition-new(picker) { animation: none; mix-blend-mode: normal; }
@keyframes fade-out-up { to { opacity: 0; translate: 0 -10px; } }
/* theme toggle reveal */
::view-transition-old(theme-root) { animation: none; }
::view-transition-new(theme-root) { animation: clip-reveal var(--dur-4) var(--ease-out) both; }
@keyframes clip-reveal { from { clip-path: circle(0 at var(--tx, 95%) var(--ty, 5%)); } to { clip-path: circle(150% at var(--tx, 95%) var(--ty, 5%)); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .masthead { flex-wrap: wrap; gap: 6px 10px; }
  .mark { margin-right: auto; font-size: 14px; gap: 8px; }
  .langs a { min-width: 36px; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .nav a { padding: 10px 6px; font-size: 14px; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 32px 0 20px; }
  .station { margin: 0 auto; }
  .sticker { right: -6px; }
  .cards { grid-template-columns: 1fr; gap: 18px; }
  .card { min-height: 0; --tilt: 0deg; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile i { margin-bottom: 14px; }
  .page-head { padding-top: 28px; }
  .picker a { flex: 1 1 calc(50% - 8px); }
  .bench { grid-template-columns: 1fr; gap: 0; padding: 20px; }
  .bench > .inputs { display: contents; }
  .bench h2 { order: 1; } .bench .field { order: 4; } .bench .field.first { order: 2; } .bench .slip { order: 3; margin: 2px 0 24px; position: static; } .bench .hint { order: 5; } .bench .actions { order: 5; }
  .studio { grid-template-columns: 1fr; gap: 24px; }
  .others { grid-template-columns: 1fr 1fr; }
  .human { grid-template-columns: 1fr; gap: 24px; }
  .note { width: 100%; max-width: 340px; }
  .postcards { grid-template-columns: 1fr; }
  .shelf-head h2 { font-size: 28px; }
  .row { grid-template-columns: 1fr; }
  .notfound .code { font-size: 120px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, [data-rise], .hero h1 span, .thought-phrase .w { animation: none !important; opacity: 1; translate: none; }
  .mark .v i { animation: none !important; }
  @view-transition { navigation: none; }
}
@media print {
  .masthead, footer.site, .nav, .sticker, .print, .acts, .tools, .theme { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- material: grain, tape, pin, hand-drawn marks, sheen, desk lamp ---------- */
.note, .postcard, .tile { position: relative; }
.card::after, .receipt::after, .note::after, .postcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background-image: var(--grain); background-size: 96px 96px; mix-blend-mode: multiply; opacity: .07; }
:root[data-theme="dark"] .card::after, :root[data-theme="dark"] .postcard:first-child::after { mix-blend-mode: screen; opacity: .035; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card::after, :root:not([data-theme="light"]) .postcard:first-child::after { mix-blend-mode: screen; opacity: .035; } }
@media (prefers-reduced-data: reduce) { .card::after, .receipt::after, .note::after, .postcard::after { display: none; } }
.stamp { filter: blur(.25px) contrast(1.3); mix-blend-mode: multiply; }
.card::before { content: ""; position: absolute; left: 50%; top: -14px; width: 92px; height: 24px; translate: -50% 0; rotate: -2deg; z-index: 2; background: rgba(255,255,255,.42); box-shadow: 0 1px 2px rgba(23,23,23,.12); -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); }
.card:nth-child(3n+2)::before { rotate: 2deg; left: 62%; }
.card:nth-child(3n+3)::before { rotate: -4deg; left: 38%; }
:root[data-theme="dark"] .card::before { background: rgba(255,255,255,.14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card::before { background: rgba(255,255,255,.14); } }
@media (prefers-reduced-transparency: reduce) { .card::before { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.6); } }
.pin { position: absolute; right: 18px; top: -9px; width: 18px; height: 18px; z-index: 2; filter: drop-shadow(0 2px 1px rgba(23,23,23,.3)); }
.thought-phrase { rotate: -.4deg; }
/* marks draw themselves: on scroll where view timelines exist, once after load elsewhere */
.doodle { position: absolute; pointer-events: none; fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; view-timeline-name: --mark; }
.doodle path { stroke-dasharray: 100; animation: draw 1s var(--ease-out) .5s both; }
@supports (animation-timeline: view()) { .doodle path { animation: draw linear both; animation-timeline: --mark; animation-range: entry 30% cover 45%; } }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.shelf-head h2 { position: relative; }
.shelf-head .doodle.underline { left: 0; bottom: -14px; width: min(170px, 100%); height: 20px; }
@media (max-width: 860px) { .shelf-head { flex-wrap: wrap; gap: 14px 16px; } .shelf-head a { white-space: normal; } }
.printer .doodle.arrow { left: -64px; bottom: 50px; width: 58px; height: 20px; rotate: -6deg; }
.printer .doodle.arrow path { animation: draw .9s var(--ease-out) 1.3s both; animation-timeline: auto; }
@media (max-width: 1000px) { .printer .doodle.arrow { display: none; } }
/* breathing type and the print button's slow sheen */
@keyframes breathe-type { 50% { font-weight: 560; } }
@media (hover: hover) { .tile:hover b { animation: breathe-type 1.6s ease-in-out infinite; } }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.print { background: conic-gradient(from var(--angle), var(--lime) 0 70%, #e2ffa6 80%, var(--lime) 90%); }
@media (hover: hover) { .print:hover:not(:disabled) { animation: spin-angle 1.8s linear infinite; } }
@keyframes spin-angle { to { --angle: 360deg; } }
/* sheen that follows the pointer on tiltable paper (desk/tilt.mjs sets --sheen-x) */
.sheen { position: absolute; inset: 0; margin: 0 !important; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity var(--dur-2);
  background: linear-gradient(105deg, transparent calc(var(--sheen-x, 50%) - 14%), rgba(255,255,255,.22) var(--sheen-x, 50%), transparent calc(var(--sheen-x, 50%) + 14%)); }
@media (hover: hover) and (pointer: fine) { .tiltable:hover .sheen { opacity: 1; } }
/* the index cards settle onto the pile as they scroll in */
@supports (animation-timeline: view()) {
  @media (min-width: 861px) { .cards .card.reveal { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; } }
  @keyframes settle { from { opacity: 0; translate: 40px 24px; rotate: 7deg; } to { opacity: 1; translate: 0 0; rotate: var(--tilt, 0deg); } }
}
/* desk lamp */
.lamp { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity var(--dur-3);
  background: radial-gradient(600px circle at var(--lamp-x, 80%) var(--lamp-y, 10%), rgba(255,220,94,.10), transparent 60%); }
:root[data-theme="dark"] .lamp { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lamp { opacity: 1; } }
@media (prefers-reduced-transparency: reduce), (hover: none) { .lamp { display: none; } }
.wrap { position: relative; z-index: 1; }
@media print { .lamp, .doodle, .pin, .card::before { display: none !important; } }

/* ---------- small shared bits ---------- */
.plain-link { border: 0; background: none; padding: 8px 0; font: 600 13px var(--mono); color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.plain-link:hover { color: var(--violet); }
.prefs { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font: 600 13px var(--mono); }
.prefs a { padding: 8px 0; text-underline-offset: 3px; }
.toast-act { margin-left: 12px; border: 0; background: none; color: var(--lime); font: inherit; font-weight: 800; text-decoration: underline; padding: 4px 0; }
:root[data-theme="dark"] .toast-act { color: var(--violet); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast-act { color: var(--violet); } }
.share-receipt { display: block; margin-top: 10px; }
.mark > span.typed { font: 600 14px var(--mono); letter-spacing: 0; color: var(--violet); }

/* ---------- the desk you can mess up ---------- */
.draggable { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab; transition: scale var(--dur-1) var(--ease-out); }
.draggable.dragging { cursor: grabbing; z-index: 20; scale: 1.03; }
.draggable:focus-visible { outline-offset: 6px; }
.tidy-link { display: block; margin-top: 14px; color: var(--muted); }
.station { z-index: 3; } /* a torn receipt may be dragged over the shelves below */
.torn { position: absolute; z-index: 5; filter: drop-shadow(0 10px 14px rgba(23,23,23,.28)); }
.torn .receipt { pointer-events: none; }
.torn.falling { transition: translate var(--dur-4) var(--ease-in), opacity var(--dur-4); translate: 0 120vh !important; opacity: 0; }
.torn.fading { transition: opacity var(--dur-3), scale var(--dur-3); opacity: 0; scale: .96; }
.stamp.filed { position: absolute; top: 38%; right: 14px; }
.tear-tab { display: block; width: calc(100% + 40px); margin: 14px -20px -22px; padding: 10px 0 12px; border: 0; border-top: 1px dashed #B9B5A6; background: none; color: #5F5D55; font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.tear-tab:hover { color: #171717; }
@media (hover: hover) and (pointer: fine) {
  :root[data-cursor="on"] .draggable { cursor: image-set(url("/assets/cursor-hand.png") 1x, url("/assets/cursor-hand-2x.png") 2x) 12 8, grab; }
  :root[data-cursor="on"] .draggable.dragging { cursor: image-set(url("/assets/cursor-grab.png") 1x, url("/assets/cursor-grab-2x.png") 2x) 12 10, grabbing; }
  :root[data-cursor="on"] .tear-tab, :root[data-cursor="on"] .cable-net .hit { cursor: image-set(url("/assets/cursor-scissors.png") 1x, url("/assets/cursor-scissors-2x.png") 2x) 16 13, pointer; }
  :root[data-cursor="on"] .board.dotted canvas { cursor: image-set(url("/assets/cursor-pencil.png") 1x, url("/assets/cursor-pencil-2x.png") 2x) 3 29, crosshair; }
}

/* ---------- achievements ---------- */
.ach-toast { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 85; width: min(300px, calc(100% - 40px)); text-decoration: none; filter: drop-shadow(0 12px 16px rgba(23,23,23,.35)); opacity: 0; translate: 0 30px; transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--ease-spring); }
.ach-toast.in { opacity: 1; translate: 0 0; }
.ach-toast .receipt { display: block; padding: 16px 16px 24px; }
.ach-toast .head { margin-bottom: 10px; }
.ach-stamp { display: inline-block; border: 2.5px solid var(--violet); color: var(--violet); border-radius: 8px; padding: 3px 10px; font: 800 14px/1.25 var(--mono); letter-spacing: .08em; rotate: -3deg; }
.ach-toast.in .ach-stamp { animation: stamp-in var(--dur-3) var(--ease-out) .25s both; }
@keyframes stamp-in { 0% { opacity: 0; scale: 2; rotate: -16deg; } 60% { opacity: 1; scale: .96; } 100% { opacity: 1; scale: 1; rotate: -3deg; } }
.ach-toast .ach-text { display: block; margin-top: 10px; font: 14px/1.4 var(--sans); color: #171717; }
@media (max-width: 860px) { .ach-toast { left: 50%; right: auto; translate: -50% 30px; } .ach-toast.in { translate: -50% 0; } }
.rank-card { margin-top: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 26px 30px; max-width: 640px; }
.rank-card h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.035em; margin-bottom: 8px; }
.rank-line { color: var(--muted); } .rank-line b { color: var(--ink); font: 800 15px var(--mono); margin-right: 8px; }
.rank-bar { height: 10px; border-radius: 99px; background: var(--soft); margin: 14px 0 10px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; width: var(--p, 0%); min-width: 10px; border-radius: inherit; background: var(--lime); transition: width var(--dur-4) var(--ease-out); }
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ach { background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 18px; min-height: 132px; }
.ach .ach-stamp { border-color: var(--line); color: var(--muted); background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--soft) 6px 12px); rotate: 0deg; }
.ach.on { border-style: solid; box-shadow: var(--shadow); }
.ach.on .ach-stamp { border-color: var(--violet); color: var(--violet); background: none; rotate: -3deg; }
.ach-text { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.ach.on .ach-text { color: var(--ink); }
.ach-date { margin-top: 6px; font: 500 12px var(--mono); color: var(--muted); }
.ach-date:empty { display: none; }
.ach-extra { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 44px; align-items: start; }
.slip.monitor { position: static; }
.cert h2 { font-size: 28px; margin-bottom: 18px; }
.cert-canvas { width: 100%; max-width: 380px; height: auto; border-radius: 6px; box-shadow: var(--shadow); margin: 4px 0 18px; }
.cert-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ach-backup { margin-top: 8px; max-width: 480px; color: var(--muted); font-size: 14px; }
.ach-backup .field { margin: 10px 0; } .ach-backup .field input { font: 16px var(--mono) !important; min-height: 48px !important; }
@media (max-width: 860px) { .ach-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .ach { padding: 14px; } .ach-extra { grid-template-columns: 1fr; gap: 30px; } .rank-card { padding: 20px; } }
@media (max-width: 480px) { .ach-grid { grid-template-columns: 1fr; } .ach { min-height: 0; } }
@media print { .print-cert .lamp, .print-cert .masthead, .print-cert .page-head, .print-cert .rank-card, .print-cert .ach-grid, .print-cert .monitor, .print-cert .cert > *:not(canvas), .print-cert footer.site { display: none !important; } .print-cert .cert-canvas { max-width: 100%; box-shadow: none; margin: 0; } .ach-toast, .toast { display: none !important; } }

/* ---------- chaos mode (Konami code); undone by "Restore order" ---------- */
:root[data-chaos] .card, :root[data-chaos] .tile, :root[data-chaos] .postcard { rotate: var(--chaos-tilt, 0deg) !important; animation: float 3s ease-in-out infinite !important; animation-timeline: auto !important; animation-delay: var(--chaos-delay, 0s) !important; opacity: 1; }
:root[data-chaos] .feed .receipt { rotate: 180deg; }
:root[data-chaos] .doodle { stroke: #ff5c8a; }
:root[data-chaos] .thought-phrase { background-image: linear-gradient(transparent 58%, var(--pink) 58%, var(--pink) 92%, transparent 92%); }
:root[data-chaos][data-theme="dark"] .thought-phrase { background-image: linear-gradient(transparent 62%, #7a2f48 62%, #7a2f48 94%, transparent 94%); }
@media (prefers-color-scheme: dark) { :root[data-chaos]:not([data-theme="light"]) .thought-phrase { background-image: linear-gradient(transparent 62%, #7a2f48 62%, #7a2f48 94%, transparent 94%); } }
@media (prefers-reduced-motion: reduce) { :root[data-chaos] .card, :root[data-chaos] .tile, :root[data-chaos] .postcard { animation: none !important; rotate: 0deg !important; } :root[data-chaos] .feed .receipt { rotate: 0deg; } }

/* ---------- the "why" dialog ---------- */
.why-dialog { border: 0; border-radius: 20px; padding: 0; width: min(540px, calc(100% - 32px)); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lift); }
.why-dialog::backdrop { background: rgba(23,23,23,.55); }
.why-body { padding: 28px; outline: none; }
.why-body h2 { font-size: 28px; margin-bottom: 14px; }
.why-steps { margin: 0 0 14px; padding-left: 22px; color: var(--muted); font-size: 14px; }
.why-answer { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 12px 0 18px; }
.why-branches { display: grid; gap: 10px; }
.why-branches .btn { justify-content: flex-start; text-align: left; height: auto; padding: 12px 16px; }
.why-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }

/* ---------- experiment No. 9: the coin that refuses ---------- */
.coin-board { display: grid; gap: 14px; }
.coin-board .coin-opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.coin-board .field { margin: 0; min-width: 0; }
.coin-board .coin-stage { display: grid; place-items: center; padding: 22px 0; border: 1.5px dashed var(--line); border-radius: 12px; -webkit-perspective: 700px; perspective: 700px; }
.coin-board .btn { width: 100%; min-height: 56px; font-size: 18px; }
.coin-3d { position: relative; width: clamp(112px, 36vw, 148px); aspect-ratio: 1; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; transition: transform 1.4s var(--ease-out); }
.coin-3d .coin-face { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border: 3px solid #171717; border-radius: 50%; background: var(--yellow); color: #171717;
  box-shadow: inset 0 0 0 6px var(--yellow), inset 0 0 0 8px rgba(23,23,23,.28), var(--shadow); font: 800 clamp(44px, 14vw, 60px)/1 var(--sans); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.coin-3d .coin-face + .coin-face { transform: rotateX(180deg); }
.coin-3d.edge::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 2px); height: 4px; border-radius: 2px; background: var(--ink); box-shadow: var(--shadow); transform: rotateX(-90deg); }
@media (prefers-reduced-motion: reduce) { .coin-3d { transition: none; } }
.slip.monitor dl { border-top: 0; padding-top: 0; }
/* phones: keep the sticker clear of the printer label, let the receipt footer wrap */
@media (max-width: 860px) { .sticker { top: -36px; right: -4px; font-size: 11px; padding: 8px 12px; } .hero { gap: 56px; } }
.receipt .tools { flex-wrap: wrap; gap: 4px 12px; }
@media (prefers-reduced-motion: reduce) { .doodle path { animation: none !important; } }
/* fingers: small text links get a taller hit area */
@media (pointer: coarse) { .plain-link, .prefs a { padding: 12px 0; } .shelf-head a { padding: 10px 0; } details.nerds a { padding: 12px 14px; } .chips > * { padding: 10px 14px; } .receipt .link { padding: 10px 0; } }
.receipt details a.link { display: block; margin-top: 6px; color: inherit; }
/* Windows high-contrast themes drop backgrounds: give filled buttons an outline so they still read as buttons */
@media (forced-colors: active) { .print, .btn, .receipt .accept, .segment button, .theme, .langs a[aria-current] { border: 1px solid ButtonText; } .doodle, .lamp, .sheen { display: none; } }
/* "more contrast" preference: darker secondary text and rules */
@media (prefers-contrast: more) { :root { --muted: #3F3E39; --line: #8A877B; } :root[data-theme="dark"] { --muted: #D6D3C7; --line: #6B6E5E; } }
@media (prefers-contrast: more) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --muted: #D6D3C7; --line: #6B6E5E; } }
/* nothing may widen the page: on phones an overflowing element makes the browser zoom the whole page out */
body { overflow-x: clip; }
/* the rotating phrase: highlight follows the text when it wraps, and two lines are reserved on phones so the
   printer below does not move every few seconds */
.thought-line { display: block; margin-top: 2px; }
.thought-phrase { display: inline; margin: 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (max-width: 860px) { .thought-line { min-height: calc(26px * 1.25 * 2); } }
/* tool pages: the tool is the title; on phones the picker is one scrolling row so the tool starts on the first screen */
.tool-head { padding-bottom: 0; }
.tool-head h1 { font-size: clamp(34px, 5vw, 52px); }
.tool-head .label a { color: inherit; }
@media (max-width: 860px) {
  .tool-head { padding-top: 20px; }
  .picker { flex-wrap: nowrap; overflow-x: auto; margin: 14px -20px 14px; padding: 2px 20px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .picker::-webkit-scrollbar { display: none; }
  .picker a { flex: 0 0 auto; min-height: 44px; padding: 4px 14px 4px 4px; font-size: 14px; }
  .picker a i { width: 34px; height: 34px; }
}
/* a placeholder should not look like a typed value */
.field input::placeholder, .field textarea::placeholder { color: var(--muted); font-weight: 500; opacity: .6; }
.stepper button:disabled { opacity: .35; cursor: default; }
.plain-link:disabled { opacity: .45; text-decoration: none; cursor: default; }
/* torn receipt: a way to throw it away without dragging */
.torn-close { position: absolute; right: -10px; top: -10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #171717; color: #FFFEF8; font: 700 20px/1 var(--sans); cursor: pointer; }
.torn .receipt { pointer-events: none; }
/* narrow phones (320–360 px): keep the header to two rows */
@media (max-width: 360px) { .mark .exe { display: none; } .masthead { gap: 6px 6px; } .nav a { padding: 10px 3px; font-size: 13px; } }
@media (max-width: 339px) { .langs a { min-width: 32px; } .theme { width: 40px; height: 40px; } }
/* achievements: two compact columns on phones, the progress line above the grid */
#ach-progress { margin-bottom: 14px; }
@media (max-width: 480px) { .ach-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .ach { padding: 12px; min-height: 0; } .ach-stamp { font-size: 11px; padding: 2px 6px; letter-spacing: .04em; } .ach-text { font-size: 13px; margin-top: 8px; } }
.rank-card .muted { font-size: 14px; }
.receipt summary { padding: 8px 0; }
/* fingers, continued: sliders and the note's link get a comfortable height */
@media (pointer: coarse) { .range input { height: 36px; } .note a { padding: 8px 0; } }
.tool-reset { display: block; margin: 12px 0 0 auto; color: var(--muted); }
