/* ============================================================
   ORDINARY RPG - Master Stylesheet
   BAR ORDINARY Design System
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   0. CUSTOM PROPERTIES (Design Tokens)
   ──────────────────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg-main: #0A0A0A;
  --bg-elevated: #0F0F0F;
  --bg-lighter: #141414;
  --bg-surface: #1A1A1A;

  /* Gold */
  --gold: #C9A962;
  --gold-light: #D4B978;
  --gold-dim: #C9A96244;

  /* Text */
  --text-white: #FAFAF9;
  --text-gray: #8A8A8A;
  --text-dark-gray: #6A6A6A;
  --text-darker: #4A4A4A;

  /* Borders */
  --border: #2A2A2A;

  /* Semantic */
  --revenue-green: #7BC67E;
  --error-red: #E85454;

  /* Fonts */
  --font-display: 'Fraunces', 'Noto Serif JP', serif;
  --font-body: 'DM Sans', 'Noto Sans JP', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-jp-serif: 'Noto Serif JP', serif;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}


/* ────────────────────────────────────────────────────────────
   1. RESET & BASE
   ──────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-white);
  line-height: 1.6;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-darker);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dark-gray);
}

/* Selection */
::selection {
  background: var(--gold-dim);
  color: var(--text-white);
}


/* ────────────────────────────────────────────────────────────
   2. GAME CONTAINER & SCENE BASE
   ──────────────────────────────────────────────────────────── */

#game {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

#game.fade-out {
  animation: fadeOut 0.4s var(--ease) forwards;
}
#game.fade-in {
  animation: fadeIn 0.4s var(--ease) forwards;
}

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

.scene {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}


/* ────────────────────────────────────────────────────────────
   3. PARTICLES
   ──────────────────────────────────────────────────────────── */

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  top: -10px;
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  animation: particleFall linear forwards;
}

.particle-gold {
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold-dim);
}

.particle-burst {
  background: var(--gold-light);
  box-shadow: 0 0 10px var(--gold);
  animation: particleBurst 2s var(--ease) forwards;
}

@keyframes particleFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: var(--opacity, 0.4);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes particleBurst {
  0% {
    transform: scale(0) translate(0, 0);
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5) translate(
      calc((var(--random, 0.5) - 0.5) * 200px),
      calc((var(--random, 0.5) - 0.5) * 200px)
    );
    opacity: 0;
  }
}


/* ────────────────────────────────────────────────────────────
   4. BUTTONS
   ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  line-height: 1.4;
  background: transparent;
  color: var(--text-white);
}

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

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Gold (primary) */
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-main);
  border-color: var(--gold);
  font-weight: 600;
}
.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 20px var(--gold-dim);
}

/* Outline */
.btn-outline {
  border-color: var(--border);
  color: var(--text-gray);
  background: transparent;
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-outline.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

/* Icon */
.btn-icon {
  padding: 6px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border-color: var(--border);
  font-size: 1rem;
}
.btn-icon:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

/* Sizes */
.btn-lg {
  padding: 14px 40px;
  font-size: 1rem;
  letter-spacing: 0.05em;
}
.btn-sm {
  padding: 6px 16px;
  font-size: 0.8125rem;
}
.btn-xs {
  padding: 4px;
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

/* Send */
.btn-send {
  border-radius: var(--radius-md);
  padding: 10px 20px;
  flex-shrink: 0;
}


/* ────────────────────────────────────────────────────────────
   5. TITLE SCREEN (.scene-title)
   ──────────────────────────────────────────────────────────── */

.scene-title {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center bottom, #141414 0%, var(--bg-main) 70%);
}

.title-container {
  text-align: center;
  z-index: 1;
  padding: var(--space-xl);
  animation: titleFadeUp 1.2s var(--ease) both;
}

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

.title-ornament {
  font-family: var(--font-display);
  color: var(--text-darker);
  font-size: 0.875rem;
  letter-spacing: 0.4em;
  margin: var(--space-md) 0;
}

.title-logo {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 40px var(--gold-dim);
  margin: var(--space-md) 0;
}

.title-subtitle {
  font-family: var(--font-jp-serif);
  font-size: clamp(0.875rem, 2.5vw, 1.125rem);
  color: var(--text-gray);
  font-weight: 300;
  letter-spacing: 0.3em;
  margin-bottom: var(--space-lg);
}

.title-desc {
  max-width: 400px;
  margin: 0 auto var(--space-2xl);
}
.title-desc p {
  font-family: var(--font-jp-serif);
  font-size: 0.875rem;
  color: var(--text-dark-gray);
  line-height: 2;
  font-weight: 300;
}

.title-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.title-credit {
  font-size: 0.75rem;
  color: var(--text-darker);
  letter-spacing: 0.1em;
  margin-top: var(--space-lg);
}


/* ────────────────────────────────────────────────────────────
   6. NAME INPUT (.scene-name)
   ──────────────────────────────────────────────────────────── */

.scene-name {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center bottom, #141414 0%, var(--bg-main) 70%);
}

.name-container {
  text-align: center;
  z-index: 1;
  padding: var(--space-xl);
  animation: titleFadeUp 0.8s var(--ease) both;
}

.name-ornament {
  font-family: var(--font-display);
  color: var(--text-darker);
  font-size: 0.875rem;
  letter-spacing: 0.4em;
  margin-bottom: var(--space-lg);
}

.name-title {
  font-family: var(--font-jp-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.name-desc {
  font-family: var(--font-jp-serif);
  font-size: 0.875rem;
  color: var(--text-dark-gray);
  font-weight: 300;
  margin-bottom: var(--space-2xl);
}

.name-input-wrap {
  margin-bottom: var(--space-xl);
}

.input-gold {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--gold);
  color: var(--text-white);
  font-family: var(--font-jp);
  font-size: 1.25rem;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  width: 240px;
  max-width: 80vw;
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.input-gold::placeholder {
  color: var(--text-darker);
}

.input-gold:focus {
  border-bottom-color: var(--gold-light);
  box-shadow: 0 4px 12px var(--gold-dim);
}


/* ────────────────────────────────────────────────────────────
   7. DIALOGUE (.scene-dialogue)
   ──────────────────────────────────────────────────────────── */

.scene-dialogue {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10vh;
  cursor: pointer;
}

.dialogue-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.95), transparent 60%);
  z-index: 1;
}

.dialogue-container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 640px;
  animation: titleFadeUp 0.6s var(--ease) both;
}

.dialogue-speaker {
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  min-height: 1.2em;
}
.dialogue-speaker.narrator {
  color: var(--gold);
}
.dialogue-speaker.character {
  color: var(--gold-light);
}

.dialogue-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
}

.dialogue-text {
  font-family: var(--font-jp-serif);
  font-size: 1rem;
  line-height: 2;
  color: var(--text-white);
  min-height: 3em;
  font-weight: 300;
}

