/* ============================================
   WHAT NOW? — Life Interest Dashboard
   Theme: Violet dusk — rich purples, warm pinks,
   teal accents, alive but not aggressive
   ============================================ */

:root {
  --bg: #1a1625;
  --bg-raised: #241f33;
  --bg-card: #2d2640;
  --bg-card-hover: #362f4d;
  --bg-input: #1e1930;

  --text: #ede8f5;
  --text-soft: #a99bc4;
  --text-faint: #6e5f8a;

  --purple: #9b72cf;
  --purple-bright: #b88be8;
  --purple-dim: #6a4f96;

  --pink: #e07aad;
  --pink-dim: #9e5578;

  --teal: #5ec4b6;
  --teal-dim: #3d8a7e;

  --amber: #e8b95a;
  --amber-dim: #a68234;

  --coral: #e8846a;

  --border: #3a3250;
  --border-light: #2f2845;

  --shadow-soft: 0 2px 16px rgba(0, 0, 0, 0.3);
  --shadow-lift: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(155, 114, 207, 0.15);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 100px;

  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Space Grotesk', -apple-system, sans-serif;

  --tab-height: 68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tab-height) + 16px);
}

/* Subtle gradient overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(155, 114, 207, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(94, 196, 182, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  position: relative;
  z-index: 1;
}

.view { animation: fadeUp 0.35s ease both; }

/* ---- Greeting ---- */

.greeting { margin-bottom: 2rem; }
.greeting__top { display: flex; justify-content: space-between; align-items: center; }

.greeting__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.greeting__sub {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-top: 0.3rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { color: var(--text-soft); background: var(--bg-raised); }

/* ---- View headers ---- */

.view-header { margin-bottom: 1.5rem; }
.view-header__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
}
.view-header__sub {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-top: 0.2rem;
}

/* ---- Filters ---- */

.filters { margin-bottom: 1.5rem; }
.filter-group { margin-bottom: 1rem; }

.filter-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.pill {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.pill:hover { border-color: var(--purple-dim); color: var(--text); }
.pill.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(155, 114, 207, 0.3);
}

/* Surprise button */

.surprise-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1.5px dashed var(--pink-dim);
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  margin-top: 0.25rem;
}
.surprise-btn:hover {
  background: var(--pink);
  color: #fff;
  border-style: solid;
  box-shadow: 0 0 16px rgba(224, 122, 173, 0.25);
}
.surprise-btn__icon {
  font-size: 1.1rem;
  transition: transform 0.4s ease;
}
.surprise-btn:hover .surprise-btn__icon { transform: rotate(180deg); }

/* ---- Cards ---- */

.results { margin-bottom: 1rem; min-height: 60px; }
.results__hint {
  font-size: 0.92rem;
  color: var(--text-faint);
  font-style: italic;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}
.card:nth-child(6n+1)::before { background: var(--purple-bright); }
.card:nth-child(6n+2)::before { background: var(--teal); }
.card:nth-child(6n+3)::before { background: var(--pink); }
.card:nth-child(6n+4)::before { background: var(--amber); }
.card:nth-child(6n+5)::before { background: var(--coral); }
.card:nth-child(6n+6)::before { background: var(--purple); }

.card:hover, .card:active {
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
  border-color: var(--border);
}

.card__name {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.card__meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.card__tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  color: var(--text-faint);
  border: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card__action {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.card__menu { margin-top: 0.65rem; padding-top: 0.55rem; border-top: 1px solid var(--border-light); }
.card__menu-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.card__menu-item {
  font-size: 0.85rem;
  color: var(--text-soft);
  padding: 0.25rem 0 0.25rem 0.9rem;
  position: relative;
}
.card__menu-item::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--purple-dim);
}

/* Card animations */
.card { animation: cardIn 0.35s ease both; }
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.12s; }
.card:nth-child(4) { animation-delay: 0.18s; }
.card:nth-child(5) { animation-delay: 0.24s; }

.card--surprise {
  animation: surpriseIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border-color: var(--pink-dim);
  box-shadow: var(--shadow-glow);
}

/* ---- Log prompt ---- */

.log-prompt { text-align: center; margin: 0.75rem 0 1.5rem; }
.log-btn {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.6rem 1.8rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--teal-dim);
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  transition: all 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.log-btn:hover { background: var(--teal); color: var(--bg); }
.log-note { font-size: 0.78rem; color: var(--text-faint); margin-top: 0.3rem; }

