/* ═══════════════════════════════════════════════════════════════════════════
   The Life of Kevin — game.css
   Three-column game layout, VN engine, phone sidebar
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Custom scrollbar (game-wide) ────────────────────────────────────────── */
::-webkit-scrollbar               { width: 5px; height: 5px; }
::-webkit-scrollbar-track         { background: rgba(255,255,255,0.03); border-radius: 4px; }
::-webkit-scrollbar-thumb         { background: rgba(232,160,69,0.35); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover   { background: rgba(232,160,69,0.65); }
::-webkit-scrollbar-corner        { background: transparent; }
/* Firefox */
* { scrollbar-width: thin; scrollbar-color: rgba(232,160,69,0.35) transparent; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.game-page {
  overflow: hidden;
  height: 100vh;
}

.game-layout {
  display: grid;
  grid-template-columns: 250px 1fr 290px;
  grid-template-rows: 100vh;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBARS (shared)
   ══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  background: var(--bg-panel);
  border-color: rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-left  { border-right:  1px solid rgba(255,255,255,0.06); }
.sidebar-right { border-left:   1px solid rgba(255,255,255,0.06); position: relative; }

.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

/* Mini logo in left sidebar */
.game-logo-small {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gls-the {
  font-size: 0.62rem;
  letter-spacing: .5em;
  color: var(--accent);
  font-weight: 300;
  text-transform: uppercase;
}
.gls-title-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.gls-title {
  font-family: var(--font-story);
  font-size: 1.25rem;
  color: var(--text-primary);
  line-height: 1.1;
}
.game-version-badge {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--accent);
  opacity: 0.6;
}

/* ── Stats panel ──────────────────────────────────────────────────────────── */
.stats-panel {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.stat-row:last-child { margin-bottom: 0; }
.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 52px;  /* fixed width so all bars align equally */
}
.stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.stat-value.money { color: var(--success); }
.stat-value.level-badge {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.xp-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0 2px;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 2px;
  transition: width .6s ease;
}
.xp-bar-label {
  font-size: 0.59rem;
  color: rgba(255,255,255,0.35);
  text-align: right;
  display: block;
  margin-bottom: 4px;
}
.stat-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.stat-bar {
  height: 100%;
  background: linear-gradient(90deg, #5590e0, #55c080);
  border-radius: 3px;
  transition: width .5s ease;
}
.stat-bar--health {
  background: linear-gradient(90deg, #e05555, #e08855);
}
.stat-bar--arousal {
  background: #5a1a33;
  transition: width .5s ease, background .6s ease;
}

/* ── Left sidebar nav ─────────────────────────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-second);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s, border-color .15s;
  width: 100%;
}
.nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}
.nav-btn--danger:hover { color: var(--danger); border-color: rgba(224,85,85,0.3); }
.nav-btn--redlight { color: #cc2244 !important; }
.nav-btn--redlight:hover { color: #ff4466 !important; border-color: rgba(204,34,68,0.3) !important; background: rgba(204,34,68,0.07) !important; }
.nav-icon { font-size: 1rem; }

/* Text links below icon rows */
.sidebar-text-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}
.sidebar-text-links a {
  display: block;
  padding: 7px 10px;
  font-size: 0.88rem;
  color: var(--text-second);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.sidebar-text-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.sidebar-text-links a.redlight-link { color: #cc2244; }
.sidebar-text-links a.redlight-link:hover { color: #ff4466; background: rgba(204,34,68,0.07); }

/* ── 4-button icon row ── */
.nav-icon-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}
.nav-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9px 4px 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm);
  color: var(--text-second);
  font-size: 1.3rem;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
  line-height: 1;
}
.nav-icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-primary);
}
.nav-icon-btn--danger:hover { color: var(--danger); border-color: rgba(224,85,85,0.3); }

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 6px 12px;
}

/* Admin collapsible section */
.admin-section {
  margin-top: 6px;
}
.admin-section-toggle {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color .15s, color .15s;
  font-family: var(--font-ui);
}
.admin-section-toggle:hover { border-color: var(--accent); color: var(--text-main); }
.admin-section-body { padding-top: 4px; }

/* Save/load dual-button cards */
.sc-actions { display: flex; gap: 5px; margin-top: 6px; }
.sc-btn {
  flex: 1;
  padding: 5px 4px;
  border-radius: 5px;
  font-size: 0.7rem;
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: opacity .15s;
  font-family: var(--font-ui);
}
.sc-btn:hover { opacity: 0.82; }
.sc-load { background: var(--accent); color: #000; }
.sc-save { background: rgba(255,255,255,0.07); color: var(--text-second); border: 1px solid var(--border) !important; }

.sidebar-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-footer-links {
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
}
.sidebar-footer-links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
  letter-spacing: .03em;
}
.sidebar-footer-links a:hover { color: var(--accent); }
.sidebar-footer-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-username {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   VN SCREEN (center)
   ══════════════════════════════════════════════════════════════════════════ */
.vn-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #08080f;
  cursor: pointer;
  user-select: none;
}

/* Background / scene area */
.vn-scene {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.vn-background {
  position: absolute;
  inset: 0;
  background: #0a0a14;
  transition: background 0.6s ease, opacity 0.4s ease;
}
.vn-background.fade-out { opacity: 0; }

/* Location label */
.location-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7,7,13,0.75);
  border: 1px solid rgba(232,160,69,0.25);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--accent-text);
  text-align: center;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.location-label.visible { opacity: 1; }