.dialogue-indicator {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-md);
  color: var(--gold);
  font-size: 0.75rem;
  opacity: 0;
  animation: indicatorPulse 1.2s var(--ease) infinite;
  transition: opacity var(--duration) var(--ease);
}

@keyframes indicatorPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}


/* ────────────────────────────────────────────────────────────
   8. BAR SCREEN (.scene-bar) - MAIN SCREEN
   ──────────────────────────────────────────────────────────── */

.scene-bar {
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Bar Header ── */

.bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
  gap: var(--space-md);
}

.bar-header__left,
.bar-header__center,
.bar-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.bar-header__center {
  gap: var(--space-md);
}

.bar-night {
  font-family: var(--font-jp-serif);
  font-size: 0.8125rem;
  color: var(--gold);
  font-weight: 400;
}

.bar-name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text-gray);
  letter-spacing: 0.1em;
  font-weight: 400;
}

.bar-time {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-white);
  letter-spacing: 0.05em;
  font-weight: 400;
}

.bar-timeslot {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-dark-gray);
  padding: 2px 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}

.stat-badge {
  font-size: 0.8125rem;
  color: var(--text-gray);
  padding: 4px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.revenue-badge {
  color: var(--revenue-green);
  font-weight: 600;
}

.revenue-value {
  color: var(--revenue-green);
}

/* ── Event Banner ── */

.event-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--gold-dim);
  border-bottom: 1px solid var(--gold);
  flex-shrink: 0;
}

.event-icon {
  color: var(--gold);
  font-size: 1rem;
}

.event-text {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--gold-light);
}

/* ── Seat Bar ── */

.seat-bar {
  padding: var(--space-lg);
  flex-shrink: 0;
}

.seat-bar__counter {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--border), var(--gold-dim), var(--border), transparent);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.seat-bar__stools {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
}

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  cursor: default;
  transition: transform var(--duration) var(--ease);
}

.seat--occupied {
  cursor: pointer;
}
.seat--occupied:hover {
  transform: translateY(-4px);
}

.seat__stool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.seat__portrait {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  font-size: 1.25rem;
  transition: all var(--duration) var(--ease);
}

.seat--occupied .seat__portrait {
  border-color: var(--seat-color, var(--gold));
  box-shadow: 0 0 12px color-mix(in srgb, var(--seat-color, var(--gold)) 30%, transparent);
}

.seat__portrait--empty {
  border-style: dashed;
  opacity: 0.3;
}

.seat__letter {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-white);
}

.seat__empty-mark {
  color: var(--text-darker);
}

.seat__name {
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
  text-align: center;
  font-family: var(--font-jp);
}

.seat--occupied .seat__name {
  color: var(--text-gray);
}

.seat__base {
  width: 32px;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
}

/* ── Customers Section ── */

.customers-section {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  flex: 1;
  min-height: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text-darker);
  text-align: center;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-lg);
  font-weight: 400;
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.customer-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.customer-card:hover {
  border-color: var(--char-color, var(--gold));
  background: var(--bg-lighter);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.customer-portrait {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  font-size: 1.5rem;
  transition: border-color var(--duration) var(--ease);
}
.customer-card:hover .customer-portrait {
  border-color: var(--char-color, var(--gold));
}

.portrait-letter {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-white);
}

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

.customer-name {
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-white);
  margin-bottom: 2px;
}

.customer-appearance {
  font-size: 0.75rem;
  color: var(--text-dark-gray);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trust-bar {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.trust-fill {
  height: 100%;
  background: var(--gold);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease);
}

.customer-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
}

.customer-visits,
.customer-discovery {
  white-space: nowrap;
}

.trust-bar {
  position: relative;
}

.trust-bar__value {
  position: absolute;
  right: 0;
  top: -14px;
  font-size: 0.625rem;
  color: var(--text-dark-gray);
}

.no-customers {
  text-align: center;
  padding: var(--space-3xl);
}
.no-customers p {
  font-family: var(--font-jp-serif);
  color: var(--text-dark-gray);
  font-weight: 300;
}

/* ── Bar Footer ── */

.bar-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Auto Mode Button Pulse */
#autoModeBtn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
  animation: autoPulse 2s var(--ease) infinite;
}

@keyframes autoPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--gold-dim); }
  50% { box-shadow: 0 0 12px 2px var(--gold-dim); }
}


/* ────────────────────────────────────────────────────────────
   9. FATIGUE GAUGE
   ──────────────────────────────────────────────────────────── */

.fatigue-gauge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
}

.fatigue-icon {
  font-size: 0.875rem;
}

.fatigue-track {
  width: 60px;
  height: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.fatigue-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease), background 0.6s var(--ease);
}

.fatigue-label {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  white-space: nowrap;
}


/* ────────────────────────────────────────────────────────────
   10. CHAT SCREEN (.scene-chat) - CRITICAL
   ──────────────────────────────────────────────────────────── */

.scene-chat {
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  overflow: hidden;
}

/* ── Chat Header ── */

.chat-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}

.chat-header__back {
  flex-shrink: 0;
}

.chat-header__customer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
}

.chat-header__portrait {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  font-size: 1rem;
  flex-shrink: 0;
}

.chat-header__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header__name {
  font-family: var(--font-jp);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-white);
}

.chat-header__trust {
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
}

.chat-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Sidebar toggle button - hidden on desktop */
.btn-sidebar-toggle {
  display: none;
}

.emotion-toggle-icon {
  color: var(--text-gray);
  transition: color var(--duration) var(--ease);
}
.btn.active .emotion-toggle-icon {
  color: var(--gold);
}

/* ── Chat Body (split layout) ── */

.chat-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ── Chat Sidebar ── */

.chat-sidebar {
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: var(--space-md);
}

/* ── Chat Main ── */

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* ── Emotion Panel ── */

.emotion-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  max-height: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0 0 0 var(--radius-lg);
  z-index: 20;
  box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
  overflow: hidden;
}

.emotion-panel--hidden {
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
}

.emotion-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-gray);
}

.emotion-panel__chart {
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Chat Messages ── */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-height: 0;
}

/* ── Chat Bubbles ── */

.chat-bubble {
  max-width: 75%;
  animation: bubbleIn 0.3s var(--ease) both;
}

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

.chat-bubble--customer {
  align-self: flex-start;
}

.chat-bubble--player {
  align-self: flex-end;
}

.chat-bubble__name {
  font-size: 0.6875rem;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.chat-bubble__text {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-family: var(--font-jp);
  font-size: 0.875rem;
  line-height: 1.7;
}

.chat-bubble--customer .chat-bubble__text {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--char-color, var(--text-dark-gray));
  border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg);
}

