/* Screen 13: Tonight / Going Out + post-night rating.
   Before the night: anticipatory, social, a little more glow.
   After the night (.tn-calm): quieter surfaces, fast choices. */

.tn-scroll {
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: var(--nav-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.tn-scroll::-webkit-scrollbar { display: none; }
.tn-content {
  display: flex; flex-direction: column; gap: 18px;
  padding-top: 4px;
  padding-bottom: 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.tn-fine { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.tn-fine svg { flex: none; width: 14px; height: 14px; margin-top: 1px; color: var(--accent-light); }
.tn-text-btn { position: relative; align-self: center; padding: 6px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tn-text-btn::before { content: ""; position: absolute; inset: -8px -6px; }
.tn-pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.tn-pick-text b { font-size: 15px; font-weight: 800; color: var(--fg); }
.tn-pick-text span { font-size: 12.5px; color: var(--muted); font-weight: 500; }

/* ---------- Your night tonight ---------- */
.tn-plan {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #100c1a;
  border: 1px solid rgba(185, 139, 255, 0.4);
  box-shadow: 0 0 40px rgba(157, 92, 255, 0.22);
  isolation: isolate;
}
.tn-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.75; }
.tn-media-scene {
  background:
    radial-gradient(50% 40% at 30% 20%, rgba(255, 46, 154, 0.55), transparent 70%),
    radial-gradient(50% 45% at 75% 35%, rgba(157, 92, 255, 0.7), transparent 70%), #0d0a14;
}
.tn-plan:not(.empty)::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(5, 4, 7, 0.25), rgba(5, 4, 7, 0.7) 45%, rgba(8, 6, 14, 0.96));
}
.tn-plan-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 14px; padding-top: 120px; }
.tn-going-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  box-shadow: 0 0 16px rgba(157, 92, 255, 0.4);
}
.tn-going-badge svg { width: 13px; height: 13px; }
.tn-plan-name {
  margin: 2px 0 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(24px, 8vw, 32px); line-height: 1.05;
  text-transform: uppercase; letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
.tn-plan-meta { margin: 0; font-size: 14px; font-weight: 700; color: #e4def0; }
.tn-plan-peak { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: #cfc8de; }
.tn-plan-peak svg { width: 15px; height: 15px; color: var(--accent-light); }
.tn-plan-peak b { color: var(--fg); }
.tn-plan-shape { margin: 2px 0 0; font-size: 13px; color: var(--accent-light); font-weight: 700; }
.tn-plan-who {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; margin-top: 4px; padding: 6px 12px 6px 8px;
  border-radius: 16px;
  background: rgba(18, 14, 28, 0.75);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; text-align: left;
}
.tn-plan-who > span:nth-child(2) { flex: 1; min-width: 0; }
.tn-plan-who > svg { flex: none; width: 15px; height: 15px; color: var(--muted); }
.tn-faces { display: flex; flex: none; }
.tn-faces img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #120e1c; margin-left: -8px; }
.tn-faces img:first-child { margin-left: 0; }
.tn-plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.tn-plan-actions .btn { min-height: 46px; padding: 0 10px; font-size: 14px; }
.tn-plan-actions .btn:first-child { grid-column: 1 / -1; }

/* no plan yet */
.tn-plan.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 18px 22px; text-align: center;
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(157, 92, 255, 0.24), transparent 70%), var(--surface);
}
.tn-plan.empty .vd-label { align-self: flex-start; }
.tn-empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; margin-top: 6px;
  background: rgba(157, 92, 255, 0.16);
  border: 1px solid rgba(185, 139, 255, 0.4);
  color: var(--accent-light);
}
.tn-empty-icon svg { width: 26px; height: 26px; }
.tn-empty-title { margin: 4px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; text-transform: uppercase; }
.tn-empty-text { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.tn-plan.empty .btn { align-self: stretch; }

/* visibility row */
.tn-visibility {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.tn-visibility > svg:last-child { flex: none; width: 16px; height: 16px; color: var(--muted); }
.tn-visibility .tn-pick-text b { font-size: 14px; }

/* ---------- Where are you thinking? ---------- */
.tn-venues { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.tn-venue {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tn-venue.on { border-color: var(--accent); box-shadow: 0 0 22px rgba(157, 92, 255, 0.28); }
.tn-venue-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.tn-venue-scene {
  flex: none;
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  font-size: 22px;
  background: radial-gradient(70% 70% at 30% 25%, #b13dff, #2a1450 75%);
}
.tn-venue-scene.lvl-trending { background: radial-gradient(70% 70% at 30% 25%, #ff2e9a, #5b1bb0 75%); box-shadow: 0 0 18px rgba(255, 46, 154, 0.35); }
.tn-venue-scene.lvl-high { background: radial-gradient(70% 70% at 30% 25%, #3d8bff, #3a1b8a 75%); }
.tn-venue-scene.lvl-low { background: radial-gradient(70% 70% at 30% 25%, #6a4fa8, #1d1530 75%); }
.tn-venue-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tn-venue-text b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-venue-energy { font-size: 12.5px; font-weight: 700; color: #e4def0; }
.tn-venue-meta { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tn-venue-btn { flex: none; min-height: 40px; padding: 0 12px; border-radius: 13px; font-size: 13px; }
.tn-venue-btn svg { width: 15px; height: 15px; }

/* ---------- Recent nights ---------- */
.tn-nights { display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.tn-night { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; }
.tn-night + .tn-night { border-top: 1px solid var(--line); }
.tn-night > svg { flex: none; width: 15px; height: 15px; color: var(--muted); }
.tn-night-vibe { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #1c1828; color: #d9d5e3; }
.tn-night-vibe.v-amazing { background: var(--accent-soft); color: var(--accent-light); }

/* prototype-only demo control */
.tn-demo {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed #3a3350;
}
.tn-demo p { margin: 0; font-size: 12.5px; color: var(--muted); }
.tn-demo p b { color: #d9d5e3; }
.tn-demo .btn { min-height: 46px; }

/* ---------- After the night (calm) ---------- */
.tn-calm .tn-content { gap: 20px; }
.tn-after-head { display: flex; flex-direction: column; gap: 4px; padding: 4px 2px 0; }
.tn-after-title { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.25; }
.tn-after-when { margin: 0; font-size: 13px; color: var(--accent-light); font-weight: 700; }
.tn-after-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.tn-q { display: flex; flex-direction: column; gap: 10px; }
.tn-q .vd-label { margin: 0; }
.tn-optional { margin-left: 6px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.tn-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-choices .chip { min-height: 40px; }
.tn-choices .chip.on::before { display: none; }
.tn-choice {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; color: #d9d5e3;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tn-choice.on { background: rgba(157, 92, 255, 0.16); border-color: var(--accent-light); color: var(--fg); }
.tn-choice-icon { font-size: 15px; opacity: 0.85; }
.tn-vibe-grid { display: grid; grid-template-columns: 1fr 1fr; }
.tn-vibe-grid .tn-choice { min-height: 54px; font-size: 15px; justify-content: flex-start; padding: 0 14px; }
.tn-scale { display: flex; gap: 8px; }
.tn-dot {
  flex: 1; max-width: 60px; height: 44px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15px; font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tn-dot.on { background: rgba(157, 92, 255, 0.2); border-color: var(--accent-light); color: var(--fg); }
.tn-review {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg); font: inherit; font-size: 15px;
}
.tn-review:focus { outline: none; border-color: var(--accent-light); }
.tn-review::placeholder { color: #6f6884; }
.tn-submit { display: flex; flex-direction: column; gap: 10px; }
.tn-submit .btn[aria-disabled="true"] { opacity: 0.45; box-shadow: none; }
.tn-submit .tn-fine { justify-content: center; text-align: center; }

.tn-thanks { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; text-align: center; }
.tn-thanks .tn-after-title { font-size: 19px; max-width: 26ch; }
.tn-summary {
  align-self: stretch;
  margin: 8px 0 4px; padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
}
.tn-summary-venue { margin: 0 0 10px; font-family: var(--font-display); font-size: 18px; font-weight: 800; text-transform: uppercase; }
.tn-summary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tn-summary li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.tn-summary li span { color: var(--muted); }
.tn-thanks .btn { align-self: stretch; margin-top: 6px; }
.tn-thanks .tn-fine { justify-content: center; }

/* ---------- Shared Tonight sheets ---------- */
.tn-confirm .sf-stack { align-self: stretch; margin-top: 8px; }
.tn-confirm-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(157, 92, 255, 0.18);
  border: 1px solid rgba(185, 139, 255, 0.5);
  color: var(--accent-light);
  box-shadow: 0 0 24px rgba(157, 92, 255, 0.35);
}
.tn-confirm-icon svg { width: 26px; height: 26px; }
.tn-swap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 15px; }
.tn-swap-from { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(143, 136, 163, 0.6); }
.tn-swap-arrow svg { width: 18px; height: 18px; color: var(--accent-light); }
.tn-swap-to { color: var(--accent-light); }
.tn-danger { color: #ff8fa3; }
.tn-pick { min-height: 56px; }
.tn-pick > svg:last-child { flex: none; width: 15px; height: 15px; color: var(--muted); }
.sf-option .tn-pick-text b { font-size: 14.5px; }

.tn-who { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tn-who li + li { border-top: 1px solid var(--line); }
.tn-who-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; text-align: left; }
.tn-who-row img, .tn-who-me { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.tn-who-me { display: grid; place-items: center; font-size: 13px; font-weight: 800; background: linear-gradient(135deg, #ff6fb5, #7a35e8); }
.tn-who-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tn-who-text b { font-size: 15px; font-weight: 800; }
.tn-who-text span { font-size: 12.5px; color: var(--muted); }
.tn-who-match { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; font-weight: 800; color: var(--accent-light); }
.tn-who-match em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.tn-who-more { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: #d9d5e3; }

/* ---------- Entry points on other screens ---------- */
/* Vibe Map: "My night tonight" pill under the header text */
.tn-entry {
  position: relative;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  margin-top: 4px; height: 32px; padding: 0 10px 0 9px;
  border-radius: 999px;
  background: rgba(18, 16, 25, 0.9);
  border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: #e4def0;
}
.tn-entry::before { content: ""; position: absolute; inset: -6px -2px; }
.tn-entry svg { flex: none; width: 15px; height: 15px; color: var(--accent-light); }
.tn-entry svg:last-child { width: 13px; height: 13px; color: var(--muted); }
.tn-entry span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-entry.on { border-color: var(--accent); background: rgba(40, 22, 70, 0.92); box-shadow: 0 0 14px rgba(157, 92, 255, 0.35); }
.tn-entry b { color: var(--fg); }

/* Venue Detail: your rated night */
.vd-your-night { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.vd-your-night svg { width: 14px; height: 14px; color: var(--accent-light); }
.vd-your-night b { color: var(--fg); }
.vd-your-night em { font-style: normal; margin-left: auto; font-size: 12px; }

/* My Profile: Tonight link */
.pf-tonight-link { margin-top: 10px; }

@media (max-width: 350px) {
  .tn-venue-btn { padding: 0 10px; }
  .tn-venue-scene { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-venue, .tn-choice, .tn-dot { transition: none; }
}
