/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:          #fdf6f0;
  --color-surface:     #ffffff;
  --color-primary:     #c9607a;
  --color-primary-dk:  #a8485f;
  --color-secondary:   #9b7fb6;
  --color-secondary-lt:#ede3f5;
  --color-accent:      #f2a7b8;
  --color-text:        #3a2a30;
  --color-text-muted:  #8a7078;
  --color-border:      #edd8de;
  --color-success:     #7ab89b;
  --color-error:       #c0455a;

  --radius-sm:  8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(180, 80, 100, 0.08);
  --shadow-md: 0 4px 20px rgba(180, 80, 100, 0.12);
  --shadow-lg: 0 8px 40px rgba(180, 80, 100, 0.16);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Mono", "Cascadia Code", Consolas, monospace;

  --transition: 0.25s ease;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 3rem;
}

/* ── Header ── */
.app-header {
  width: 100%;
  background: linear-gradient(135deg, #f8d7df 0%, #e8d0f0 100%);
  padding: 0.75rem 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(180, 80, 100, 0.10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.header-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary-dk);
  letter-spacing: 0.02em;
}

.header-icon {
  color: var(--color-primary);
  font-size: 1rem;
  animation: heartbeat 2.4s ease-in-out infinite;
}

.notification-bell {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
}

.notification-bell:hover {
  background: rgba(201, 96, 122, 0.15);
}

.notification-bell[hidden] { display: none; }

.notification-nudge {
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #fff5f7 0%, #f3edf7 100%);
  border: 1px dashed var(--accent);
  border-radius: 0.75rem;
  text-align: center;
}

.notification-nudge[hidden] { display: none; }

.notification-nudge .btn {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.app-header {
  position: relative;
}

.participants-display {
  font-size: 0.8rem;
  text-align: center;
  color: var(--color-primary-dk);
  padding: 0.2rem 0 0;
  opacity: 0.85;
}

.participants-display[hidden] {
  display: none;
}

.my-name {
  font-weight: 700;
}

.partner-name {
  font-weight: 700;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.2); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.15); }
  56%       { transform: scale(1); }
}

/* ── Invite Banner ── */
.invite-banner {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #fff0f4 0%, #f3eafc 100%);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.82rem;
}

.invite-banner[hidden] {
  display: none;
}

