:root {
  --bg: #09070a;
  --bg-2: #120d11;
  --ink: #f7f1ea;
  --muted: #b5a6ae;
  --faint: #8c7c86;
  --pink: #f9a1bc;
  --pink-deep: #e4789b;
  --gold: #ffab40;
  --gold-2: #f3d5a0;
  --plum: #8d7394;
  --line: rgba(249, 161, 188, 0.18);
  --green: #8dcead;
  --danger: #f0b4b4;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 100% -10%, rgba(249, 161, 188, 0.18), transparent 55%),
    radial-gradient(700px 480px at -15% 15%, rgba(90, 60, 110, 0.45), transparent 50%),
    var(--bg);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--pink); }
::selection { background: rgba(249, 161, 188, 0.35); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

#app { min-height: 100dvh; }
#app.has-shell { display: flex; }
.shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.shell main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 18px 28px;
  scroll-behavior: smooth;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--pink);
  font-family: var(--serif);
  background: rgba(249, 161, 188, 0.08);
}
.brand strong { display: block; font-size: 1.25rem; font-weight: 400; line-height: 1; }
.brand small { color: var(--muted); letter-spacing: 0.04em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.bote {
  border: 1px solid rgba(255, 171, 64, 0.35);
  color: var(--gold);
  background: rgba(255, 171, 64, 0.08);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.82rem;
}
.bote small { color: var(--gold-2); margin-left: 4px; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.62rem; }

.nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(9, 7, 10, 0.88);
  backdrop-filter: blur(18px);
  position: sticky;
  bottom: 0;
}
.nav-btn {
  position: relative;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.nav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn.is-active { color: var(--pink); }
.nav-btn.is-main { color: var(--ink); }
.nav-plus {
  width: 48px; height: 48px; margin-top: -22px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #ffd0de, var(--pink) 45%, #e48aaa);
  color: #2a1218;
  box-shadow: 0 10px 24px rgba(249, 161, 188, 0.28);
}
.nav-plus svg { width: 22px; height: 22px; }
.nav-dot {
  position: absolute; top: 6px; right: 18px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink);
}

