:root {
  --bg-dark: #0a0705;
  --bg-card: rgba(24, 17, 12, 0.86);
  --bg-card-solid: #18110c;
  --bg-elevated: rgba(38, 27, 18, 0.92);
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;
  --gold-glow: rgba(245, 158, 11, 0.45);
  --copper: #ea580c;
  --green: #10b981;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a855f7;
  --text-main: #fffbeb;
  --text-muted: #d6c5b3;
  --text-dim: #9c8773;
  --border-gold: rgba(251, 191, 36, 0.24);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* AMBIENT GÖTAFORS BACKGROUND */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-photo {
  position: absolute;
  inset: -20px;
  background-image: url('/assets/bg/gotafors1.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.2) brightness(0.32);
  transform: scale(1.06);
  transition: background-image 1s ease;
}

.ambient-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10, 7, 5, 0.65) 0%, rgba(10, 7, 5, 0.92) 55%, #0a0705 100%);
}

.bubbles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.beer-bubble {
  position: absolute;
  bottom: -20px;
  background: radial-gradient(circle, rgba(252, 211, 77, 0.55) 0%, rgba(245, 158, 11, 0.1) 70%);
  border-radius: 50%;
  animation: riseBubble linear infinite;
}

@keyframes riseBubble {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  20% { opacity: 0.65; }
  80% { opacity: 0.45; }
  100% { transform: translateY(-105vh) scale(1.25); opacity: 0; }
}

/* ================= 1. SPLASH SCREEN ================= */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, rgba(10, 7, 5, 0.55) 0%, rgba(10, 7, 5, 0.94) 75%, #0a0705 100%),
    url('/assets/bg/gotafors2.jpg') center/cover no-repeat;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

.splash-inner {
  width: 100%;
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: splashPop 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes splashPop {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--amber-300);
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.splash-logo-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-glow {
  position: absolute;
  inset: -16px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.55) 0%, rgba(234, 88, 12, 0.2) 55%, transparent 75%);
  filter: blur(18px);
  animation: pulseGlow 2.6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.95); opacity: 0.75; }
  50% { transform: scale(1.08); opacity: 1; }
}

.splash-logo {
  position: relative;
  width: 210px;
  height: 210px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.75), 0 0 0 4px rgba(251, 191, 36, 0.5);
  animation: floatLogo 3.5s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

.splash-title {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(245, 158, 11, 0.5);
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber-300);
  margin-bottom: 28px;
}

.splash-loader {
  width: 180px;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 18px;
}

.splash-pw-box {
  width: 100%;
  margin-bottom: 14px;
  text-align: center;
}

.splash-pw-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--amber-300);
  margin-bottom: 8px;
}

.splash-pw-input {
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(251, 191, 36, 0.5);
}

.splash-pw-error {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 6px 12px;
  border-radius: 10px;
}

@keyframes shakePw {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.splash-pw-box.shake {
  animation: shakePw 0.35s ease;
}

.splash-loader-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--amber-500), #fff, var(--amber-400));
  transform-origin: left;
  animation: loadFill 1.2s ease-out forwards;
}

@keyframes loadFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ================= BUTTONS & INPUTS ================= */
.btn-primary {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: #140c04;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 55%, #ea580c 100%);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  appearance: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--amber-300);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  width: 100%;
  transition: transform 0.14s ease, background 0.14s ease;
}

.btn-secondary:active {
  transform: scale(0.97);
  background: rgba(245, 158, 11, 0.22);
}

.btn-giant {
  font-size: 17px;
  padding: 18px 26px;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--amber-300);
  margin: 14px 0 6px;
  text-transform: uppercase;
}

.text-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.text-input:focus {
  border-color: var(--amber-400);
  background: rgba(255, 255, 255, 0.1);
}

/* ================= APP SHELL & STICKY TOP HEADER ================= */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 102px;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 8, 5, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-mini-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.brand-mini-title {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
}

.brand-mini-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber-400);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Profile Switcher Pill */
.profile-switcher-pill {
  appearance: none;
  border: 1px solid var(--border-gold);
  background: rgba(245, 158, 11, 0.12);
  color: #fff;
  padding: 6px 11px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  max-width: 195px;
  transition: transform 0.14s ease, background 0.14s ease;
}

.profile-switcher-pill:active {
  transform: scale(0.95);
}

.pill-avatar {
  font-size: 20px;
  line-height: 1;
}

.pill-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

.pill-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 115px;
}

.pill-sub {
  font-size: 9px;
  color: var(--amber-300);
  font-weight: 600;
}

.pill-chevron {
  font-size: 11px;
  color: var(--amber-400);
}

/* ALWAYS-VISIBLE LIVE STATUS BANNER */
.live-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(234, 88, 12, 0.18) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.35s ease;
}