.chat-bubble--player .chat-bubble__text {
  background: color-mix(in srgb, var(--gold) 12%, var(--bg-surface));
  border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
  border-radius: var(--radius-lg) 4px var(--radius-lg) var(--radius-lg);
}

.chat-bubble--player .chat-bubble__name {
  text-align: right;
}

/* Streaming bubble */
.chat-bubble.streaming {
  align-self: flex-start;
}
.chat-bubble.streaming .bubble-text {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--char-color, var(--text-dark-gray));
  border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg);
  font-family: var(--font-jp);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── Typing Indicator ── */

.chat-typing {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-lg);
  flex-shrink: 0;
}

.chat-typing__dots {
  display: flex;
  gap: 4px;
}

.chat-typing__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dark-gray);
  animation: typingDot 1.4s var(--ease) infinite;
}

.chat-typing__dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing__dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.chat-typing__text {
  font-size: 0.75rem;
  color: var(--text-dark-gray);
  font-family: var(--font-jp);
}

/* ── Chat Input Area ── */

.chat-input-area {
  flex-shrink: 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.chat-input-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.chat-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px var(--space-md);
  color: var(--text-white);
  font-family: var(--font-jp);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--duration) var(--ease);
}

.chat-input::placeholder {
  color: var(--text-darker);
}

.chat-input:focus {
  border-color: var(--gold);
}

.chat-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}


/* ────────────────────────────────────────────────────────────
   11. PROFILE CARD (Chat Sidebar)
   ──────────────────────────────────────────────────────────── */

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.profile-card__portrait {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.profile-card__letter {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-white);
}

.profile-card__info {
  min-width: 0;
}

.profile-card__name {
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-white);
}

.profile-card__trust {
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
}

.profile-card__section {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.profile-card__section:last-child {
  border-bottom: none;
}

.profile-card__section-title {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.profile-card__observations {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.observation-note {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-gray);
  font-style: italic;
  line-height: 1.5;
  padding-left: var(--space-sm);
  border-left: 2px solid var(--border);
}

.profile-card__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.profile-item {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.profile-item--revealed {
  animation: revealSlide 0.4s var(--ease) both;
}

@keyframes revealSlide {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.profile-item__truth {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--gold-light);
  line-height: 1.5;
}

.profile-card__empty {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-dark-gray);
  line-height: 1.8;
}


/* ────────────────────────────────────────────────────────────
   12. EMOTION RADAR (SVG)
   ──────────────────────────────────────────────────────────── */

.emotion-radar-svg {
  width: 100%;
  max-width: 240px;
}

.radar-grid-line {
  fill: none;
  stroke: var(--border);
  stroke-width: 0.5;
}

.radar-axis {
  stroke: var(--border);
  stroke-width: 0.5;
}

.radar-data {
  fill: var(--gold-dim);
  stroke: var(--gold);
  stroke-width: 1.5;
  transition: all 0.6s var(--ease);
}

.radar-dot {
  transition: all 0.6s var(--ease);
}

.radar-label {
  font-family: var(--font-jp);
  font-size: 7px;
  font-weight: 500;
}

.radar-value {
  font-family: var(--font-body);
  font-size: 6px;
  opacity: 0.7;
}


/* ────────────────────────────────────────────────────────────
   13. CRAFT SCREEN (.scene-craft)
   ──────────────────────────────────────────────────────────── */

.scene-craft {
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  overflow-y: auto;
}

.craft-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.craft-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text-white);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.craft-time-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.craft-time {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text-white);
  letter-spacing: 0.05em;
}

.craft-timeslot {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
  padding: 2px 6px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}

.craft-for {
  text-align: center;
  font-family: var(--font-jp);
  font-size: 0.875rem;
  color: var(--text-gray);
  padding: var(--space-sm) 0;
}

.craft-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  gap: var(--space-xl);
}

/* Glass visual */
.craft-glass {
  width: 80px;
  height: 120px;
  border: 2px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.glass-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gold-dim);
  transition: height 0.6s var(--ease), background 0.6s var(--ease);
}

.glass-garnish {
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 1.5rem;
}

/* Steps */
.craft-steps {
  width: 100%;
  max-width: 600px;
}

.craft-step {
  margin-bottom: var(--space-lg);
  opacity: 0.4;
  transition: opacity var(--duration) var(--ease);
}

.craft-step.active {
  opacity: 1;
}

.step-title {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-gray);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--space-sm);
}

.ingredient-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  color: var(--text-white);
  font-family: var(--font-jp);
}

.ingredient-btn:hover {
  border-color: var(--gold);
  background: var(--bg-lighter);
}

.ingredient-btn.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 0 12px var(--gold-dim);
}

.ing-icon {
  font-size: 1.25rem;
}

.ing-name {
  font-size: 0.6875rem;
  color: var(--text-gray);
}

.ing-desc {
  font-size: 0.625rem;
  color: var(--text-dark-gray);
  text-align: center;
}

.technique-btn {
  grid-column: span 1;
}

/* Selection summary */
.craft-selection {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.selection-slot {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-dark-gray);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}

.selection-slot span {
  color: var(--gold);
}

/* Craft actions */
.craft-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  flex-shrink: 0;
}


/* ────────────────────────────────────────────────────────────
   14. RESULT SCREEN (.scene-result)
   ──────────────────────────────────────────────────────────── */

.scene-result {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #141414 0%, var(--bg-main) 70%);
}

.result-container {
  text-align: center;
  z-index: 1;
  padding: var(--space-xl);
  max-width: 500px;
  animation: titleFadeUp 0.8s var(--ease) both;
}

.result-rank {
  margin-bottom: var(--space-xl);
}

.result-stars {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.3em;
  margin-bottom: var(--space-sm);
  animation: starsGlow 2s var(--ease) infinite alternate;
}

@keyframes starsGlow {
  from { text-shadow: 0 0 10px currentColor; }
  to { text-shadow: 0 0 30px currentColor, 0 0 60px currentColor; }
}

.result-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.result-score {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-gray);
  margin-top: var(--space-sm);
}

.result-drink {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.result-drink-name {
  font-family: var(--font-jp);
  font-size: 1.125rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.result-drink-desc {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-gray);
}

/* Reaction (legacy format) */
.result-reaction {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--gold);
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  text-align: left;
}

.reaction-speaker {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-dark-gray);
  margin-bottom: var(--space-xs);
}

.reaction-text {
  font-family: var(--font-jp-serif);
  font-size: 0.9375rem;
  color: var(--text-white);
  font-style: italic;
  line-height: 1.8;
  font-weight: 300;
}

/* Reaction bubble (v2 format) */
.result-reaction-bubble {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  text-align: left;
}

.reaction-bubble__portrait {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.reaction-bubble__body {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--char-color, var(--gold));
  border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: var(--space-md);
  position: relative;
}

