/* ═══════════════════════════════════════════════════════════
   PUNTA PRIMA '26 — Balearic editorial
   ivory · espresso · terracotta · antique gold · deep navy
   Fraunces (display, light/italic) · Instrument Sans (body)
   ═══════════════════════════════════════════════════════════ */

:root {
  --ivory: #F7F1E5;
  --paper: #FDFAF3;
  --ink: #26211B;
  --muted: #8D8071;
  --hairline: #E6DCC9;

  --clay: #B4532A;
  --clay-deep: #96431F;
  --gold: #BE9A5F;
  --navy: #1C2333;
  --navy-deep: #131828;
  --night-ink: #EEE9DC;

  --radius: 14px;
  --shadow: 0 12px 32px -18px rgba(38, 33, 27, .35);
  --font-display: 'Fraunces', serif;
  --font-body: 'Instrument Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  min-height: 100%;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
em { font-style: italic; }

.kicker {
  font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   CINEMATIC INTRO — slow dusk, restrained
   ───────────────────────────────────────────── */
.intro {
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  background: #0E1120;
  display: grid; place-items: center;
  cursor: pointer;
}

.intro-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; z-index: 0;
}
.intro.has-video .intro-video {
  opacity: 1;
  animation: videoIn 6.5s cubic-bezier(.25,.6,.3,1) both;
}
@keyframes videoIn {
  from { transform: scale(1.14); filter: brightness(.55) saturate(.9); opacity: 0; }
  18%  { opacity: 1; }
  to   { transform: scale(1); filter: brightness(1) saturate(1); opacity: 1; }
}
.intro.has-video .intro-sky,
.intro.has-video .intro-stars,
.intro.has-video .intro-sun,
.intro.has-video .intro-sea { display: none; }

.intro-sky {
  position: absolute; inset: -20% 0 0 0;
  background: linear-gradient(180deg,
    #0E1120 0%, #1C2333 30%, #4A3A50 52%,
    #8A5B54 68%, #C08A62 84%, #E3C296 100%);
  animation: skyrise 5.5s cubic-bezier(.25,.7,.3,1) both;
}
@keyframes skyrise {
  from { transform: translateY(-42%); }
  to   { transform: translateY(0); }
}

.intro-stars {
  position: absolute; inset: 0 0 45% 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #ffffffcc 60%, transparent),
    radial-gradient(1px 1px at 34% 8%, #ffffff88 60%, transparent),
    radial-gradient(1.5px 1.5px at 58% 22%, #ffffff77 60%, transparent),
    radial-gradient(1px 1px at 78% 12%, #ffffffaa 60%, transparent),
    radial-gradient(1px 1px at 90% 28%, #ffffff66 60%, transparent),
    radial-gradient(1px 1px at 22% 38%, #ffffff66 60%, transparent);
  animation: starfade 5s 1.2s ease both;
}
@keyframes starfade { to { opacity: .3; } }

.intro-sun {
  position: absolute; left: 50%; bottom: 26%;
  width: min(30vw, 150px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #F6E3BD 0%, #E3B57E 55%, #C08A62 100%);
  box-shadow: 0 0 60px 20px rgba(227, 181, 126, .35), 0 0 160px 60px rgba(192, 138, 98, .18);
  transform: translate(-50%, 160%);
  animation: sunrise 4.6s .8s cubic-bezier(.25,.7,.3,1) forwards;
}
@keyframes sunrise { to { transform: translate(-50%, 30%); } }

.intro-sea {
  position: absolute; left: 0; right: 0; bottom: 0; height: 24%;
  background: linear-gradient(180deg, #232B3D 0%, #131828 100%);
}
.intro-sea .shimmer {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: min(24vw, 120px); height: 100%;
  background: repeating-linear-gradient(180deg,
    rgba(227, 194, 150, .4) 0 2px, transparent 2px 16px);
  filter: blur(1px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  animation: shimmer 3s 2.4s ease-in-out infinite alternate, fadein 2.5s 2.2s both;
}
@keyframes shimmer { from { transform: translateX(-50%) scaleX(.85); } to { transform: translateX(-50%) scaleX(1.1); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.intro-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .4; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
}

.intro-copy {
  position: relative; z-index: 2; text-align: center; color: #F3EDDF;
  padding: 0 24px;
}
.intro-kicker {
  font-size: 11px; letter-spacing: .42em; font-weight: 500; text-transform: uppercase;
  opacity: 0; animation: riseIn 1.2s 2s both;
}
.intro-title {
  font-family: var(--font-display);
  font-size: clamp(58px, 19vw, 110px);
  font-weight: 420; font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  line-height: 1.02; margin: 20px 0 22px; letter-spacing: .01em;
}
.intro-title .line { display: block; overflow: hidden; }
.intro-title .line em { display: inline-block; animation: riseIn 1.3s cubic-bezier(.2,.85,.25,1) both; }
.intro-title .line:nth-child(1) em { animation-delay: 2.5s; }
.intro-title .line:nth-child(2) em { animation-delay: 2.75s; }
.intro-sub {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500;
  opacity: 0; animation: riseIn 1.2s 3.4s both;
}
.intro-hint {
  margin-top: 48px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  opacity: 0; animation: pulseIn 2.6s 4.4s ease both infinite;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(110%); } to { opacity: 1; transform: none; } }
@keyframes pulseIn { 0% { opacity: 0; } 30% { opacity: .7; } 60% { opacity: .25; } 100% { opacity: 0; } }

/* name picker scene */
.intro-picker { position: relative; z-index: 2; text-align: center; padding: 0 28px; width: 100%; max-width: 420px; }
.picker-kicker { color: #E3C296; font-size: 11px; letter-spacing: .36em; font-weight: 500; text-transform: uppercase; animation: fadein .7s both; }
.picker-title {
  font-family: var(--font-display); font-weight: 430; font-style: italic; color: #F3EDDF;
  font-size: 32px; margin: 12px 0 30px; animation: fadein .7s .1s both;
}
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.picker-name {
  padding: 15px 10px; border-radius: 4px; font-weight: 500; font-size: 16px; letter-spacing: .06em;
  color: #F3EDDF; background: rgba(243, 237, 223, .06);
  border: 1px solid rgba(243, 237, 223, .25);
  backdrop-filter: blur(6px);
  animation: riseIn .8s both; transition: transform .15s, background .15s;
}
.picker-name:active { transform: scale(.96); background: rgba(243, 237, 223, .18); }

.intro-hola { position: relative; z-index: 2; text-align: center; }
.hola-text {
  font-family: var(--font-display); font-weight: 420; font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  color: #F3EDDF; font-size: clamp(46px, 14vw, 84px); line-height: 1.05;
  animation: holaIn 1.1s cubic-bezier(.2,.9,.25,1) both;
}
@keyframes holaIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.intro.leaving { animation: introOut .8s ease forwards; }
@keyframes introOut { to { opacity: 0; } }

/* ─────────────────────────────────────────────
   APP CHROME
   ───────────────────────────────────────────── */
.app {
  max-width: 560px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 16px) 22px 12px;
  background: linear-gradient(180deg, var(--ivory) 78%, transparent);
}
.wordmark {
  font-family: var(--font-display); font-weight: 480; font-size: 21px;
  font-variation-settings: 'opsz' 60, 'SOFT' 0, 'WONK' 0;
  letter-spacing: .02em;
}
.wordmark em { font-weight: 430; }
.wordmark .yr { color: var(--clay); font-style: italic; }
.me-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 5px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--hairline);
  font-weight: 500; font-size: 13.5px; letter-spacing: .02em;
}

.avatar {
  width: 27px; height: 27px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-weight: 500; font-size: 12px; color: #F3EDDF;
  font-family: var(--font-display);
}
.avatar.sm { width: 21px; height: 21px; font-size: 10.5px; }

.view { flex: 1; padding: 4px 22px calc(env(safe-area-inset-bottom) + 96px); }

/* tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 560px); z-index: 30;
  display: flex; justify-content: space-around;
  padding: 8px 18px calc(env(safe-area-inset-bottom) + 10px);
  background: rgba(253, 250, 243, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--hairline);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 18px; color: var(--muted);
  font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  transition: color .15s, transform .15s;
}
.tab svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: var(--clay); }
.tab:active { transform: scale(.94); }

/* ─────────────────────────────────────────────
   TRIP / COUNTDOWN
   ───────────────────────────────────────────── */
.hype-hero {
  position: relative; overflow: hidden; border-radius: 18px;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(190, 154, 95, .28), transparent 55%),
    linear-gradient(170deg, #232B3D 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: var(--night-ink); padding: 36px 28px 30px; margin-top: 8px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(190, 154, 95, .28);
}
.hype-kicker { font-size: 10.5px; letter-spacing: .38em; font-weight: 500; text-transform: uppercase; color: var(--gold); }
.hype-title {
  font-family: var(--font-display); font-weight: 420; font-style: italic; line-height: 1.04;
  font-size: clamp(42px, 12vw, 58px); margin: 14px 0 10px; letter-spacing: .01em;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
}
.hype-title em { color: #E3C296; }
.hype-dest { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; opacity: .75; }

.countdown {
  display: flex; margin-top: 30px;
  border-top: 1px solid rgba(190, 154, 95, .3);
  padding-top: 20px;
}
.cd-cell { flex: 1; text-align: center; }
.cd-cell + .cd-cell { border-left: 1px solid rgba(190, 154, 95, .22); }
.cd-num {
  font-family: var(--font-display); font-weight: 380; font-size: clamp(30px, 9.5vw, 42px);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.cd-lbl { font-size: 9px; letter-spacing: .26em; text-transform: uppercase; opacity: .6; margin-top: 7px; }

.hype-live {
  margin-top: 26px; font-family: var(--font-display); font-style: italic; font-weight: 420;
  font-size: 24px; text-align: center; color: #E3C296;
}

/* sections */
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-title {
  font-family: var(--font-display); font-weight: 470; font-size: 22px; letter-spacing: .01em;
}
.section-link { color: var(--clay); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }

.crew-strip { display: flex; flex-wrap: wrap; gap: 9px; }
.crew-pill {
  display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 999px;
  font-weight: 500; font-size: 13.5px; letter-spacing: .02em;
}

.stat-row { display: flex; gap: 10px; }
.stat-card {
  flex: 1; background: var(--paper); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 18px 14px 15px; text-align: center;
}
.stat-num { font-family: var(--font-display); font-weight: 400; font-size: 32px; color: var(--clay); }
.stat-lbl { font-size: 9.5px; color: var(--muted); font-weight: 600; letter-spacing: .22em; text-transform: uppercase; margin-top: 5px; }

/* ─────────────────────────────────────────────
   DAYS
   ───────────────────────────────────────────── */
.day-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 18px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.day-scroll::-webkit-scrollbar { display: none; }
.day-chip {
  flex: none; scroll-snap-align: start;
  width: 62px; padding: 11px 0 13px; text-align: center; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--hairline);
  transition: all .18s;
}
.day-chip .dow { font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.day-chip .dom { font-family: var(--font-display); font-weight: 420; font-size: 23px; margin-top: 3px; }
.day-chip.selected { background: var(--navy); border-color: var(--navy); color: var(--night-ink); box-shadow: var(--shadow); }
.day-chip.selected .dow { color: var(--gold); }
.day-chip.today-dot { position: relative; }
.day-chip.today-dot::after {
  content: ''; position: absolute; top: 8px; right: 9px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--clay);
}

.day-heading {
  font-family: var(--font-display); font-weight: 440; font-size: 27px; margin: 8px 2px 20px;
  letter-spacing: .01em;
}
.day-heading em { color: var(--clay); }

/* slot cards */
.slot {
  border-radius: var(--radius); padding: 20px 20px 16px; margin-bottom: 14px;
  position: relative; overflow: hidden;
  background: var(--paper); border: 1px solid var(--hairline);
}
.slot-day { --slot-accent: var(--gold); background: linear-gradient(180deg, #FCF7EA, var(--paper)); }
.slot-evening { --slot-accent: var(--clay); background: linear-gradient(180deg, #FAF1E6, var(--paper)); }
.slot-night {
  --slot-accent: var(--gold);
  background: linear-gradient(172deg, #232B3D, var(--navy-deep));
  border-color: rgba(190, 154, 95, .3);
  color: var(--night-ink);
}
.slot-night::before {
  content: ''; position: absolute; inset: 0 0 55% 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 15% 30%, #ffffff99 60%, transparent),
    radial-gradient(1px 1px at 45% 15%, #ffffff66 60%, transparent),
    radial-gradient(1px 1px at 75% 35%, #ffffff55 60%, transparent),
    radial-gradient(1px 1px at 90% 20%, #ffffff88 60%, transparent);
}
.slot-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid var(--hairline);
}
.slot-night .slot-head { border-bottom-color: rgba(190, 154, 95, .25); }
.slot-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
}
.slot-title .glyph { display: flex; color: var(--slot-accent); }
.slot-title .glyph svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.slot-add {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--hairline); color: var(--muted);
  font-size: 18px; font-weight: 400; line-height: 1;
  transition: transform .15s;
}
.slot-night .slot-add { border-color: rgba(190, 154, 95, .4); color: var(--gold); }
.slot-add:active { transform: scale(.88); }

.plan-item {
  padding: 13px 2px 12px; display: flex; align-items: flex-start; gap: 10px;
  color: inherit;
}
.plan-item + .plan-item { border-top: 1px solid var(--hairline); }
.slot-night .plan-item + .plan-item { border-top-color: rgba(238, 233, 220, .12); }
.plan-body { flex: 1; min-width: 0; }
.plan-title { font-weight: 600; font-size: 15.5px; letter-spacing: .01em; }
.plan-note { font-size: 13.5px; opacity: .7; margin-top: 3px; line-height: 1.45; }
.plan-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; letter-spacing: .06em; opacity: .65; }
.plan-empty { font-size: 13.5px; opacity: .55; font-style: italic; padding: 12px 2px 4px; }

/* photo strip */
.photo-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-thumb {
  flex: none; width: 104px; height: 104px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--hairline); background: var(--paper); padding: 0;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-add {
  flex: none; width: 104px; height: 104px; border-radius: 10px;
  border: 1px dashed #C9BCA4; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  background: transparent;
}
.photo-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ─────────────────────────────────────────────
   IDEAS
   ───────────────────────────────────────────── */
.ideas-head { margin: 12px 2px 6px; }
.ideas-title { font-family: var(--font-display); font-weight: 440; font-size: 27px; }
.ideas-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; letter-spacing: .02em; }

.idea-card {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 18px; margin-top: 12px;
}
.idea-top { display: flex; gap: 14px; align-items: flex-start; }
.idea-main { flex: 1; min-width: 0; }
.idea-title { font-weight: 600; font-size: 16.5px; line-height: 1.3; letter-spacing: .01em; }
.idea-note { font-size: 13.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.idea-tags { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tag {
  font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 3px;
}
.tag-day { background: #F1E6CB; color: #7A5E24; }
.tag-evening { background: #F2E0D0; color: #8C441F; }
.tag-night { background: #DFE2EB; color: #333D57; }
.tag-any { background: #E5E8DE; color: #57624B; }
.tag-planned { background: var(--navy); color: var(--night-ink); }
.idea-by { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; letter-spacing: .04em; }

.vote-btn {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 52px; padding: 10px 8px 8px; border-radius: 10px;
  border: 1px solid var(--hairline); background: transparent;
  color: var(--muted);
  transition: all .18s;
}
.vote-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.vote-btn .count { font-family: var(--font-display); font-weight: 450; font-size: 16px; color: var(--ink); }
.vote-btn.voted { background: var(--clay); border-color: var(--clay); color: #F6EADF; }
.vote-btn.voted .count { color: #FDFAF3; }
.vote-btn:active { transform: scale(.92); }

.idea-actions { display: flex; gap: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.idea-action { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.idea-action.accent { color: var(--clay); }

.comments { margin-top: 12px; }
.comment { display: flex; gap: 8px; margin-top: 10px; font-size: 13.5px; }
.comment-body { background: var(--ivory); border: 1px solid var(--hairline); border-radius: 3px 12px 12px 12px; padding: 8px 12px; line-height: 1.45; }
.comment-author { font-weight: 600; font-size: 11px; letter-spacing: .08em; }
.comment-row { display: flex; gap: 8px; margin-top: 12px; }
.comment-input {
  flex: 1; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--ivory); font-size: 13.5px; outline: none;
}
.comment-input:focus { border-color: var(--gold); }
.comment-send { color: var(--clay); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

.fab {
  position: fixed; right: max(22px, calc(50% - 258px)); bottom: calc(env(safe-area-inset-bottom) + 88px);
  z-index: 25; display: flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--navy); color: var(--night-ink); font-weight: 600; font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase;
  box-shadow: 0 16px 34px -12px rgba(19, 24, 40, .6), inset 0 0 0 1px rgba(190, 154, 95, .35);
  transition: transform .15s;
}
.fab:active { transform: scale(.95); }

/* ─────────────────────────────────────────────
   SHEETS, LIGHTBOX, TOAST
   ───────────────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(19, 24, 40, .5); animation: fadein .25s both; }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 560px); max-height: 86dvh; overflow-y: auto;
  background: var(--paper); border-radius: 18px 18px 0 0;
  padding: 10px 24px calc(env(safe-area-inset-bottom) + 26px);
  animation: sheetUp .34s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes sheetUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet::before {
  content: ''; display: block; width: 36px; height: 3px; border-radius: 2px;
  background: var(--hairline); margin: 8px auto 20px;
}
.sheet-title { font-family: var(--font-display); font-weight: 450; font-size: 23px; margin-bottom: 20px; letter-spacing: .01em; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--hairline);
  background: var(--ivory); outline: none; font-size: 16px;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { resize: none; min-height: 74px; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--hairline);
  background: transparent; font-weight: 500; font-size: 13.5px; letter-spacing: .03em;
  transition: all .15s;
}
.chip.selected { background: var(--navy); color: var(--night-ink); border-color: var(--navy); }

.btn-primary {
  width: 100%; margin-top: 10px; padding: 15px; border-radius: 10px;
  background: var(--clay); color: #FDF6EE; font-weight: 600; font-size: 12.5px;
  letter-spacing: .2em; text-transform: uppercase;
  transition: transform .15s, background .15s;
}
.btn-primary:active { transform: scale(.98); background: var(--clay-deep); }
.btn-danger { width: 100%; margin-top: 10px; padding: 13px; color: var(--clay-deep); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.btn-ghost { width: 100%; margin-top: 2px; padding: 13px; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }

.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(14, 17, 32, .96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; animation: fadein .2s both;
}
.lightbox img { max-width: 100%; max-height: 72dvh; border-radius: 8px; }
.lightbox-caption { color: #F3EDDF; margin-top: 16px; font-size: 15px; text-align: center; font-family: var(--font-display); font-style: italic; font-weight: 430; }
.lightbox-meta { color: var(--gold); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; margin-top: 8px; }
.lightbox-close { position: absolute; top: calc(env(safe-area-inset-top) + 16px); right: 22px; color: #F3EDDF; font-size: 30px; line-height: 1; font-weight: 300; }
.lightbox-del { margin-top: 20px; color: #D08A76; font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 100px);
  transform: translateX(-50%); z-index: 80;
  background: var(--navy); color: var(--night-ink); font-weight: 500; font-size: 13px;
  letter-spacing: .04em;
  padding: 11px 22px; border-radius: 999px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(190, 154, 95, .3);
  animation: toastIn .3s cubic-bezier(.2,1.1,.3,1) both;
  max-width: 86vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* view transition */
.view > .pane { animation: paneIn .3s ease both; }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
}
