/* fonts served from the app itself, so nothing waits on another server */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-italic.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-latin.woff2) format("woff2"); }
/* Maya&Kayo, "Rosé Sunset": peach to rose to orchid by day, deep wine by night. */
:root {
  --bg: #fff1ec;
  --bg-grad: linear-gradient(170deg, #ffece2 0%, #ffd8dc 45%, #f6cfe6 100%);
  --surface: rgba(255, 255, 255, .93);
  --surface-solid: #ffffff;
  --raised: #ffffff;
  --ink: #3b1830;
  --muted: #8f6a7d;
  --line: #f2c6d2;
  --accent: #f0436f;
  --accent-ink: #ffffff;
  --grad: linear-gradient(120deg, #ff5f6d 0%, #f0436f 45%, #c2389e 100%);
  --glow: rgba(240, 67, 111, .32);
  --soft: #ffe8ec;
  --danger: #c0392b;
  --inva: #b02f8f;
  --ylli: #d9601f;
  --shadow: 0 1px 2px rgba(120, 30, 70, .06), 0 12px 30px rgba(170, 50, 95, .16);
  --hero: linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(255, 236, 240, .95));
  --display: "Instrument Serif", "Georgia", serif;
  --ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f0a1b; --bg-grad: linear-gradient(170deg, #1f0a1b 0%, #2c0d25 50%, #381322 100%);
    --surface: rgba(74, 28, 62, .88); --surface-solid: #3f1736; --raised: rgba(255, 255, 255, .07);
    --ink: #ffeef2; --muted: #d6a7b8; --line: rgba(255, 170, 190, .24); --accent: #ff6f8f; --accent-ink: #ffffff;
    --grad: linear-gradient(120deg, #ff7a6b 0%, #ff4f86 50%, #d64fc0 100%); --glow: rgba(255, 79, 134, .40);
    --soft: rgba(255, 95, 130, .14); --danger: #ff7a6b; --inva: #e77be0; --ylli: #ffa36b;
    --shadow: 0 1px 0 rgba(255, 190, 210, .08) inset, 0 14px 32px rgba(0, 0, 0, .45); color-scheme: dark;
    --hero: linear-gradient(160deg, rgba(96, 32, 74, .92), rgba(80, 26, 70, .92));
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
html { background: var(--bg); }
/* the sunset sits still behind everything while you scroll */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--bg-grad); pointer-events: none; }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font: 500 15px/1.5 var(--ui);
  padding-inline: 16px;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; }
.app { max-width: 460px; margin: 0 auto; padding-block: calc(14px + env(safe-area-inset-top, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.tab { display: flex; flex-direction: column; gap: 14px; }
header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
h1 { margin: 0; font: 400 32px/1 var(--display); letter-spacing: .01em; }
h1 em { font-style: italic; color: var(--accent); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: .06em; }
.today { color: var(--muted); font-size: 13px; }
h2 { margin: 0; font: 400 24px/1.15 var(--display); text-wrap: balance; }
.label { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
textarea, select, input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], input[type="date"], input[type="time"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--raised);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; resize: none;
}
.btn { border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 800; background: var(--grad); color: var(--accent-ink); min-height: 44px; box-shadow: 0 8px 20px var(--glow); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.note { color: var(--muted); font-size: 12.5px; margin: 0; }
.error { color: var(--danger); font-size: 13px; margin: 0; }
.empty { color: var(--muted); font-size: 13.5px; margin: 0; padding: 6px 2px; }
.demo-tag { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; }

/* sign in */
.auth { margin-top: 8vh; }
.auth form { display: flex; flex-direction: column; gap: 10px; }
.auth .switch { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 800; text-decoration: underline; }
.who-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* tabs */
nav.tabs { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px; position: sticky; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 20; box-shadow: var(--shadow); }
/* keep things scrolled into view clear of the sticky tabs */
.card { scroll-margin-top: calc(96px + env(safe-area-inset-top, 0px)); }
nav.tabs .inner { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
nav.tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 10.5px; min-width: 0; font-weight: 800; color: var(--muted); border-radius: 14px; }
nav.tabs button svg { width: 22px; height: 22px; }
nav.tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--grad); box-shadow: 0 6px 16px var(--glow); }

/* the two of us */
.us { background: var(--hero); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 18px 12px 16px; display: grid; grid-template-columns: 1fr 44px 1fr; align-items: start; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.ring { --mood: #c9b6c9; position: relative; width: 112px; height: 112px; border-radius: 50%; padding: 5px; background: conic-gradient(var(--mood), color-mix(in srgb, var(--mood) 45%, transparent), var(--mood)); border: 0; }
.ring.live { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--mood) 22%, transparent); } }
.ring img, .ring .initial { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 30%; display: block; border: 3px solid var(--surface-solid); background: var(--soft); }
.ring .initial { display: grid; place-items: center; font: 400 44px/1 var(--display); color: var(--accent); }
.ring .badge { position: absolute; right: -2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mood); color: #fff; border: 3px solid var(--raised); }
.ring .badge svg { width: 18px; height: 18px; }
.ring .edit { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); font-size: 11px; font-weight: 700; background: var(--raised); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); white-space: nowrap; }
.name { font: 400 26px/1 var(--display); margin-top: 6px; }
.mood-name { font-weight: 800; font-size: 14px; }
.when { font-size: 12px; color: var(--muted); }
.says { font-size: 13px; background: var(--soft); border-radius: 12px; padding: 6px 10px; max-width: 100%; overflow-wrap: anywhere; }
.thread { height: 112px; display: grid; place-items: center; }
.thread svg { width: 44px; height: 112px; color: var(--accent); filter: drop-shadow(0 0 8px var(--glow)); }
.thread .beat { transform-origin: 22px 56px; }
.thread.pulse .beat { animation: beat .9s ease-in-out 3; }
@keyframes beat { 30% { transform: scale(1.45); } 60% { transform: scale(.95); } }