/* ---- Modal ---- */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 8, 18, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 500;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.75rem;
  width: 100%; max-width: 520px;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.85rem;
}
.modal__interests { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.modal__interest-pill {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.modal__interest-pill.selected {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.modal__notes {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.modal__notes:focus { border-color: var(--purple-dim); }
.modal__notes::placeholder { color: var(--text-faint); }

.modal__actions { display: flex; gap: 0.6rem; margin-top: 0.85rem; }
.modal__save {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--purple);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.modal__save:hover { background: var(--purple-bright); box-shadow: 0 0 12px rgba(155, 114, 207, 0.3); }
.modal__save:disabled { opacity: 0.5; cursor: not-allowed; }
.modal__skip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s;
}
.modal__skip:hover { border-color: var(--text-faint); }

/* ---- Weekly ---- */

.weekly { padding-top: 1.25rem; border-top: 1px solid var(--border-light); }
.weekly__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}
.weekly__item { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.12rem 0; font-size: 0.88rem; color: var(--text-soft); }
.weekly__dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; position: relative; top: -1px; }
.weekly__empty { font-style: italic; color: var(--text-faint); font-size: 0.85rem; }

/* ---- Manage view ---- */

.manage-list { display: flex; flex-direction: column; gap: 0.5rem; }

.manage__group-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  padding-left: 0.25rem;
}

.manage__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.manage__row:hover, .manage__row:active { background: var(--bg-card-hover); border-color: var(--border); }
.manage__row-info { display: flex; flex-direction: column; gap: 0.2rem; }
.manage__row-name { font-weight: 600; font-size: 0.95rem; }
.manage__row-tags { display: flex; gap: 0.3rem; }

.manage__status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.manage__status--active { background: rgba(94, 196, 182, 0.15); color: var(--teal); }
.manage__status--someday { background: rgba(232, 185, 90, 0.15); color: var(--amber); }
.manage__status--paused { background: rgba(110, 95, 138, 0.15); color: var(--text-faint); }

/* Inbox */
.capture__inbox { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border-light); }
.capture__inbox-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }

.manage__inbox { margin-bottom: 0.75rem; }
.manage__inbox-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.manage__inbox-item {
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-soft);
  word-break: break-word;
}
.manage__inbox-empty {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-style: italic;
  padding: 0.4rem 0;
}
.manage__inbox-loading { font-size: 0.85rem; color: var(--text-faint); }
.manage__inbox-refresh {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0;
  margin-top: 0.3rem;
}
.manage__inbox-refresh:hover { color: var(--text-soft); }

.signout-btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.5rem 0 0.5rem;
  display: block;
  margin: 0 auto;
}
.signout-btn:hover { color: var(--text-soft); }

.manage__new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.85rem;
  margin-top: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.2s;
}
.manage__new-btn:hover { border-color: var(--purple-dim); color: var(--purple); }

/* ---- Capture view ---- */

.capture { display: flex; flex-direction: column; gap: 0.85rem; }
.capture__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}
.capture__input:focus { border-color: var(--purple-dim); }
.capture__input::placeholder { color: var(--text-faint); }
.capture__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.capture__targets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.capture__save {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--purple);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}
.capture__save:hover { background: var(--purple-bright); box-shadow: 0 0 12px rgba(155, 114, 207, 0.3); }
.capture__save:disabled { opacity: 0.5; }

/* ---- Bottom sheet ---- */

.sheet {
  position: fixed; inset: 0;
  z-index: 500;
  display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none;
  transition: opacity 0.3s;
  opacity: 0;
}
.sheet[hidden] { display: none; }
.sheet.open { pointer-events: auto; opacity: 1; }

.sheet__overlay {
  position: absolute; inset: 0;
  background: rgba(10, 8, 18, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sheet__content {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1.25rem calc(var(--tab-height) + 4rem);
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-overflow-scrolling: touch;
}
.sheet.open .sheet__content { transform: translateY(0); }

.sheet__handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 1rem;
}

/* ---- Detail view (inside sheet) ---- */

.detail__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.6rem;
}
.detail__status-row { display: flex; gap: 0.4rem; margin-bottom: 0.75rem; }
.detail__status-pill {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s;
}
.detail__status-pill:hover { border-color: var(--text-faint); }
.detail__status-pill--active { color: #fff; }

.detail__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }

