:root {
  --night: #120d2b;
  --night-2: #1d1744;
  --night-3: #2a2160;
  --ink: #f7f1e6;
  --muted: #b7aed6;
  --gold: #f2c46d;
  --gold-deep: #d79b3a;
  --coral: #ff7a85;
  --mint: #7ee0c3;
  --violet: #b99cff;
  --sky: #7fc4ff;
  --rose: #ffa8d2;
  --paper: #fbf5ea;
  --paper-ink: #2b2147;
  --paper-muted: #6d6489;
  --line: rgba(247, 241, 230, 0.14);
  --radius: 18px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(185, 156, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(255, 122, 133, 0.10), transparent 60%),
    var(--night);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 58% 22%, #ffe9b8 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 90% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 44%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 52%, #d9ccff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 44% 70%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 86%, #ffe9b8 50%, transparent 51%);
  opacity: 0.55;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffd98f; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ---------- header / footer ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--gold); font-weight: 800; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; }
.top nav a:hover { background: rgba(255, 255, 255, 0.07); }
.top nav .pill { border: 1px solid var(--line); }
@media (max-width: 640px) { .top nav .hide-sm { display: none; } }

.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 40px 0 56px; color: var(--muted); font-size: 0.92rem; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; margin-bottom: 28px; }
.foot-cols b { display: block; color: var(--ink); margin-bottom: 8px; }
.foot-cols a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; }
.foot-cols a:hover { color: var(--gold); }