.reaction-bubble__name {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--char-color, var(--gold));
  margin-bottom: var(--space-xs);
}

.reaction-bubble__text {
  font-family: var(--font-jp-serif);
  font-size: 0.9375rem;
  color: var(--text-white);
  font-style: italic;
  line-height: 1.8;
  font-weight: 300;
}

.reaction-bubble__tail {
  display: none; /* Visual only, no content needed */
}

.result-rewards {
  margin-bottom: var(--space-xl);
}

.result-rewards p {
  font-family: var(--font-jp);
  font-size: 0.875rem;
  color: var(--text-gray);
  margin-bottom: var(--space-xs);
}

.result-price {
  font-size: 1.25rem !important;
  font-weight: 600;
  color: var(--revenue-green) !important;
  margin-bottom: var(--space-sm) !important;
}


/* ────────────────────────────────────────────────────────────
   15. STATUS SCREEN (.scene-status)
   ──────────────────────────────────────────────────────────── */

.scene-status {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  background: var(--bg-main);
  padding: var(--space-xl) var(--space-lg);
}

.status-container {
  width: 100%;
  max-width: 540px;
  animation: titleFadeUp 0.6s var(--ease) both;
}

.status-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.status-ornament {
  font-family: var(--font-display);
  color: var(--text-darker);
  font-size: 0.875rem;
  letter-spacing: 0.4em;
  margin-bottom: var(--space-sm);
}

.status-name {
  font-family: var(--font-jp-serif);
  font-size: 1.75rem;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.status-level {
  font-family: var(--font-jp);
  font-size: 0.875rem;
  color: var(--text-gray);
}

.status-fatigue {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.status-exp {
  margin-bottom: var(--space-xl);
}

.exp-bar {
  height: 6px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease);
}

.exp-text {
  font-size: 0.75rem;
  color: var(--text-dark-gray);
  text-align: right;
  display: block;
}

.status-stats {
  margin-bottom: var(--space-xl);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.stat-label {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-gray);
  width: 60px;
  flex-shrink: 0;
}

.stat-bar-container {
  flex: 1;
  height: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease);
}

.stat-value {
  font-size: 0.8125rem;
  color: var(--text-white);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

.status-section {
  margin-bottom: var(--space-xl);
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  color: var(--text-darker);
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.recipe-list-mini {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.recipe-tag {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--gold);
  padding: 4px 10px;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
}

.customer-list-status {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.customer-status-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.cs-portrait {
  font-size: 1rem;
  width: 24px;
  text-align: center;
}

.cs-name {
  font-family: var(--font-jp);
  color: var(--text-white);
  flex: 1;
}

.cs-progress {
  color: var(--gold);
  font-size: 0.75rem;
}

.cs-trust {
  color: var(--text-dark-gray);
  font-size: 0.75rem;
}

.cs-present {
  font-size: 0.6875rem;
  color: var(--revenue-green);
}

.status-night {
  text-align: center;
  font-family: var(--font-jp-serif);
  font-size: 0.875rem;
  color: var(--text-dark-gray);
  margin-bottom: var(--space-xl);
}

.scene-status .btn {
  display: block;
  margin: 0 auto;
}


/* ────────────────────────────────────────────────────────────
   16. RECIPES SCREEN (.scene-recipes)
   ──────────────────────────────────────────────────────────── */

.scene-recipes {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  background: var(--bg-main);
  padding: var(--space-xl) var(--space-lg);
}

.recipes-container {
  width: 100%;
  max-width: 640px;
  animation: titleFadeUp 0.6s var(--ease) both;
}

.recipes-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-white);
  text-align: center;
  letter-spacing: 0.15em;
  font-weight: 400;
  margin-bottom: var(--space-xl);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.recipe-card {
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--duration) var(--ease);
}

.recipe-card.unlocked {
  border-color: var(--border);
}

.recipe-card.locked {
  opacity: 0.5;
  border-style: dashed;
}

.recipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.recipe-card-name {
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-white);
}

.recipe-card-diff {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.recipe-card-desc {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.locked-text {
  color: var(--text-dark-gray) !important;
  font-style: italic;
}

.recipe-card-ingredients {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
  margin-bottom: var(--space-xs);
}

.recipe-card-technique {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  color: var(--gold);
}

.scene-recipes .btn {
  display: block;
  margin: 0 auto;
}


/* ────────────────────────────────────────────────────────────
   17. NIGHT REPORT (.scene-night-report)
   ──────────────────────────────────────────────────────────── */

.scene-night-report {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background: radial-gradient(ellipse at center, #141414 0%, var(--bg-main) 70%);
  padding: var(--space-xl);
}

.night-report {
  width: 100%;
  max-width: 540px;
  text-align: center;
  z-index: 1;
  animation: titleFadeUp 0.8s var(--ease) both;
}

.night-report__header {
  margin-bottom: var(--space-xl);
}

.night-report__ornament {
  font-family: var(--font-display);
  color: var(--text-darker);
  font-size: 0.875rem;
  letter-spacing: 0.4em;
  margin: var(--space-sm) 0;
}

.night-report__title {
  font-family: var(--font-jp-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold);
}

.night-report__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.night-report__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.night-report__stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-white);
  font-weight: 400;
}

.night-report__stat-label {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
}

.night-report__total-revenue {
  font-family: var(--font-jp);
  font-size: 0.875rem;
  color: var(--text-gray);
  margin-bottom: var(--space-md);
}

.night-report__closing-time {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-dark-gray);
  margin-bottom: var(--space-sm);
}

.night-report__fatigue {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-gray);
  margin-bottom: var(--space-xl);
}

.night-report__customers {
  text-align: left;
  margin-bottom: var(--space-xl);
}

.night-report__section-title {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-dark-gray);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.night-report__customer-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
  font-size: 0.8125rem;
}

.night-report__customer-portrait {
  font-size: 1rem;
  width: 24px;
  text-align: center;
}

.night-report__customer-name {
  font-family: var(--font-jp);
  color: var(--text-white);
  flex: 1;
}

.night-report__customer-trust {
  color: var(--text-dark-gray);
  font-size: 0.75rem;
}

.night-report__customer-progress {
  color: var(--gold);
  font-size: 0.75rem;
}


/* ────────────────────────────────────────────────────────────
   18. ENDING SCREEN (.scene-ending)
   ──────────────────────────────────────────────────────────── */

.scene-ending {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
}

.ending-container {
  text-align: center;
  z-index: 1;
  padding: var(--space-xl);
  max-width: 500px;
  animation: endingFadeIn 3s var(--ease) both;
}

@keyframes endingFadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  30% { opacity: 0; }
  100% { opacity: 1; transform: translateY(0); }
}

.ending-ornament {
  font-family: var(--font-display);
  color: var(--text-darker);
  font-size: 0.875rem;
  letter-spacing: 0.4em;
  margin: var(--space-md) 0;
}

