/* =====================================================================
   From the Streets to the Seats
   Palette sampled directly from the cover artwork:
   black asphalt on the left, warm gold room light on the right.
   ===================================================================== */

@property --pct { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  /* Surfaces - the street side */
  --ink:        #08080A;
  --asphalt:    #101013;
  --concrete:   #17171B;
  --raised:     #1E1E23;
  --edge:       rgba(255, 255, 255, 0.07);
  --edge-strong:rgba(255, 255, 255, 0.13);

  /* Type - the graffiti white */
  --bone:       #DED6C8;
  --stone:      #948C80;
  --dim:        #666058;

  /* The room light */
  --gold:       #DFAA66;
  --gold-hi:    #F2C87F;
  --gold-dim:   #A87848;
  --ember:      #4C3016;

  --danger:     #C4302B;
  --danger-dim: #6B2320;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shell: 520px;
  --tabbar-h: 62px;

  --shadow-card: 0 1px 0 rgba(255,255,255,.04) inset, 0 8px 24px rgba(0,0,0,.5);
  --shadow-lift: 0 14px 40px rgba(0,0,0,.65);

  --font-display: 'Anton', Impact, 'Haettenschweiler', 'Arial Narrow', sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* NA keytag colours, in order */
.tag-white    { --tag: #EFEADF; --tag-ink: #23201A; --tag-edge: #FFFFFF; }
.tag-orange   { --tag: #E5761F; --tag-ink: #1E1206; --tag-edge: #FFA24E; }
.tag-green    { --tag: #2E9E5B; --tag-ink: #06180D; --tag-edge: #5CD189; }
.tag-red      { --tag: #C4302B; --tag-ink: #FFE9E7; --tag-edge: #F1615A; }
.tag-blue     { --tag: #2A6FD6; --tag-ink: #E8F1FF; --tag-edge: #5C9AF2; }
.tag-yellow   { --tag: #E8C21E; --tag-ink: #201A02; --tag-edge: #FFE066; }
.tag-moonglow { --tag: #C8E6A8; --tag-ink: #16200E; --tag-edge: #E3FFC4; }
.tag-gray     { --tag: #8A8A8E; --tag-ink: #131315; --tag-edge: #B9B9BE; }
.tag-black    { --tag: #26262A; --tag-ink: #E8E2D6; --tag-edge: #4A4A52; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

/* Faint concrete grain over the whole page, like the artwork's wall */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .05;
  background-image:
    radial-gradient(circle at 15% 12%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 62% 47%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 34% 78%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 87% 66%, #fff 0 1px, transparent 1px);
  background-size: 79px 83px, 113px 97px, 61px 71px, 137px 129px;
}

/* The room light bleeding in from the right, echoing the cover */
body::after {
  content: '';
  position: fixed;
  top: -10%;
  right: -30%;
  width: 90vw;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(223, 170, 102, .13), transparent 68%);
  filter: blur(20px);
}

/* ===================== SHELL ===================== */

.app {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px);
}

.main { padding: 0 18px; }

.view { animation: viewIn .32s cubic-bezier(.22,.8,.28,1) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ===================== TOPBAR ===================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) 18px 12px;
  background: linear-gradient(180deg, rgba(8,8,10,.94) 60%, rgba(8,8,10,0));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand { display: flex; flex-direction: column; line-height: 1; }

.brand-sm {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--dim);
  text-transform: uppercase;
}

.brand-lg {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .015em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--bone) 0%, var(--bone) 38%, var(--gold-hi) 72%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-lg em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--dim);
  -webkit-text-fill-color: var(--dim);
  padding: 0 2px;
}

.sync-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stone);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
.sync-badge[data-mode="cloud"] { color: var(--gold); border-color: rgba(223,170,102,.35); }
.sync-badge[data-mode="local"] { color: var(--stone); }

/* ===================== NOTICE ===================== */

.notice {
  position: relative;
  z-index: 1;
  margin: 0 18px 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(223,170,102,.28);
  background: rgba(76,48,22,.35);
  color: var(--gold-hi);
  font-size: 13px;
  line-height: 1.5;
}

/* ===================== HERO ART ===================== */

.hero { padding: 4px 0 2px; }

.hero-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;          /* the artwork is square - never distorted */
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--edge);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;           /* whole image, no cropping, no stretch */
  display: block;
}

/* The light sweeping from the street side to the seats side, once, on load */
.hero-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(223,170,102,.00) 32%,
    rgba(242,200,127,.20) 48%,
    rgba(223,170,102,.05) 60%,
    transparent 78%);
  transform: translateX(-115%);
  animation: sweep 2.6s cubic-bezier(.32,.06,.24,1) .35s both;
}
@keyframes sweep {
  to { transform: translateX(115%); }
}

