@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Cinzel:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0f131a;
  --bg-card: rgba(18, 23, 34, 0.85);
  --bg-card-hover: rgba(26, 33, 49, 0.95);
  
  --border-subtle: rgba(212, 175, 55, 0.18);
  --border-gold: #c5a059;
  --border-gold-glow: rgba(197, 160, 89, 0.4);
  
  --gold-primary: #dfb15b;
  --gold-light: #fef08a;
  --gold-dark: #85581a;
  
  --crimson-red: #dc2626;
  --crimson-dark: #7f1d1d;
  --crimson-glow: rgba(220, 38, 38, 0.5);
  
  --curse-purple: #9333ea;
  --curse-glow: rgba(147, 51, 234, 0.4);
  
  --ethereal-teal: #0d9488;
  --ghost-green: #10b981;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-gold: #fde047;
  
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(197, 160, 89, 0.15);
  --shadow-haunt: 0 0 50px rgba(220, 38, 38, 0.6);
  --glass-blur: blur(16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(30, 20, 45, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(20, 10, 10, 0.6) 0%, transparent 50%),
    linear-gradient(to bottom, #07090e, #0b0f16);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* App Shell */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Top Navigation Bar */
.top-nav {
  height: 60px;
  background: rgba(11, 15, 22, 0.9);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--gold-primary);
  filter: drop-shadow(0 0 6px rgba(223, 177, 91, 0.6));
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #fff 20%, var(--gold-primary) 70%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.brand-subtitle {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--gold-primary);
  letter-spacing: 2px;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--border-gold-glow);
  border-radius: 4px;
  background: rgba(197, 160, 89, 0.08);
}

/* Nav Stats & Trackers */
.nav-status-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 23, 34, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.status-pill.omen-counter {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(45, 10, 10, 0.4);
}

.status-pill.omen-counter .count {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #f87171;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.status-pill.turn-indicator {
  border-color: var(--border-gold);
}