.banner { border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.banner p { margin: 0; overflow-wrap: anywhere; }
.banner .from { font: 400 21px/1.2 var(--display); }

.moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 10px; }
.mood { --mood: #999; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; text-align: center; border: 1.5px solid var(--line); background: var(--raised); color: var(--ink); border-radius: 16px; padding: 10px 4px 9px; min-height: 84px; min-width: 0; }

.mood .dot { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--mood); }
.mood .dot svg { width: 18px; height: 18px; }
.mood b { display: block; font-size: 11.5px; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.mood small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.mood[aria-pressed="true"] { border-color: var(--mood); background: color-mix(in srgb, var(--mood) 12%, var(--raised)); box-shadow: inset 0 0 0 1px var(--mood); }

.hint { display: flex; gap: 12px; align-items: flex-start; }
.hint .dot { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--mood); }
.hint .dot svg { width: 20px; height: 20px; }
.hint p { margin: 0; }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.action { border: 1.5px solid var(--line); background: var(--raised); border-radius: 18px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; text-align: center; }
.action svg { width: 24px; height: 24px; color: var(--accent); }

.q { font: 400 23px/1.25 var(--display); margin: 0; text-wrap: balance; }
.answers { display: grid; gap: 8px; }
.answer { background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; overflow-wrap: anywhere; }
.answer .who { font-size: 12px; font-weight: 800; color: var(--muted); }
.answer.locked { color: var(--muted); font-style: italic; }