/* Melts the artwork's black edge into the page */
.hero-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(8,8,10,.55) 84%, var(--ink) 100%);
}

/* ===================== SPOTLIGHT (next celebration) ===================== */

.spotlight { margin: -26px 0 6px; position: relative; z-index: 2; }

.spot-card {
  border-radius: var(--r-xl);
  border: 1px solid var(--edge);
  background:
    radial-gradient(120% 90% at 88% 8%, rgba(223,170,102,.16), transparent 62%),
    linear-gradient(165deg, var(--raised), var(--concrete));
  box-shadow: var(--shadow-lift);
  padding: 20px 18px 22px;
  overflow: hidden;
  position: relative;
}

.spot-card.is-today {
  border-color: rgba(242,200,127,.5);
  animation: todayPulse 2.8s ease-in-out infinite;
}
@keyframes todayPulse {
  0%, 100% { box-shadow: var(--shadow-lift), 0 0 0 0 rgba(242,200,127,.22); }
  50%      { box-shadow: var(--shadow-lift), 0 0 34px 3px rgba(242,200,127,.22); }
}

.spot-eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
}

.spot-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.spot-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--bone);
  overflow-wrap: anywhere;
}

.spot-milestone {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-hi);
}

.spot-when {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--stone);
  line-height: 1.5;
}

.spot-count {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--bone);
  letter-spacing: .01em;
  display: inline-block;
  min-width: 1ch;
  vertical-align: -3px;
  margin-right: 5px;
}

.spot-empty {
  padding: 26px 20px;
  border-radius: var(--r-xl);
  border: 1px dashed var(--edge-strong);
  background: rgba(23,23,27,.7);
  text-align: center;
  color: var(--stone);
  font-size: 14px;
  line-height: 1.6;
}

/* ===================== PROGRESS RING ===================== */

.ring {
  --pct: 0;
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(from -90deg,
    var(--gold) calc(var(--pct) * 360deg),
    rgba(255,255,255,.07) calc(var(--pct) * 360deg));
  transition: --pct 1.2s cubic-bezier(.22,.8,.28,1);
  display: grid;
  place-items: center;
}
.ring::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: linear-gradient(165deg, var(--raised), var(--concrete));
  box-shadow: inset 0 2px 10px rgba(0,0,0,.6);
}

/* ===================== KEYTAG ===================== */

.keytag {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 92px;
  border-radius: 13px;
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--tag) 100%, #fff 22%) 0%,
      var(--tag) 42%,
      color-mix(in srgb, var(--tag) 100%, #000 26%) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -2px 6px rgba(0,0,0,.35),
    0 6px 16px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px 9px;
  overflow: hidden;
  transform-style: preserve-3d;
  animation: tagFloat 6.5s ease-in-out infinite;
}
@keyframes tagFloat {
  0%, 100% { transform: perspective(520px) rotateY(-13deg) rotateX(3deg); }
  50%      { transform: perspective(520px) rotateY(13deg)  rotateX(-2deg); }
}

/* the punch hole at the top of a real keytag */
.keytag::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--concrete);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.22);
}