.live-status-banner.status-theme-promenad {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.26) 0%, rgba(29, 78, 216, 0.2) 100%);
  border-color: rgba(96, 165, 250, 0.55);
}
.live-status-banner.status-theme-kop {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.26) 0%, rgba(5, 150, 105, 0.2) 100%);
  border-color: rgba(52, 211, 153, 0.55);
}
.live-status-banner.status-theme-drick {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32) 0%, rgba(217, 119, 6, 0.24) 100%);
  border-color: rgba(251, 191, 36, 0.7);
}
.live-status-banner.status-theme-ga {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(185, 28, 28, 0.28) 100%);
  border-color: rgba(248, 113, 113, 0.8);
  animation: urgentPulse 1.4s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 22px 4px rgba(239, 68, 68, 0.45); }
}

.live-stop-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber-300);
  text-transform: uppercase;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: blinkDot 1.2s infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.live-stop-name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #fff;
  margin-top: 2px;
}

.live-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 8px 13px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.broadcast-ribbon {
  margin-top: 8px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px dashed var(--amber-400);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* PUSH BANNER */
.push-banner {
  margin: 12px 14px 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 88, 12, 0.15));
  border: 1px solid var(--amber-400);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.push-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.push-banner-icon {
  font-size: 22px;
}

.push-banner-text {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--text-muted);
}

.push-banner-text strong {
  color: #fff;
  font-size: 13px;
}

.btn-push-activate {
  border: none;
  background: var(--amber-400);
  color: #140c04;
  font-weight: 800;
  font-size: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.ios-push-tip {
  margin: 10px 14px 0;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 12px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #dbeafe;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tip-close {
  background: none;
  border: none;
  color: #93c5fd;
  font-size: 14px;
  cursor: pointer;
}

/* ================= MAIN CONTENT & TABS ================= */
.main-content {
  padding: 14px;
}

.tab-view {
  display: none;
  animation: fadeTab 0.25s ease;
}

.tab-view.active {
  display: block;
}

@keyframes fadeTab {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HERO STAGE CARD */
.hero-stage-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1.5px solid var(--border-gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  margin-bottom: 24px;
}

.hero-stage-bg {
  position: absolute;
  inset: 0;
  background: url('/assets/bg/gotafors2.jpg') center/cover no-repeat;
  filter: brightness(0.45) contrast(1.1);
  transform: scale(1.03);
  transition: background-image 0.6s ease;
}

.hero-stage-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 7, 5, 0.3) 0%, rgba(10, 7, 5, 0.85) 65%, rgba(15, 10, 6, 0.97) 100%);
}

.hero-stage-content {
  position: relative;
  z-index: 1;
  padding: 20px 18px;
}

.hero-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber-300);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-gold);
  padding: 5px 10px;
  border-radius: 99px;
}

.hero-stamp-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.hero-stamp-pill.done {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  color: #6ee7b7;
}

.hero-stop-title {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 0.96;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.hero-stop-Address {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 16px;
}

.hero-status-box {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.hero-status-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--amber-300);
  margin-bottom: 4px;
}

.hero-status-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.hero-status-emoji {
  font-size: 30px;
}

.hero-status-word {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 0.04em;
  color: var(--amber-400);
}

.hero-status-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-hero-action {
  width: 100%;
  border: none;
  cursor: pointer;
  padding: 15px 18px;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 15px;
  color: #140c04;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35);
}

/* SECTION HEADINGS */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.05em;
  color: var(--amber-300);
}

.section-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.07);
  padding: 4px 10px;
  border-radius: 99px;
}

.btn-mini-outline {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--amber-300);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
}

/* TIMELINE */
.timeline-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.timeline-item.completed {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 26, 20, 0.78);
}

.timeline-item.current {
  border: 2px solid var(--amber-400);
  background: linear-gradient(135deg, rgba(45, 30, 12, 0.95) 0%, rgba(28, 18, 10, 0.95) 100%);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.22);
  transform: scale(1.01);
}

.timeline-item.upcoming {
  opacity: 0.68;
}

.tl-node {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  flex-shrink: 0;
}

.timeline-item.completed .tl-node {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.timeline-item.current .tl-node {
  background: var(--amber-400);
  color: #140c04;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.6);
}

.tl-info {
  flex: 1;
  min-width: 0;
}

.tl-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-name {
  font-weight: 800;
  font-size: 16px;
  color: #fff;
}

.tl-live-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  background: var(--amber-400);
  color: #140c04;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
}

.tl-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.tl-stamp-indicator {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
}

