/* cleverjazz.com — the app's opening screen (lib/features/splash): warm paper,
   a pencil doodle with an indigo touch, the name in Georgia bold italic; the
   app's night palette in the dark. Built by scripts/python/build_website.py. */

:root {
  --paper: #FAF6EE; --ink: #C6BCA6; --soft: #E0D7C5; --acc: #46548C; --title: #2F3A6B;
  --text: #5E574A; --text-2: #756D5C; --on-title: #FAF6EE;
  --btn: #FFFDF8; --btn-edge: rgba(47, 58, 107, .08); --lift: rgba(47, 58, 107, .30); --near: rgba(47, 58, 107, .10); --pool: rgba(47, 58, 107, .13);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1420; --ink: rgba(214, 204, 182, .30); --soft: rgba(214, 204, 182, .14); --acc: #9AA8E2; --title: #EBE5D6;
    --text: rgba(235, 229, 214, .78); --text-2: rgba(235, 229, 214, .6); --on-title: #0F1420;
    --btn: #1B2335; --btn-edge: rgba(235, 229, 214, .10); --lift: rgba(0, 0, 0, .6); --near: rgba(0, 0, 0, .3); --pool: rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 15px/1.75 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--title); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 8px; }
[data-lang="zh"] .en, [data-lang="en"] .zh { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--btn); padding: 6px 12px; border-radius: 999px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The doodle draws itself, a stroke after another, the way the login page does. */
.doodle path, .band path, .mini path, .wave path, .rule path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ink { stroke: var(--ink); } .soft { stroke: var(--soft); }
.acc7 { stroke: var(--acc); opacity: .7; } .acc9 { stroke: var(--acc); opacity: .9; } .acc85 { stroke: var(--acc); opacity: .85; }
.drawing .doodle path, .drawing .band path, .drawing .mini path {
  stroke-dasharray: var(--len, 4000px) var(--len, 4000px); stroke-dashoffset: var(--len, 4000px);
  animation: draw .88s ease-in-out var(--s, 0s) forwards;
}
.rec { transform-box: view-box; animation: spin 40s linear 2.4s infinite; }
.notes { animation: bob 2.4s ease-in-out 2.4s infinite alternate; }

/* Home: the opening screen, two round buttons and the name, small. */
.cover { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.doodle { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.doodle-phone { display: block; }
@media (min-aspect-ratio: 3/4) { .doodle-phone { display: none; } .doodle-square { display: block; } }
@media (min-aspect-ratio: 4/3) { .doodle-square { display: none; } .doodle-wide { display: block; } }
.corner { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; z-index: 3; }
/* Buttons, their captions and the name are one column in one flow, so they can never overlap. */
.stage { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 16px 56px; }
.dock { --fab: clamp(70px, 19vw, 96px); position: relative; display: flex; justify-content: center; gap: clamp(26px, 8vw, 44px);
  padding-bottom: 66px; }
.fab { position: relative; display: block; width: var(--fab); height: var(--fab); padding: 0; border: 0; background: none; color: inherit; font: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent; animation: pop .9s var(--spring) var(--d) both; }
.fab-in { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: var(--btn); color: var(--title); border: 1px solid var(--btn-edge);
  box-shadow: 0 18px 30px -14px var(--lift), 0 4px 10px -3px var(--near); transition: transform .35s var(--spring); }
.fab-in svg { display: block; width: 46%; height: 46%; }
@media (hover: hover) { .fab:hover .fab-in { transform: translateY(-5px) scale(1.06); } .fab:hover .tip { opacity: 1; transform: translate(-50%, 0); } }
.fab:focus-visible { outline: none; }
.fab:focus-visible .fab-in { outline: 2px solid var(--acc); outline-offset: 4px; transform: translateY(-5px) scale(1.06); }
.fab:active .fab-in { transform: scale(.92); transition-duration: .12s; }
.pool { position: absolute; left: 18%; right: 18%; bottom: -16px; height: 9px; border-radius: 50%; background: var(--pool); }
.tip { position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translate(-50%, 6px); white-space: nowrap; padding: 6px 12px; border-radius: 999px;
  background: var(--btn); border: 1px solid var(--btn-edge); color: var(--title); font: 500 13px/1.2 var(--sans);
  box-shadow: 0 8px 18px -10px var(--lift); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .35s var(--spring); }
.fab:focus-visible .tip, .fab.say .tip { opacity: 1; transform: translate(-50%, 0); }
/* Under each button: where it comes from, small. */
.cap { position: absolute; left: 50%; top: calc(100% + 18px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center;
  white-space: nowrap; pointer-events: none; color: var(--text-2); font: 500 11.5px/1.35 var(--sans); animation: fade .8s ease 1.5s both; }
.cap b { color: var(--title); font: 600 12.5px/1.35 var(--sans); }
.ua-android .fab-android { order: -1; }
/* An app's own browser (WeChat, QQ, 小红书…) can't download the APK: say how to get out. */
.toast { position: absolute; left: 16px; right: 16px; top: calc(68px + env(safe-area-inset-top, 0px)); z-index: 4; max-width: 380px; margin: 0 auto;
  padding: 12px 16px; border-radius: 18px; background: var(--btn); border: 1px solid var(--btn-edge); color: var(--title); text-align: center;
  font: 500 14px/1.55 var(--sans); box-shadow: 0 14px 28px -16px var(--lift); opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .25s ease, transform .35s var(--spring); }
.toast.show { opacity: 1; transform: none; }
.sig { position: relative; margin: 14px 0 0; text-align: center;
  font: italic 700 clamp(21px, 5.6vw, 27px)/1.2 var(--serif); color: var(--title); letter-spacing: .01em; animation: fade 1s ease 1.5s both; }

/* The 中 / EN switch: a bubble slides to the chosen language. */
.lang { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--btn); border: 1px solid var(--btn-edge);
  box-shadow: 0 10px 22px -14px var(--lift), 0 2px 6px -3px var(--near); }
.lang .bubble { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--title);
  box-shadow: 0 4px 10px -4px var(--lift); transition: transform .5s var(--spring); }
[data-lang="en"] .lang .bubble { transform: translateX(100%); }
.lang button { position: relative; z-index: 1; min-width: 42px; padding: 7px 11px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  color: var(--title); font: 600 14px/1 var(--sans); transition: color .3s ease; }
.lang button[lang="en"] { font: italic 700 14px/1 var(--serif); }
.lang button[aria-pressed="true"] { color: var(--on-title); }

/* Footer: the pages, then who runs the site. */
.foot { padding: 22px 22px 32px; text-align: center; font-size: 12.5px; color: var(--text-2); }
.foot .rule { display: block; width: min(560px, 100%); height: 14px; margin: 0 auto 14px; }
.foot .rule path, .wave path { stroke: var(--soft); stroke-width: 1.6; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-bottom: 8px; }
.foot nav a { font-size: 14px; text-decoration: none; }
.foot p { margin: 0; }
.foot .icp { color: var(--text-2); text-decoration: none; }

/* Inner pages: the same paper, a staff across the top. */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 0; }
.brand { font: italic 700 22px/1 var(--serif); color: var(--title); text-decoration: none; }
.inner { max-width: 720px; margin: 0 auto; padding: 0 20px 36px; }
.band { display: block; width: 100%; height: 56px; margin: 14px 0 4px; }
.head { display: flex; align-items: center; gap: 6px; margin: 16px 0 4px; }
.head h1 { margin: 0; font: 600 clamp(26px, 7vw, 32px)/1.3 var(--sans); color: var(--title); text-wrap: balance; }
.head h1 .en { font: italic 700 1.05em/1.2 var(--serif); }
.mini { width: 66px; height: 55px; flex: none; }
.lead { margin: 0 0 20px; color: var(--text); }
.sub { margin: 34px 0 6px; font: 600 18px/1.4 var(--sans); color: var(--title); }
.wave { display: block; width: 100%; height: 12px; }
.qa { padding: 18px 0; }
.qa h2 { margin: 0 0 6px; font: 600 17px/1.45 var(--sans); color: var(--title); }
.qa p { margin: 0; }
.rows .row { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; }
.rows .k { color: var(--text-2); flex: none; }
.rows .v { text-align: right; color: var(--title); min-width: 0; overflow-wrap: anywhere; }
.contact { display: flex; align-items: center; gap: 16px; padding: 14px 0; text-decoration: none; }
.orb { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--btn); border: 1px solid var(--btn-edge);
  color: var(--title); box-shadow: 0 12px 22px -14px var(--lift), 0 3px 8px -3px var(--near); transition: transform .35s var(--spring); }