/* ---------- buttons / forms ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; color: var(--night);
  background: linear-gradient(180deg, #ffd98f, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 10px 30px -10px rgba(242, 196, 109, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); color: var(--night); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.btn.small { padding: 9px 14px; font-size: 0.9rem; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: #ffb3b9; border: 1px solid rgba(255, 122, 133, 0.45); box-shadow: none; }

label { display: block; font-weight: 700; font-size: 0.92rem; margin: 0 0 6px; }
input[type="text"], textarea, select {
  width: 100%; font: inherit; color: var(--paper-ink); background: #fffdf8;
  border: 1.5px solid #e4d9c4; border-radius: 12px; padding: 12px 14px;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(242, 196, 109, 0.3); }
.field { margin-bottom: 14px; }
.hint { font-size: 0.82rem; color: var(--paper-muted); margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: #c0283a; font-weight: 700; font-size: 0.9rem; min-height: 1.2em; margin: 6px 0 0; }
.dark .error { color: #ffb3b9; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 28px 0 40px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); margin-bottom: 14px; }
.lede { font-size: 1.15rem; color: #e4dcf5; max-width: 34em; }
.make {
  margin-top: 22px; background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); max-width: 460px;
}
.make h2 { font-size: 1.3rem; color: var(--paper-ink); margin-bottom: 12px; }
.make .row { display: grid; grid-template-columns: 1fr; gap: 0; }
.make .tzline { font-size: 0.85rem; color: var(--paper-muted); margin: 2px 0 14px; }
.make .tzline button { all: unset; cursor: pointer; color: #8a5a12; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.reassure { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 0.84rem; color: var(--paper-muted); }
.reassure span::before { content: "✓ "; color: #2f9e78; font-weight: 800; }
.mine { margin-top: 14px; font-size: 0.92rem; }
.mine a { display: inline-block; margin: 4px 8px 0 0; }

/* the card illustration on the landing page */
.demo-card { position: relative; perspective: 1200px; }
.paper-card {
  position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 22px; padding: 28px 26px 22px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 10px rgba(255, 255, 255, 0.04);
  transform: rotate(-2.5deg);
}
.paper-card::before {
  content: ""; position: absolute; inset: 10px; border: 1.5px dashed rgba(215, 155, 58, 0.5); border-radius: 16px; pointer-events: none;
}
.paper-card h3 { font-family: var(--display); font-style: italic; font-size: 1.9rem; margin: 0 0 4px; color: var(--paper-ink); }
.paper-card .for { color: var(--paper-muted); font-size: 0.9rem; margin-bottom: 16px; }
.seals { display: flex; flex-wrap: wrap; gap: 10px; }
.seal {
  --c: var(--gold);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: #fff; border: 1px solid #eadfca; font-weight: 700; font-size: 0.88rem; color: var(--paper-ink);
}
.seal i {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 0.8rem; color: rgba(0, 0, 0, 0.45);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 70%, #000));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
}
.seal.c-gold { --c: #f2c46d; } .seal.c-coral { --c: #ff7a85; } .seal.c-mint { --c: #5fd2ac; }
.seal.c-violet { --c: #b99cff; } .seal.c-sky { --c: #7fc4ff; } .seal.c-rose { --c: #ff9cc9; }
.seal.mine-seal { outline: 2px solid var(--gold-deep); }
.paper-card .stamp {
  position: absolute; right: 18px; top: -18px; background: var(--coral); color: #fff; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 8px 12px; border-radius: 999px; transform: rotate(6deg); box-shadow: 0 8px 20px -8px rgba(255, 122, 133, 0.9);
}
.sealed-line { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #e4d6bb; color: var(--paper-muted); font-size: 0.9rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- countdown ---------- */
.clockbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; background: rgba(29, 23, 68, 0.6); backdrop-filter: blur(6px);
}
.clockbar .where { color: var(--muted); font-size: 0.95rem; }
.clockbar .where b { color: var(--ink); }
.digits { display: flex; gap: 10px; font-variant-numeric: tabular-nums; }
.digits div { text-align: center; min-width: 64px; background: var(--night-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.digits b { display: block; font-family: var(--display); font-size: 1.9rem; line-height: 1.1; color: var(--gold); }
.digits span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 520px) { .digits div { min-width: 0; flex: 1; } .digits { width: 100%; } .digits b { font-size: 1.5rem; } }

/* ---------- sections ---------- */
section { padding: 56px 0 8px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; list-style: none; padding: 0; margin: 24px 0 0; }
.steps li { position: relative; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 18px; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; top: -14px; left: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--night); font-weight: 800;
}
.steps h3 { margin-top: 6px; }
.steps p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.panel { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.grid-links a {
  display: block; text-decoration: none; color: var(--ink); background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: border-color 0.15s, transform 0.15s;
}
.grid-links a:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.grid-links b { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 4px; }
.grid-links span { color: var(--muted); font-size: 0.92rem; }
.cta-band { margin-top: 40px; text-align: center; background: linear-gradient(135deg, var(--night-3), var(--night-2)); border: 1px solid var(--line); border-radius: 24px; padding: 34px 20px; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: #ddd5ef; margin: 10px 0 0; }

/* ---------- article / content pages ---------- */
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 8px 0 18px; }
.crumbs a { color: var(--muted); }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); }
.article h2 { margin-top: 1.6em; }
.article p, .article li { color: #e6def5; }
.article ul { padding-left: 1.2em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.toc a:hover { border-color: var(--gold); }
.wishlist { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.wishlist li {
  position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 14px; padding: 14px 16px 14px 18px; display: flex; gap: 12px; align-items: flex-start;
  border-left: 5px solid var(--gold);
}
.wishlist li:nth-child(3n+2) { border-left-color: var(--coral); }
.wishlist li:nth-child(3n) { border-left-color: #5fd2ac; }
.wishlist li p { margin: 0; flex: 1; color: var(--paper-ink); }
.copy { flex: none; appearance: none; border: 1px solid #e4d6bb; background: #fff; color: var(--paper-ink); font: inherit; font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.copy:hover { border-color: var(--gold-deep); }
.copy.done { background: #e3f7ef; border-color: #5fd2ac; }
.tip { background: rgba(126, 224, 195, 0.08); border: 1px solid rgba(126, 224, 195, 0.35); border-radius: 14px; padding: 14px 16px; margin: 18px 0; }
.tip b { color: var(--mint); }
.inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 26px 0; }
.inline-cta p { margin: 0; }
table.cities { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.95rem; }
table.cities th, table.cities td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
table.cities th { color: var(--muted); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
table.cities td.when { font-variant-numeric: tabular-nums; color: var(--gold); }
.big-count { text-align: center; padding: 30px 16px; border: 1px solid var(--line); border-radius: 24px; background: rgba(29, 23, 68, 0.6); }
.big-count .digits { justify-content: center; }
.big-count select { max-width: 360px; margin: 14px auto 0; display: block; }

/* ---------- card page ---------- */
.card-page { padding: 10px 0 30px; }
.card-head { text-align: center; margin: 8px 0 18px; }
.card-head h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.card-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; }
.card-layout .paper-card { transform: none; }
.paper-card .empty { color: var(--paper-muted); font-style: italic; }
.sign-box { background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sign-box h2 { color: var(--paper-ink); font-size: 1.35rem; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; margin: 0 0 14px; }
.colors legend { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; padding: 0; }
.colors label { margin: 0; cursor: pointer; }
.colors input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.colors span { display: block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #e4d6bb; }
.colors input:checked + span { box-shadow: 0 0 0 3px var(--paper-ink); }
.colors input:focus-visible + span { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.ideas { margin: -4px 0 12px; }
.ideas button { all: unset; cursor: pointer; font-size: 0.85rem; font-weight: 700; color: #8a5a12; text-decoration: underline; text-underline-offset: 2px; }
.idea-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.idea-list button { width: 100%; text-align: left; font: inherit; font-size: 0.88rem; background: #fff; border: 1px solid #eadfca; color: var(--paper-ink); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.idea-list button:hover { border-color: var(--gold-deep); }
.owner-box { margin-top: 18px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-size: 0.9rem; }
.notice { border-radius: 14px; padding: 14px 16px; margin: 12px 0; background: rgba(242, 196, 109, 0.12); border: 1px solid rgba(242, 196, 109, 0.4); color: var(--ink); }
.notice.paper { background: #fff6e2; color: var(--paper-ink); border-color: #f0d9a8; }
.wish-mine { margin-top: 12px; background: #fff; border: 1px solid #eadfca; border-radius: 12px; padding: 10px 12px; font-size: 0.92rem; }
.wish-mine p { margin: 0 0 6px; white-space: pre-wrap; }
.linkish { all: unset; cursor: pointer; color: #b3303e; font-weight: 700; font-size: 0.82rem; text-decoration: underline; }
.dark .linkish { color: #ffb3b9; }
.manage { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.manage summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.manage .seal { cursor: default; }
.manage ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.manage li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.revealed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.wish-card { --c: var(--gold); background: var(--paper); color: var(--paper-ink); border-radius: 16px; padding: 16px 16px 14px; border-top: 6px solid var(--c); box-shadow: var(--shadow); }
.wish-card p { margin: 0 0 10px; white-space: pre-wrap; font-size: 1.02rem; }
.wish-card b { font-family: var(--display); font-style: italic; font-size: 1.05rem; }
.wish-card.c-coral { --c: #ff7a85; } .wish-card.c-mint { --c: #5fd2ac; } .wish-card.c-violet { --c: #b99cff; } .wish-card.c-sky { --c: #7fc4ff; } .wish-card.c-rose { --c: #ff9cc9; }
.center { text-align: center; }
.loading { text-align: center; color: var(--muted); padding: 80px 0; }

/* ---------- reveal show ---------- */
dialog.show { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #070512; color: var(--ink); overflow: hidden; }
dialog.show::backdrop { background: #070512; }
dialog.show canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.show-ui { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; padding: 20px; }
.show-count { font-family: var(--display); font-size: clamp(5rem, 26vw, 14rem); color: var(--gold); text-shadow: 0 0 40px rgba(242, 196, 109, 0.6); line-height: 1; }
.show-msg {
  pointer-events: auto; max-width: 520px; width: 100%; background: rgba(251, 245, 234, 0.96); color: var(--paper-ink); border-radius: 22px; padding: 24px 24px 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); border-top: 8px solid var(--c, var(--gold));
}
.show-msg p { font-size: clamp(1.1rem, 3.6vw, 1.45rem); line-height: 1.45; margin: 0 0 14px; white-space: pre-wrap; font-family: var(--display); }
.show-msg .who { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--paper-muted); font-size: 0.9rem; }
.show-msg .who b { font-family: var(--display); font-style: italic; color: var(--paper-ink); font-size: 1.15rem; }
.show-title { text-align: center; }
.show-title h2 { font-size: clamp(2rem, 8vw, 4.4rem); color: var(--ink); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); margin: 0; }
.show-title p { color: var(--muted); }
.show-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.show-bar .btn { pointer-events: auto; }
.show-bar .progress { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 900px) {
  .hero, .split, .card-layout { grid-template-columns: 1fr; }
  .hero { gap: 28px; padding-top: 8px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 26px 14px; }
  .paper-card { transform: rotate(-1deg); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .make { padding: 16px; }
  .clockbar { padding: 16px; }
  section { padding-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