.ending-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 40px var(--gold-dim);
  margin-bottom: var(--space-lg);
}

.ending-text {
  margin-bottom: var(--space-xl);
}

.ending-text p {
  font-family: var(--font-jp-serif);
  font-size: 0.9375rem;
  color: var(--text-gray);
  line-height: 2.2;
  font-weight: 300;
}

.ending-stats {
  margin-bottom: var(--space-xl);
}

.ending-stats p {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-dark-gray);
  margin-bottom: var(--space-xs);
}

.ending-credit {
  font-size: 0.75rem;
  color: var(--text-darker);
  letter-spacing: 0.1em;
}


/* ────────────────────────────────────────────────────────────
   19. NOTIFICATIONS
   ──────────────────────────────────────────────────────────── */

.notification {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-full);
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  font-weight: 500;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.notification-gold {
  background: var(--gold);
  color: var(--bg-main);
  box-shadow: 0 4px 20px var(--gold-dim);
}

.notification-cyan {
  background: #4ECDC4;
  color: var(--bg-main);
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.3);
}


/* ────────────────────────────────────────────────────────────
   20. DISCOVERY ANIMATION
   ──────────────────────────────────────────────────────────── */

.discovery-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  cursor: pointer;
}

.discovery-overlay--active {
  opacity: 1;
}

.discovery-card {
  width: 200px;
  height: 280px;
  perspective: 800px;
}

.discovery-card__inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s var(--ease);
  transform-style: preserve-3d;
}

.discovery-card__inner--flipped {
  transform: rotateY(180deg);
}

.discovery-card__front,
.discovery-card__back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  backface-visibility: hidden;
}

.discovery-card__front {
  background: var(--bg-surface);
  border: 2px solid var(--border);
}

.discovery-card__mystery {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--text-darker);
}

.discovery-card__back {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-lighter));
  border: 2px solid var(--gold);
  transform: rotateY(180deg);
  gap: var(--space-md);
  padding: var(--space-lg);
  text-align: center;
}

.discovery-card__category {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.discovery-card__detail {
  font-family: var(--font-jp);
  font-size: 1rem;
  color: var(--gold);
  line-height: 1.6;
  font-weight: 500;
}

.discovery-card__label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  color: var(--text-darker);
  letter-spacing: 0.2em;
}


/* ────────────────────────────────────────────────────────────
   21. DRINK PROMPT
   ──────────────────────────────────────────────────────────── */

.drink-prompt {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 100;
  opacity: 0;
  transition: all var(--duration) var(--ease);
}

.drink-prompt.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.drink-prompt-inner {
  background: var(--bg-surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.drink-prompt-inner p {
  font-family: var(--font-jp);
  font-size: 0.875rem;
  color: var(--text-white);
  margin-bottom: var(--space-md);
}

.drink-prompt-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}


/* ────────────────────────────────────────────────────────────
   22. CHOICE BUTTONS (Legacy)
   ──────────────────────────────────────────────────────────── */

.choice-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  color: var(--text-white);
  font-family: var(--font-jp);
  font-size: 0.875rem;
  text-align: left;
}

.choice-btn:hover {
  border-color: var(--gold);
  background: var(--bg-lighter);
}

.choice-indicator {
  color: var(--gold);
  font-family: var(--font-display);
}

.choice-text {
  flex: 1;
}