.detail__editable { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.detail__edit-group { display: flex; align-items: center; gap: 0.6rem; }
.detail__edit-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  min-width: 50px;
}
.detail__edit-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.detail__edit-pills .pill { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
.detail__section { margin-bottom: 1rem; }
.detail__section-header { display: flex; justify-content: space-between; align-items: center; }
.detail__edit-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--purple);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}
.detail__edit-btn:hover { background: var(--bg-card); color: var(--purple-bright); }
.detail__placeholder { color: var(--text-faint); font-style: italic; }
.detail__editor-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  resize: vertical;
  outline: none;
  line-height: 1.6;
  min-height: 80px;
  transition: border-color 0.2s;
}
.detail__editor-textarea:focus { border-color: var(--purple-dim); }
.detail__editor-actions { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.detail__section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}
.detail__text { font-size: 0.9rem; color: var(--text-soft); line-height: 1.6; }
.detail__text--small { font-size: 0.85rem; }
.detail__text--line { margin-bottom: 0.15rem; }
.detail__subheading {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple-bright);
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
}
.detail__bullet {
  font-size: 0.85rem;
  color: var(--text-soft);
  padding: 0.15rem 0 0.15rem 0.9rem;
  position: relative;
}
.detail__bullet::before { content: '\2022'; position: absolute; left: 0; color: var(--purple-dim); }
.detail__bullet--done { color: var(--text-faint); text-decoration: line-through; }
.detail__bullet strong { color: var(--text); font-weight: 600; }

.detail__menu-item {
  font-size: 0.88rem;
  color: var(--text-soft);
  padding: 0.3rem 0 0.3rem 0.9rem;
  position: relative;
}
.detail__menu-item::before { content: '\2022'; position: absolute; left: 0; color: var(--teal-dim); }

.detail__actions {
  display: flex; gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}
.detail__add-resource-btn, .detail__log-btn {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.detail__add-resource-btn { color: var(--purple); border-color: var(--purple-dim); }
.detail__add-resource-btn:hover { background: var(--purple); color: #fff; }
.detail__log-btn { color: var(--teal); border-color: var(--teal-dim); }
.detail__log-btn:hover { background: var(--teal); color: var(--bg); }

.detail__add-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.detail__add-form-actions { display: flex; gap: 0.5rem; }

/* ---- Interest form ---- */

.view--overlay {
  position: fixed; inset: 0;
  z-index: 450;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.form {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.25rem;
}
.form__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.form__back {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.form__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
}
.form__body { display: flex; flex-direction: column; gap: 1rem; }
.form__label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: -0.5rem;
}
.form__input, .form__textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.form__input:focus, .form__textarea:focus { border-color: var(--purple-dim); }
.form__input::placeholder, .form__textarea::placeholder { color: var(--text-faint); }
.form__textarea { resize: none; line-height: 1.5; }
.form__pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.form__save {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--purple);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}
.form__save:hover { background: var(--purple-bright); box-shadow: 0 0 16px rgba(155, 114, 207, 0.3); }
.form__save:disabled { opacity: 0.5; }

/* ---- Setup ---- */

.setup {
  position: fixed; inset: 0;
  z-index: 600;
  background: rgba(10, 8, 18, 0.8);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.setup[hidden] { display: none; }

.setup__card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.setup__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
}
.setup__sub { font-size: 0.9rem; color: var(--text-soft); }
.setup__help { font-size: 0.82rem; color: var(--text-faint); line-height: 1.5; }
.setup__help a { color: var(--purple-bright); }
.setup__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}
.setup__input:focus { border-color: var(--purple-dim); }
.setup__input::placeholder { color: var(--text-faint); }
.setup__btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--purple);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.setup__btn:hover { background: var(--purple-bright); }
.setup__btn:disabled { opacity: 0.5; }
.setup__skip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  text-align: center;
  padding: 0.3rem;
}
.setup__skip:hover { color: var(--text-soft); }

/* ---- Tab bar ---- */

.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-height);
  background: var(--bg-raised);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tab-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tab-bar__btn--active { color: var(--purple-bright); }
.tab-bar__btn:hover { color: var(--text-soft); }
.tab-bar__btn--active:hover { color: var(--purple-bright); }

/* ---- Toast ---- */

.toast {
  position: fixed;
  bottom: calc(var(--tab-height) + 12px);
  left: 50%; transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.85rem;
  z-index: 700;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: calc(100vw - 2rem);
  box-shadow: var(--shadow-lift);
}
.toast[hidden] { display: none; }
.toast__text { font-size: 0.85rem; line-height: 1.4; }
.toast__close {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  white-space: nowrap;
}

/* ---- Confetti ---- */

.confetti-dot {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 700;
  animation: confetti 0.8s ease-out forwards;
}

/* ---- Animations ---- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes surpriseIn {
  from { opacity: 0; transform: translateY(20px) scale(0.93) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes confetti {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(-60px) rotate(360deg); }
}

/* ---- Responsive ---- */

@media (min-width: 600px) {
  #app { padding: 2.5rem 2rem 3rem; }
  .greeting__title { font-size: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