.orb .line { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .contact:hover .orb { transform: translateY(-3px) scale(1.06); } }
.contact .t { min-width: 0; display: flex; flex-direction: column; }
.contact b { font: 600 16px/1.4 var(--sans); color: var(--title); }
.contact .t > span { color: var(--text-2); overflow-wrap: anywhere; }
.prose h2 { margin: 26px 0 8px; font: 600 17px/1.45 var(--sans); color: var(--title); }
.prose p, .prose li { margin: 6px 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 6px 0; }
.prose h2 { scroll-margin-top: 16px; }
.prose a { color: var(--acc); overflow-wrap: anywhere; }
.prose strong { color: var(--title); font-weight: 600; }
.gist, .toc { margin: 0 0 18px; padding: 14px 18px; border-radius: 18px; background: var(--btn); border: 1px solid var(--btn-edge);
  box-shadow: 0 12px 22px -18px var(--lift); }
.gist-h { margin: 0 0 4px !important; font: 600 15px/1.5 var(--sans); color: var(--title); }
.toc ol { columns: 2; column-gap: 24px; }
.toc li { margin: 0; padding: 2px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
@media (max-width: 480px) { .toc ol { columns: 1; } }
@media (max-width: 480px) {
  .rows .row { flex-direction: column; gap: 2px; }
  .rows .v { text-align: left; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.55); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .drawing .doodle path, .drawing .band path, .drawing .mini path { stroke-dasharray: none; stroke-dashoffset: 0; }
}