/* ────────────────────────────────────────────────────────────
   23. RESPONSIVE - TABLET (600px - 1024px)
   ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .chat-sidebar {
    width: 220px;
  }

  .emotion-panel {
    width: 240px;
  }

  .bar-header {
    padding: var(--space-sm) var(--space-md);
  }

  .bar-header__left .bar-name {
    display: none;
  }

  .customer-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}


/* ────────────────────────────────────────────────────────────
   24. RESPONSIVE - MOBILE (<600px)
   ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  :root {
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
  }

  /* Bar Header - stack vertically on mobile */
  .bar-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
    padding: var(--space-sm);
  }

  .bar-header__left {
    justify-content: center;
  }

  .bar-header__left .bar-name {
    display: none;
  }

  .bar-header__center {
    justify-content: center;
    gap: var(--space-sm);
    padding-top: var(--space-xs);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
  }

  .bar-header__right {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  /* Seat Bar */
  .seat-bar {
    padding: var(--space-sm) var(--space-xs);
  }

  .seat-bar__stools {
    gap: var(--space-xs);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding: 0 var(--space-sm);
  }

  .seat {
    flex-shrink: 0;
  }

  .seat__portrait {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  .seat__name {
    font-size: 0.625rem;
  }

  /* Customer Grid - proper spacing */
  .customer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .customers-section {
    padding: var(--space-sm) var(--space-sm) var(--space-md);
  }

  .customer-card {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .customer-portrait {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.25rem;
  }

  /* Bar Footer */
  .bar-footer {
    gap: var(--space-xs);
    padding: var(--space-sm);
    flex-wrap: wrap;
  }

  .bar-footer .btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  /* ── Chat Header - compact on mobile ── */
  .chat-header {
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
  }

  .chat-header__portrait {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.8125rem;
  }

  .chat-header__name {
    font-size: 0.8125rem;
  }

  .chat-header__trust {
    font-size: 0.625rem;
  }

  .chat-header__actions {
    gap: var(--space-xs);
  }

  .chat-header__actions .fatigue-gauge {
    display: none;
  }

  /* Sidebar toggle visible on mobile */
  .btn-sidebar-toggle {
    display: inline-flex;
  }

  /* Chat - Sidebar fully hidden with toggle */
  .chat-body {
    flex-direction: column;
  }

  .chat-sidebar {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    border-right: none;
    border-bottom: none;
    padding: 0;
    transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
  }

  .chat-sidebar.sidebar--open {
    max-height: 200px;
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm);
    overflow-y: auto;
  }

  .chat-sidebar .profile-card {
    display: block;
  }

  .chat-sidebar .profile-card__header {
    border-bottom: 1px solid var(--border);
    border-right: none;
  }

  .chat-sidebar .profile-card__section {
    border-bottom: 1px solid var(--border);
    border-right: none;
    min-width: auto;
  }

  .chat-sidebar .profile-card__empty {
    min-width: auto;
  }

  /* Chat Messages */
  .chat-messages {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .chat-bubble {
    max-width: 88%;
  }

  .chat-bubble__text {
    font-size: 0.8125rem;
    padding: var(--space-xs) var(--space-sm);
  }

  /* Suggestions - wrap on mobile */
  .suggestions-container {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .suggestion-btn {
    white-space: normal;
    max-width: none;
    text-overflow: clip;
  }

  /* Chat Input - sticky bottom */
  .chat-input-area {
    padding: var(--space-xs) var(--space-sm);
    position: sticky;
    bottom: 0;
    z-index: 10;
  }

  .chat-input {
    padding: 8px var(--space-sm);
    font-size: 0.8125rem;
  }

  .chat-input-row {
    margin-bottom: var(--space-xs);
  }

  .chat-actions {
    gap: var(--space-xs);
  }

  .chat-actions .btn {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  /* Emotion Panel - full width on mobile */
  .emotion-panel {
    width: 100%;
    max-width: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  /* Craft */
  .ingredient-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .craft-workspace {
    padding: var(--space-md);
  }

  .craft-selection {
    padding: var(--space-sm);
  }

  .craft-top-bar {
    flex-wrap: wrap;
    gap: var(--space-xs);
    padding: var(--space-sm);
  }

  /* Night Report */
  .night-report__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Result */
  .result-container {
    padding: var(--space-md);
  }

  /* Title */
  .title-menu {
    margin-bottom: var(--space-lg);
  }

  /* Recipe Grid */
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  /* Interruption - adjust for mobile */
  .interruption-overlay {
    right: var(--space-sm);
    left: var(--space-sm);
    top: var(--space-md);
  }

  .interruption-card {
    max-width: none;
    flex-wrap: wrap;
  }

  .interruption-actions {
    flex-direction: row;
    width: 100%;
    justify-content: flex-end;
  }
}


/* ────────────────────────────────────────────────────────────
   25. RESPONSIVE - LARGE DESKTOP (>1200px)
   ──────────────────────────────────────────────────────────── */

@media (min-width: 1200px) {
  .customer-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    max-width: 960px;
    margin: 0 auto;
  }

  .chat-sidebar {
    width: 280px;
  }

  .chat-messages {
    padding: var(--space-xl);
  }

  .chat-bubble {
    max-width: 65%;
  }
}


/* ────────────────────────────────────────────────────────────
   26. PRINT
   ──────────────────────────────────────────────────────────── */

@media print {
  body {
    background: white;
    color: black;
  }
  .particles,
  .btn,
  .bar-footer,
  .chat-input-area {
    display: none !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONVERSATION SUGGESTIONS (v3.1)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.suggestions-container {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

.suggestion-btn {
  flex-shrink: 0;
  background: rgba(201, 169, 98, 0.06);
  border: 1px solid rgba(201, 169, 98, 0.25);
  border-radius: 20px;
  padding: 8px 16px;
  color: #C9A962;
  font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-btn:hover {
  background: rgba(201, 169, 98, 0.15);
  border-color: #C9A962;
  transform: translateY(-1px);
}

.suggestion-btn:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .suggestion-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   INTERRUPTION OVERLAY (v3.2)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.interruption-overlay {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-lg);
  z-index: 200;
  opacity: 0;
  transform: translateX(20px);
  transition: all var(--duration) var(--ease);
  pointer-events: auto;
}

.interruption-overlay.show {
  opacity: 1;
  transform: translateX(0);
}

.interruption-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--char-color, var(--gold));
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  max-width: 340px;
  animation: interruptSlideIn 0.4s var(--ease) both;
}

@keyframes interruptSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.interruption-portrait {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  font-size: 1rem;
  flex-shrink: 0;
}

.interruption-body {
  flex: 1;
  min-width: 0;
}

.interruption-name {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.interruption-message {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-white);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.interruption-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex-shrink: 0;
}


/* ────────────────────────────────────────────────────────────
   UPGRADE SHOP
   ──────────────────────────────────────────────────────────── */

.scene-upgrade-shop {
  padding: var(--space-lg);
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  overflow-y: auto;
}

.upgrade-shop-header {
  text-align: center;
  padding: var(--space-md) 0;
}

.upgrade-shop-title {
  font-family: var(--font-jp-serif);
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
}

.upgrade-shop-money {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-gray);
}

.upgrade-money-value {
  color: var(--revenue-green);
  font-weight: 600;
  font-size: 1.125rem;
}

.upgrade-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  flex: 1;
}

.upgrade-category {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.upgrade-category-title {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-md);
}

.upgrade-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.upgrade-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}

.upgrade-card:hover:not(.purchased):not(.too-expensive) {
  border-color: var(--gold-dim);
}

.upgrade-card.purchased {
  border-color: var(--gold-dim);
  box-shadow: 0 0 12px var(--gold-dim), inset 0 0 8px rgba(201, 169, 98, 0.05);
}

.upgrade-card.too-expensive {
  opacity: 0.45;
}

.upgrade-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-lighter);
  border-radius: var(--radius-md);
}

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

.upgrade-name {
  font-family: var(--font-jp);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 2px;
}

.upgrade-desc {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-gray);
  line-height: 1.4;
  margin-bottom: var(--space-xs);
}

.upgrade-effects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.upgrade-effect-tag {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  color: var(--gold-light);
  background: var(--gold-dim);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.upgrade-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
  flex-shrink: 0;
  min-width: 72px;
}

.upgrade-cost {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-white);
}

.upgrade-card.purchased .upgrade-cost {
  color: var(--text-dark-gray);
  text-decoration: line-through;
}

.upgrade-card.too-expensive .upgrade-cost {
  color: var(--error-red);
}

.upgrade-purchased-mark {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 500;
}

.upgrade-buy-btn {
  font-size: 0.75rem;
  padding: 4px 12px;
}

.btn-disabled {
  background: var(--bg-lighter);
  color: var(--text-darker);
  border: 1px solid var(--border);
  cursor: not-allowed;
  pointer-events: none;
}

.upgrade-shop-footer {
  text-align: center;
  padding: var(--space-md) 0 var(--space-xl);
}

/* Bar upgrades display (small icons in bar view) */
.bar-upgrades-display {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  flex-wrap: wrap;
}

.bar-upgrade-icon {
  font-size: 0.875rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  cursor: default;
}

/* Mobile adjustments for upgrade shop */
@media (max-width: 480px) {
  .scene-upgrade-shop {
    padding: var(--space-md);
    gap: var(--space-md);
  }

  .upgrade-card {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .upgrade-action {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: flex-end;
    gap: var(--space-sm);
  }
}

/* ────────────────────────────────────────────────────────────
   Portrait Images
   ──────────────────────────────────────────────────────────── */

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.cs-portrait-img {
  width: 1.2em;
  height: 1.2em;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid;
  vertical-align: middle;
}

.night-report__customer-portrait-img {
  width: 1.4em;
  height: 1.4em;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid;
  vertical-align: middle;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   QUEST BANNER (v3.3)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.quest-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.06), rgba(201, 169, 98, 0.02));
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  flex-shrink: 0;
  transition: all var(--duration) var(--ease);
}

.quest-banner.quest-complete {
  background: linear-gradient(135deg, rgba(123, 198, 126, 0.12), rgba(123, 198, 126, 0.04));
  border-color: var(--revenue-green);
}