.invite-label {
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.invite-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.btn-icon-sm {
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
}

.copy-feedback-inline {
  font-size: 0.78rem;
  color: var(--color-success);
  font-weight: 600;
  animation: fadeSlideIn 0.2s ease;
}

/* ── Carousel ── */
#screen-carousel {
  max-width: 100%;
  padding: 0;
}
.carousel-container {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  font-family: 'Playfair Display', 'Georgia', serif;
}
.carousel-slides {
  display: flex;
  width: 100%;
  height: 100%;
  /* transition set by JS for infinite loop control */
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 3.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
}
.carousel-slide .slide-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,100,150,0.12) 0%, transparent 60%);
}
.carousel-slide .slide-logo {
  position: absolute;
  top: max(1.5rem, env(safe-area-inset-top, 1rem));
  left: 50%;
  transform: translateX(-50%);
  height: 56px;
  width: auto;
  z-index: 2;
  pointer-events: none;
}
.carousel-slide .slide-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  font-family: 'Inter', var(--font-base);
}
.carousel-slide .slide-headline {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  max-width: 480px;
}
.carousel-slide .slide-headline .pop {
  color: var(--carousel-accent, #ff8a65);
}
.carousel-slide .slide-subline {
  font-family: 'Inter', var(--font-base);
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 420px;
}
.carousel-slide .slide-cta {
  background: linear-gradient(135deg, #ff6b6b, #e74c8b, #9b59b6);
  color: #fff;
  font-family: 'Inter', var(--font-base);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  border: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 8px 30px rgba(231,76,139,0.35);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.carousel-slide .slide-cta:active {
  transform: scale(0.97);
}
.carousel-dots {
  position: absolute;
  bottom: max(2rem, env(safe-area-inset-bottom, 1rem));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.carousel-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.carousel-nav-btn:hover { background: rgba(255,255,255,0.2); }
#carousel-prev { left: 0.75rem; }
#carousel-next { right: 0.75rem; }
.carousel-skip-btn {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top, 0.5rem));
  right: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', var(--font-base);
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  z-index: 5;
  transition: color 0.2s;
}
.carousel-skip-btn:hover { color: rgba(255,255,255,0.8); }

/* ── Screens ── */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  padding: 1.5rem 1rem 2rem;
  gap: 1rem;
  animation: fadeSlideIn var(--transition);
}

.screen.active {
  display: flex;
}

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

/* ── Cards ── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

/* ── Landing ── */
.hero-card {
  background: linear-gradient(135deg, #fff0f4 0%, #f3eafc 100%);
  border-color: var(--color-accent);
  text-align: center;
  padding: 2rem 1.5rem;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.app-subtitle {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.hero-stats {
  margin-bottom: 1.25rem;
  text-align: center;
}

.hero-counter {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.hero-counter-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.hero-counter-label {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.hero-proof-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-proof-points li {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.hero-proof-points li::before {
  content: "✓ ";
  color: var(--color-success);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.hero-secondary-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.hero-secondary-ctas .btn {
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-secondary-ctas .btn:hover {
  color: var(--color-primary);
}

.hero-cta-divider {
  color: var(--color-border);
  font-size: 0.9rem;
}

.hero-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  text-align: left;
}

.hero-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.6rem;
}

.hero-link {
  width: 100%;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-link:hover {
  color: var(--color-primary);
}

/* ── Landing Sections ── */
.landing-section {
  width: 100%;
  padding: 0.25rem 0;
}
.landing-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

/* How it works */
.how-it-works {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.how-it-works li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.4;
}
.hiw-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Sample question */
.sample-card {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  padding: 1rem 1.25rem;
}
.sample-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}
.sample-question {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
}
.sample-explanation {
  padding: 0.75rem 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.sample-explanation p {
  margin: 0;
}
.sample-reflection-card {
  background: linear-gradient(135deg, #f9f4ff 0%, #fff0f4 100%);
  border: 1.5px solid var(--color-accent);
  padding: 1rem 1.25rem;
}
.sample-reflection {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.55;
  margin: 0;
}
.sample-reflection p {
  margin: 0 0 0.6rem;
}
.sample-reflection p:last-child {
  margin-bottom: 0;
}
.sample-reflection strong {
  color: var(--color-primary-dk);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sample-style-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-secondary);
  background: var(--color-secondary-lt);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.4rem;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
}

/* Social proof / counter */
.social-proof {
  text-align: center;
  margin-bottom: 0.75rem;
}
.proof-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.proof-points li {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.4;
}
.proof-points li::before {
  content: "~";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 600;
}

/* Trust / privacy */
.trust-section {
  padding-bottom: 0.5rem;
}
.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.trust-list li {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding-left: 1.4rem;
  position: relative;
}
.trust-list li::before {
  content: "~";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 600;
}

/* ── Privacy Grid (How It Works) ── */
.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.privacy-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  text-align: center;
}
.privacy-icon {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}
.privacy-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
}
.privacy-desc {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .privacy-grid { grid-template-columns: 1fr; }
}

/* ── FAQ Inline (How It Works) ── */
.faq-section-inline {
  margin-top: 1rem;
}
.faq-item {
  margin-bottom: 1.25rem;
}
.faq-q {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
}
.faq-a {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
}

/* ── Landing Menu ── */
.landing-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.landing-menu-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
  background: var(--color-card);
  cursor: pointer;
  text-align: left;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.landing-menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.landing-menu-btn:active {
  transform: translateY(0);
}
.landing-menu-btn--primary {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, #fff0f4 0%, #f9f4ff 100%);
}
.landing-menu-btn--primary:hover {
  border-color: var(--color-primary);
}
.landing-menu-btn--secondary {
  border-color: var(--color-border);
}
.landing-menu-btn--secondary:hover {
  border-color: var(--color-accent);
}
.landing-menu-btn--ghost {
  border-color: transparent;
  background: transparent;
}
.landing-menu-btn--ghost:hover {
  background: var(--color-card);
  border-color: var(--color-border);
}

.landing-menu-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}
.landing-menu-text {
  flex: 1;
  min-width: 0;
}
.landing-menu-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  display: block;
  line-height: 1.2;
}
.landing-menu-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: block;
  line-height: 1.3;
  margin-top: 0.15rem;
}

/* ── Sub-screen header (back + title) ── */
.sub-screen-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.875rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* ── Pack Accordion ── */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.pack-accordion {
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.15s;
}
.pack-accordion:last-child { border-bottom: none; }

.pack-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  transition: background 0.15s;
}
.pack-row:hover { background: rgba(201, 96, 122, 0.04); }

.pack-row-icon { font-size: 1.1rem; flex-shrink: 0; }
.pack-row-name { font-size: 0.88rem; font-weight: 600; color: var(--color-text); flex: 1; }
.pack-row-count { font-size: 0.72rem; color: var(--color-text-muted); white-space: nowrap; }
.pack-row-stars { font-size: 0.7rem; color: #d4a020; white-space: nowrap; }
.pack-row-arrow {
  font-size: 0.7rem; color: var(--color-text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.pack-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}
.pack-tag-paid { background: #fff3cd; color: #856404; }
.pack-tag-locked { background: var(--color-surface); color: var(--color-text-muted); }

/* Open state */
.pack-accordion.open .pack-row-arrow { transform: rotate(90deg); }
.pack-accordion.open .pack-row { background: rgba(201, 96, 122, 0.04); }

/* Selected state */
.pack-accordion.selected {
  background: rgba(201, 96, 122, 0.06);
}
.pack-accordion.selected .pack-row-name { color: var(--color-primary); }
.pack-accordion.selected .pack-row {
  border-left: 3px solid var(--color-primary);
  padding-left: calc(0.75rem - 3px);
}

/* Unavailable */
.pack-accordion.unavailable { opacity: 0.65; }
.pack-accordion.unavailable .pack-row:hover { background: transparent; }

/* Detail panel (collapsed by default) */
.pack-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 0.75rem;
}
.pack-accordion.open .pack-detail {
  max-height: 200px;
  padding: 0 0.75rem 0.6rem;
}
.pack-accordion.paid-pack.open .pack-detail {
  max-height: 500px;
}

.pack-detail-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0 0 0.3rem;
  line-height: 1.4;
}

.pack-lang-chips {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.lang-chip {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--color-text-muted);
}

.lang-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.lang-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.pack-detail-select {
  font-size: 0.78rem;
  color: var(--color-primary);
  font-weight: 600;
}

.pack-detail-paid {
  font-size: 0.78rem;
  color: #856404;
  background: #fff8e1;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  margin: 0.3rem 0 0;
}

.pack-detail-locked {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0.3rem 0 0;
}

/* Paid message banner */
.paid-pack-message { margin-top: 0.75rem; }
.paid-pack-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border: 1px solid #d4a843;
  border-radius: 12px;
  color: #5d4e37;
  font-size: 0.88rem;
  line-height: 1.5;
}
.paid-pack-banner .paid-icon { font-size: 1.5rem; flex-shrink: 0; }
.paid-pack-message[hidden] { display: none; }

/* Purchase section within paid pack detail */
.pack-purchase-section {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.btn-purchase {
  background: linear-gradient(135deg, #f6d365, #fda085);
  color: #5a3e00;
  font-weight: 700;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  transition: opacity 0.2s;
}
.btn-purchase:hover { opacity: 0.85; }
.btn-purchase:disabled { opacity: 0.5; cursor: not-allowed; }
.unlock-code-toggle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  cursor: pointer;
}
.unlock-code-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.unlock-code-section[hidden] { display: none; }
.unlock-code-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  width: 100%;
  margin: 0;
}
.unlock-code-input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.btn-unlock-apply {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-unlock-apply:disabled { opacity: 0.5; }
.unlock-code-status {
  width: 100%;
  font-size: 0.78rem;
  margin: 0;
}
.unlock-code-valid { color: #2e7d32; }
.unlock-code-invalid { color: #c62828; }
.unlock-code-status[hidden] { display: none; }

/* ── Pack Browser (Netflix-style) ── */
.pack-filter-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pack-filter-chips::-webkit-scrollbar { display: none; }

.pack-chip {
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.pack-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.pack-chip.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.pack-scroll-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pack-tag-row-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.4rem;
  padding-left: 0.15rem;
}

.pack-tag-row-scroll {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pack-tag-row-scroll::-webkit-scrollbar { display: none; }

.pack-card {
  flex-shrink: 0;
  width: 148px;
  min-height: 180px;
  border-radius: 14px;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  cursor: pointer;
  position: relative;
  color: white;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.pack-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.pack-card:active { transform: scale(0.97); }

.pack-card-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  margin-bottom: 0.15rem;
}

.pack-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  word-wrap: break-word;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  letter-spacing: -0.01em;
}

.pack-card-desc {
  font-size: 0.62rem;
  line-height: 1.3;
  opacity: 0.8;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  margin-top: -0.1rem;
}

.pack-card-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.62rem;
  opacity: 0.8;
  margin-top: auto;
}

.pack-card-langs {
  font-size: 0.55rem;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.pack-card-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  color: var(--color-primary);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.pack-card.selected .pack-card-check { display: flex; }

.pack-card-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.6rem;
  background: rgba(255, 255, 255, 0.25);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.pack-selected-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(201, 96, 122, 0.08);
  border: 1.5px solid var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.pack-selected-badge[hidden] { display: none; }
.pack-selected-badge .badge-lang {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: auto;
}

/* ── Detail Bottom Sheet ── */
.pack-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.pack-sheet-overlay[hidden] { display: none; }

.pack-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s;
}
.pack-sheet-overlay:not([hidden]) .pack-sheet-backdrop { opacity: 1; }

.pack-sheet-content {
  position: relative;
  background: var(--color-surface);
  border-radius: 16px 16px 0 0;
  padding: 0.5rem 1.25rem 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.pack-sheet-overlay:not([hidden]) .pack-sheet-content { transform: translateY(0); }

.pack-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin: 0 auto 1rem;
}

.pack-sheet-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pack-sheet-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pack-sheet-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.pack-sheet-stars {
  font-size: 0.8rem;
  color: #d4a020;
}

.pack-sheet-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.pack-sheet-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* Desktop: centered modal instead of bottom sheet */
@media (min-width: 600px) {
  .pack-sheet-overlay {
    justify-content: center;
    align-items: center;
  }
  .pack-sheet-content {
    border-radius: 16px;
    max-width: 420px;
    max-height: 80vh;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
  }
  .pack-sheet-overlay:not([hidden]) .pack-sheet-content {
    transform: translateY(0);
    opacity: 1;
  }
  .pack-sheet-handle { display: none; }
}

input[type="text"],
textarea {
  width: 100%;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(201, 96, 122, 0.15);
  background: #fff;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #c5b3b9;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

textarea.locked {
  opacity: 0.7;
  cursor: default;
  resize: none;
}

/* ── Divider ── */
.divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(201, 96, 122, 0.30);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dk);
  box-shadow: 0 4px 16px rgba(201, 96, 122, 0.40);
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(155, 127, 182, 0.28);
}
.btn-secondary:hover:not(:disabled) {
  background: #7d64a0;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--color-secondary-lt);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-icon {
  background: var(--color-secondary-lt);
  color: var(--color-secondary);
  border: 1.5px solid transparent;
  padding: 0.5rem 0.65rem;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
}
.btn-icon:hover { background: #ddd0ef; }

.btn-full { width: 100%; }

.btn-sm {
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
}

/* ── Error messages ── */
.error-message {
  color: var(--color-error);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: #fde8ec;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

/* ── Waiting screen ── */
.waiting-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.waiting-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.waiting-card h2 {
  font-size: 1.4rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.waiting-hint {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.session-code-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff0f4;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
}

.session-code {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-primary);
}

.copy-feedback {
  font-size: 0.82rem;
  color: var(--color-success);
  font-weight: 600;
  margin-top: 0.25rem;
  animation: fadeSlideIn 0.2s ease;
}

/* Pulse ring animation */
.pulse-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--color-accent);
  margin: 1.5rem auto 0;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0%   { transform: scale(0.8); opacity: 0.8; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* ── Question screen ── */
.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0.25rem;
}

.q-progress {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.turn-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.turn-badge.your-turn {
  background: #fff0f4;
  color: var(--color-primary);
  border: 1.5px solid var(--color-accent);
}

.turn-badge.their-turn {
  background: var(--color-secondary-lt);
  color: var(--color-secondary);
  border: 1.5px solid #c9b0e4;
}

.question-card {
  background: linear-gradient(135deg, #fff6f8 0%, #f8f3fc 100%);
  border-color: var(--color-accent);
  padding: 2rem 1.5rem;
}

.question-text {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--color-text);
  font-style: italic;
}

.answer-card { padding: 1.25rem 1rem; }
@media (min-width: 480px) {
  .answer-card { padding: 1.25rem 1.5rem; }
}

.answer-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.style-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin-top: 0.75rem;
}
.style-picker-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.style-picker-select {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
}

.answer-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.875rem;
  justify-content: flex-end;
}

/* ── Partner Presence Indicator ── */
.partner-presence {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  transition: opacity 0.3s;
}
.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.3s;
}
.presence-dot.online { background: #4caf50; box-shadow: 0 0 4px #4caf5088; }
.presence-dot.typing { background: #ff9800; box-shadow: 0 0 4px #ff980088; animation: presencePulse 1s ease-in-out infinite; }
.presence-dot.offline { background: #999; }
@keyframes presencePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.waiting-partner-card {
  text-align: center;
  padding: 1.75rem;
  background: var(--color-secondary-lt);
  border-color: #c9b0e4;
  color: var(--color-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.partner-pulse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 0.75rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-secondary);
  animation: dotBounce 1.3s ease-in-out infinite;
}
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.30s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%           { transform: translateY(-8px); opacity: 1; }
}

.question-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 0.25rem;
}

/* ── Analysis screen ── */
.analysis-header {
  text-align: center;
  padding: 0.5rem 0;
}

.analysis-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  animation: sparkle 1.5s ease-in-out;
}

@keyframes sparkle {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.analysis-header h2 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
}

.analysis-subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.analysis-card {
  background: linear-gradient(135deg, #fff6f8 0%, #f3eafc 100%);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.analysis-text .llm-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 1.25rem 0 0.4rem;
}
.analysis-text .llm-heading:first-child {
  margin-top: 0;
}
.analysis-text p {
  margin-bottom: 0.6rem;
}

.analysis-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.analysis-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

/* ── Share card ── */
.share-card-wrapper {
  width: 100%;
  margin: 1rem 0;
  text-align: center;
}

.share-card-wrapper canvas {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.share-card-wrapper[hidden] { display: none; }

/* ── History screen ── */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0.25rem;
}

.history-header h2 {
  font-size: 1.2rem;
  color: var(--color-text);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
}

.history-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.history-q-num {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.history-q-text {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.history-answer-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.history-answer-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.history-answer-text {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.5;
}

.history-answer-text.skipped {
  color: var(--color-text-muted);
  font-style: italic;
}

.history-analysis {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.history-analysis-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-secondary);
  margin-bottom: 0.3rem;
}

.empty-hint {
  color: var(--color-text-muted);
  text-align: center;
  padding: 2rem;
  font-size: 0.95rem;
}

/* ── Completed screen ── */
.completed-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, #fff0f4 0%, #f3eafc 100%);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
}

.completed-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.completed-card h2 {
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.completed-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* ── QR Code ── */
.waiting-qr-container {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.waiting-qr-container canvas {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.share-buttons a, .share-buttons button {
  text-decoration: none;
}

.save-reminder {
  font-size: 0.78rem;
  color: var(--color-primary);
  background: #fff0f4;
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  text-align: center;
  font-weight: 500;
}

.qr-icon {
  font-size: 1rem;
}

/* ── QR Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 42, 48, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.modal-content h3 {
  font-size: 1.1rem;
  color: var(--color-text);
}

.modal-content canvas {
  border-radius: var(--radius-sm);
}

.qr-hint {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ── Global counter ── */
.global-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(201, 96, 122, 0.08);
  border-radius: 999px;
}

.global-counter[hidden] { display: none; }

.counter-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary);
}

.counter-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.faq-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.faq-link:hover { opacity: 1; text-decoration: underline; }

/* ── Category stars ── */
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.category-stars {
  font-size: 0.8rem;
  color: #e0c060;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.category-stars .rating-count {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-left: 0.2rem;
}

/* ── Star rating ── */
.rating-card {
  text-align: center;
  padding: 1.5rem;
}

.rating-prompt {
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.star-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-border);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  padding: 0.1rem;
  line-height: 1;
}

.star-btn:hover {
  transform: scale(1.2);
}

.star-btn.active {
  color: #e0c060;
}

.star-btn.hover {
  color: #f0d060;
}

.rating-thanks {
  font-size: 0.85rem;
  color: var(--color-success);
  font-weight: 600;
  margin-top: 0.5rem;
  animation: fadeSlideIn 0.3s ease;
}

.rating-thanks[hidden] { display: none; }

/* ── Style badge ── */
.style-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--color-secondary-lt);
  color: var(--color-secondary);
  border: 1px solid #c9b0e4;
  vertical-align: middle;
  margin-left: 0.3rem;
  text-transform: none;
  font-style: normal;
}

