/* ---------- tokens ---------- */
:root {
  --bg: #0b0b0f;
  --surface: #131319;
  --surface-2: #1b1b23;
  --line: #26262f;
  --text: #f4f4f6;
  --muted: #8b8b98;
  --accent: #ff5470;
  --accent-soft: rgba(255, 84, 112, 0.12);
  --danger: #ff6b6b;
  --radius: 18px;
  --pad: 20px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* any rule that sets display beats the browser's own [hidden] rule, and several
   below do - this keeps the attribute authoritative */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  min-height: 100svh;
  /* keep content clear of the notch and the home indicator */
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px var(--pad) 48px;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
}

.brand {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand .amp { color: var(--accent); }

.topbar-actions { display: flex; gap: 8px; }

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.icon-btn:active { transform: scale(0.96); }
.icon-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero {
  margin-top: 18px;
  padding: 28px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  margin: 0 0 22px;
  font-size: clamp(26px, 8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.clock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 2px;
  background: var(--surface-2);
  border-radius: 14px;
}

.num {
  font-size: clamp(24px, 7.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.04em;
  /* stops the layout jittering as digits change */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  line-height: 1;
}

.lbl {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero.is-past .num { color: var(--accent); }

/* ---------- the absurd units ---------- */
.measures {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.measure {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.measure-v {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.measure-l {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

/* ---------- empty ---------- */
.empty {
  margin-top: 18px;
  padding: 40px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.empty-big { margin: 0 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.empty-sub { margin: 0 0 22px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- clocks ---------- */
.clocks {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.clock-side { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }

.clock-who {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-time {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.clock-place {
  font-size: 11px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* the far side goes quiet when it's the middle of the night there */
.clock-side.is-asleep .clock-time,
.clock-side.is-asleep .clock-place { opacity: 0.45; }

.clock-gap {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 6px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  align-self: stretch;
  display: flex;
  align-items: center;
}

/* ---------- statuses ---------- */
.statuses { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

.status-pill {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.status-pill.is-them { cursor: default; }

.status-who {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-age { flex: none; font-size: 11px; color: var(--muted); }

/* ---------- now playing ---------- */
.listening { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }

.listen {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  font: inherit;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.listen.is-connect {
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.listen-art {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}

.listen-main { flex: 1; min-width: 0; }

.listen-who {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.listen-title {
  display: block;
  font-size: 14px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listen-artist {
  display: block;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listen.is-paused { opacity: 0.55; }

/* ---------- status picker ---------- */
.pick-custom { display: flex; gap: 8px; margin: 14px 0 4px; }

.pick-custom input {
  flex: 1;
  min-width: 0;
  appearance: none;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.pick-custom input:focus { outline: none; border-color: var(--accent); background: var(--accent-soft); }

.pick-groups { max-height: 46svh; overflow-y: auto; margin: 10px -4px; padding: 0 4px; }

.pick-group-title {
  margin: 14px 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.pick-opt {
  appearance: none;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
}

.pick-opt:active { transform: scale(0.97); }

/* ---------- feelings ---------- */
.feelings { margin-top: 26px; }

.push-note {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.mood-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0 10px;
  overflow-x: auto;
  /* let the row bleed to the screen edge rather than clipping mid-tab */
  scrollbar-width: none;
}

.mood-tabs::-webkit-scrollbar { display: none; }

.mood-tab {
  flex: none;
  appearance: none;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}

.mood-tab.is-on {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 460px) {
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
}

.feel-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  cursor: pointer;
  transition: transform 90ms ease, background 140ms ease;
}

.feel-btn:active { transform: scale(0.96); background: var(--accent-soft); }

/* a quick flash so rapid taps still feel like they registered */
.feel-btn.is-sent { background: var(--accent-soft); border-color: var(--accent); }

.feel-emoji { flex: none; font-size: 19px; line-height: 1; }
.feel-text { min-width: 0; line-height: 1.25; }

.feel-btn.is-add {
  justify-content: center;
  color: var(--muted);
  background: none;
  border-style: dashed;
}

/* ---------- making your own ---------- */
.feel-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; }
.feel-form .field { flex: 1; min-width: 0; }
.feel-emoji-field { flex: 0 0 84px; }

.feel-mine {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feel-mine-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.feel-mine-row span { flex: 1; min-width: 0; }

.throws {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.throw-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 2px;
}

.throw-row.is-mine { opacity: 0.6; }
.throw-who { flex: none; font-weight: 600; color: var(--text); }
.throw-text { flex: 1; min-width: 0; }
.throw-when { flex: none; }

/* ---------- shared checklist ---------- */
.todo-form { display: flex; gap: 8px; margin-bottom: 10px; }

.todo-form input {
  flex: 1;
  min-width: 0;
  appearance: none;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.todo-form input:focus { outline: none; border-color: var(--accent); background: var(--accent-soft); }
.todo-add { padding: 12px 16px; }

.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.todo-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  appearance: none;
}

.todo-check:checked { background: var(--accent); border-color: var(--accent); }

.todo-check:checked::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.todo-main { flex: 1; min-width: 0; }
.todo-text { display: block; font-size: 14px; line-height: 1.35; }
.todo-by { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

.todo-row.is-done .todo-text { text-decoration: line-through; color: var(--muted); }

.todo-del {
  flex: none;
  appearance: none;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

.todo-empty { margin: 6px 2px 0; font-size: 13px; color: var(--muted); }

/* ---------- together list card ---------- */
.todo-card {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.todo-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 18px 18px;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.todo-toggle-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.todo-toggle .section-title { margin: 0; }

.todo-toggle::after {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
}

.todo-toggle.is-open::after { transform: rotate(225deg); }

.todo-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.todo-body .todo-form { margin-top: 12px; }

/* ---------- the map ---------- */
.map-section { margin-top: 16px; }

.map-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.us-map {
  height: 280px;
  width: 100%;
  background: #121820;
}

.map-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.map-refresh {
  appearance: none;
  flex: none;
  border: none;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.map-refresh:active { transform: scale(0.97); }
.map-refresh.is-busy { opacity: 0.5; }

.map-dot {
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.map-open {
  flex: 1;
  min-width: 0;
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  text-align: right;
}

.map-open:active { color: var(--text); }

.leaflet-container { background: #121820; font: inherit; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(0.35) brightness(0.75); }
.leaflet-control-attribution {
  background: transparent !important;
  color: var(--muted);
  font-size: 10px;
}
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-control-zoom a {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
}
.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; line-height: 1.4; }
.leaflet-popup-content strong { display: block; margin-bottom: 2px; }
.leaflet-popup-content span { color: var(--muted); font-size: 12px; }
.leaflet-popup-content a { color: var(--accent); }
.leaflet-popup-close-button { color: var(--muted) !important; }

/* ---------- meme ---------- */
.meme-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.meme-img {
  display: block;
  width: 100%;
  height: auto;
  /* very tall screenshots would otherwise push the page into oblivion */
  max-height: 70svh;
  object-fit: contain;
  background: #000;
}

.meme-foot {
  margin: 0;
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------- list ---------- */
.list-section { margin-top: 16px; }

.section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 4px 10px 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.section-toggle .section-title { margin: 0; }

.section-meta {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}

.section-toggle::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
}

.section-toggle.is-open::after { transform: rotate(225deg); }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.row:active { transform: scale(0.99); }

.row-emoji { font-size: 22px; line-height: 1; flex: none; }

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

.row-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-date { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.row-away {
  flex: none;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.row.is-past .row-away { color: var(--muted); }

/* whichever one the big countdown is showing */
.row.is-on { border-color: var(--accent); }

/* ---------- footer ---------- */
.foot { margin-top: 34px; text-align: center; }
.foot p { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.foot .link-btn { display: block; margin: 0 auto; }

.link-btn {
  appearance: none;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 10px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.empty .link-btn { display: block; margin: 14px auto 0; }

/* ---------- buttons ---------- */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease;
}

.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: transparent; border-color: transparent; color: var(--danger); }

/* ---------- sheet ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 20;
  animation: fade .18s ease;
}

.sheet {
  position: fixed;
  z-index: 21;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92svh;
  overflow-y: auto;
  margin: 0 auto;
  max-width: 560px;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  animation: rise .22s cubic-bezier(.2, .8, .2, 1);
}

@media (min-width: 600px) {
  .sheet {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 26px;
    border-bottom: 1px solid var(--line);
    animation: fade .18s ease;
  }
}

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 2px auto 14px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-body { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.form { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 10px; }

.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  appearance: none;
  width: 100%;
  /* under 16px, iOS Safari zooms the whole page when the field is focused */
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* iOS renders empty date/time inputs oddly without this */
input[type="date"], input[type="time"] { -webkit-appearance: none; min-height: 48px; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; }

.form-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--danger);
}

.paste-box {
  appearance: none;
  width: 100%;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  resize: none;
  /* long share links should wrap rather than run off the side */
  word-break: break-all;
}

.paste-box:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.sheet-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.spacer { flex: 1; }

.import-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.import-list li {
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
}

.import-list li span { color: var(--muted); font-size: 12px; }

/* ---------- celebrate ---------- */
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  animation: fade .3s ease;
}

.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.celebrate-inner { position: relative; text-align: center; padding: 24px; }

.celebrate-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.celebrate-title {
  margin: 0;
  font-size: clamp(40px, 15vw, 76px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--accent);
}

.celebrate-sub { margin: 14px 0 26px; font-size: 15px; color: var(--muted); }

.scuba-cat {
  display: block;
  width: min(220px, 58vw);
  height: auto;
  margin: 0 auto 8px;
  mix-blend-mode: lighten;
  animation: scuba-dance .55s ease-in-out infinite;
  transform-origin: 50% 80%;
}

@keyframes scuba-dance {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  25% { transform: translateY(-12px) rotate(5deg); }
  50% { transform: translateY(0) rotate(-4deg); }
  75% { transform: translateY(-10px) rotate(7deg); }
}

.day-confetti {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.day-confetti span {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 5px;
  border-radius: 1px;
  background: var(--accent);
  animation: day-fall linear infinite;
}

.day-confetti span:nth-child(3n) { background: #ffd166; }
.day-confetti span:nth-child(3n+1) { background: #7ee0c1; }
.day-confetti span:nth-child(3n+2) { background: #8ab6ff; }

@keyframes day-fall {
  from { transform: translateY(0) rotate(0deg); opacity: 1; }
  to { transform: translateY(110vh) rotate(240deg); opacity: 0.85; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  transform: translateX(-50%);
  top: calc(18px + env(safe-area-inset-top));
  bottom: auto;
  padding: 16px 28px;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px rgba(255, 84, 112, 0.38);
  animation: toast-drop .22s ease;
  transition: opacity .2s ease;
}

.toast.is-out { opacity: 0; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
/* keeps the centring transform, which a plain translateY would wipe out */
@keyframes toast-drop {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .scuba-cat { animation: none; }
  .day-confetti { display: none !important; }
}