.quest-label {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gold);
  padding: 2px 8px;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.quest-text {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--gold-light);
  flex: 1;
  min-width: 0;
}

.quest-progress {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--gold);
  font-weight: 500;
  white-space: nowrap;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HINT BUTTON (v3.3)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.hint-btn {
  border-color: color-mix(in srgb, #9BB8D3 40%, transparent);
  color: #9BB8D3;
}

.hint-btn:hover:not(:disabled) {
  border-color: #9BB8D3;
  color: #9BB8D3;
  background: rgba(155, 184, 211, 0.1);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HELP OVERLAY (v3.3)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.help-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.help-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: helpSlideUp 0.4s var(--ease) both;
}

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

.help-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: 1px solid var(--border);
  color: var(--text-gray);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}

.help-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.help-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.1em;
  font-weight: 400;
}

.help-section {
  margin-bottom: var(--space-lg);
}

.help-section h3 {
  font-family: var(--font-jp);
  font-size: 0.875rem;
  color: var(--gold-light);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

.help-step {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  color: var(--text-gray);
  line-height: 1.7;
  padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
  border-left: 2px solid var(--border);
  margin-bottom: var(--space-xs);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACHIEVEMENT NOTIFICATION (v3.3)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.achievement-notification {
  position: fixed;
  top: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.08), var(--bg-surface));
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(201, 169, 98, 0.12);
  opacity: 0;
  transition: all 0.4s var(--ease);
  pointer-events: none;
}

.achievement-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.achievement-notification__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.achievement-notification__body {
  min-width: 0;
}

.achievement-notification__title {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.achievement-notification__name {
  font-family: var(--font-jp);
  font-size: 1rem;
  color: var(--text-white);
  font-weight: 500;
}

.achievement-notification__desc {
  font-family: var(--font-jp);
  font-size: 0.75rem;
  color: var(--text-gray);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACHIEVEMENT LIST (Status Screen) (v3.3)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.achievement-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--ease);
}

.achievement-card:not(.locked) {
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
}

.achievement-card.locked {
  opacity: 0.4;
}

.achievement-card__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.achievement-card.locked .achievement-card__icon {
  font-size: 1rem;
  color: var(--text-darker);
}

.achievement-card__info {
  min-width: 0;
}

.achievement-card__name {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-white);
}

.achievement-card.locked .achievement-card__name {
  color: var(--text-dark-gray);
}

.achievement-card__desc {
  font-family: var(--font-jp);
  font-size: 0.6875rem;
  color: var(--text-dark-gray);
}