.turn-avatar-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(197, 160, 89, 0.15);
  border-color: var(--border-gold);
  color: var(--gold-primary);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #b45309, #78350f);
  border: 1px solid var(--gold-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d97706, #92400e);
  box-shadow: 0 0 15px rgba(217, 119, 6, 0.5);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #991b1b, #450a0a);
  border: 1px solid #ef4444;
  color: #fee2e2;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

/* Main Gameplay Area */
.main-stage {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Left Sidebar - Player Characters & Haunt Info */
.sidebar-left {
  width: 280px;
  background: rgba(11, 15, 22, 0.85);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: width 0.3s ease;
}

.sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.characters-roster {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roster-card {
  background: rgba(18, 23, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.roster-card:hover {
  background: rgba(26, 33, 49, 0.8);
  border-color: var(--border-subtle);
}

.roster-card.active-turn {
  border-color: var(--gold-primary);
  background: rgba(197, 160, 89, 0.1);
  box-shadow: 0 0 15px rgba(223, 177, 91, 0.2);
}

.roster-card.is-my-character {
  border-left: 4px solid var(--ghost-green);
}

.roster-card.is-traitor {
  border-color: var(--crimson-red);
  background: rgba(220, 38, 38, 0.15);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.roster-card.is-dead {
  opacity: 0.45;
  filter: grayscale(1);
}

.roster-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 1.1rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

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

.roster-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-player {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.roster-stats-mini {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.7rem;
}

.stat-tag {
  color: #cbd5e1;
}

/* Center Stage - Board Viewport */
.board-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #05070a;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(rgba(212, 175, 55, 0.04) 2px, transparent 2px);
  background-size: 40px 40px, 120px 120px;
  cursor: grab;
}

.board-viewport:active {
  cursor: grabbing;
}

/* Floor Switcher Navigation Floating on Board */
.floor-switcher {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(11, 15, 22, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 4px;
  display: flex;
  gap: 4px;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.floor-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.floor-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.floor-btn.active {
  background: linear-gradient(135deg, var(--gold-dark), #b45309);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.floor-btn .badge {
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 10px;
}

/* Zoom / Camera Controls */
.camera-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 20;
}

.cam-btn {
  width: 36px;
  height: 36px;
  background: rgba(11, 15, 22, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.cam-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold-primary);
  background: rgba(26, 33, 49, 0.9);
}

/* Right Sidebar - Activity Log & Chat */
.sidebar-right {
  width: 300px;
  background: rgba(11, 15, 22, 0.85);
  backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
  background: rgba(197, 160, 89, 0.05);
}

.feed-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-item {
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 0.3s ease;
}

.feed-item .time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-right: 6px;
}

.feed-item.roll {
  border-left-color: var(--gold-primary);
  background: rgba(197, 160, 89, 0.06);
}

.feed-item.danger {
  border-left-color: var(--crimson-red);
  background: rgba(220, 38, 38, 0.08);
}

.feed-item.omen {
  border-left-color: var(--curse-purple);
  background: rgba(147, 51, 234, 0.08);
}

.feed-item.item {
  border-left-color: var(--ghost-green);
  background: rgba(16, 185, 129, 0.06);
}

.chat-input-bar {
  padding: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: var(--font-body);
}

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

/* Bottom Player Control HUD */
.player-hud {
  height: 230px;
  background: rgba(9, 12, 18, 0.95);
  backdrop-filter: var(--glass-blur);
  border-top: 2px solid var(--border-gold-glow);
  display: flex;
  z-index: 50;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

.hud-char-profile {
  width: 250px;
  padding: 14px 18px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 15px rgba(223, 177, 91, 0.3);
}

.profile-details {
  flex: 1;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
}

.profile-title {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-turn-status {
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(197, 160, 89, 0.08);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.moves-badge {
  font-weight: bold;
  color: var(--gold-primary);
  font-size: 0.9rem;
}

/* Stat Tracks Section */
.hud-stats-container {
  flex: 1;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  border-right: 1px solid var(--border-subtle);
}

.stat-track-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-label-wrap {
  width: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-icon {
  width: 20px;
  height: 20px;
}

.stat-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-title.might { color: #f87171; }
.stat-title.speed { color: #38bdf8; }
.stat-title.sanity { color: #c084fc; }
.stat-title.knowledge { color: #4ade80; }

.stat-slider-track {
  flex: 1;
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-pip {
  flex: 1;
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.stat-pip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.stat-pip.active {
  background: linear-gradient(135deg, var(--gold-primary), #b45309);
  color: #000;
  font-weight: 800;
  border-color: var(--gold-light);
  box-shadow: 0 0 12px var(--gold-primary);
  transform: scale(1.05);
  z-index: 2;
}

.stat-pip.starting {
  border-bottom: 3px solid var(--ghost-green);
}

.stat-pip.skull {
  color: var(--crimson-red);
}

.stat-pip.skull.active {
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
  color: #fff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.8);
}

.stat-actions {
  display: flex;
  gap: 4px;
}

.stat-step-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
}

.stat-step-btn:hover {
  background: var(--gold-dark);
  color: #fff;
}

/* Inventory Cards Section */
.hud-inventory {
  width: 380px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.inventory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--gold-primary);
}

.cards-shelf {
  flex: 1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.inventory-card {
  width: 100px;
  height: 140px;
  background: rgba(18, 23, 34, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.inventory-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
  border-color: var(--gold-light);
}

.inventory-card.omen {
  border-color: var(--curse-purple);
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.inventory-card.item {
  border-color: var(--ghost-green);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.card-mini-type {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.card-mini-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.card-mini-btn {
  font-size: 0.65rem;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-align: center;
}

/* Quick Action Tray */
.hud-actions-tray {
  width: 170px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hauntPulse {
  0% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 35px rgba(220, 38, 38, 0.8); }
  100% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.4); }
}

.haunt-active {
  animation: hauntPulse 3s infinite;
}

/* Guided Narrator Banner */
.guided-narrator-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 28, 0.95);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-gold);
  border-radius: 30px;
  padding: 8px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 40;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(223, 177, 91, 0.25);
  max-width: 85%;
  pointer-events: auto;
  transition: all 0.3s ease;
}

.guided-narrator-banner.danger {
  border-color: var(--crimson-red);
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
  background: rgba(35, 10, 10, 0.95);
}

.guided-narrator-banner.omen {
  border-color: var(--curse-purple);
  box-shadow: 0 0 30px rgba(147, 51, 234, 0.45);
  background: rgba(22, 10, 38, 0.95);
}

.narrator-icon-wrap {
  font-size: 1.5rem;
  flex-shrink: 0;
  animation: bounceSlow 2s infinite ease-in-out;
}

.narrator-text-wrap {
  display: flex;
  flex-direction: column;
}

.narrator-phase {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  text-transform: uppercase;
  font-weight: 700;
}

.narrator-prompt {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 500;
  line-height: 1.25;
}

.narrator-action-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  flex-shrink: 0;
}

/* Portrait Image Styles */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.profile-edit-btn {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
  transition: all 0.15s;
}

.profile-edit-btn:hover {
  background: var(--gold-dark);
  color: #fff;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ==========================================================================
   STREAMLINED MOBILE & TABLET RESPONSIVE SYSTEM
   ========================================================================== */

/* Mobile Navigation Bar Buttons */
.mobile-nav-toggles {
  display: none;
  align-items: center;
  gap: 6px;
}

.mobile-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.mobile-toggle-btn:active {
  transform: scale(0.95);
  background: rgba(197, 160, 89, 0.25);
  border-color: var(--gold-primary);
}

.mobile-roll-btn {
  background: linear-gradient(135deg, #b45309, #78350f);
  border-color: var(--gold-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.4);
}

/* Mobile Dropdown Menu */
.mobile-menu-dropdown {
  display: none;
  position: absolute;
  top: 60px;
  right: 12px;
  background: rgba(14, 18, 27, 0.98);
  backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-gold);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  padding: 8px 0;
  z-index: 150;
  flex-direction: column;
  min-width: 200px;
}

.mobile-menu-dropdown.active {
  display: flex;
}

.mobile-menu-item {
  padding: 10px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mobile-menu-item:hover, .mobile-menu-item:active {
  background: rgba(197, 160, 89, 0.15);
  color: var(--gold-primary);
}

/* Mobile Drawer Overlay Backdrop */
.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 180;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

/* Mobile HUD Dock & Bottom Sheet */
.mobile-dock-bar {
  display: none;
  height: 64px;
  width: 100%;
  background: rgba(11, 15, 23, 0.96);
  backdrop-filter: var(--glass-blur);
  border-top: 1.5px solid var(--border-gold);
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
  z-index: 60;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
}

.mobile-dock-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}

.mobile-dock-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.mobile-dock-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-dock-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-dock-turn {
  font-size: 0.68rem;
  color: var(--gold-light);
  font-weight: 600;
}

.mobile-dock-btn {
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  transition: all 0.15s;
}

.mobile-dock-btn:active {
  transform: scale(0.95);
}

.mobile-dock-btn.primary {
  background: linear-gradient(135deg, #b45309, #78350f);
  border-color: var(--gold-primary);
  color: #fff;
}

.mobile-dock-btn.accent {
  background: rgba(197, 160, 89, 0.15);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.mobile-sheet-collapse-bar {
  display: none;
  width: 100%;
  padding: 8px;
  background: rgba(18, 23, 34, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--gold-light);
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .brand-subtitle {
    display: none;
  }
  .nav-status-group .omen-counter {
    padding: 4px 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 768px) {
  /* Hide desktop action buttons and stats in nav */
  .nav-actions {
    display: none;
  }
  .nav-status-group .turn-indicator {
    display: none;
  }
  .mobile-nav-toggles {
    display: flex;
  }
  .drawer-close-btn {
    display: block;
  }

  /* Off-canvas Sidebars */
  .sidebar-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.95);
  }
  .sidebar-left.open {
    transform: translateX(0);
  }

  .sidebar-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 88%;
    max-width: 340px;
    height: 100vh;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.95);
  }
  .sidebar-right.open {
    transform: translateX(0);
  }

  /* Full screen board viewport with touch gestures */
  .board-viewport {
    touch-action: none;
  }

  /* Floating Floor Switcher positioned cleanly */
  .floor-switcher {
    top: 10px;
    left: 10px;
    padding: 2px;
    gap: 2px;
  }
  .floor-btn {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  /* Camera Controls */
  .camera-controls {
    top: 10px;
    right: 10px;
    gap: 4px;
  }
  .cam-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  /* Guided Narrator Banner on mobile */
  .guided-narrator-banner {
    top: 54px;
    width: 94%;
    max-width: 94%;
    padding: 6px 14px;
    gap: 10px;
  }
  .narrator-icon-wrap {
    font-size: 1.2rem;
  }
  .narrator-phase {
    font-size: 0.6rem;
  }
  .narrator-prompt {
    font-size: 0.78rem;
  }

  /* Door exploration touch targets */
  .explore-door-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.8);
  }

  /* Player HUD transformed into Mobile Dock + Bottom Sheet */
  .player-hud {
    height: auto;
    position: relative;
    border-top: none;
    box-shadow: none;
    flex-direction: column;
  }

  .mobile-dock-bar {
    display: flex;
  }

  .mobile-sheet-collapse-bar {
    display: flex;
  }

  .hud-content-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 80vh;
    background: rgba(11, 15, 23, 0.98);
    backdrop-filter: var(--glass-blur);
    border-top: 2px solid var(--gold-primary);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.95);
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hud-content-sheet.expanded {
    transform: translateY(0);
  }

  .hud-char-profile {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 16px;
  }

  .hud-stats-container {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 14px;
    overflow-x: auto;
  }

  .hud-inventory {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 14px;
  }

  .cards-shelf {
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hud-actions-tray {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 14px;
    gap: 10px;
  }

  .hud-actions-tray button {
    flex: 1;
    min-width: 130px;
    justify-content: center;
  }
}