.week { display: grid; grid-template-columns: 56px repeat(7, 1fr); gap: 6px; align-items: center; font-size: 12px; }
.week .day { text-align: center; color: var(--muted); font-weight: 700; font-size: 11px; }
.week .who { font-weight: 800; }
.week .cell { aspect-ratio: 1; max-width: 100%; border-radius: 50%; background: var(--line); display: grid; place-items: center; color: #fff; }
.week .cell svg { width: 60%; height: 60%; }

.count { display: flex; align-items: baseline; gap: 10px; }
.count .big { font: 400 44px/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }

/* voice */
.recorder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; }
.recbtn { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--grad); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 10px 26px var(--glow); }
.recbtn svg { width: 34px; height: 34px; }
.recbtn.on { background: var(--danger); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--danger) 25%, transparent); } }
.timer { font: 400 34px/1 var(--display); font-variant-numeric: tabular-nums; }
.voice { display: flex; align-items: center; gap: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.voice .play { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grad); color: var(--accent-ink); display: grid; place-items: center; }
.voice .play svg { width: 18px; height: 18px; }
.voice .meta { flex: 1; min-width: 0; }
.voice .meta b { display: block; font-size: 14px; }
.voice .meta span { font-size: 12.5px; color: var(--muted); }
.wave { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.wave i { display: block; height: 100%; width: 0; background: var(--grad); }
.list { display: flex; flex-direction: column; gap: 8px; }

/* photos */
.today-photo { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.thumb { width: 96px; aspect-ratio: 1; max-width: 100%; border-radius: 16px; background: var(--soft); border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; padding: 0; }
.thumb svg { width: 28px; height: 28px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.days { display: flex; flex-direction: column; gap: 14px; }
.dayrow .label { margin-bottom: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pic { border: 0; padding: 0; background: var(--soft); border-radius: 16px; overflow: hidden; aspect-ratio: 1; max-width: 100%; position: relative; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic .tag { position: absolute; left: 8px; bottom: 8px; background: rgba(20, 10, 25, .62); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.viewer { position: fixed; inset: 0; z-index: 40; background: rgba(12, 6, 16, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 16px; color: #fff; }
.viewer img { max-width: 100%; max-height: 70vh; border-radius: 16px; }
.viewer p { margin: 0; text-align: center; max-width: 420px; overflow-wrap: anywhere; }

/* history */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1.5px solid var(--line); background: var(--raised); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; }
.filters button[aria-pressed="true"] { background: var(--grad); color: var(--accent-ink); border-color: transparent; }
.hday { display: flex; flex-direction: column; gap: 8px; }
.entry { --mood: #999; display: grid; grid-template-columns: 66px 34px 1fr; gap: 10px; align-items: start; }
.entry time { font-size: 12.5px; font-weight: 800; color: var(--muted); padding-top: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--mood); }
.entry .dot svg { width: 17px; height: 17px; }
.entry b { font-size: 14px; }
.entry .by { font-size: 12px; color: var(--muted); font-weight: 700; }
.entry p { margin: 2px 0 0; font-size: 13.5px; overflow-wrap: anywhere; }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); z-index: 50; text-align: center; }
.float-heart { position: fixed; bottom: -40px; z-index: 30; pointer-events: none; color: var(--accent); animation: rise 3.2s ease-out forwards; }
@keyframes rise { to { transform: translateY(-105vh) rotate(var(--r)); opacity: 0; } }
footer { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
footer button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .ring.live, .thread.pulse .beat, .float-heart, .recbtn.on { animation: none; } }
@media (max-width: 380px) { .ring { width: 92px; height: 92px; } .thread, .thread svg { height: 92px; } .us { grid-template-columns: 1fr 34px 1fr; } }

/* Plans: a week at a glance, each person in their own color, plans together in pink */
.weeknav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; text-align: center; }
.nav-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--raised); color: var(--ink); display: grid; place-items: center; padding: 0; }
.nav-arrow svg { width: 20px; height: 20px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.ev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-grid .ev-day { grid-column: 1 / -1; }
.ev-grid input { min-width: 0; }
select { appearance: auto; min-height: 44px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 36px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); margin-left: auto; }
.pday { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pday:last-child { border-bottom: 0; padding-bottom: 0; }
.pday-head { display: flex; align-items: center; gap: 8px; }
.pday-head .label { color: var(--ink); }
.pday.today .pday-head .label { color: var(--accent); }
.pill { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--grad); color: var(--accent-ink); border-radius: 999px; padding: 1px 8px; }
.pday-add { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--raised); color: var(--muted); display: grid; place-items: center; padding: 0; font-size: 18px; line-height: 1; }
.pday .free { color: var(--muted); font-size: 13px; margin: 0; }
.ev { --c: var(--accent); display: grid; grid-template-columns: 52px 4px 1fr; gap: 10px; align-items: stretch; text-align: left; width: 100%; border: 0; background: var(--raised); border-radius: 14px; padding: 9px 10px; color: var(--ink); font: inherit; }
button.ev { cursor: pointer; }
.ev time { font-size: 12.5px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.ev .bar { border-radius: 4px; background: var(--c); }
.ev b { font-size: 14.5px; overflow-wrap: anywhere; }
.ev .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.ev .meta .who { color: var(--c); }
.ev p { margin: 3px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ev.together { background: var(--soft); }
.ev.together .bar { background: var(--grad); }

/* Today's strength: the morning quote, set like a love letter */
.quote { background: var(--hero); }
.quote .qt { margin: 0; font: italic 400 23px/1.25 var(--display); text-wrap: balance; }
.quote .qa { margin: 0; font-size: 13px; font-weight: 800; color: var(--accent); }

/* folded mood: what I shared last, and a button to change it */
.mood-now { display: flex; align-items: center; gap: 12px; }
.mood-now .dot { flex: 0 0 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--mood); }
.mood-now .dot svg { width: 20px; height: 20px; }
.mood-now div { min-width: 0; flex: 1; }
.mood-now b { display: block; font-size: 15px; line-height: 1.25; }
.mood-now small { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.mood-now .btn { margin-left: auto; flex: 0 0 auto; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
/* plans: a free day takes one short line */
.pday.empty-day { padding-bottom: 8px; gap: 0; }
.pday-head .free { color: var(--muted); font-size: 13px; font-weight: 600; }

/* Games: scoreboard, daily duel, know-me and this-or-that */
.g-score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-score-col { --c: var(--accent); background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; text-align: center; border-top: 4px solid var(--c); }
.g-name { font: 400 22px/1.1 var(--display); }
.g-big { display: flex; align-items: center; justify-content: center; gap: 4px; font: 800 26px/1.2 var(--ui); color: var(--c); }
.g-sub { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.g-lead { margin: 0; text-align: center; font-weight: 800; font-size: 13.5px; }
.g-status { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.g-mine { margin: 0; font-weight: 800; }
.g-result { display: flex; align-items: center; gap: 6px; font: italic 400 24px/1.2 var(--display); color: var(--accent); margin: 0; }
.g-vs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.g-forfeit { margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--soft); font-weight: 700; font-size: 14px; }
.g-reveal { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 12px; background: var(--raised); font-size: 13px; }
.g-reveal b { font-size: 12px; color: var(--muted); }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.g-info { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
/* Heart Match */
.g-memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.g-tile { aspect-ratio: 1; border: 0; padding: 0; border-radius: 14px; position: relative; background: none; perspective: 600px; }
.g-tile span { position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center; backface-visibility: hidden; transition: transform .35s ease; }
.g-tile .back { background: var(--grad); box-shadow: 0 4px 12px var(--glow); }
.g-tile .back::after { content: "♥"; color: rgba(255, 255, 255, .55); font-size: 22px; }
.g-tile .face { background: var(--raised); border: 1.5px solid var(--line); transform: rotateY(180deg); }
.g-tile .face svg { width: 58%; height: 58%; }
.g-tile.up .back { transform: rotateY(180deg); }
.g-tile.up .face { transform: rotateY(0); }
.g-tile.done .face { border-color: currentColor; box-shadow: inset 0 0 0 2px var(--soft); }
@media (prefers-reduced-motion: reduce) { .g-tile span { transition: none; } }
/* Love Word */
.g-word { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 300px; margin: 0 auto; width: 100%; }
.g-cell { aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 10px; font: 800 22px/1 var(--ui); background: var(--raised); text-transform: uppercase; }
.g-cell.ok { background: #2f9c6a; border-color: #2f9c6a; color: #fff; }
.g-cell.near { background: #e5a50a; border-color: #e5a50a; color: #fff; }
.g-cell.no { background: var(--line); border-color: transparent; color: var(--muted); }
.g-keys { display: flex; flex-direction: column; gap: 6px; }
.g-krow { display: flex; gap: 4px; justify-content: center; }
.g-key { flex: 1; min-width: 0; max-width: 36px; height: 46px; border: 0; border-radius: 8px; background: var(--raised); color: var(--ink); font: 800 14px var(--ui); box-shadow: inset 0 0 0 1px var(--line); padding: 0; }
.g-key.wide { max-width: 58px; flex: 1.6; font-size: 12px; }
.g-key.ok { background: #2f9c6a; color: #fff; box-shadow: none; }
.g-key.near { background: #e5a50a; color: #fff; box-shadow: none; }
.g-key.no { opacity: .4; }
/* questions */
.g-steps { display: flex; flex-direction: column; gap: 10px; }
.g-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-option { min-height: 64px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--raised); color: var(--ink); font: 800 14px/1.25 var(--ui); padding: 10px; }
.g-option:active, .g-tot-pick:active { border-color: var(--accent); background: var(--soft); }
.g-tot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.g-tot-pick { min-height: 110px; border: 0; border-radius: 20px; background: var(--grad); color: var(--accent-ink); font: 400 24px/1.1 var(--display); padding: 12px; box-shadow: 0 8px 20px var(--glow); }
.g-tot-pick:last-child { background: linear-gradient(120deg, #c2389e, #8a6bd6); }
.g-or { font: italic 400 20px var(--display); color: var(--muted); }

/* Memories: section switch, bucket list, timeline, Sunday check-in */
.mem-seg { justify-content: space-between; }
.mem-seg button { flex: 1; padding: 7px 6px; font-size: 12.5px; white-space: nowrap; }
.mem-thumb { flex: 0 0 64px; height: 64px; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: var(--soft); }
.mem-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.bk-bar i { display: block; height: 100%; background: var(--grad); border-radius: 8px; }
.bk-add { display: flex; gap: 8px; }
.bk-add input { flex: 1; min-width: 0; }
.bk-item, .bk-done { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bk-item:last-child, .bk-done:last-child { border-bottom: 0; }
.bk-tick { flex: 0 0 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; padding: 0; }
.bk-tick:active { background: var(--soft); }
.bk-text { flex: 1; min-width: 0; }
.bk-text b { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.bk-text small { color: var(--muted); font-size: 12px; font-weight: 600; }
.bk-text p { margin: 3px 0 0; font-size: 13px; color: var(--muted); font-style: italic; }
.bk-done .bk-text b { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.bk-more { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--muted); font-size: 20px; padding: 0; }
.bk-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--soft); }
.tl { position: relative; display: flex; flex-direction: column; gap: 10px; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--grad); }
.tl-year { position: relative; z-index: 1; width: fit-content; padding: 2px 8px 2px 0; background: var(--surface-solid); font: 400 26px/1 var(--display); color: var(--accent); margin: 6px 0 -2px -22px; }
.tl-item { position: relative; text-align: left; border: 1px solid var(--line); background: var(--raised); color: var(--ink); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font: inherit; width: 100%; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--accent); }
.tl-date { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tl-item b { font-size: 16px; }
.tl-item p { margin: 0; font-size: 13.5px; color: var(--muted); }
.tl-item small { font-size: 11.5px; color: var(--muted); }
.tl-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-top: 4px; }
.ci-answers { display: flex; flex-direction: column; gap: 12px; }
.ci-q > b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ci-a { --c: var(--accent); margin: 0 0 6px; padding: 8px 10px; border-radius: 12px; background: var(--raised); border-left: 4px solid var(--c); font-size: 14px; overflow-wrap: anywhere; }
.ci-a i { color: var(--muted); }
.ci-who { display: block; font-size: 11px; font-weight: 800; color: var(--c); text-transform: uppercase; letter-spacing: .08em; }
.ci-past { border-top: 1px solid var(--line); padding: 8px 0; }
.ci-past summary { cursor: pointer; font-weight: 800; font-size: 14px; padding: 4px 0; }
.ci-past .ci-answers { margin-top: 8px; }

/* replies to a mood */
.replies { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.replied { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1.5px solid color-mix(in srgb, var(--mood, var(--accent)) 45%, var(--line)); background: var(--raised); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 700 13px var(--ui); min-height: 36px; }
.chip:active { background: var(--soft); }
.reply-row { display: flex; gap: 8px; }
.reply-row input { flex: 1; min-width: 0; }
.reply-bubble { font-size: 13px; background: var(--grad); color: var(--accent-ink); border-radius: 14px 14px 14px 4px; padding: 6px 10px; max-width: 100%; overflow-wrap: anywhere; box-shadow: 0 4px 12px var(--glow); }
.reply-bubble small { opacity: .85; font-size: 11px; }
.h-reply { margin: 3px 0 0 !important; font-size: 12.5px !important; color: var(--muted); }

/* Catch the hearts */
.g-catch { width: 100%; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, var(--raised), var(--soft)); border: 1px solid var(--line); }
.g-catch canvas { display: block; width: 100%; touch-action: none; }
/* Rhythm of the heart */
.g-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 320px; margin: 0 auto; width: 100%; }
.g-pad { --c: var(--accent); aspect-ratio: 1; border: 0; border-radius: 26px; background: color-mix(in srgb, var(--c) 18%, var(--raised)); color: var(--c); display: grid; place-items: center; padding: 0; transition: transform .12s, background .12s, box-shadow .12s; touch-action: manipulation; }
.g-pad svg { width: 52%; height: 52%; opacity: .55; transition: opacity .12s; }
.g-pad.lit { background: var(--c); color: #fff; transform: scale(1.05); box-shadow: 0 0 28px color-mix(in srgb, var(--c) 70%, transparent); }
.g-pad.lit svg { opacity: 1; }
.g-pad:disabled { cursor: default; }
/* Merge the hearts */
.g-merge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 7px; border-radius: 18px; background: var(--line); touch-action: none; user-select: none; -webkit-user-select: none; }
.g-mtile { aspect-ratio: 1; border-radius: 12px; background: color-mix(in srgb, var(--raised) 70%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-mtile .e { font-size: clamp(20px, 7vw, 30px); line-height: 1.1; }
.g-mtile small { font-size: 10px; font-weight: 800; color: var(--muted); }
.g-mtile.v2 { background: #ffe8ee; } .g-mtile.v4 { background: #ffd7e2; } .g-mtile.v8 { background: #ffc1d2; } .g-mtile.v16 { background: #ffa8c0; }
.g-mtile.v32 { background: #ff8fae; } .g-mtile.v64 { background: #ff7399; } .g-mtile.v128 { background: #f0568a; } .g-mtile.v256 { background: #d9468f; }
.g-mtile.v512 { background: #c2389e; } .g-mtile.v1024 { background: #9b3fb4; } .g-mtile.v2048, .g-mtile.v4096 { background: linear-gradient(135deg, #ffcf5c, #f0436f); }
.g-mtile.v2 small, .g-mtile.v4 small, .g-mtile.v8 small, .g-mtile.v16 small, .g-mtile.v32 small, .g-mtile.v64 small { color: #8f4a63; }
.g-mtile.v128 small, .g-mtile.v256 small, .g-mtile.v512 small, .g-mtile.v1024 small, .g-mtile.v2048 small, .g-mtile.v4096 small { color: #fff; }
.g-mtile.new, .g-mtile.merged { animation: mk-pop .18s ease-out; }
@keyframes mk-pop { from { transform: scale(.6); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .g-mtile.new, .g-mtile.merged { animation: none; } .g-pad { transition: none; } }

/* today's four duels */
.g-duel { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.g-duel-text { flex: 1; min-width: 0; }
.g-duel-text b { display: block; font-size: 15px; }
.g-duel-text small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.35; }
.g-badge { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: var(--line); color: var(--muted); }
.g-badge.won { background: var(--grad); color: var(--accent-ink); }
.g-badge.lost { background: var(--soft); color: var(--accent); }
.g-badge svg { width: 14px; height: 14px; }
