/* app.zeta4.net — shared by the app list and the Dongle Money pages.
   Colours follow the app itself (lib/app/dongle_tokens.dart, dongle_money_theme.dart). */
:root {
  --page: #f6f8f8;
  --surface: #ffffff;
  --ink: #17201c;
  --ink-soft: #4d5a56;
  --line: #c3d0cc;
  --teal: #00695c;
  --teal-ink: #ffffff;
  --mint: #d8f1ea;
  --blue: #dce9fb;
  --heading-fill: #e9f2f3;
  --amber: #854f0b;
  --amber-fill: #faeeda;
  --now: #17201c;
  --now-ink: #ffffff;
  --frame: #17201c;
  --node: 3.5rem;
  --gap: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111918;
    --surface: #1b2523;
    --ink: #ecf1ed;
    --ink-soft: #a9b8b3;
    --line: #3a4a46;
    --teal: #7fd8c8;
    --teal-ink: #0c1f1b;
    --mint: #1f4a44;
    --blue: #24364d;
    --heading-fill: #1b2523;
    --amber: #fac775;
    --amber-fill: #4a3410;
    --now: #ecf1ed;
    --now-ink: #111918;
    --frame: #05090a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.75 "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html:lang(en) body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
}

a { color: var(--teal); text-underline-offset: 0.2em; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 0.5rem; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.375rem; letter-spacing: -0.02em; }
.brand img { width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; }
.top nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: center; padding: 2.5rem 0 4rem; }
.hero h1 { margin: 0; font-size: clamp(2.375rem, 6.4vw, 4.25rem); line-height: 1.16; letter-spacing: -0.035em; font-weight: 800; }
.stroke { display: block; width: min(17rem, 70%); height: 0.9rem; margin: 0.75rem 0 1.5rem; color: #9be0d2; }
@media (prefers-color-scheme: dark) { .stroke { color: #2f7a6e; } }
.hero p { margin: 0 0 1rem; max-width: 30em; font-size: 1.1875rem; color: var(--ink-soft); }
.hero p strong { color: var(--ink); font-weight: 700; }

.phone { width: min(17.5rem, 72vw); border: 0.5rem solid var(--frame); border-radius: 2.25rem; overflow: hidden; background: #fff; box-shadow: 0 1.5rem 3rem -1.5rem rgba(0, 61, 53, 0.45); }
.phone img { width: 100%; }
.phone.small { width: min(14.5rem, 60vw); border-width: 0.4rem; border-radius: 1.9rem; box-shadow: none; }

/* ---------- the ledger timeline ---------- */
.timeline { position: relative; padding: 0 0 1rem; }
.timeline::before { content: ""; position: absolute; left: calc(var(--node) / 2 - 1px); top: 0.5rem; bottom: 2.5rem; width: 2px; background: var(--line); }

.entry { position: relative; padding: 0 0 3.5rem calc(var(--node) + var(--gap)); }
.node { position: absolute; left: 0; top: 0; width: var(--node); height: var(--node); border-radius: 50%; background: var(--mint); color: var(--teal); display: grid; place-items: center; }
.node svg { width: 1.6rem; height: 1.6rem; }

.record { display: inline-flex; align-items: center; min-height: var(--node); margin: 0; padding: 0.5rem 1.5rem; border-radius: 999px; background: var(--heading-fill); font-size: 1.4375rem; line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; }

.pair { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0.9rem 0 0; padding: 0; list-style: none; font-weight: 700; font-size: 1rem; }
.pair li { padding: 0.55rem 1.1rem; border-radius: 999px; }
.pair .from { background: var(--mint); }
.pair .to { position: relative; margin-left: 1.85rem; background: var(--blue); }
/* The dash between the two shapes belongs to the second one, so it follows it onto a new line. */
.pair .to::before { content: ""; position: absolute; left: -1.75rem; top: 50%; width: 1.1rem; height: 2px; margin-top: -1px; background: var(--ink-soft); }

.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; align-items: start; margin-top: 1.5rem; }
.body.plain { display: block; }
.body ul { margin: 0; padding: 0; list-style: none; max-width: 33em; }
.body li { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.body li:first-child { border-top: 0; padding-top: 0; }
.body p { margin: 0 0 0.75rem; max-width: 33em; }
.shots { display: flex; gap: 1rem; }

.entry.note .node { background: var(--amber-fill); color: var(--amber); }
.entry.note .record { background: var(--amber-fill); color: var(--amber); }

.entry.now { padding-bottom: 1rem; }
.entry.now .node { background: var(--teal); color: var(--teal-ink); }
.entry.now .record { background: var(--now); color: var(--now-ink); }

/* ---------- app list (front page) ---------- */
.lead { padding: 2rem 0 2.5rem; }
.lead h1 { margin: 0 0 0.75rem; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; letter-spacing: -0.03em; font-weight: 800; }
.lead p { margin: 0; max-width: 32em; color: var(--ink-soft); font-size: 1.125rem; }
.app-link { display: block; margin-top: 0.75rem; color: inherit; text-decoration: none; }
.app-link .record { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; }
.app-link:hover .record, .app-link:focus-visible .record { text-decoration-color: currentColor; }
.app-art { margin-top: 1.5rem; border-radius: 1.5rem; width: 100%; max-width: 40rem; }

/* ---------- footer ---------- */
.foot { margin-top: 2rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-soft); }
.foot ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 0 0 0.75rem; padding: 0; list-style: none; }
.foot p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 46rem) {
  :root { --node: 2.75rem; --gap: 0.75rem; }
  body { font-size: 1rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 1.25rem 0 3rem; }
  .hero .phone { margin: 0 auto; }
  .hero p { font-size: 1.0625rem; }
  .record { font-size: 1.1875rem; padding: 0.4rem 1.1rem; }
  .node svg { width: 1.3rem; height: 1.3rem; }
  .body { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .shots { overflow-x: auto; margin-left: calc(-1 * (var(--node) + var(--gap))); padding: 0 0 0.5rem calc(var(--node) + var(--gap)); }
  .shots .phone { flex: none; }
  .entry { padding-bottom: 2.75rem; }
}