/* travelling specular highlight */
.keytag::after {
  content: '';
  position: absolute;
  inset: -40% -120%;
  background: linear-gradient(72deg, transparent 42%, rgba(255,255,255,.42) 50%, transparent 58%);
  animation: tagSheen 5.5s ease-in-out infinite;
}
@keyframes tagSheen {
  0%, 62%, 100% { transform: translateX(-58%); }
  82%           { transform: translateX(58%); }
}

.keytag-num {
  font-family: var(--font-display);
  font-size: 27px;
  line-height: .92;
  color: var(--tag-ink);
  text-shadow: 0 1px 0 rgba(255,255,255,.22);
}
.keytag-unit {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--tag-ink);
  opacity: .82;
  margin-top: 2px;
}

/* small version used in lists */
.keytag-mini {
  width: 30px;
  height: 44px;
  border-radius: 7px;
  padding: 0 2px 4px;
  animation: none;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 8px rgba(0,0,0,.5);
}
.keytag-mini::before { top: 4px; width: 6px; height: 6px; }
.keytag-mini::after { animation: none; opacity: .3; }
.keytag-mini .keytag-num { font-size: 14px; }
.keytag-mini .keytag-unit { font-size: 6px; letter-spacing: .08em; margin-top: 1px; }

/* ===================== SECTION HEADS ===================== */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 14px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stone);
}

.lead {
  margin: -4px 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--stone);
}

/* ===================== CHIPS ===================== */

.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--stone);
  background: transparent;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.chip:hover { color: var(--bone); border-color: var(--edge-strong); }
.chip.is-active {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

/* ===================== CARD LIST ===================== */

.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 13px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--edge);
  background: linear-gradient(165deg, var(--concrete), var(--asphalt));
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .16s cubic-bezier(.22,.8,.28,1), border-color .16s, background .16s;
}
.row:hover { border-color: var(--edge-strong); transform: translateY(-1px); }
.row:active { transform: translateY(0) scale(.995); }

.row.is-today {
  border-color: rgba(242,200,127,.42);
  background: linear-gradient(165deg, rgba(76,48,22,.5), var(--asphalt));
}

.row-main { min-width: 0; }

.row-name {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--bone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--stone);
  line-height: 1.45;
}
.row-sub b { color: var(--gold); font-weight: 600; }

.row-right { text-align: right; flex: none; }

.row-count {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--bone);
  line-height: 1;
}
.row-count.is-today { color: var(--gold-hi); font-size: 13px; letter-spacing: .12em; }

.row-count-unit {
  display: block;
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 3px;
}

/* ===================== EMPTY STATES ===================== */

.empty {
  margin: 8px 0;
  padding: 22px 18px;
  border-radius: var(--r-md);
  border: 1px dashed var(--edge-strong);
  color: var(--stone);
  font-size: 13.5px;
  text-align: center;
  line-height: 1.6;
}

.empty-state {
  padding: 34px 22px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--edge-strong);
  text-align: center;
}
.empty-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--bone);
}
.empty-body {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--stone);
}

/* ===================== FORMS ===================== */

.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 14px; }

.field-label {
  display: block;
  margin: 16px 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.field-label .optional { color: var(--dim); font-weight: 400; letter-spacing: .04em; text-transform: none; }

.input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--bone);
  background: var(--asphalt);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  padding: 12px 13px;
  transition: border-color .16s, box-shadow .16s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--dim); }
.input:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(223,170,102,.14);
}
.input[type="date"] { color-scheme: dark; }

.input-select {
  background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%), linear-gradient(135deg, var(--stone) 50%, transparent 50%);
  background-position: calc(100% - 17px) 51%, calc(100% - 12px) 51%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.textarea {
  font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  resize: vertical;
  min-height: 190px;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--bone);
  cursor: pointer;
  line-height: 1.45;
}
.checkline input[type="checkbox"] {
  flex: none;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dim);
}