@media (max-width: 600px) {
  .achievement-list {
    grid-template-columns: 1fr;
  }

  .help-container {
    padding: var(--space-lg);
  }

  .quest-banner {
    padding: var(--space-xs) var(--space-md);
    gap: var(--space-xs);
  }

  .quest-label {
    font-size: 0.625rem;
  }

  .quest-text {
    font-size: 0.75rem;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BAR BACKGROUND + CUSTOMER DETAIL MODAL (v4.1)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.scene-bar[style*="bar-bg"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.scene-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.75);
  z-index: 0;
}

.scene-bar > * {
  position: relative;
  z-index: 1;
}

/* Customer Detail Modal */
.customer-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.customer-detail-overlay.visible {
  opacity: 1;
}

.customer-detail-card {
  background: var(--surface, #1A1A1A);
  border: 1px solid var(--border, #2A2A2A);
  border-radius: 8px;
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  cursor: default;
  animation: detailSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.customer-detail__portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  position: relative;
}

.customer-detail__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customer-detail__portrait-letter {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 80px;
  font-weight: 300;
}

.customer-detail__body {
  padding: 20px;
}

.customer-detail__name {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.customer-detail__trust {
  font-size: 12px;
  color: var(--gray, #8A8A8A);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.customer-detail__section {
  margin-bottom: 16px;
}

.customer-detail__section-title {
  font-size: 10px;
  color: var(--gold, #C9A962);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.6;
}

.customer-detail__observation {
  font-size: 12px;
  color: var(--gray, #8A8A8A);
  line-height: 1.6;
  font-style: italic;
  padding: 3px 0;
}

.customer-detail__observation::before {
  content: '· ';
  color: var(--gold, #C9A962);
  opacity: 0.4;
}

.customer-detail__discovery {
  padding: 8px 10px;
  background: rgba(201, 169, 98, 0.06);
  border-left: 2px solid var(--gold, #C9A962);
  border-radius: 0 4px 4px 0;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--white, #FAFAF9);
  line-height: 1.5;
}

.customer-detail__empty {
  color: var(--gray-dark, #4A4A4A);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  padding: 12px 0;
}

.customer-detail__close {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border, #2A2A2A);
  color: var(--gray, #8A8A8A);
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: color 0.3s;
}

.customer-detail__close:hover {
  color: var(--gold, #C9A962);
}

@media (max-width: 600px) {
  .customer-detail-card {
    max-width: 100%;
    width: 95%;
    max-height: 90vh;
  }
  .customer-detail__portrait {
    aspect-ratio: 1 / 1;
  }
}

/* ── Atmosphere Narration ── */
.chat-bubble--atmosphere {
  background: transparent !important;
  border: none !important;
  border-left: none !important;
  padding: 4px 16px !important;
  margin: 8px 0;
}
.chat-bubble--atmosphere .bubble-text {
  color: #6A6A6A !important;
  font-style: italic;
  font-size: 12px;
}

/* ── Intoxication Label ── */
.chat-header__intoxication {
  font-size: 11px;
  color: #D4A0D4;
  opacity: 0.85;
  margin-left: 6px;
}


/* ────────────────────────────────────────────────────────────
   WEATHER SYSTEM
   ──────────────────────────────────────────────────────────── */

.bar-weather {
  font-size: 14px;
  color: var(--text-gray, #8A8A8A);
  letter-spacing: 2px;
}

.weather-effect {
  background: rgba(107, 142, 181, 0.08) !important;
  border-color: rgba(107, 142, 181, 0.2) !important;
}


/* ────────────────────────────────────────────────────────────
   INTOXICATION INDICATOR ON SEATS
   ──────────────────────────────────────────────────────────── */

.seat__portrait {
  position: relative;
}

.seat-intox {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.seat-intox--tipsy { background: #C9A962; }
.seat-intox--drunk { background: #E8A54B; }
.seat-intox--wasted { background: #E85454; animation: intoxPulse 1s ease-in-out infinite; }

@keyframes intoxPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Occupied seat glow */
.seat--occupied .seat__portrait {
  box-shadow: 0 4px 12px rgba(var(--seat-color-rgb, 201, 169, 98), 0.2);
}


/* ────────────────────────────────────────────────────────────
   ATMOSPHERE CHAT BUBBLE
   ──────────────────────────────────────────────────────────── */

.chat-bubble--atmosphere {
  background: transparent !important;
  border: none !important;
  border-left: none !important;
  padding: 4px 16px !important;
  margin: 4px 0 !important;
}

.chat-bubble--atmosphere .bubble-text {
  color: #5A5A5A !important;
  font-style: italic;
  font-size: 12px !important;
}


/* ────────────────────────────────────────────────────────────
   INTOXICATION LABEL IN CHAT
   ──────────────────────────────────────────────────────────── */

.intox-label {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.intox-label--tipsy { color: #C9A962; background: rgba(201, 169, 98, 0.1); }
.intox-label--drunk { color: #E8A54B; background: rgba(232, 165, 75, 0.1); }
.intox-label--wasted { color: #E85454; background: rgba(232, 84, 84, 0.1); }


/* ────────────────────────────────────────────────────────────
   NIGHT REPORT HIGHLIGHTS
   ──────────────────────────────────────────────────────────── */

.night-report__section {
  margin: var(--space-md, 16px) 0;
  text-align: center;
}

.night-report__highlight {
  font-size: 14px;
  color: var(--text-gray, #8A8A8A);
  padding: 4px 0;
  letter-spacing: 1px;
}


/* ────────────────────────────────────────────────────────────
   STORY GAUGE
   ──────────────────────────────────────────────────────────── */

.story-gauge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin: 4px 16px;
}

.story-gauge__label {
  font-size: 11px;
  color: #C9A962;
  white-space: nowrap;
  letter-spacing: 1px;
}

.story-gauge__bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}

.story-gauge__fill {
  height: 100%;
  background: linear-gradient(90deg, #C9A962, #FFD700);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.story-gauge__act {
  font-size: 11px;
  color: #8A8A8A;
  white-space: nowrap;
}


/* ────────────────────────────────────────────────────────────
   STORY EVENT NARRATION
   ──────────────────────────────────────────────────────────── */

.scene-story-event {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0A0A0A;
  position: relative;
}

.story-event-container {
  max-width: 600px;
  width: 90%;
  text-align: center;
  padding: 40px 20px;
}

.story-event__act-title {
  font-size: 14px;
  color: #C9A962;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.story-event__title {
  font-family: 'Noto Serif JP', serif;
  font-size: 28px;
  font-weight: 400;
  color: #FFD700;
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.story-event__narration {
  text-align: left;
  min-height: 200px;
}

.story-event__line {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  line-height: 2;
  color: #D4C5A0;
  margin-bottom: 12px;
  opacity: 1;
}

.story-event__continue {
  margin-top: 40px;
}


/* ────────────────────────────────────────────────────────────
   REVENUE WARNING
   ──────────────────────────────────────────────────────────── */

.revenue-warning {
  background: rgba(232, 84, 84, 0.15);
  border: 1px solid rgba(232, 84, 84, 0.4);
  color: #E85454;
  padding: 10px 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  margin: 12px 0;
  letter-spacing: 1px;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}


/* ────────────────────────────────────────────────────────────
   ENDING VARIANTS
   ──────────────────────────────────────────────────────────── */

.ending-type {
  font-size: 14px;
  color: #C9A962;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.scene-ending--bad {
  background: linear-gradient(180deg, #1A0808 0%, #0A0A0A 100%) !important;
}

.scene-ending--bad .ending-title {
  color: #8B3A3A !important;
}

.scene-ending--bad .ending-text p {
  color: #A08080 !important;
}

.scene-ending--bad .ending-type {
  color: #E85454;
}

.scene-ending--normal .ending-type {
  color: #8A8A8A;
}

.scene-ending--good {
  background: linear-gradient(180deg, #1A1508 0%, #0A0A0A 100%) !important;
}

.scene-ending--good .ending-title {
  color: #FFD700 !important;
}

.scene-ending--good .ending-type {
  color: #FFD700;
}

.scene-ending--true {
  background: linear-gradient(180deg, #1A1808 0%, #0A0A0A 100%) !important;
}

.scene-ending--true .ending-title {
  color: #FFD700 !important;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.scene-ending--true .ending-text p {
  color: #E8D8B0 !important;
}

.scene-ending--true .ending-type {
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}


/* ────────────────────────────────────────────────────────────
   "USUAL" BUTTON
   ──────────────────────────────────────────────────────────── */

.btn-usual {
  background: rgba(201, 169, 98, 0.15);
  border: 1px solid #C9A962;
  color: #C9A962;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-usual:hover {
  background: #C9A962;
  color: #0A0A0A;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TESTER FEEDBACK FIXES (v6.2)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Character Standing Portrait in Chat */
.chat-stage {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

.chat-portrait-standing {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 0 8px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.3s;
  overflow: hidden;
}

.chat-portrait-standing:hover {
  opacity: 1;
}

.chat-portrait-standing img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom;
  border-radius: 4px;
  filter: brightness(0.9);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Recipe Quick Select */
.recipe-quick-select {
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--border, #2A2A2A);
}

.recipe-quick-label {
  font-size: 11px;
  color: var(--gold, #C9A962);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 6px;
}

.recipe-quick-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.recipe-quick-btn {
  background: var(--surface, #1A1A1A);
  border: 1px solid var(--border, #2A2A2A);
  border-radius: 16px;
  padding: 5px 14px;
  color: var(--white, #FAFAF9);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.recipe-quick-btn:hover {
  border-color: var(--gold, #C9A962);
  color: var(--gold, #C9A962);
  background: rgba(201, 169, 98, 0.08);
}

/* Drink Hint Pulse */
.drink-hint-pulse {
  animation: drinkHintPulse 1s ease-in-out 3;
}

@keyframes drinkHintPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.4); }
  50% { box-shadow: 0 0 12px 4px rgba(201, 169, 98, 0.3); }
}

/* Mobile: hide standing portrait */
@media (max-width: 768px) {
  .chat-portrait-standing {
    display: none;
  }
  .chat-stage {
    flex-direction: column;
  }
}

/* Tablet: smaller portrait */
@media (min-width: 769px) and (max-width: 1024px) {
  .chat-portrait-standing {
    width: 150px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHAT BACKGROUND PORTRAIT (v6.3)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.scene-chat[style*="background-image"] {
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
}

.chat-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.6) 0%,
    rgba(10, 10, 10, 0.75) 30%,
    rgba(10, 10, 10, 0.88) 60%,
    rgba(10, 10, 10, 0.95) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.scene-chat > *:not(.chat-bg-overlay) {
  position: relative;
  z-index: 1;
}

/* 立ち絵サイド表示は不要になったので非表示 */
.chat-portrait-standing {
  display: none;
}
.chat-stage {
  display: contents;
}