/* ── Announcement ticker (LED scrolling banner) ─────────────────────────── */
.announce-ticker {
  position: absolute;
  top: 52px;   /* sits just below the location-label pill */
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 92vw);
  height: 28px;
  background: rgba(4, 4, 10, 0.82);
  border: 1px solid rgba(255, 200, 60, 0.35);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 6;
  box-shadow: 0 0 10px rgba(255, 180, 0, 0.15), inset 0 0 8px rgba(0,0,0,0.5);
}
.announce-ticker::before {
  content: '▶';
  flex-shrink: 0;
  padding: 0 6px 0 8px;
  font-size: 0.55rem;
  color: rgba(255, 200, 60, 0.6);
}
.announce-ticker-inner {
  display: inline-block;
  white-space: nowrap;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffd84a;
  text-shadow: 0 0 6px rgba(255, 200, 50, 0.7), 0 0 12px rgba(255, 160, 0, 0.4);
  animation: tickerScroll 18s linear infinite;
  padding-left: 100%;
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
/* Slow down when there's more text */
.announce-ticker-inner.long { animation-duration: 32s; }
.location-pill {
  display: inline-block;
  margin-left: 8px;
  background: rgba(40,180,80,0.22);
  border: 1px solid rgba(60,200,100,0.45);
  color: #6edb8a;
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* Character sprite */
.character-sprite {
  position: absolute;
  bottom: 0;
  width: 340px;
  height: 85%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
  transition: opacity .4s ease, transform .4s ease, left .4s ease, right .4s ease;
  pointer-events: none;
}
.character-sprite.left  { left: 5%; }
.character-sprite.right { right: 5%; }
.character-sprite.center { left: 50%; transform: translateX(-50%); }
.character-sprite.fade-in  { animation: spriteIn .4s ease forwards; }
.character-sprite.fade-out { animation: spriteOut .3s ease forwards; }
@keyframes spriteIn  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spriteOut { from { opacity: 1; } to { opacity: 0; } }

/* ── Text Box ─────────────────────────────────────────────────────────────── */
.vn-textbox {
  flex-shrink: 0;
  min-height: 200px;
  max-height: 240px;
  background: rgba(8, 8, 16, 0.94);
  border-top: 2px solid var(--accent-dim);
  padding: 20px 30px 24px;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.speaker-name {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
  min-height: 1.4em;
}
.speaker-name.thought { color: #a0c4e8; font-style: italic; font-weight: 500; }
.speaker-name.narration { display: none; }

.dialogue-text {
  font-family: var(--font-story);
  font-size: 1.22rem;
  line-height: 1.7;
  color: var(--text-primary);
  min-height: 3.4em;
}
.dialogue-text.narration {
  font-style: italic;
  color: var(--text-second);
}
.dialogue-text.thought {
  font-style: italic;
  color: #c8e0f8;
}

.click-indicator {
  position: absolute;
  bottom: 14px;
  right: 24px;
  color: var(--accent);
  font-size: 0.9rem;
  animation: bounce 1.2s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

/* ── Advance-lock countdown ring ─────────────────────────────────────────── */
.wait-countdown {
  position: absolute;
  bottom: 10px;
  right: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wait-ring {
  width: 32px;
  height: 32px;
  transform: rotate(-90deg);
  position: absolute;
  inset: 0;
}
.wait-ring-bg {
  fill: none;
  stroke: rgba(232,160,69,0.18);
  stroke-width: 3;
}
.wait-ring-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.wait-ring-num {
  position: relative;
  z-index: 1;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  pointer-events: none;
}

/* ── Wait tooltip (near-cursor popup) ────────────────────────────────────── */
.wait-tooltip {
  position: fixed;
  z-index: 9999;
  background: rgba(10, 8, 18, 0.92);
  border: 1px solid rgba(232,160,69,0.5);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 18px rgba(0,0,0,0.7);
  animation: tooltipPop 0.18s ease-out;
  transform-origin: top left;
}
@keyframes tooltipPop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Admin copy-line button */
.copy-text-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(232,160,69,0.08);
  border: 1px solid rgba(232,160,69,0.25);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 0.78rem;
  padding: 2px 7px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity .15s, background .15s;
  line-height: 1.6;
}
.copy-text-btn:hover {
  opacity: 1;
  background: rgba(232,160,69,0.18);
}

/* ── Choices ─────────────────────────────────────────────────────────────── */
.choices-overlay {
  position: absolute;
  bottom: 200px;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 60px;
  z-index: 20;
  pointer-events: all;
}

.choice-btn {
  width: 100%;
  max-width: 520px;
  padding: 14px 24px;
  background: rgba(12,12,22,0.9);
  border: 1px solid rgba(232,160,69,0.35);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-story);
  font-size: 1.08rem;
  cursor: pointer;
  text-align: center;
  transition: background .18s, border-color .18s, transform .15s;
  backdrop-filter: blur(6px);
}
.choice-btn:hover {
  background: rgba(232,160,69,0.12);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.choice-btn.choice-correct {
  box-shadow: 0 0 0 2px #55cc80;
  border-color: #55cc80;
}
.choice-btn.choice-correct:hover {
  background: rgba(85,204,128,0.10);
  border-color: #55cc80;
}

/* ── Overlays ─────────────────────────────────────────────────────────────── */
.end-day-overlay,
.settings-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4,4,10,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.end-day-card {
  text-align: center;
  padding: 48px 56px;
  background: var(--bg-panel);
  border: 1px solid rgba(232,160,69,0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-accent);
  max-width: 400px;
  width: 90%;
}
.end-day-label {
  font-size: 0.82rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.end-day-title {
  font-family: var(--font-story);
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}
.end-day-stats {
  color: var(--text-second);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 28px;
}
.end-day-xp-bonus {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* ── Notepad overlay ─────────────────────────────────────────────────────── */
.notepad-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4,4,10,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.notepad-panel {
  background: var(--bg-panel);
  border: 1px solid rgba(232,160,69,0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-accent);
  width: min(480px, 90vw);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notepad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notepad-title {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
}
.notepad-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s;
}
.notepad-close:hover { color: var(--accent); }
.notepad-compose {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notepad-textarea {
  background: var(--bg-scene);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  padding: 10px 12px;
  resize: vertical;
  min-height: 60px;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.5;
}
.notepad-textarea:focus { outline: none; border-color: var(--accent); }
.notepad-add-btn { align-self: flex-end; padding: 8px 20px; font-size: 0.85rem; }
.notepad-list {
  overflow-y: auto;
  flex: 1;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notepad-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px 0;
}
.notepad-note {
  background: rgba(232,160,69,0.07);
  border: 1px solid rgba(232,160,69,0.18);
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
}
.notepad-note-text {
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  padding-right: 24px;
}
.notepad-note-date {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 6px;
}
.notepad-note-del {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  transition: color .15s;
}
.notepad-note-del:hover { color: #e05050; }

/* ── Resume overlay ──────────────────────────────────────────────────────── */
.resume-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4,4,10,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.resume-card {
  text-align: center;
  padding: 40px 52px;
  background: var(--bg-panel);
  border: 1px solid rgba(232,160,69,0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-accent);
  max-width: 380px;
  width: 90%;
}
.resume-label {
  font-size: 0.78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.resume-title {
  font-family: var(--font-story);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.resume-meta {
  color: var(--text-second);
  font-size: 0.83rem;
  line-height: 1.6;
  margin-bottom: 28px;
}
.resume-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.resume-actions .btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.resume-actions .btn-secondary:hover { border-color: var(--accent); color: var(--text-main); }

/* ── Coming Soon overlay ─────────────────────────────────────────────────── */
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4,4,10,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(10px);
}
.coming-soon-card {
  text-align: center;
  padding: 48px 56px;
  background: var(--bg-panel);
  border: 1px solid rgba(232,160,69,0.35);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-accent);
  max-width: 480px;
  width: 92%;
}
.cs-label {
  font-size: 0.78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.cs-title {
  font-family: var(--font-story);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1.15;
}
.cs-subtitle {
  color: var(--text-second);
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.cs-subtitle-small {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 24px;
  font-style: italic;
}
.cs-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.cs-btn-row .btn-primary,
.cs-btn-row .btn-secondary {
  flex: 1;
}
.cs-donate-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.cs-donate-link {
  color: var(--accent);
  text-decoration: underline;
}
.cs-save-hint {
  font-size: 0.83rem;
  color: var(--text-second);
  margin-bottom: 16px;
}

.settings-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  min-width: 360px;
  max-width: 480px;
  width: 90%;
}
.settings-panel h2 {
  font-family: var(--font-ui);
  color: var(--accent);
  margin-bottom: 28px;
  font-size: 1.4rem;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--text-second);
}
.setting-row input[type="range"] {
  width: 160px;
  accent-color: var(--accent);
}
.setting-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.settings-panel .btn-primary { width: 100%; margin-top: 8px; }

/* ── Toast notification ───────────────────────────────────────────────────── */
.game-toast {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50px; /* just below Kevin's Phone header, overlays phone — no layout push */
  z-index: 100;
  background: var(--bg-panel);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.8rem;
  color: var(--accent-text);
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
.game-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════
   VN BACKGROUNDS — Day 1
   ══════════════════════════════════════════════════════════════════════════ */

.bg-schiphol-arrivals {
  background: linear-gradient(180deg, #1c2535 0%, #2a3a4e 40%, #1a2535 100%);
}
.bg-schiphol-plaza {
  background: linear-gradient(180deg, #2e3e50 0%, #3a4e62 50%, #253040 100%);
}
.bg-train-platform {
  background: linear-gradient(180deg, #0f1520 0%, #1a2030 50%, #0f1015 100%);
}
.bg-train-interior {
  background: linear-gradient(180deg, #1e1a10 0%, #2a2015 50%, #1a1510 100%);
}
.bg-amsterdam-centraal-ext {
  background: linear-gradient(180deg, #4a5a70 0%, #5a6a80 30%, #2a3040 100%);
}
.bg-amsterdam-street-day {
  background: linear-gradient(180deg, #6a7a9a 0%, #8090b0 30%, #4a5570 100%);
}
.bg-amsterdam-canal-day {
  background: linear-gradient(180deg, #4a6a8a 0%, #3a5a7a 30%, #1a3050 70%, #1a2035 100%);
}
.bg-hostel-entrance {
  background: linear-gradient(180deg, #3a2a1a 0%, #4a3520 40%, #2a1e10 100%);
}
.bg-albert-heijn {
  background: linear-gradient(180deg, #1a3020 0%, #20402a 40%, #102015 100%);
}
.bg-amsterdam-canal-evening {
  background: linear-gradient(180deg, #6a3a10 0%, #4a2808 30%, #2a1a05 70%, #10100a 100%);
}
.bg-amsterdam-street-evening {
  background: linear-gradient(180deg, #3a2810 0%, #281808 40%, #12100a 100%);
}
.bg-shelter-exterior {
  background: linear-gradient(180deg, #1a1a20 0%, #20202a 50%, #101015 100%);
}
.bg-shelter-reception {
  background: linear-gradient(180deg, #1e1e28 0%, #252530 50%, #141418 100%);
}
.bg-shelter-hallway {
  background: linear-gradient(180deg, #1a1820 0%, #222028 50%, #12101a 100%);
}
.bg-shelter-dorm {
  background: linear-gradient(180deg, #181820 0%, #20202a 60%, #101015 100%);
}
.bg-shelter-dorm-night {
  background: linear-gradient(180deg, #05050a 0%, #0a0a12 60%, #080810 100%);
}
.bg-default {
  background: linear-gradient(180deg, #0d0d18 0%, #12122a 100%);
}

/* Subtle grain overlay on all backgrounds */
.vn-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .5;
  z-index: 3;   /* above image and gradient, below labels */
}

/* ── Scene image (<img> tag, always fully visible) ───────────────────────── */
.scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;       /* always show the full image, no cropping */
  object-position: center center;
  display: none;             /* hidden until a scene sets backgroundImage */
  z-index: 1;
}

.scene-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: none;
  z-index: 1;
  background: #000;
}

.scene-video-volume {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.72);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  z-index: 6;
}

.scene-video-volume-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.scene-video-volume input[type="range"] {
  width: 110px;
}

/* Gradient overlay so text box edge reads cleanly */
.vn-background.bg-has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.04) 0%,
    rgba(0,0,0,0.02) 55%,
    rgba(0,0,0,0.55) 100%
  );
  z-index: 2;
  pointer-events: none;
}
/* Keep labels and sprites above image + overlays */
.location-label { z-index: 5; }
.character-sprite { z-index: 5; }

/* ── Admin Scene Navigator ─────────────────────────────────────────────── */
.admin-scene-nav {
  padding: 8px 10px 12px;
  border: 1px solid rgba(232,160,69,0.25);
  border-radius: var(--radius-sm);
  margin: 2px 10px 6px;
  background: rgba(232,160,69,0.05);
}
.admin-scene-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 600;
}
.admin-scene-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.admin-nav-btn {
  flex: 1;
  padding: 6px 4px !important;
  font-size: 0.8rem !important;
  justify-content: center;
}
.admin-scene-ctr {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0 4px;
  min-width: 44px;
  text-align: center;
}
.admin-scene-id {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 5px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.admin-restart-btn {
  width: 100%;
  margin-top: 8px;
  font-size: 0.78rem !important;
  padding: 7px 8px !important;
  justify-content: center;
  border-color: rgba(224,85,85,0.4) !important;
  color: var(--danger) !important;
}
.admin-restart-btn:hover {
  background: rgba(224,85,85,0.12) !important;
  border-color: var(--danger) !important;
}

/* ── Restart confirmation overlay ────────────────────────────────────────── */
.restart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4,4,10,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  backdrop-filter: blur(8px);
}
.restart-card {
  text-align: center;
  padding: 40px 48px;
  background: var(--bg-panel);
  border: 1px solid rgba(224,85,85,0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 40px rgba(224,85,85,0.1);
  max-width: 380px;
  width: 90%;
}
.restart-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  color: var(--danger);
}
.restart-card h2 {
  font-family: var(--font-ui);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.restart-card p {
  font-size: 0.9rem;
  color: var(--text-second);
  line-height: 1.6;
  margin-bottom: 28px;
}
.restart-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.btn-danger-solid {
  background: var(--danger) !important;
  color: #fff !important;
}
.btn-danger-solid:hover { background: #f07070 !important; }
.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-second);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   FULL-SCREEN OVERLAY MODALS (Save/Load, People Met)
   ══════════════════════════════════════════════════════════════════════════ */

.game-overlay-modal {
  position: fixed;
  inset: 0;
  background: rgba(4,4,10,0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.overlay-modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(820px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
}
.overlay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.overlay-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  font-family: var(--font-ui);
}
.overlay-modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; padding: 2px 8px;
  border-radius: 4px; line-height: 1; transition: color .15s, background .15s;
}
.overlay-modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

/* Tabs */
.overlay-modal-tabs {
  display: flex;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.overlay-tab {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  color: var(--text-muted);
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.overlay-tab:hover { color: var(--text-primary); }
.overlay-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Save slots grid */
.save-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 18px 24px;
  overflow-y: auto;
}
.save-auto-list { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }

/* Save cards */
.save-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color .15s;
  position: relative;
}
.save-card-click { cursor: pointer; }
.save-card-click:hover { border-color: var(--accent); background: rgba(232,160,69,0.04); }
.save-card-empty { background: rgba(255,255,255,0.02); }
.save-card-filled { background: rgba(255,255,255,0.04); }

.sc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.sc-num  { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing:.08em; }
.sc-del  {
  background: none; border: none; color: var(--text-muted); font-size: 1rem;
  cursor: pointer; padding: 0 2px; line-height: 1; transition: color .15s;
}
.sc-del:hover { color: var(--danger); }
.sc-empty-lbl { color: var(--text-muted); font-size: 0.85rem; flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.sc-hint { font-size: 0.7rem; color: var(--accent); text-align: center; opacity: 0; transition: opacity .15s; }
.save-card-click:hover .sc-hint { opacity: 1; }
.sc-name  { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin-top: 4px; line-height: 1.3; }
.sc-day   { font-size: 0.75rem; color: var(--accent); }
.sc-loc   { font-size: 0.72rem; color: var(--text-muted); flex: 1; line-height: 1.4; }
.sc-date  { font-size: 0.68rem; color: var(--text-muted); opacity: 0.55; }
.sc-action { font-size: 0.7rem; color: var(--accent); opacity: 0; transition: opacity .15s; margin-top: 2px; }
.save-card-click:hover .sc-action { opacity: 1; }
.save-loading { grid-column: 1/-1; color: var(--text-muted); text-align: center; padding: 32px; font-size: 0.9rem; }

/* ── People Met ─────────────────────────────────────────────────────────── */
.people-list {
  padding: 16px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.people-empty {
  color: var(--text-muted); text-align: center; padding: 40px; font-size: 0.9rem;
}

/* ── Quest Log ──────────────────────────────────────────────────────────── */
.quest-list {
  padding: 16px 24px;
  overflow-y: auto;
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quest-empty {
  color: var(--text-muted); text-align: center; padding: 40px; font-size: 0.9rem;
}
.quest-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 16px;
}
.quest-card.completed {
  border-color: rgba(168,85,247,0.4);
  background: rgba(168,85,247,0.06);
}
.quest-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.quest-icon { font-size: 1.4rem; line-height: 1; }
.quest-title-wrap { flex: 1; }
.quest-title {
  font-weight: 700;
  color: #e0e0ff;
  font-size: 0.9rem;
}
.quest-desc {
  font-size: 0.72rem;
  color: rgba(200,200,220,0.6);
  margin-top: 3px;
}
.quest-complete-badge {
  background: rgba(168,85,247,0.3);
  color: #c084fc;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  align-self: center;
}
.quest-tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.quest-task {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(200,200,220,0.55);
}
.quest-task.done { color: #86efac; }
.quest-task-check { width: 14px; text-align: center; font-size: 0.7rem; }
.quest-reward {
  font-size: 0.72rem;
  color: rgba(200,200,220,0.45);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}
.quest-reward strong { color: #fbbf24; }

/* ── iPhone-style phone screens ─────────────────────────────────────────── */
.ph-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Lock screen */
#ph-lock {
  padding: 20px 12px 12px;
  text-align: center;
  cursor: pointer;
  background: transparent;
}
.lock-hint {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.3);
  margin-top: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Home screen */
#ph-home {
  padding: 12px 8px 0;
  background: transparent;
  align-items: center;
}
.ph-home-time {
  font-family: var(--font-ui);
  font-size: 2.4rem;
  font-weight: 300;
  color: #f0f0ff;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 16px;
}
.ph-app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 8px;
  width: 100%;
  padding: 0 4px;
}
.ph-app-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  border-radius: 10px;
  transition: opacity .15s;
}
.ph-app-btn:hover { opacity: 0.82; }
.ph-app-btn:active { opacity: 0.65; transform: scale(0.93); }
.ph-app-btn.ph-app-off { opacity: 0.35; cursor: default; }
.ph-app-btn.ph-app-installed { opacity: 0.75; cursor: default; }
.ph-app-btn.ph-app-installed .ph-app-icon::after {
  content: '✓';
  position: absolute;
  bottom: -2px; right: -2px;
  font-size: 9px;
  background: #28c840;
  color: #fff;
  border-radius: 50%;
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.ph-app-btn.ph-app-installed .ph-app-icon { position: relative; }

/* Email app */
.ph-email-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: background .12s;
}
.ph-email-item:hover { background: rgba(255,255,255,0.05); }
.ph-email-from { font-size: 0.82rem; font-weight: 600; color: #dde0ee; margin-bottom: 2px; }
.ph-email-subject { font-size: 0.78rem; color: #b0b4c8; margin-bottom: 2px; }
.ph-email-preview { font-size: 0.72rem; color: #606080; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-email-detail { padding: 12px 14px; }
.ph-email-detail-subject { font-size: 0.88rem; font-weight: 700; color: #dde0ee; margin-bottom: 6px; }
.ph-email-detail-from { font-size: 0.75rem; color: #8080a0; margin-bottom: 2px; }
.ph-email-detail-time { font-size: 0.72rem; color: #606080; margin-bottom: 12px; }
.ph-email-detail-body { font-size: 0.8rem; color: #b0b4c8; line-height: 1.6; white-space: pre-wrap; }
.ph-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--app-col, #333);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.ph-app-lbl {
  font-size: 0.58rem;
  color: rgba(240,240,255,0.82);
  text-align: center;
  font-family: var(--font-ui);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48px;
}

/* App navigation bar */
.ph-app-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 6px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.ph-back-btn {
  background: none;
  border: none;
  color: #1d6ef5;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.ph-app-title {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: #f0f0ff;
}
.ph-app-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  /* smooth momentum scrolling */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  /* slim iOS-style scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.ph-app-content::-webkit-scrollbar       { width: 3px; }
.ph-app-content::-webkit-scrollbar-track { background: transparent; }
.ph-app-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}
.ph-app-content::-webkit-scrollbar-thumb:hover { background: rgba(232,160,69,0.4); }
.ph-empty {
  text-align: center;
  padding: 24px 12px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
}

/* Contacts inside Contacts app */
.ph-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ph-contact-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1) center top / cover no-repeat;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}
.ph-contact-info { flex: 1; min-width: 0; }
.ph-contact-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e0e0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-contact-actions { display: flex; gap: 6px; margin-top: 3px; }
.ph-action-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 22px; height: 22px;
  cursor: not-allowed;
  font-size: 0.6rem;
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gallery app */
.ph-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 3px;
}
.ph-gthumb {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.ph-gthumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.ph-gthumb.ph-thumb-err {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.15);
}
.ph-gthumb-from {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55);
  font-size: 0.56rem;
  color: rgba(255,255,255,0.8);
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Video gallery thumbnail */
.ph-gthumb-video {
  background: #0a0a14;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  position: relative;
}
/* Hover preview video */
.ph-gthumb-video video {
  pointer-events: none;
}
.ph-play-icon {
  width: 40px; height: 40px;
  background: rgba(232,160,69,0.25);
  border: 1px solid rgba(232,160,69,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  transition: background .15s, transform .15s;
  z-index: 1;
  position: relative;
}
.ph-gthumb-video:hover .ph-play-icon {
  background: rgba(232,160,69,0.55);
  transform: scale(1.1);
}

/* Video in message bubble */
.ph-bubble-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  min-width: 70px;
}
.ph-bubble-video:hover { background: rgba(255,255,255,0.1); }
.ph-bubble-vid-cap {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
}

/* Video player inside photo viewer — NO controls, fills viewer */
.ph-video-player {
  max-width: 100%;
  max-height: 82%;
  width: 100%;
  border-radius: 10px;
  outline: none;
  display: block;
  pointer-events: none;       /* no interaction at all */
  user-select: none;
  -webkit-user-select: none;
}
/* Hide any browser-native media overlay (Chrome/Safari) */
.ph-video-player::-webkit-media-controls { display: none !important; }
.ph-video-player::-webkit-media-controls-enclosure { display: none !important; }

/* Messages app */
.ph-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.ph-msg-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.1) center top / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.ph-msg-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #f0f0ff;
}
.ph-msg-bubbles {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.ph-bubble {
  max-width: 85%;
  padding: 6px 9px;
  border-radius: 14px;
  font-size: 0.7rem;
  line-height: 1.35;
  word-break: break-word;
}
.ph-in  {
  align-self: flex-start;
  background: rgba(255,255,255,0.12);
  color: #e8e8f8;
  border-bottom-left-radius: 4px;
}
.ph-out {
  align-self: flex-end;
  background: #1d6ef5;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ph-bubble-img {
  display: block;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  draggable: false;
  pointer-events: auto;
}

/* Photo viewer (full screen within phone) */
.ph-photo-viewer {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.ph-photo-close {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph-photo-img {
  max-width: 100%;
  max-height: 80%;
  border-radius: 8px;
  object-fit: contain;
}
.ph-photo-caption {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-top: 8px;
  padding: 0 8px;
}
.people-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s;
}
.people-card:hover { border-color: rgba(255,255,255,0.14); }
.people-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.06) center top / cover no-repeat;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: var(--text-muted);
}
.people-info { flex: 1; min-width: 0; }
.people-name  { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.people-first-met { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.people-pts   { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.pts { font-size: 0.72rem; border-radius: 3px; padding: 1px 7px; }
.pts-friend  { background: rgba(80,180,100,0.15); color: #50c464; }
.pts-hostile { background: rgba(224,85,85,0.15);  color: var(--danger); }
.pts-neutral { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.people-badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; padding: 4px 10px; border-radius: 20px; flex-shrink: 0;
}
.rel-acquaintance { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.rel-friendly     { background: rgba(100,180,230,0.15); color: #64c8f0; }
.rel-friend       { background: rgba(80,140,220,0.2);   color: #90b8f8; }
.rel-closefriend  { background: rgba(232,160,69,0.2);   color: var(--accent); }
.rel-hostile      { background: rgba(224,140,60,0.2);   color: #e09050; }
.rel-enemy        { background: rgba(224,85,85,0.2);    color: var(--danger); }

/* ── People Met — avatar grid layout ─────────────────────────────────────── */
.pm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px 8px;
}
.pm-avatar-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color .15s, background .15s;
  width: 76px;
}
.pm-avatar-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}
.pm-avatar-btn.active {
  border-color: var(--accent);
  background: rgba(232,160,69,0.08);
}
.pm-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,0.06) center top / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: var(--text-muted);
  flex-shrink: 0;
}
.pm-avatar-name {
  font-size: 0.68rem;
  color: rgba(200,200,220,0.7);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}
.pm-detail-card {
  margin: 0 16px 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: pm-card-in .15s ease;
}
@keyframes pm-card-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pm-detail-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.08) center top / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: var(--text-muted);
}
.pm-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pm-detail-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.pm-detail-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── People Detail Sub-Modal ─────────────────────────────────────────────── */
.pcd-overlay { z-index: 300; }

.pcd-card {
  width: min(640px, 96vw);
  max-height: 88vh;
}
.pcd-header {
  gap: 0;
}
.pcd-back-btn {
  font-size: 1.3rem;
  min-width: 36px;
}
.pcd-body {
  display: flex;
  gap: 22px;
  padding: 20px 24px 24px;
  overflow-y: auto;
  min-height: 0;
  align-items: flex-start;
}
.pcd-portrait-wrap {
  flex-shrink: 0;
  width: 170px;
}
.pcd-portrait {
  width: 170px;
  height: 230px;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  display: block;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.pcd-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.pcd-status-row { margin-bottom: 2px; }
.pcd-pts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pcd-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.pcd-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
}
.pcd-row {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  line-height: 1.4;
}
.pcd-key {
  color: var(--text-muted);
  min-width: 86px;
  flex-shrink: 0;
  font-size: 0.72rem;
}
.pcd-val {
  color: var(--text-primary);
  word-break: break-word;
}
.pcd-notes {
  font-size: 0.73rem;
  color: rgba(200,200,220,0.58);
  line-height: 1.6;
  margin-top: 8px;
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 8px;
}
.pcd-loading {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.5;
}

@media (max-width: 480px) {
  .pcd-body { flex-direction: column; align-items: center; gap: 16px; }
  .pcd-portrait-wrap { width: 140px; }
  .pcd-portrait { width: 140px; height: 190px; }
}

/* ── Sidebar: bank balance val ──────────────────────────────────────────── */
.stat-value.bank-val { color: #4fbdff; }

/* ══════════════════════════════════════════════════════════════════════════
   CHARACTER INFO MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.ci-modal-card { width: min(560px, 100%); }
.ci-avatar-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 24px 12px; gap: 6px; border-bottom: 1px solid var(--border);
  position: relative;
}
.ci-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,0.08) center top / cover no-repeat;
  position: relative;
}
.ci-name { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.ci-subtitle { font-size: 0.75rem; color: var(--text-muted); }
.ci-xp-section { padding: 10px 24px 4px; border-bottom: 1px solid var(--border); }
.ci-xp-bar-wrap { height: 5px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.ci-xp-bar-fill { height: 100%; background: linear-gradient(90deg, #a855f7, #ec4899); border-radius: 3px; transition: width .6s ease; }
.ci-xp-label { font-size: 0.65rem; color: rgba(255,255,255,0.35); text-align: right; }
#charInfoBody { overflow-y: auto; max-height: 60vh; padding-bottom: 8px; }
.ci-section { padding: 14px 24px 6px; }
.ci-section-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 8px;
}
.ci-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 12px;
}
.ci-row:last-child { border-bottom: none; }
.ci-label { font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; }
.ci-value { font-size: 0.82rem; color: var(--text-primary); text-align: right; font-family: var(--font-ui); word-break: break-all; }
.ci-placeholder { color: var(--text-muted); font-style: italic; font-size: 0.78rem; }
.ci-title-val { display: flex; align-items: center; gap: 8px; }
.ci-edit-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
  color: var(--text-muted); font-size: 0.75rem; padding: 2px 6px; cursor: pointer;
  transition: border-color .15s, color .15s; line-height: 1.4;
}
.ci-edit-btn:hover { border-color: var(--accent); color: var(--accent); }
.ci-title-picker { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.ci-title-opt {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px; padding: 3px 10px; font-size: 0.78rem; cursor: pointer;
  font-family: var(--font-ui); transition: background .15s, border-color .15s;
}
.ci-title-opt:hover { background: rgba(255,255,255,0.12); }
.ci-title-opt-active { border-color: currentColor !important; background: rgba(255,255,255,0.12); }

/* ══════════════════════════════════════════════════════════════════════════
   BANK APP MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.bank-modal-card { width: min(560px, 100%); }
#bankBody { overflow-y: auto; max-height: 70vh; }
.bank-locked {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 48px 24px; color: var(--text-muted); text-align: center;
}
.bank-locked span { font-size: 3rem; }
.bank-locked p { margin: 0; }
.bank-summary {
  padding: 16px 24px;
  display: flex; flex-direction: column; gap: 6px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.bank-balance-item { display: flex; justify-content: space-between; align-items: center; }
.bank-bal-label { font-size: 0.8rem; color: var(--text-muted); }
.bank-bal-val { font-size: 1rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-ui); }
.bank-iban { font-size: 0.72rem; color: var(--accent); font-family: var(--font-ui); letter-spacing: .05em; margin-top: 4px; }
.bank-tx-list { padding: 8px 0; }
.tx-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 24px; border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 12px;
}
.tx-row:last-child { border-bottom: none; }
.tx-left { display: flex; align-items: center; gap: 10px; }
.tx-type { font-size: 1.2rem; }
.tx-desc { font-size: 0.82rem; color: var(--text-primary); }
.tx-day  { font-size: 0.7rem; color: var(--text-muted); }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.tx-amount { font-size: 0.88rem; font-weight: 700; font-family: var(--font-ui); }
.tx-plus  { color: #4fbdff; }
.tx-minus { color: var(--danger); }
.tx-bal   { font-size: 0.7rem; color: var(--text-muted); }



.sidebar-right {
  align-items: center;
  padding-bottom: 16px;
}

.phone-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  overflow: hidden;
}

.phone-frame {
  width: 220px;
  background: #1a1a22;
  border-radius: 36px;
  border: 3px solid #2e2e3e;
  box-shadow:
    0 0 0 1px #0a0a14,
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 20px 60px rgba(0,0,0,0.7);
  overflow: hidden;
  position: relative;
  padding-bottom: 28px;
  /* Fixed phone size — content scrolls inside, frame never grows */
  height: 520px;
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 90px;
  height: 22px;
  background: #1a1a22;
  border-radius: 0 0 14px 14px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  border-bottom: 2px solid #2e2e3e;
}

.phone-screen {
  background: #08080e;
  border-radius: 0 0 4px 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  /* ph-screen inside must also be constrained */
}

/* Status bar */
.phone-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 4px 12px;
  background: rgba(0,0,0,0.6);
  height: 24px;
}
.phone-time {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: #e0e0f0;
}
.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Signal bars */
.phone-signal {
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
}
.sig-bar {
  width: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 1px;
}
.sig-bar.s1 { height: 30%; }
.sig-bar.s2 { height: 50%; }
.sig-bar.s3 { height: 72%; }
.sig-bar.s4 { height: 100%; }
.signal-full   .sig-bar         { background: #55cc80; }
.signal-good   .sig-bar.s1,
.signal-good   .sig-bar.s2,
.signal-good   .sig-bar.s3      { background: #55cc80; }
.signal-weak   .sig-bar.s1,
.signal-weak   .sig-bar.s2      { background: #e8a045; }
.signal-roaming .sig-bar.s1,
.signal-roaming .sig-bar.s2,
.signal-roaming .sig-bar.s3     { background: #e8a045; }
.signal-off    .sig-bar         { background: rgba(255,255,255,0.1); }

/* Battery icon */
.batt-bolt {
  display: none;
  font-size: 0.5rem;
  line-height: 1;
  color: #55dd70;
  margin-right: 1px;
}
.phone-screen.is-charging .batt-bolt { display: inline; }
.phone-screen.is-charging .phone-battery-pct { color: #55dd70; }
.phone-screen.is-charging .batt-fill { animation: batt-charge-pulse 1.2s ease-in-out infinite alternate; }
@keyframes batt-charge-pulse { from { opacity: 1; } to { opacity: 0.55; filter: brightness(1.4); } }

.phone-battery-icon {
  width: 20px;
  height: 10px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.phone-battery-icon::after {
  content: '';
  position: absolute;
  right: -4px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 5px;
  background: rgba(255,255,255,0.4);
  border-radius: 0 1px 1px 0;
}
.batt-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: #55cc80;
  transition: width .5s ease, background .3s;
}
.batt-fill.low    { background: #e05555; }
.batt-fill.medium { background: #e8a045; }
.batt-fill.dead   { width: 0 !important; }

/* ── Dead battery overlay ───────────────────────────────────────────────── */
.phone-dead-screen {
  display: none;
  position: absolute;
  inset: 0;
  background: #000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 20;
}
.dead-batt-icon {
  display: flex;
  align-items: center;
  gap: 0;
}
.dead-batt-body {
  width: 48px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.dead-batt-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #e05555;
  border-radius: 2px 0 0 2px;
}
.dead-batt-tip {
  width: 3px;
  height: 10px;
  background: rgba(255,255,255,0.25);
  border-radius: 0 2px 2px 0;
}
.dead-batt-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}
.dead-charging-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: #55dd70;
  letter-spacing: 0.04em;
  animation: dead-charge-blink 1.4s ease-in-out infinite;
}
@keyframes dead-charge-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
/* Hide status bar and phone screens when phone is dead */
.phone-screen.is-dead .phone-statusbar,
.phone-screen.is-dead .ph-screen {
  visibility: hidden;
}

.phone-battery-pct {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
}

/* Lock screen */
.phone-lockscreen {
  padding: 20px 12px 16px;
  text-align: center;
}
.lock-time {
  font-family: var(--font-ui);
  font-size: 3rem;
  font-weight: 300;
  color: #f0f0ff;
  line-height: 1;
  margin-bottom: 4px;
}
.lock-date {
  font-size: 0.78rem;
  color: rgba(200,200,220,0.7);
  margin-bottom: 16px;
}
.phone-notifications {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phone-notif {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
}
.notif-icon { font-size: 1rem; flex-shrink: 0; }
.notif-content { min-width: 0; }
.notif-app  { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(200,200,220,0.5); margin-bottom: 1px; }
.notif-text { font-size: 0.72rem; color: rgba(220,220,240,0.85); line-height: 1.4; white-space: normal; word-break: break-word; }

.phone-homebutton {
  width: 50px;
  height: 5px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  margin: 10px auto 0;
}

/* Phone info section below */
.phone-info {
  width: 100%;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phone-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.phone-info-row span:last-child { color: var(--text-second); font-weight: 500; }

.badge-roaming {
  background: rgba(232,160,69,0.15);
  color: var(--accent);
  border: 1px solid rgba(232,160,69,0.25);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.72rem;
}
.badge-local {
  background: rgba(85,192,128,0.15);
  color: var(--success);
  border: 1px solid rgba(85,192,128,0.25);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.72rem;
}

/* ── Ping display ─────────────────────────────────────────────────────────── */
.ping-good    { color: #55cc80; font-weight: 500; }
.ping-mid     { color: #e8a045; font-weight: 500; }
.ping-bad     { color: #e85555; font-weight: 500; }
.ping-unknown { color: var(--text-muted); }

/* ── Server disconnect banner ─────────────────────────────────────────────── */
.disconnect-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: rgba(30, 8, 8, 0.96);
  border: 1px solid #e85555;
  border-top: none;
  border-radius: 0 0 10px 10px;
  color: #e85555;
  font-family: var(--font-ui, sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(232, 85, 85, 0.3);
  animation: dc-slidein 0.3s ease;
}
@keyframes dc-slidein {
  from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
.disconnect-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Players count (plain, non-clickable for regular users) ─────────────── */
.phone-players-count {
  color: var(--text-second);
  font-weight: 500;
  font-size: 0.78rem;
}

/* ── Players modal ────────────────────────────────────────────────────────── */
.players-modal-card {
  max-width: 680px;
  width: 96%;
}

/* ── Bills modal ── */
.bills-modal-card { max-width: 560px; width: 96%; }
.bills-list { display: flex; flex-direction: column; padding: 8px 0; }
.bills-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.bills-row:last-child { border-bottom: none; }
.bills-info { flex: 1; min-width: 0; }
.bills-name { font-size: 0.97rem; font-weight: 600; color: var(--text); }
.bills-detail { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.bills-right { text-align: right; flex-shrink: 0; }
.bills-amount { font-size: 1rem; font-weight: 700; color: var(--accent); }
.bills-due { font-size: 0.75rem; margin-top: 3px; }
.bills-due-ok     { color: var(--text-dim); }
.bills-due-soon   { color: #e8c84a; }
.bills-due-urgent { color: #e85555; font-weight: 600; }
.bills-empty { padding: 32px 20px; text-align: center; color: var(--text-dim); font-family: var(--font-story); }
.bills-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-dim);
}
.players-loading {
  text-align: center;
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.players-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 68vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.players-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.players-rank {
  font-size: 1.3rem;
  text-align: center;
}
.players-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.players-meta {
  display: flex;
  gap: 10px;
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.players-loc { color: var(--text-second); }
.players-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.74rem;
  text-align: right;
}
.players-detail-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.players-detail-label {
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}
.players-gf-yes { color: #ff8fb1; font-weight: 600; }
.players-gf-none { color: var(--text-muted); font-style: italic; }

/* ══ Community Chat ════════════════════════════════════════════════════════ */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,4,10,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  backdrop-filter: blur(8px);
}
.chat-panel {
  width: 780px;
  max-width: 96vw;
  height: 560px;
  max-height: 92vh;
  background: var(--bg-panel);
  border: 1px solid rgba(232,160,69,0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-accent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.chat-panel-header h2 {
  font-family: var(--font-story);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-primary);
}
.chat-header-btns { display: flex; gap: 8px; align-items: center; }
.chat-avatar-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: border-color .15s, color .15s;
}
.chat-avatar-btn:hover { border-color: var(--accent); color: var(--text-main); }
.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 8px;
  line-height: 1;
  transition: color .15s;
}
.chat-close-btn:hover { color: var(--danger); }
.chat-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}
/* ── Message list ── */
.chat-messages-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-messages-wrap::-webkit-scrollbar { width: 4px; }
.chat-messages-wrap::-webkit-scrollbar-track { background: transparent; }
.chat-messages-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.chat-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 40px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chat-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.chat-av-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(232,160,69,0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(232,160,69,0.2);
}
.chat-msg-body { min-width: 0; }
.chat-msg-meta { display: flex; align-items: baseline; gap: 7px; margin-bottom: 3px; }
.chat-msg-user {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}
.chat-msg-time {
  font-size: 0.7rem;
  color: var(--text-dim);
}
.chat-msg-text {
  font-size: 0.9rem;
  color: var(--text-second);
  line-height: 1.4;
  word-break: break-word;
}
/* ── User list (right panel) ── */
.chat-userlist {
  width: 152px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.07);
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-userlist-head {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chat-ul-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 4px;
  border-radius: 5px;
}
.chat-ul-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.chat-ul-placeholder {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(232,160,69,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-ul-name {
  font-size: 0.75rem;
  color: var(--text-second);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ── Input row ── */
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color .15s;
}
.chat-input:focus { border-color: rgba(232,160,69,0.4); }
.chat-send-btn {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 7px;
  padding: 8px 18px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.chat-send-btn:hover { opacity: 0.85; }

/* ══════════════════════════════════════════════════════════════════════
   ATM BUTTON OVERLAY + ATM MACHINE MODAL
   ══════════════════════════════════════════════════════════════════════ */

/* ── ATM scene button ── */
.atm-btn-overlay {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 15;
  display: none;
}
.atm-btn-overlay.visible { display: block; }
.atm-trigger-btn {
  background: linear-gradient(135deg, #ff9500 0%, #d46e00 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 13px 7px 10px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,149,0,0.35);
  transition: transform .15s, box-shadow .15s;
  text-transform: uppercase;
}
.atm-trigger-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,149,0,0.45), 0 0 0 1px rgba(255,149,0,0.5);
}
.atm-trigger-btn:active { transform: translateY(0); }
.atm-trigger-icon { font-size: 0.95rem; line-height: 1; }

/* ── ATM modal overlay ── */
.atm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,4,10,0.93);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 16px;
}

/* ── ATM machine shell ── */
.atm-machine {
  background: linear-gradient(170deg, #2c2c2c 0%, #1c1c1c 100%);
  border: 2px solid #3a3a3a;
  border-radius: 18px;
  width: min(390px, 100%);
  box-shadow: 0 36px 90px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

/* ── ATM header bar ── */
.atm-header {
  background: linear-gradient(90deg, #ff9500 0%, #d46e00 100%);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.atm-brand {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1;
}
.atm-brand-sub {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}
.atm-header-right { text-align: right; }
.atm-header-label {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.atm-header-loc {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

/* ── Card slot ── */
.atm-card-slot {
  margin: 10px 20px 0;
  height: 5px;
  background: #0e0e0e;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.atm-card-slot::after {
  content: '';
  position: absolute;
  top: 0; height: 100%; width: 55%;
  background: linear-gradient(90deg, transparent, rgba(255,149,0,0.5), transparent);
  border-radius: 3px;
  animation: atm-card-sweep 2.8s ease-in-out infinite;
}
@keyframes atm-card-sweep {
  0%   { left: -55%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ── Screen area ── */
.atm-screen-wrap {
  margin: 11px 20px 0;
  background: #0a150a;
  border: 2px solid #143014;
  border-radius: 8px;
  min-height: 210px;
  overflow: hidden;
  flex-shrink: 0;
}

/* ── Inner screen content ── */
.atm-screen {
  padding: 14px 16px 12px;
  color: #e0e0e0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
}
.atm-screen-title {
  font-size: 0.66rem;
  color: rgba(255,149,0,0.65);
  text-transform: uppercase;
  letter-spacing: .1em;
  border-bottom: 1px solid rgba(255,149,0,0.18);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* Options list */
.atm-screen-options { display: flex; flex-direction: column; gap: 5px; }
.atm-screen-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: background .13s;
}
.atm-screen-option:hover { background: rgba(255,255,255,0.06); }
.atm-option-key {
  background: rgba(255,149,0,0.12);
  border: 1px solid rgba(255,149,0,0.35);
  color: #ff9500;
  border-radius: 4px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
}
.atm-option-label { color: #bbb; font-size: 0.82rem; }
.atm-option-val   { margin-left: auto; color: #e0e0e0; font-weight: 600; }

/* PIN display */
.atm-pin-display {
  font-size: 2rem;
  letter-spacing: .45em;
  color: #ff9500;
  text-align: center;
  margin: 16px 0 6px;
  min-height: 2.6rem;
}
.atm-pin-hint {
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
}

/* Amount display */
.atm-amount-display {
  font-size: 2.1rem;
  color: #e8e8e8;
  text-align: center;
  margin: 10px 0 4px;
  font-weight: 600;
  min-height: 2.8rem;
  letter-spacing: .02em;
}
.atm-amount-display.error { color: #e05252; }

.atm-balance-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-top: 6px;
}
.atm-balance-label { color: rgba(255,255,255,0.4); }
.atm-balance-val   { color: #ff9500; font-weight: 600; }

/* Messages */
.atm-message {
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
}
.atm-message-title {
  font-size: 0.98rem;
  color: #ff9500;
  font-weight: 700;
  margin-bottom: 8px;
}
.atm-message-body {
  font-size: 0.79rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
}

/* Receipt */
.atm-receipt-amount {
  font-size: 1.5rem;
  color: #4cd97b;
  font-weight: 700;
  margin: 9px 0 4px;
}
.atm-receipt-amount.debit { color: #e05252; }
.atm-receipt-line {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
  font-family: 'Courier New', Courier, monospace;
}

/* Processing */
.atm-processing {
  padding: 26px 16px;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
}
.atm-dot-1, .atm-dot-2, .atm-dot-3 {
  opacity: 0;
  animation: atm-dot-blink 1.2s ease-in-out infinite;
  color: #ff9500;
}
.atm-dot-2 { animation-delay: .4s; }
.atm-dot-3 { animation-delay: .8s; }
@keyframes atm-dot-blink {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

/* Preset buttons */
.atm-amount-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}
.atm-preset-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 5px;
  color: #bbb;
  font-size: 0.82rem;
  padding: 9px 10px;
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  transition: background .13s, border-color .13s, color .13s;
  text-align: center;
}
.atm-preset-btn:hover {
  background: rgba(255,149,0,0.11);
  border-color: rgba(255,149,0,0.38);
  color: #ff9500;
}

/* Receipt slot */
.atm-receipt-slot {
  margin: 0 20px;
  height: 4px;
  background: #0e0e0e;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Keypad ── */
.atm-keypad-wrap {
  padding: 12px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.atm-keypad-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.atm-key {
  width: 52px;
  height: 38px;
  background: linear-gradient(175deg, #3c3c3c 0%, #282828 100%);
  border: 1px solid #484848;
  border-bottom: 3px solid #111;
  border-radius: 6px;
  color: #ccc;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .07s, border-bottom-width .07s;
  flex-shrink: 0;
}
.atm-key:hover  { background: linear-gradient(175deg, #484848 0%, #333 100%); }
.atm-key:active { transform: translateY(2px); border-bottom-width: 1px; }
.atm-key.key-enter {
  background: linear-gradient(175deg, #1c6e1c 0%, #124412 100%);
  border-color: #247024;
  border-bottom-color: #0a2e0a;
  color: #7fe87f;
}
.atm-key.key-enter:hover { background: linear-gradient(175deg, #257025 0%, #185018 100%); }
.atm-key.key-cancel {
  background: linear-gradient(175deg, #6e1c1c 0%, #441212 100%);
  border-color: #702424;
  border-bottom-color: #2e0a0a;
  color: #e87f7f;
}
.atm-key.key-cancel:hover { background: linear-gradient(175deg, #702525 0%, #501818 100%); }
.atm-key.key-clear {
  background: linear-gradient(175deg, #5a4a14 0%, #3c3210 100%);
  border-color: #786018;
  border-bottom-color: #28200a;
  color: #e8c87f;
}
.atm-key.key-clear:hover { background: linear-gradient(175deg, #6a5818 0%, #4a3e14 100%); }
.atm-key.key-wide { width: 112px; }

/* ── Close hint bar ── */
.atm-close-bar {
  padding: 7px 20px 12px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.atm-close-hint {
  font-size: 0.63rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: .06em;
  cursor: pointer;
  text-transform: uppercase;
  font-family: var(--font-ui);
  transition: color .15s;
}
.atm-close-hint:hover { color: rgba(255,255,255,0.4); }

/* ══════════════════════════════════════════════════════════════════════
   RED LIGHT DISTRICT OVERLAY
   ══════════════════════════════════════════════════════════════════════ */
.rld-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,4,10,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 390;
}
.rld-card {
  display: flex;
  flex-direction: column;
  width: min(800px, 96vw);
  max-height: 92vh;
  background: #0a070f;
  border: 1px solid rgba(204,34,68,0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.9);
}
.rld-img-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05030a;
}
.rld-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  max-height: 55vh;
  display: block;
}
.rld-textbox {
  flex-shrink: 0;
  padding: 18px 24px 10px;
  border-top: 1px solid rgba(204,34,68,0.15);
}
.rld-speaker {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: #cc2244;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rld-text {
  font-family: var(--font-story, 'Crimson Pro', Georgia, serif);
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 2.5em;
}
.rld-actions {
  flex-shrink: 0;
  padding: 10px 24px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.rld-btn {
  padding: 9px 22px;
  border-radius: 7px;
  font-family: var(--font-ui);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}
.rld-btn:hover { opacity: 0.85; }
.rld-btn--next {
  background: #cc2244;
  color: #fff;
}
.rld-btn--leave {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-second);
}

/* ══ Phone: Quote 10 app ══ */
.ph-top10-list {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}
.ph-top10-row {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 8px;
  font-family: 'Courier New', Courier, monospace;
}
.ph-top10-row:last-child { border-bottom: none; }
.ph-top10-rank {
  width: 18px;
  font-size: 0.7rem;
  color: rgba(255,215,10,0.55);
  flex-shrink: 0;
  text-align: right;
}
.ph-top10-name {
  flex: 1;
  font-size: 0.78rem;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-top10-money {
  font-size: 0.78rem;
  color: #ffd60a;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ══ Money dropdown ══ */
.money-arrow {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 4px;
  flex-shrink: 0;
}
.money-breakdown {
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 4px 8px 4px 52px; /* indent past label width */
  margin-bottom: 6px;
}
.money-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.money-breakdown-row:last-child { border-bottom: none; }
.money-bd-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.money-bd-val {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
  font-family: var(--font-ui);
}

/* ══ Quote 10 — condensed names + € + you row ══ */
.ph-top10-name {
  font-size: 0.72rem !important;
  letter-spacing: -.01em;
}
.ph-top10-money {
  font-size: 0.75rem !important;
}
.ph-top10-you {
  text-align: center;
  padding: 10px 0 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: #ffd60a;
  font-weight: 700;
  border-top: 1px solid rgba(255,214,10,0.15);
  margin: 0 12px;
}

/* ══════════════════════════════════════════════════════
   CASINO OVERLAY
══════════════════════════════════════════════════════ */
.casino-card { min-width: 340px; max-width: 520px; width: 100%; }

.casino-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 0.92rem;
}

/* Closed splash */
.casino-closed {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  text-align: center;
  gap: 12px;
}
.casino-closed-icon { font-size: 3rem; }
.casino-closed-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-ui);
}
.casino-closed-msg {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Lottery panel */
.casino-lottery { padding: 0 4px 16px; display: flex; flex-direction: column; gap: 16px; }

.casino-jackpot-wrap {
  background: linear-gradient(135deg, #1a0a00, #2d1200);
  border: 1px solid #e8a045;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.casino-jackpot-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: .15em;
  color: #e8a045;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.casino-jackpot-amount {
  font-family: var(--font-ui);
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffd60a;
  text-shadow: 0 0 20px rgba(255,214,10,0.5);
}
.casino-jackpot-note { font-size: 0.75rem; color: #8888aa; margin-top: 4px; }

.casino-draw-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 10px 14px;
}
.casino-draw-label { font-size: 0.82rem; color: var(--text-muted); }
.casino-draw-time  { font-family: 'Courier New', monospace; font-size: 0.9rem; color: #e8e8f0; font-weight: 600; }

.casino-ticket-bar-wrap { display: flex; flex-direction: column; gap: 4px; }
.casino-ticket-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.casino-ticket-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
}
.casino-ticket-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e8a045, #ffd60a);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.casino-rules {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.7;
}

.casino-my-tickets {
  font-size: 0.8rem;
  color: #50c878;
  background: rgba(80,200,120,0.07);
  border: 1px solid rgba(80,200,120,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  word-break: break-all;
}

.casino-buy-row { display: flex; gap: 10px; align-items: center; }
.casino-buy-input {
  width: 90px;
  background: #0a0a14;
  border: 1px solid #3a3a5e;
  border-radius: 6px;
  color: #e0e0e8;
  padding: 8px 12px;
  font-size: 1rem;
  text-align: center;
  outline: none;
  font-family: var(--font-ui);
}
.casino-buy-input:focus { border-color: #e8a045; }
.casino-buy-btn { flex: 1; }
.casino-buy-feedback {
  font-size: 0.82rem;
  min-height: 18px;
  color: #8888aa;
}

/* Winners list */
.casino-winners-list { padding: 4px 0 8px; }
.casino-winner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.83rem;
}
.casino-winner-row:last-child { border-bottom: none; }
.casino-winner-row.no-winner { color: var(--text-muted); }
.casino-winner-row.winner    { color: var(--text-main); }
.cw-date   { flex-shrink: 0; color: #6a6a8a; font-size: 0.75rem; width: 78px; }
.cw-name   { flex: 1; font-weight: 600; color: #ffd60a; }
.cw-ticket { flex-shrink: 0; color: #8888aa; font-family: 'Courier New', monospace; font-size: 0.78rem; }
.cw-amount { flex-shrink: 0; color: #50c878; font-weight: 700; margin-left: auto; }
.cw-result { flex: 1; font-size: 0.78rem; }

/* Win claim */
.casino-win-claim {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  gap: 12px;
}
.casino-win-icon { font-size: 3rem; }
.casino-win-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffd60a;
  font-family: var(--font-ui);
}
.casino-win-amount {
  font-size: 2.4rem;
  font-weight: 700;
  color: #50c878;
  font-family: var(--font-ui);
}
.casino-win-detail { font-size: 0.85rem; color: var(--text-muted); }
.casino-claim-btn  { margin-top: 8px; }

/* ══════════════════════════════════════════════════════
   DAILY REWARD OVERLAY
══════════════════════════════════════════════════════ */
.dr-card { min-width: 340px; max-width: 540px; width: 100%; }

.dr-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 0.92rem;
}

.dr-body { padding: 0 4px 16px; display: flex; flex-direction: column; gap: 16px; }

.dr-streak-label {
  font-size: 1rem;
  color: var(--text-second);
  text-align: center;
}
.dr-streak-label strong { color: var(--text-primary); }

.dr-streak-fire {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffd60a;
  text-align: center;
  text-shadow: 0 0 16px rgba(255,214,10,0.5);
  font-family: var(--font-ui);
}

/* Streak progress bar */
.dr-streak-bar-wrap { display: flex; flex-direction: column; gap: 4px; }
.dr-streak-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.dr-streak-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
}
.dr-streak-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e8a045, #ffd60a);
  border-radius: 4px;
  transition: width .6s ease;
}

/* Day tiles grid */
.dr-day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.dr-day-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  transition: border-color .15s;
}
.dr-day-num  { font-size: 0.62rem; color: var(--text-muted); letter-spacing: .02em; }
.dr-day-reward { font-size: 0.78rem; font-weight: 700; font-family: var(--font-ui); }
.dr-day-icon { font-size: 0.9rem; min-height: 1.1em; }

/* Tile states */
.dr-day-claimed {
  opacity: 0.45;
  background: rgba(80,200,120,0.08);
  border-color: rgba(80,200,120,0.2);
}
.dr-day-claimed .dr-day-reward { color: #50c878; }
.dr-day-claimed .dr-day-icon   { color: #50c878; }

.dr-day-today {
  border-color: #ffd60a;
  background: rgba(255,214,10,0.08);
  box-shadow: 0 0 12px rgba(255,214,10,0.2);
}
.dr-day-today .dr-day-reward { color: #ffd60a; font-size: 0.88rem; }

.dr-day-done-today {
  border-color: rgba(80,200,120,0.4);
  background: rgba(80,200,120,0.08);
}
.dr-day-done-today .dr-day-reward { color: #50c878; }

.dr-day-future { opacity: 0.4; }
.dr-day-future .dr-day-reward { color: var(--text-muted); }

/* Info row */
.dr-next-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}
.dr-next-info strong { color: var(--text-second); }

.dr-claim-btn { width: 100%; }

.dr-feedback {
  font-size: 0.82rem;
  min-height: 18px;
  text-align: center;
  color: #8888aa;
}

/* Sidebar badge dot */
.dr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffd60a;
  color: #0a0a14;
  font-size: 0.65rem;
  font-weight: 800;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  font-family: var(--font-ui);
}

/* ════════════════════════════════════════════════════════════════════════════
   TEMPER APP
   ════════════════════════════════════════════════════════════════════════════ */

.temper-card { min-width: 340px; max-width: 560px; width: 100%; }

.temper-loading {
  padding: 32px; text-align: center; color: var(--text-muted); font-size: 0.9rem;
}

.temper-section { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }

.temper-intro { font-size: 0.85rem; color: var(--text-muted); }

.temper-warning {
  background: rgba(255,180,0,0.1); border: 1px solid rgba(255,180,0,0.35);
  border-radius: 7px; padding: 10px 14px; font-size: 0.82rem; color: #f0c040;
}

.temper-active-banner {
  background: rgba(80,200,80,0.12); border: 1px solid rgba(80,200,80,0.4);
  border-radius: 7px; padding: 10px 14px; font-size: 0.9rem; font-weight: 600;
  color: #60d060; text-align: center;
}
.temper-done-banner { background: rgba(80,120,255,0.12); border-color: rgba(80,120,255,0.4); color: #8099ff; }
.temper-sched-banner {
  background: rgba(255,200,50,0.09); border: 1px solid rgba(255,200,50,0.35);
  border-radius: 7px; padding: 10px 14px; font-size: 0.88rem; font-weight: 600;
  color: #f0d050; text-align: center;
}

.temper-job-mini  { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.temper-earned-preview { font-size: 0.85rem; color: var(--text-muted); }

.temper-jobs-list { display: flex; flex-direction: column; gap: 12px; }

.temper-job-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  transition: border-color 0.15s;
}
.temper-job-card:hover { border-color: rgba(255,255,255,0.18); }
.temper-job-scheduled { border-color: rgba(255,200,50,0.35); background: rgba(255,200,50,0.04); }

.temper-job-emoji { font-size: 2rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.temper-job-info  { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.temper-job-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.temper-job-company { font-size: 0.78rem; color: var(--text-muted); }
.temper-job-desc  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.temper-job-rate  { font-size: 0.88rem; font-weight: 700; color: #60c060; margin-top: 2px; }

/* Buttons */
.temper-btn {
  border: none; border-radius: 7px; padding: 9px 18px; font-size: 0.86rem;
  font-weight: 600; cursor: pointer; transition: opacity 0.15s;
}
.temper-btn:hover { opacity: 0.85; }
.temper-btn-apply { background: var(--accent); color: #fff; margin-top: 8px; align-self: flex-start; }
.temper-btn-main  { background: var(--accent); color: #fff; }
.temper-btn-cancel { background: rgba(200,80,60,0.25); color: #ff8070; border: 1px solid rgba(200,80,60,0.4); }

/* ── Work Splash Screen ─────────────────────────────────────────────────── */
.work-splash-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 40px; max-width: 520px; width: 100%;
  display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center;
}

.work-splash-logo {
  font-size: 1.3rem; font-weight: 700; color: var(--accent); letter-spacing: .03em;
}
.work-splash-job      { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); }
.work-splash-company  { font-size: 0.85rem; color: var(--text-muted); }
.work-splash-location { font-size: 0.82rem; color: var(--text-muted); }

.work-splash-divider {
  width: 100%; height: 1px; background: var(--border); margin: 4px 0;
}

.work-splash-stat-row {
  display: flex; gap: 28px; justify-content: center; flex-wrap: wrap;
}
.work-splash-stat { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.work-splash-stat-lbl { font-size: 0.73rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.work-splash-stat-val { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); font-family: var(--font-ui); }

.work-splash-rate { font-size: 0.82rem; color: var(--text-muted); }
.work-splash-note { font-size: 0.82rem; color: var(--text-muted); min-height: 1.4em; }

.work-splash-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

.work-splash-start-btn {
  background: #4caf50; color: #fff; border: none; border-radius: 8px;
  padding: 11px 28px; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s;
}
.work-splash-start-btn:hover { opacity: 0.85; }

.work-splash-stop-btn {
  background: rgba(200,60,60,0.2); color: #ff7070; border: 1px solid rgba(200,60,60,0.45);
  border-radius: 8px; padding: 11px 28px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s;
}
.work-splash-stop-btn:hover { opacity: 0.8; }

/* Completion screen */
.work-splash-done-title { font-size: 1.4rem; font-weight: 800; color: #70e070; }
.work-splash-done-job   { font-size: 0.95rem; color: var(--text-muted); }
.work-splash-done-stats {
  display: flex; flex-direction: column; gap: 8px; width: 100%;
  background: rgba(255,255,255,0.04); border-radius: 8px; padding: 14px 18px;
}
.work-splash-done-stats > div { display: flex; justify-content: space-between; font-size: 0.9rem; }
.ws-done-lbl { color: var(--text-muted); }
.ws-done-val { font-weight: 700; color: var(--text-primary); }
.ws-done-zero { color: #ff7070; font-size: 0.82rem; text-align: center; }
.work-splash-done-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* ── Temper job story moments ── */
.ws-story-moment {
  width: 100%;
  padding: 14px 16px;
  background: rgba(232,160,69,0.06);
  border-left: 3px solid rgba(232,160,69,0.4);
  border-radius: 0 8px 8px 0;
  text-align: left;
}
.ws-story-moment.ws-story-end {
  border-left-color: rgba(100,200,100,0.5);
  background: rgba(100,200,100,0.05);
}
.ws-story-speaker {
  font-family: var(--font-u);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}
.ws-story-narration {
  font-family: var(--font-b);
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}
.ws-story-dialogue {
  font-family: var(--font-b);
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
}

#workSplashOverlay { display: none; }

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Portrait phones + small landscape
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Floating action bar (mobile only, hidden on desktop) ─────────────────── */
.mobile-fab-bar {
  display: none; /* shown via media query below */
}

/* ── Sidebar backdrop (shown when a sidebar is open on mobile) ─────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 299;
}
.sidebar-backdrop.active { display: block; }

/* ── Portrait phones ─────────────────────────────────────────────────────── */
@media (max-width: 767px) and (orientation: portrait),
       (max-height: 500px) and (max-width: 900px) {

  /* Single-column: just the VN fills the screen */
  .game-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 100vh;
  }

  /* Both sidebars become full-height overlays, hidden off-screen by default */
  .sidebar-left,
  .sidebar-right {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 300;
    width: min(300px, 85vw);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
  }
  .sidebar-left {
    left: 0;
    transform: translateX(-105%);
  }
  .sidebar-right {
    right: 0;
    transform: translateX(105%);
  }
  /* Opened state */
  .sidebar-left.mobile-open  { transform: translateX(0); }
  .sidebar-right.mobile-open { transform: translateX(0); }

  /* VN still needs to occupy the full grid cell */
  .vn-wrapper {
    grid-column: 1;
    height: 100vh;
  }

  /* Give textbox a bit more room on small screens */
  .vn-textbox {
    min-height: 180px;
    max-height: min(42vh, 300px);
    padding: 14px 18px 20px;
  }

  /* FAB bar — floats above the textbox (textbox max-height ≈ 240px) */
  .mobile-fab-bar {
    display: flex;
    position: fixed;
    bottom: calc(min(42vh, 300px) + 14px);
    left: 0;
    right: 0;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 400;
    pointer-events: none; /* let clicks through except on buttons */
    transition: opacity .2s;
  }
  .mobile-fab-bar.fabs-hidden {
    opacity: 0;
    pointer-events: none !important;
  }
  .mobile-fab {
    pointer-events: all;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(232,160,69,.45);
    background: rgba(10,10,20,.88);
    backdrop-filter: blur(8px);
    color: rgba(232,160,69,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
    transition: background .18s, border-color .18s, transform .15s;
  }
  .mobile-fab:active { transform: scale(.91); }
  .mobile-fab.fab-active {
    background: rgba(232,160,69,.18);
    border-color: rgba(232,160,69,.85);
    color: #e8a045;
  }

  /* Slightly reduce phone size on narrow screens */
  .phone-frame {
    width: 220px !important;
    min-height: 400px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROLOGUE OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

#prologueOverlay {
  display: none;
  position: fixed; inset: 0; z-index: 4000;
  background: #07070d;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.prologue-card {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.prologue-logo {
  font-family: var(--font-t);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  letter-spacing: .04em;
}
.prologue-sub {
  font-family: var(--font-u);
  font-size: 0.78rem;
  color: rgba(232,160,69,.5);
  text-align: center;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: -14px;
}
.prologue-scene-area {
  min-height: 90px;
  padding: 20px 24px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
}
.prologue-speaker {
  font-family: var(--font-u);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.prologue-text {
  font-family: var(--font-b);
  font-size: 1.05rem;
  color: #f0ede6;
  line-height: 1.6;
}
.prologue-narration {
  font-style: italic;
  color: rgba(240,237,230,.65);
}
.prologue-input-area { min-height: 0; }
.prologue-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prologue-label {
  font-family: var(--font-u);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(240,237,230,.55);
}
.prologue-input {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(232,160,69,.3);
  border-radius: 8px;
  padding: 13px 16px;
  font-family: var(--font-u);
  font-size: 1rem;
  color: #f0ede6;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .18s;
}
.prologue-input:focus { border-color: rgba(232,160,69,.7); }
.prologue-input-error {
  font-size: 0.8rem;
  color: #ff7070;
  min-height: 1.2em;
}
.prologue-footer {
  display: flex;
  justify-content: flex-end;
}
.prologue-next-btn {
  padding: 12px 32px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  font-family: var(--font-u);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #07070d;
  cursor: pointer;
  transition: opacity .18s;
}
.prologue-next-btn:hover { opacity: .85; }

/* Content preferences step */
.prologue-prefs-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }

/* Warning / content notice step */
.prologue-warning-box {
  width: 100%;
  background: rgba(180,30,30,.10);
  border: 1px solid rgba(220,60,60,.35);
  border-radius: 10px;
  padding: 16px 18px;
}
.prologue-warning-title {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 700;
  color: #e07070;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.prologue-warning-intro {
  font-size: 0.82rem;
  color: rgba(240,237,230,.65);
  margin: 0 0 10px;
  line-height: 1.5;
}
.prologue-warning-list {
  margin: 0 0 10px 16px;
  padding: 0;
  font-size: 0.82rem;
  color: rgba(240,237,230,.75);
  line-height: 1.7;
}
.prologue-warning-note {
  font-size: 0.75rem;
  color: rgba(240,237,230,.4);
  margin: 0;
  font-style: italic;
}
/* Big final button */
.prologue-enter-btn {
  font-size: 1.05rem !important;
  padding: 16px 32px !important;
  letter-spacing: .12em !important;
  background: var(--accent) !important;
  color: #07070d !important;
  margin-top: 6px;
}

/* Name step — two fields side by side */
.prologue-name-row { display: flex; gap: 12px; width: 100%; }
.prologue-name-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* Prologue video */
.prologue-video-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 24px rgba(0,0,0,.7);
}
.prologue-video {
  width: 100%;
  display: block;
  border-radius: 8px;
  pointer-events: none;   /* no drag/click on video element itself */
}
/* Transparent shield prevents right-click save-as on the video */
.prologue-video-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}
/* Locked state */
.prologue-inputs-locked .prologue-input { opacity: 0.3; cursor: not-allowed; }
.prologue-btn-locked { opacity: 0.4 !important; cursor: not-allowed !important; pointer-events: none !important; }
.prologue-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 10px 13px;
}
.prologue-pref-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.prologue-pref-name { font-size: 0.85rem; font-weight: 600; color: rgba(240,237,230,.85); }
.prologue-pref-desc { font-size: 0.72rem; color: rgba(240,237,230,.45); line-height: 1.4; }
.prologue-pref-toggle {
  flex-shrink: 0;
  min-width: 46px;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: var(--font-u);
  font-weight: 700;
  font-size: 0.78rem;
  transition: background .18s, color .18s;
}
.prologue-pref-toggle.pref-on  { background: rgba(50,140,50,.75); color: #e0f0e0; }
.prologue-pref-toggle.pref-off { background: rgba(255,255,255,.08); color: rgba(240,237,230,.45); }
.prologue-pref-toggle:hover { opacity: .8; }

/* Gender selection */
.prologue-gender-btns {  display: flex;
  gap: 12px;
}
.prologue-gender-btn {
  flex: 1;
  padding: 13px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  font-family: var(--font-u);
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(240,237,230,.65);
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.prologue-gender-btn:hover { border-color: rgba(232,160,69,.45); color: rgba(240,237,230,.9); }
.prologue-gender-btn-active {
  border-color: rgba(232,160,69,.7) !important;
  background: rgba(232,160,69,.12) !important;
  color: var(--accent) !important;
}

/* CharacterInfo avatar upload button */
.ci-avatar-upload-btn {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #07070d;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .18s;
}
.ci-avatar-upload-btn:hover { opacity: .8; }