/* ── Feedback thumbs ── */
.feedback-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.feedback-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-right: auto;
}

.feedback-btn {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  line-height: 1;
}

.feedback-btn:hover {
  background: var(--color-secondary-lt);
  border-color: var(--color-secondary);
  transform: scale(1.15);
}

.feedback-btn.selected {
  background: var(--color-secondary-lt);
  border-color: var(--color-secondary);
}

.feedback-btn.selected-up {
  background: #e6f7ee;
  border-color: var(--color-success);
}

.feedback-btn.selected-down {
  background: #fde8ec;
  border-color: var(--color-error);
}

.feedback-thanks {
  font-size: 0.78rem;
  color: var(--color-success);
  font-weight: 600;
  animation: fadeSlideIn 0.2s ease;
}

.feedback-thanks[hidden] { display: none; }

/* ── Thinking overlay ── */
.thinking-overlay {
  position: fixed;
  inset: 0;
  background: rgba(253, 246, 240, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.3s ease;
}

.thinking-overlay[hidden] { display: none; }

.thinking-content {
  text-align: center;
  padding: 2rem;
}

.thinking-brain {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin-bottom: 1.5rem;
}

.brain-icon {
  font-size: 2.8rem;
  z-index: 1;
  animation: brainPulse 2s ease-in-out infinite;
}

@keyframes brainPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.thinking-rings {
  position: absolute;
  inset: 0;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  opacity: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ringExpand 2.4s ease-out infinite;
}

.ring-1 { width: 40px; height: 40px; animation-delay: 0s; }
.ring-2 { width: 40px; height: 40px; animation-delay: 0.8s; }
.ring-3 { width: 40px; height: 40px; animation-delay: 1.6s; }

@keyframes ringExpand {
  0%   { width: 40px; height: 40px; opacity: 0.6; }
  100% { width: 120px; height: 120px; opacity: 0; }
}

.thinking-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.thinking-subtext {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  animation: thinkingDots 1.5s steps(4) infinite;
}

@keyframes thinkingDots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* ── Toast notification ── */
.toast-notification {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.4s ease;
  max-width: 90vw;
  text-align: center;
}
.toast-notification.show {
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive tweaks ── */
@media (max-width: 400px) {
  .session-code { font-size: 1.3rem; }
  .question-text { font-size: 1.05rem; }
  .app-title { font-size: 1.4rem; }
}