.form-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: #F1615A;
  min-height: 1em;
}

/* ===================== BUTTONS ===================== */

.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-sm);
  padding: 12px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .14s cubic-bezier(.22,.8,.28,1), filter .16s, background .16s, border-color .16s;
}
.btn:active { transform: scale(.975); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn-gold {
  background: linear-gradient(165deg, var(--gold-hi), var(--gold-dim));
  color: #1A1207;
  box-shadow: 0 6px 18px rgba(223,170,102,.18);
}
.btn-gold:hover { filter: brightness(1.07); }

.btn-ghost {
  background: transparent;
  border-color: var(--edge-strong);
  color: var(--bone);
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-hi); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }

.btn-danger-quiet {
  background: transparent;
  border-color: var(--danger-dim);
  color: #E0736D;
}
.btn-danger-quiet:hover { background: rgba(196,48,43,.12); }

.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

.btn-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 150px; }

/* ===================== PANELS ===================== */

.panel {
  margin-bottom: 14px;
  padding: 16px 16px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--edge);
  background: linear-gradient(165deg, var(--concrete), var(--asphalt));
}
.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.panel .field-label:first-of-type { margin-top: 14px; }
.panel-danger { border-color: var(--danger-dim); }

.toggle-grid { display: grid; gap: 2px; margin-top: 10px; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 2px;
  cursor: pointer;
  border-bottom: 1px solid var(--edge);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row input { flex: none; width: 19px; height: 19px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.toggle-row .swatch {
  width: 13px;
  height: 19px;
  border-radius: 3px;
  flex: none;
  background: var(--tag);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 3px rgba(0,0,0,.6);
}
.toggle-row span { font-size: 14px; color: var(--bone); }

.version {
  margin: 24px 0 8px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--dim);
}

/* ===================== TAB BAR ===================== */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 40;
  width: 100%;
  max-width: var(--shell);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  background: rgba(12,12,14,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--edge);
}

.tab {
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--dim);
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 7px 2px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color .18s;
}
.tab-ico { font-size: 15px; line-height: 1; }
.tab:hover { color: var(--stone); }
.tab.is-active { color: var(--gold); }

/* ===================== LOCK SCREEN ===================== */

.lock {
  position: relative;
  z-index: 1;
  max-width: 400px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 24px 22px calc(24px + env(safe-area-inset-bottom));
}
.lock-art {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--edge);
  aspect-ratio: 1 / 1;
}
.lock-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lock-form { display: block; }

/* ===================== ADD / EDIT SHEET ===================== */

.sheet {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: var(--shell);
  width: 100%;
  margin: auto auto 0;
  color: var(--bone);
}
.sheet::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }

.sheet-form {
  background: linear-gradient(180deg, var(--raised), var(--concrete));
  border: 1px solid var(--edge-strong);
  border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 92dvh;
  overflow-y: auto;
  animation: sheetIn .3s cubic-bezier(.22,.9,.3,1) both;
}
@keyframes sheetIn {
  from { transform: translateY(24px); opacity: .4; }
  to   { transform: none; opacity: 1; }
}

.sheet-grab {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--edge-strong);
  margin: 0 auto 14px;
}

.sheet-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--bone);
}

.sheet-actions { display: grid; gap: 9px; margin-top: 22px; }

/* ===================== TOAST ===================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px);
  transform: translate(-50%, 14px);
  z-index: 60;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #17120A;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s cubic-bezier(.22,.8,.28,1);
  max-width: min(88vw, 420px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ===================== CONFETTI ===================== */

.confetti {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

/* ===================== WIDER SCREENS ===================== */

@media (min-width: 720px) {
  :root { --shell: 560px; }
  body::after { right: -10%; width: 55vw; }
}

/* ===================== REDUCED MOTION ===================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-sweep { display: none; }
  .keytag { transform: perspective(520px) rotateY(0); }
}