.tl-stamp-indicator.stamped {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* PARTICIPANTS GRID */
.participants-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.participant-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.participant-chip.is-me {
  border-color: var(--border-gold);
  background: rgba(245, 158, 11, 0.1);
}

.p-avatar {
  font-size: 24px;
}

.p-meta {
  flex: 1;
  min-width: 0;
}

.p-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-stamps {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber-400);
}

/* ================= TAB 2: DIGITALA STÄMPLAR ================= */
.stamps-header-card, .gallery-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 16px;
}

.stamps-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stamps-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--amber-400);
  text-transform: uppercase;
}

.stamps-title {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.03em;
  color: #fff;
}

.stamps-counter-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.16);
  border: 2px solid var(--amber-400);
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 12px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--amber-300);
}

.stamps-counter-ring small {
  font-size: 16px;
  color: var(--text-dim);
}

.stamps-instructions {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.stamp-profile-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stamp-prof-tab {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.stamp-prof-tab.active {
  background: var(--amber-400);
  color: #140c04;
  border-color: var(--amber-400);
}

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

.stamp-slot {
  position: relative;
  min-height: 188px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 2px dashed rgba(251, 191, 36, 0.32);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.2s ease;
}

.stamp-slot:active {
  transform: scale(0.97);
}

.stamp-slot.is-current-stop {
  border-color: var(--amber-400);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.2);
}

.stamp-slot.stamped {
  border-style: solid;
  border-color: #10b981;
  background: rgba(16, 32, 24, 0.9);
}

.stamp-slot-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  transition: opacity 0.3s ease;
}

.stamp-slot-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.stamp-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stamp-num-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber-300);
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 8px;
  border-radius: 99px;
}

.stamp-center-icon {
  margin: 14px auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.stamp-slot.stamped .stamp-center-icon {
  background: rgba(16, 185, 129, 0.28);
  border: 2px solid #34d399;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transform: rotate(-8deg);
}

.stamp-wax-seal {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #ecfdf5;
  background: #059669;
  border: 2px solid #6ee7b7;
  padding: 3px 8px;
  border-radius: 6px;
  transform: rotate(-6deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.stamp-stop-name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #fff;
}

.stamp-action-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber-300);
  margin-top: 3px;
}

.stamp-slot.stamped .stamp-action-hint {
  color: #6ee7b7;
}

/* ================= TAB 3: LARS GAHRN ================= */
.lars-stage-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.lars-header-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--amber-300);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid var(--border-gold);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.lars-main-title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
  margin-bottom: 18px;
}

.lars-portrait-stage {
  position: relative;
  width: 210px;
  margin: 0 auto 18px;
  cursor: pointer;
  user-select: none;
}

.lars-aura {
  position: absolute;
  inset: -12px;
  background: conic-gradient(from 0deg, #f59e0b, #ea580c, #fbbf24, #7c2d12, #f59e0b);
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.55;
  animation: spinAura 8s linear infinite;
}

@keyframes spinAura {
  to { transform: rotate(360deg); }
}

.lars-frame {
  position: relative;
  width: 196px;
  height: 196px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #fde047, #b45309);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75);
}

.lars-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lars-photo.talking {
  animation: larsShake 0.48s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes larsShake {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.09) rotate(-5deg); }
  45% { transform: scale(1.12) rotate(5deg); }
  70% { transform: scale(1.06) rotate(-3deg); }
}

.lars-beard-sparkle {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 28px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
}

.lars-tap-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber-300);
  margin-top: 10px;
  letter-spacing: 0.08em;
}