.kicker { margin: 0 0 6px; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pink); }
.serif { font-family: var(--serif); font-weight: 400; }
h1.serif { margin: 0; font-size: clamp(2.4rem, 9vw, 4.2rem); line-height: 0.92; letter-spacing: -0.03em; }
h1.serif span { font-style: italic; color: var(--pink); }
h2.serif { margin: 0 0 8px; font-size: 1.8rem; line-height: 1.05; }
h3.serif { margin: 0; font-size: 1.7rem; line-height: 1.05; }
.whisper { font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1.35; color: #f0dde6; margin: 10px 0 0; }
.lead, .letter { line-height: 1.6; color: #f3e7ec; white-space: pre-line; }
.meta, .hint { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.hint.center, .center { text-align: center; }
.hero { margin: 12px 0 18px; }
.block { margin: 22px 0; }
.block-h { margin-bottom: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.split { display: flex; gap: 8px; flex-wrap: wrap; }
.split > .btn, .split > button { flex: 1; }
.split.tight { margin: 8px 0 16px; }

.btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(180deg, #ffd5e2, var(--pink)); color: #2a1218; }
.btn-gold { background: transparent; color: var(--gold); border-color: rgba(255, 171, 64, 0.5); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--ink); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(240, 180, 180, 0.35); }
.btn:disabled { opacity: 0.45; }
.text-btn, .text-link {
  min-height: 44px;
  background: none; border: 0; color: var(--pink);
  padding: 0 4px;
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  display: grid; place-items: center; color: var(--ink);
}
.icon-btn svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > .kicker { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
input, textarea, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 48px;
  padding: 12px 14px;
}
textarea { min-height: 96px; resize: vertical; }
.pw { position: relative; display: block; }
.pw input { padding-right: 84px; }
.pw .text-btn { position: absolute; right: 8px; top: 2px; }
.counter { display: block; text-align: right; color: var(--faint); font-size: 0.75rem; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--pink); }
.is-hidden { display: none !important; }

.chips, .filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip, .check {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}
.chip.is-on, .check.is-on, .ig-btn.is-on { background: rgba(249, 161, 188, 0.16); border-color: var(--pink); color: var(--pink); }
.mode { display: flex; flex-wrap: wrap; gap: 8px; }

.stepper { display: grid; grid-template-columns: 52px 52px 1fr 52px 52px; gap: 6px; align-items: center; }
.stepper button {
  min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}
.stepper-val { display: flex; flex-direction: column; align-items: center; }
.stepper-val input { text-align: center; font-family: var(--serif); font-size: 1.6rem; padding: 6px; }
.stepper-val span { font-size: 0.65rem; letter-spacing: 0.14em; color: var(--muted); }

.proposal, .panel, .game-card, .setting, .invite {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: 28px;
  margin-bottom: 14px;
}
.proposal { overflow: hidden; display: block; width: 100%; text-align: left; padding: 0; }
.proposal .media { height: 220px; }
.media { position: relative; background: #1a1216; }
.media img, .hero-figure img, .preview { width: 100%; height: 100%; object-fit: cover; }
.proposal-copy, .story-body { padding: 16px 16px 18px; }
.proposal-top, .tags, .who, .facts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.proposal-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.excerpt { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pill {
  border-radius: 999px; padding: 4px 10px;
  background: rgba(249, 161, 188, 0.12); color: var(--pink);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.pill-gold { background: rgba(255, 171, 64, 0.12); color: var(--gold); }
.pill-quiet { background: rgba(255,255,255,0.05); color: var(--muted); }
.tag { border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,0.04); color: var(--gold-2); font-size: 0.78rem; }
.price { font-family: var(--serif); color: var(--gold); font-size: 1.7rem; font-weight: 400; }
.price small, .price .small { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-2); margin-left: 4px; }
.price.big { font-size: 3rem; display: block; margin: 8px 0; }
.more { color: var(--pink); font-size: 0.85rem; }
[data-act="open"] { cursor: pointer; }
.is-urgent { color: var(--gold); }

.menu { columns: 1; column-gap: 14px; }
.menu-card {
  position: relative; break-inside: avoid; display: block; width: 100%;
  min-height: 340px; margin: 0 0 14px; padding: 0; overflow: hidden;
  border: 0; border-radius: 28px; text-align: left; color: white;
}
.menu-card.is-tall { min-height: 460px; }
.menu-card .media { position: absolute; inset: 0; }
.menu-card .media img { position: absolute; inset: 0; }
.menu-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,5,8,0.92) 0%, rgba(8,5,8,0.15) 58%); }
.menu-copy { position: relative; z-index: 1; min-height: inherit; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; gap: 6px; }
.menu-copy p { margin: 0; color: #f6e7ee; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.reacts { display: flex; gap: 6px; margin: 8px 0 16px; }
.react {
  flex: 1; min-height: 52px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); gap: 2px;
}
.react span { font-size: 1.05rem; color: var(--pink); }
.react small { font-size: 0.62rem; letter-spacing: 0.02em; }
.react.is-on { background: rgba(249, 161, 188, 0.16); border-color: var(--pink); color: var(--ink); }

.subhead { display: flex; gap: 12px; align-items: center; margin: 8px 0 16px; }
.subhead h1 { font-size: clamp(2rem, 7vw, 3rem); }
.hero-figure { margin: 0 0 8px; border-radius: 28px; overflow: hidden; min-height: 240px; background: linear-gradient(160deg, #2a121c, #8a3d55 60%, #f3c1cf); }
.hero-figure img { max-height: 460px; width: 100%; object-fit: cover; }
.who { margin-bottom: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #2a1218; color: var(--pink); }
.avatar.is-j { background: #2a2418; color: var(--gold); }
.who strong, .who small { display: block; }
.who small { color: var(--muted); }
blockquote { margin: 12px 0; padding: 4px 0 4px 14px; border-left: 2px solid var(--pink); font-family: var(--serif); font-style: italic; font-size: 1.25rem; }
.plan, .panel { padding: 16px; }
.facts { list-style: none; padding: 0; margin: 8px 0; color: var(--muted); }
.detail-bar {
  position: sticky; bottom: 8px; display: flex; gap: 8px;
  padding: 10px; border-radius: 22px;
  background: rgba(14, 9, 12, 0.9); border: 1px solid var(--line);
  backdrop-filter: blur(16px); margin: 12px 0;
}
.detail-bar .btn-primary { flex: 1.6; }
.notice { padding: 12px 14px; border-radius: 16px; background: rgba(141, 206, 173, 0.1); color: var(--green); }
.reviews, .review { margin-top: 8px; }
.review strong { color: var(--gold); letter-spacing: 0.12em; }
.bubble { max-width: 85%; margin: 8px 0; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,0.04); }
.bubble.is-mine { margin-left: auto; background: rgba(249, 161, 188, 0.12); }
.bubble small { color: var(--faint); }
.composer { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.composer input { flex: 1; }
.composer .btn { flex: none; }
.stars { display: flex; gap: 4px; }
.stars button { font-size: 1.8rem; background: none; border: 0; color: #5c5158; min-width: 44px; min-height: 44px; }
.stars button.is-on { color: var(--gold); }

.invite, .setting { width: 100%; text-align: left; color: inherit; padding: 16px 18px; }
.setting { display: flex; align-items: center; justify-content: space-between; }
.setting small, .invite small { display: block; color: var(--muted); margin-top: 3px; }
.setting i { color: var(--plum); font-style: normal; }
.settings { display: grid; gap: 10px; }
.list-row, .activity {
  width: 100%; text-align: left; color: inherit;
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 10px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,0.05); background: transparent;
  min-height: 48px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-2 div, .panel strong { display: block; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 84px; }
.bars i { display: block; flex: 1; background: linear-gradient(to top, var(--plum), var(--pink)); border-radius: 4px 4px 0 0; min-height: 4px; }
.bars.days { align-items: end; }
.bars.days span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars.days i { width: 100%; }
.insight { padding: 12px 14px; border-radius: 16px; background: rgba(98, 70, 110, 0.35); }
.ig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ig-btn, .ig-card { position: relative; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid transparent; background: #1a1216; min-height: 84px; }
.ig-btn img, .ig-card img { height: 84px; width: 100%; object-fit: cover; }
.ig-card button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.55); color: white; border: 0; }
.preview { border-radius: 18px; max-height: 240px; object-fit: cover; margin: 8px 0; width: 100%; }
.morning { padding: 8px 0 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.morning.is-off { opacity: 0.5; }
.week { display: flex; gap: 4px; align-items: center; }
.week i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 0.68rem; background: rgba(255,255,255,.05); color: var(--faint); }
.week i.is-on { background: var(--pink); color: #2a1218; }
.week strong { margin-left: auto; color: var(--gold); font-weight: 500; }
.letter-block p { line-height: 1.7; }
.sign { text-align: right; font-family: var(--serif); font-style: italic; color: var(--pink); }
.is-off { text-decoration: line-through; opacity: 0.6; }

.game-card {
  min-height: 210px; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center; position: relative; overflow: hidden;
}
.game-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,5,8,.9), rgba(8,5,8,.2)); }
.game-card > * { position: relative; z-index: 1; }
.row-card { display: flex; gap: 10px; align-items: center; padding: 10px; }
.row-card img, .thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.play-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.meter { flex: 1; height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--pink); }
.play-media { width: 100%; height: 42vh; object-fit: cover; border-radius: 24px; background: #141014; }
.scores { display: flex; gap: 4px; }
.score { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); }
.score.is-on { font-weight: 700; }
.score-block { margin: 8px 0 12px; }
.pair { display: flex; justify-content: space-around; margin-top: 8px; }
.pair strong { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.cmp { margin: 8px 0; }
.bar { height: 6px; background: rgba(255,255,255,.06); border-radius: 6px; overflow: hidden; margin: 4px 0; }
.bar i { display: block; height: 100%; background: var(--plum); }
.bar.is-n i { background: var(--pink); }
.soft { background: rgba(249, 161, 188, 0.08); }

.gate { width: min(480px, 100%); margin: 0 auto; padding: 48px 22px 64px; }
.mark {
  width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--pink); font-family: var(--serif); font-size: 2.2rem;
  background: radial-gradient(circle at 30% 20%, rgba(255,171,64,.4), transparent 42%), #1a1016;
  margin-bottom: 18px;
}
.preview-entry { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.ritual { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-direction: column; gap: 14px; }
.ritual li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.ritual span { font-family: var(--serif); color: var(--gold); font-size: 1.3rem; }
.bote-note { padding: 14px; border-radius: 18px; background: rgba(255,171,64,.08); border: 1px solid rgba(255,171,64,.2); }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 18px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--pink); display: block; }
.pin-dots i.is-on { background: var(--pink); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; justify-content: center; }
.pin-pad button { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 1.4rem; }
.is-alert { color: var(--danger); }

.empty { padding: 28px 8px 10px; }
.skel-list { display: grid; gap: 12px; }
.skel { height: 180px; border-radius: 28px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shine 1.2s infinite; }
.sheet-overlay { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .25s ease; }
.sheet-overlay.is-open { opacity: 1; }
.sheet { width: min(560px, 100%); max-height: min(88dvh, 760px); overflow: auto; background: #161217; border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); border: 1px solid var(--line); }
.sheet-handle { width: 42px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); margin: 4px auto 12px; }
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0; z-index: 50; background: #241820; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; min-height: 44px; transition: .25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(240,180,180,.5); }
.update { position: sticky; top: 0; z-index: 40; display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 14px; background: #2a2030; color: var(--pink); }
.update button { min-height: 36px; border-radius: 999px; border: 1px solid var(--pink); background: transparent; color: var(--pink); padding: 0 12px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; animation: fall 1.5s ease-in forwards; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(42,18,24,.25); border-top-color: #2a1218; display: inline-block; animation: spin .7s linear infinite; }

@keyframes shine { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes fall { to { transform: translateY(100vh) rotate(180deg); opacity: .2; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 860px) {
  body { padding: 22px; }
  #app.has-shell .shell {
    min-height: calc(100dvh - 44px);
    height: calc(100dvh - 44px);
    border-radius: 32px;
    border: 1px solid var(--line);
    background: rgba(12, 9, 12, 0.72);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .menu { columns: 2; }
  .settings { grid-template-columns: 1fr 1fr; }
  .nav { border-radius: 0 0 32px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* F1 v51: favorites heart + dual price */
.fav { position: absolute; top: 12px; right: 12px; z-index: 3; width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(13,13,13,.45); color: #fff; font-size: 20px; line-height: 1; backdrop-filter: blur(6px); cursor: pointer; }
.fav.is-on { color: var(--pink, #f9a1bc); border-color: var(--pink, #f9a1bc); }
.fav.fav-big { position: static; margin-left: auto; }
.price small { opacity: .7; font-weight: 400; }
.price s.was { opacity: .55; font-weight: 400; margin-right: 4px; }