.lars-fact-card {
  background: rgba(10, 7, 5, 0.78);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  border-radius: 20px;
  padding: 18px 16px;
  margin-bottom: 18px;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.lars-fact-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.lars-fact-num {
  color: var(--amber-400);
  font-weight: 700;
}

.lars-fact-tag {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 2px 8px;
  border-radius: 99px;
}

.lars-fact-text {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.48;
  color: #fff;
}

.lars-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================= TAB 4: GALLERY ================= */
.gallery-upload-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.btn-upload-photo {
  margin-top: 0;
}

.gallery-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.photo-card-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.photo-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-author-avatar {
  font-size: 24px;
}

.photo-author-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.photo-stop-tag {
  font-size: 11px;
  color: var(--amber-400);
}

.photo-img-wrap {
  width: 100%;
  max-height: 440px;
  overflow: hidden;
  background: #050302;
  cursor: pointer;
}

.photo-img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.photo-card-footer {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photo-caption {
  font-size: 14px;
  color: var(--text-main);
  flex: 1;
}

.btn-like-photo {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid var(--border-gold);
  color: var(--amber-300);
  padding: 7px 12px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

/* ================= BOTTOM NAVIGATION ================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(12, 8, 5, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-gold);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

.nav-tab {
  position: relative;
  appearance: none;
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-tab.active {
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.12);
}

.nav-icon {
  font-size: 22px;
  line-height: 1;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  background: var(--amber-500);
  color: #140c04;
  padding: 1px 5px;
  border-radius: 99px;
}

/* ================= MODALS & AI SCANNER ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 3, 2, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-card, .scanner-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-card-solid);
  border: 1.5px solid var(--border-gold);
  border-radius: 24px;
  padding: 22px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--amber-400);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: #fff;
}

.icon-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* Profile modal avatar picker & list */
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.avatar-opt {
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 24px;
  cursor: pointer;
}

.avatar-opt.selected {
  border-color: var(--amber-400);
  background: rgba(245, 158, 11, 0.24);
  transform: scale(1.06);
}

.existing-profiles-section {
  margin-bottom: 14px;
}

.section-mini-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.device-profiles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid transparent;
  cursor: pointer;
}

.device-profile-row.active {
  border-color: var(--amber-400);
  background: rgba(245, 158, 11, 0.15);
}

.dp-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-name {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

.dp-tag {
  font-size: 11px;
  color: var(--amber-300);
}

.divider-text {
  text-align: center;
  margin: 14px 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* AI SCANNER HUD (Matappen style) */
.scanner-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber-400);
  letter-spacing: 0.1em;
}

.scanner-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 12px;
}

.scanner-viewport {
  position: relative;
  width: 100%;
  height: 270px;
  border-radius: 18px;
  overflow: hidden;
  background: #050302;
  border: 2px solid var(--amber-400);
  margin-bottom: 14px;
}

.scanner-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #fde047, #10b981, #fde047, transparent);
  box-shadow: 0 0 18px 4px rgba(251, 191, 36, 0.85);
  animation: laserScan 1.9s ease-in-out infinite;
}

@keyframes laserScan {
  0%, 100% { top: 4%; }
  50% { top: 94%; }
}

.scanner-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(251, 191, 36, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 191, 36, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hud-c {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #fde047;
  border-style: solid;
}
.hud-c.tl { top: 10px; left: 10px; border-width: 3px 0 0 3px; }
.hud-c.tr { top: 10px; right: 10px; border-width: 3px 3px 0 0; }
.hud-c.bl { bottom: 10px; left: 10px; border-width: 0 0 3px 3px; }
.hud-c.br { bottom: 10px; right: 10px; border-width: 0 3px 3px 0; }

.scanner-live-chip {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.75);
  color: #fde047;
  border: 1px solid rgba(253, 224, 71, 0.5);
  padding: 4px 10px;
  border-radius: 99px;
}

.scanner-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.scan-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.25s ease;
}

.scan-step.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.scan-step.done {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.scan-step.active .step-dot {
  background: var(--amber-400);
  box-shadow: 0 0 8px var(--amber-400);
}

.scan-step.done .step-dot {
  background: #10b981;
}

/* VERDICT BOX */
.scanner-verdict {
  text-align: center;
  padding-top: 8px;
  animation: fadeTab 0.3s ease;
}

.verdict-stamp-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.08em;
  padding: 6px 20px;
  border-radius: 12px;
  margin-bottom: 10px;
  transform: rotate(-4deg);
}

.verdict-stamp-badge.approved {
  background: rgba(16, 185, 129, 0.22);
  border: 2.5px solid #10b981;
  color: #6ee7b7;
}

.verdict-stamp-badge.rejected {
  background: rgba(239, 68, 68, 0.22);
  border: 2.5px solid #ef4444;
  color: #fca5a5;
}

.verdict-headline {
  font-family: var(--font-display);
  font-size: 28px;
  color: #fff;
  margin-bottom: 12px;
}

.verdict-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.v-metric {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px;
}

.v-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-dim);
}

.v-val {
  font-weight: 800;
  font-size: 14px;
  color: var(--amber-300);
}

.verdict-comment {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.45);
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 16px;
}

/* UPLOAD PREVIEW & LIGHTBOX */
.upload-preview-wrap {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  margin-bottom: 12px;
}

.upload-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-inner {
  position: relative;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -6px;
  z-index: 2;
}

.lightbox-img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 18px;
  border: 1.5px solid var(--border-gold);
}

.lightbox-caption {
  margin-top: 12px;
  font-size: 14px;
  color: #fff;
  background: rgba(0,0,0,0.75);
  padding: 10px 14px;
  border-radius: 12px;
}

/* LIVE TOAST */
.live-alert-toast {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 900;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(135deg, #18110c 0%, #2b1d10 100%);
  border: 2px solid var(--amber-400);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.4);
  animation: toastSlideDown 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toastSlideDown {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-emoji {
  font-size: 32px;
}

.toast-body {
  flex: 1;
}

.toast-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--amber-400);
  letter-spacing: 0.1em;
}

.toast-title {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
}
