/**
 * truecraime-responsive.css
 * Responsive retrofit for TRUE CRAIME — mobile (390), tablet (768), desktop (1440)
 * DO NOT put desktop-only rules here. Desktop is handled in truecraime.css.
 */

/* ============================================================
   CSS CUSTOM PROPS — viewport-aware overrides
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --tc-nav-h: 56px;
    --tc-bottom-h: 56px;
    --tc-sidebar-w: 0px;
    --tc-content-pad: 16px;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --tc-nav-h: 58px;
    --tc-bottom-h: 0px;
    --tc-sidebar-w: 64px;
    --tc-content-pad: 20px;
  }
}

/* ============================================================
   BODY CLASSES — injected by JS in game.blade.php
   ============================================================ */
body.tc-mobile  { --tc-bp: mobile; }
body.tc-tablet  { --tc-bp: tablet; }
body.tc-desktop { --tc-bp: desktop; }

/* ============================================================
   === TABLET  (768px – 1023px): icon-only 64px sidebar ===
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {

  /* --- Kill bottom nav on tablet --- */
  .tc-mobile-nav { display: none !important; }

  /* --- Restore sidebar at 64px icon-only --- */
  .tc-sidebar {
    display: flex !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: calc(100vh - var(--tc-nav-h, 62px)) !important;
    top: var(--tc-nav-h, 62px) !important;
    padding: 6px 0 !important;
  }
  .tc-sidebar__label { display: none !important; }
  .tc-sidebar__item { padding: 12px 0 !important; }
  .tc-sidebar__icon { font-size: 18px !important; }
  .tc-sidebar__badge { right: 4px !important; top: 4px !important; }

  /* --- Content area --- */
  .tc-board-wrap {
    margin-left: 64px !important;
    padding-bottom: 62px !important;  /* command bar (desktop/tablet — not mobile) */
  }
  .tc-command-bar { left: 64px !important; bottom: 0 !important; }

  /* --- Fixed-height panels --- */
  .tc-ev-viewer   { height: calc(100vh - 62px) !important; }
  .tc-dossier     { height: calc(100vh - 62px) !important; }

  /* --- Two-column grids --- */
  .tc-suspect-cards              { grid-template-columns: repeat(2, 1fr) !important; }
  .tc-evidence-grid              { grid-template-columns: repeat(2, 1fr) !important; }
  .tc-lobby-cases                { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .tc-lobby-main                 { grid-template-columns: 1fr !important; }
  .tc-ach-grid                   { grid-template-columns: repeat(3, 1fr) !important; }
  .tc-stats-grid                 { grid-template-columns: repeat(3, 1fr) !important; }
  .tc-podium                     { grid-template-columns: 1fr !important; }

  /* --- Murder board: 2-column --- */
  .tc-murder-board-grid {
    grid-template-columns: 200px 1fr !important;
    padding: 10px !important;
  }

  /* --- Interview: keep left panel, drop right --- */
  .tc-interview-layout { grid-template-columns: 220px 1fr !important; }
  .tc-interview-right  { display: none !important; }

  /* --- Nav height adjustment for top bar --- */
  .tc-nav { height: 58px !important; }
  .tc-board-wrap { margin-top: 58px !important; }

  /* --- Page padding --- */
  .tc-content-page { padding: 24px 24px 72px !important; }
  .tc-page         { padding: 24px 32px 60px !important; }
}

/* ============================================================
   === MOBILE (< 768px): bottom tabs, no sidebar ===
   ============================================================ */
@media (max-width: 767px) {

  /* --- Nav: 56px, hide case title, show hamburger area --- */
  .tc-nav {
    height: 56px !important;
    padding: 0 !important;
  }
  .tc-nav__logo   { padding: 0 14px !important; }
  .tc-nav__name   { font-size: 11px !important; }
  .tc-nav__rank   { display: none !important; }
  .tc-nav__case-title { display: none !important; }
  .tc-nav__xp     { display: none !important; }
  .tc-nav__right  { gap: 8px !important; padding: 0 10px !important; }
  .tc-nav__avatar { width: 30px !important; height: 30px !important; font-size: 12px !important; }

  /* --- Board wrap: account for nav (56px) + tabs (56px) + action strip (40px) --- */
  .tc-board-wrap {
    margin-top: 56px !important;
    margin-left: 0 !important;
    padding-bottom: 100px !important; /* tabs(56) + action-strip(40) + 4px gap */
    min-height: calc(100vh - 56px) !important;
  }

  /* --- Command bar: hidden on mobile (action strip replaces its quick buttons) --- */
  .tc-command-bar { display: none !important; }
  .tc-accuse-btn {
    height: 38px !important;
    font-size: 11px !important;
    padding: 0 12px !important;
    letter-spacing: 0 !important;
  }

  /* --- Murder board: stacked, full-width --- */
  .tc-murder-board-grid {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
  }
  .tc-board-mobile-tabs { display: flex !important; }

  /* --- Evidence viewer: single col + mobile toolbar --- */
  .tc-ev-viewer { grid-template-columns: 1fr !important; height: auto !important; min-height: calc(100vh - 56px - 56px) !important; }
  .tc-ev-sidebar, .tc-ev-actions { display: none !important; }
  .tc-ev-mobile-toolbar { display: flex !important; }
  .tc-ev-main { padding: 14px 16px !important; gap: 14px !important; }
  .tc-ev-analysis__grid { grid-template-columns: 1fr !important; }

  /* --- Suspects: single col --- */
  .tc-suspect-cards { grid-template-columns: 1fr !important; gap: 10px !important; }
  .tc-sus-card { padding: 14px !important; }
  .tc-sus-card__name { font-size: 15px !important; }

  /* --- Evidence grid: single col list --- */
  .tc-evidence-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
  .tc-ev-card { flex-direction: row !important; }
  .tc-ev-card__thumb {
    width: 72px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 !important;
    height: auto !important;
  }
  .tc-ev-card__body { padding: 10px 12px !important; gap: 3px !important; }
  .tc-ev-card__title { font-size: 12px !important; }

  /* --- Dossier: stacked --- */
  .tc-dossier { grid-template-columns: 1fr !important; height: auto !important; }
  .tc-dossier__left { display: none !important; }
  .tc-dossier-mobile-header { display: flex !important; }
  .tc-dossier__tabs { overflow-x: auto !important; padding: 0 12px !important; }
  .tc-dossier__tab { padding: 0 12px !important; font-size: 11px !important; }
  .tc-dossier__tab-body { padding: 16px 16px !important; }

  /* --- Locations: stack --- */
  .tc-locations-layout { grid-template-columns: 1fr !important; }
  .tc-map-panel { min-height: 260px !important; }

  /* --- Interview: chat only --- */
  .tc-interview-layout { grid-template-columns: 1fr !important; }
  .tc-interview-left, .tc-interview-right { display: none !important; }
  .tc-interview-statusbar {
    padding: 8px 12px !important;
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 44px !important;
    gap: 4px !important;
  }
  .tc-interview-statusbar__right { flex-wrap: wrap !important; gap: 6px !important; }
  .tc-interview-statusbar__label { font-size: 11px !important; }
  .tc-interview-statusbar__sub { display: none !important; }
  .tc-interview-statusbar__phase { font-size: 10px !important; }
  .tc-interview-mobile-info-btn { display: block !important; }
  .tc-interview-messages { padding: 14px 14px !important; }
  .tc-interview-msg__text { font-size: 13px !important; padding: 10px 12px !important; }
  .tc-interview-input { height: 40px !important; font-size: 12px !important; }
  .tc-interview-send-btn { height: 40px !important; font-size: 11px !important; padding: 0 14px !important; }
  .tc-interview-input-bar { padding: 10px 12px !important; }
  /* Approach buttons: smaller on mobile, allow wrap */
  .tc-interview-approach-bar { gap: 4px !important; margin-bottom: 6px !important; padding-bottom: 6px !important; }
  .tc-interview-approach-btn { font-size: 9px !important; padding: 3px 7px !important; }
  .tc-interview-approach-label { display: none; }
  /* Evidence chip groups stack compactly on mobile */
  .tc-interview-ev-chip-group { gap: 3px; }
  .tc-interview-ev-chip--confront { font-size: 9px !important; padding: 5px 7px !important; }

  /* --- Tasks: full-width --- */
  .tc-task-row { padding: 14px 14px !important; }
  .tc-task-text { font-size: 13px !important; }

  /* --- Notes --- */
  .tc-note-card { padding: 14px 16px !important; }
  .tc-note-card__title { font-size: 14px !important; }
  .tc-note-card__body { font-size: 12px !important; }

  /* --- Files: card list shown, table hidden --- */
  .tc-files-table--desktop { display: none !important; }
  .tc-files-card-list { display: block !important; }

  /* --- Timeline: better touch --- */
  .tc-tl-event { min-width: 44px !important; }
  .tc-tl-event__dot { width: 20px !important; height: 20px !important; }

  /* --- Content pages: padding --- */
  .tc-content-page { padding: 14px 16px 64px !important; }
  .tcp-title { font-size: 20px !important; }
  .tcp-eyebrow { font-size: 10px !important; }
  .tc-filter-tab { height: 32px !important; padding: 0 12px !important; font-size: 11px !important; }

  /* --- Lobby --- */
  .tc-lobby-wrap { padding: 14px 16px 32px !important; }
  .tc-lobby-title { font-size: 22px !important; }
  .tc-lobby-main { grid-template-columns: 1fr !important; }
  .tc-lobby-cases { grid-template-columns: 1fr !important; gap: 10px !important; }
  .tc-lobby-header { flex-direction: column !important; gap: 10px !important; margin-bottom: 14px !important; }
  .tc-lobby-header > div:last-child { text-align: left !important; min-width: 0 !important; }
  .tc-lobby-case-title { font-size: 14px !important; }
  .tc-lobby-case-summary { font-size: 12px !important; }

  /* --- Profile / Stats pages --- */
  .tc-profile-hero { padding: 16px !important; flex-wrap: wrap !important; gap: 12px !important; }
  .tc-profile-hero__name { font-size: 18px !important; }
  .tc-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .tc-stat-card__value { font-size: 22px !important; }

  /* --- Achievements grid --- */
  .tc-ach-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .tc-ach-card { padding: 14px 12px !important; }
  .tc-ach-card__name { font-size: 12px !important; }

  /* --- Leaderboard --- */
  .tc-podium { grid-template-columns: 1fr !important; gap: 8px !important; }
  .tc-rank-row { grid-template-columns: 36px 32px 1fr 60px !important; }
  .tc-rank-row > *:nth-child(5),
  .tc-rank-row > *:nth-child(6) { display: none !important; }

  /* --- Session history --- */
  .tc-phase-dots { gap: 3px !important; }
  .tc-phase-dot { width: 10px !important; height: 10px !important; }

  /* --- Verdict --- */
  .tc-verdict-wrap { padding: 16px 12px 40px !important; }
  .tc-verdict-card { max-width: 100% !important; }
  .tc-verdict-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  .tc-verdict-actions { grid-template-columns: 1fr !important; }
  .tc-verdict-title { font-size: 22px !important; }
  .tc-verdict-xp__value { font-size: 28px !important; }

  /* --- Case preview: stack --- */
  .tc-preview-layout { grid-template-columns: 1fr !important; padding: 0 16px 40px !important; }
  .tc-preview-title { font-size: 24px !important; }
  .tc-preview-meta-strip { flex-wrap: wrap !important; }
  .tc-preview-meta-item { min-width: 90px !important; border-right: none !important; border-bottom: 1px solid rgba(97,71,40,0.45) !important; }

  /* --- Locked case --- */
  .tc-locked-stats { grid-template-columns: repeat(3, 1fr) !important; }
  .tc-locked-card__name { font-size: 18px !important; }

  /* --- Settings --- */
  .tc-settings-row { flex-direction: row !important; align-items: center !important; }

  /* --- Main nav (tc-main-nav) --- */
  .tc-main-nav__links { display: none !important; }
  .tc-main-nav__xp { font-size: 10px !important; }

  /* --- Onboarding --- */
  .tc-onboarding-card { grid-template-columns: 1fr !important; }
  .tc-onboarding-illustration { display: none !important; }
  .tc-onboarding-content { padding: 24px 20px !important; }

  /* --- Landing page --- */
  .tc-landing-hero { grid-template-columns: 1fr !important; padding: 44px 20px 28px !important; }
  .tc-landing-preview-card { display: none !important; }
  .tc-landing-headline { font-size: clamp(28px, 8vw, 40px) !important; }
  .tc-landing-features { grid-template-columns: 1fr !important; padding: 24px 20px !important; }
  .tc-landing-stats-strip { grid-template-columns: repeat(2, 1fr) !important; padding: 16px 20px !important; }
  .tc-landing-nav { padding: 0 16px !important; gap: 12px !important; }
  .tc-landing-nav__links { display: none !important; }

  /* --- Modals: full-width --- */
  .tc-modal { max-width: calc(100vw - 24px) !important; margin-inline: auto !important; }
  .tc-modal__body { padding: 20px 18px !important; }
  .tc-modal__title { font-size: 18px !important; }

  /* --- Mobile accordion: board panels --- */
  .tc-board-panel-accordion-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(163,127,64,0.4);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    user-select: none;
    border-radius: 8px 8px 0 0;
  }
  .tc-board-panel-accordion-header:hover { background: rgba(242,193,68,0.06); }
  .tc-board-panel-accordion-chevron {
    font-size: 10px;
    transition: transform 0.2s ease;
    color: var(--text-muted);
  }
  .tc-board-panel-accordion-chevron.open { transform: rotate(180deg); }
}

/* ============================================================
   === COMPONENT: BottomTabBar ===
   ============================================================ */
.tc-bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 110;
  background: var(--nav-bg);
  border-top: 1px solid rgba(163,127,64,0.45);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.7);
  display: none;   /* shown by JS body.tc-mobile rule below */
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.tc-mobile .tc-bottom-tab-bar { display: flex; }

.tc-bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  position: relative;
  transition: background 0.12s, color 0.12s;
  min-width: 0;
  padding: 6px 2px;
}
.tc-bottom-tab:hover { background: rgba(242,193,68,0.06); color: var(--text-sec); }
.tc-bottom-tab.active {
  color: var(--gold);
  background: rgba(242,193,68,0.08);
}
.tc-bottom-tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: 8px; right: 8px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 8px rgba(242,193,68,0.5);
}
.tc-bottom-tab__icon {
  font-size: 18px;
  line-height: 1;
}
.tc-bottom-tab__label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.tc-bottom-tab__badge {
  position: absolute;
  top: 4px; right: 8px;
  min-width: 15px; height: 13px;
  background: var(--red);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 7.5px; font-weight: 700; color: #fff;
  box-shadow: 0 0 6px rgba(209,48,30,0.6);
}

/* ── Bottom tab + “More” sheet (children use position:fixed) ── */
.tc-bottom-tab.tc-bottom-tab--more {
  flex: 1;
  background: none;
  border: none;
  padding: 6px 2px;
  margin: 0;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.tc-bottom-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 115;
  background: rgba(0, 0, 0, 0.72);
}
.tc-bottom-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  z-index: 116;
  max-height: min(68vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, #16161f 0%, var(--nav-bg) 40%);
  border-top: 1px solid rgba(163, 127, 64, 0.5);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.85);
  padding: 8px 14px 14px;
}
.tc-bottom-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: rgba(163, 127, 64, 0.35);
  margin: 6px auto 12px;
}
.tc-bottom-sheet__title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
  padding-left: 4px;
}
.tc-bottom-sheet__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tc-bottom-sheet__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-sec);
  background: rgba(242, 193, 68, 0.04);
  border: 1px solid rgba(163, 127, 64, 0.15);
  transition: background 0.12s, border-color 0.12s;
}
.tc-bottom-sheet__link:hover {
  background: rgba(242, 193, 68, 0.08);
  border-color: rgba(163, 127, 64, 0.35);
  color: var(--gold);
}
.tc-bottom-sheet__link--active {
  border-color: rgba(242, 193, 68, 0.45);
  background: rgba(242, 193, 68, 0.1);
  color: var(--gold);
}
.tc-bottom-sheet__icon {
  font-size: 18px;
  line-height: 1;
  width: 26px;
  text-align: center;
}
.tc-bottom-sheet__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tc-bottom-sheet__badge {
  position: absolute;
  top: 8px;
  right: 12px;
  min-width: 16px;
  height: 14px;
  padding: 0 4px;
  background: var(--red);
  border-radius: 7px;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-bottom-sheet__close {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(163, 127, 64, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.tc-bottom-sheet__close:hover {
  color: var(--text-sec);
  border-color: rgba(163, 127, 64, 0.45);
}

/* ============================================================
   === COMPONENT: MobileNav ===
   ============================================================ */
.tc-mobile-top-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(163,127,64,0.45);
  box-shadow: 0 2px 8px rgba(0,0,0,0.75);
  z-index: 100;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 10px;
}
/* Media query: fires immediately before JS, no flash of desktop nav */
@media (max-width: 767px) {
  .tc-mobile-top-nav { display: flex !important; }
  .tc-nav            { display: none  !important; }
}
/* body-class versions kept as fallback */
body.tc-mobile .tc-mobile-top-nav { display: flex; }
body.tc-mobile .tc-nav            { display: none !important; }

.tc-mobile-top-nav__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--text-sec); text-decoration: none;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid rgba(97,71,40,0.55);
  white-space: nowrap;
  transition: color 0.12s, border-color 0.12s;
}
.tc-mobile-top-nav__back:hover { color: var(--gold); border-color: rgba(242,193,68,0.55); }

.tc-mobile-top-nav__title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--text-pri);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center;
}
.tc-mobile-top-nav__logo {
  display: flex; align-items: center; gap: 8px;
}
.tc-mobile-top-nav__badge {
  width: 30px; height: 30px; border-radius: 4px;
  background: var(--gold);
  display: grid; place-items: center;
  font-size: 14px; color: var(--nav-bg); font-weight: 700;
  flex-shrink: 0;
}
.tc-mobile-top-nav__name {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; color: var(--gold-dim); text-transform: uppercase;
}
.tc-mobile-top-nav__hamburger {
  width: 32px; height: 32px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; background: transparent; border: none; padding: 0;
}
.tc-mobile-top-nav__hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-sec); border-radius: 1px;
  transition: background 0.12s;
}
.tc-mobile-top-nav__hamburger:hover span { background: var(--gold); }

.tc-mobile-top-nav__xp {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--gold); white-space: nowrap;
}

/* ============================================================
   === COMPONENT: TabletSidebar (64px icon-only) ===
   ============================================================ */
/* Handled via existing .tc-sidebar override in TABLET block above */

/* Additional sidebar polish for tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .tc-sidebar__item {
    min-height: 48px;
    border-radius: 0;
  }
  .tc-sidebar__item.active::before {
    border-radius: 0 3px 3px 0;
  }
  /* Tooltip on hover */
  .tc-sidebar__item[data-label]:hover::after {
    content: attr(data-label);
    position: absolute;
    left: calc(64px + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    border: 1px solid rgba(163,127,64,0.5);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-pri);
    white-space: nowrap;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  }
}

/* ============================================================
   === COMPONENT: MobileCaseCard ===
   ============================================================ */
.tc-mobile-case-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--card-bg);
  border: 1px solid rgba(97,71,40,0.55);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s;
  margin-bottom: 10px;
}
.tc-mobile-case-card:hover { border-color: rgba(163,127,64,0.7); }
.tc-mobile-case-card--locked { opacity: 0.65; }
.tc-mobile-case-card__cover {
  width: 90px; flex-shrink: 0;
  background: var(--panel-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 22px;
  color: rgba(128,96,54,0.4);
  overflow: hidden; position: relative;
}
.tc-mobile-case-card__cover img {
  width: 100%; height: 100%; object-fit: cover;
}
.tc-mobile-case-card__body {
  flex: 1; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.tc-mobile-case-card__num {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  color: var(--red); letter-spacing: 1px;
}
.tc-mobile-case-card__title {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--text-pri); line-height: 1.2;
}
.tc-mobile-case-card__meta {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-muted);
}
.tc-mobile-case-card__progress-wrap {
  height: 4px; background: rgba(97,71,40,0.4); border-radius: 2px;
  overflow: hidden; margin-top: 2px;
}
.tc-mobile-case-card__progress-fill {
  height: 100%; background: var(--gold); border-radius: 2px;
}
.tc-mobile-case-card__action {
  margin-top: auto;
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: var(--gold);
}

/* ============================================================
   === COMPONENT: MobileEvidenceRow ===
   ============================================================ */
.tc-mobile-ev-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel-bg);
  border: 1px solid rgba(97,71,40,0.55);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.12s;
  margin-bottom: 6px;
}
.tc-mobile-ev-row:hover { border-color: rgba(163,127,64,0.7); }
.tc-mobile-ev-row--new { border-color: rgba(242,193,68,0.6); }
.tc-mobile-ev-row--critical { border-color: rgba(209,48,30,0.6); }
.tc-mobile-ev-row__thumb {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 6px; background: var(--card-bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 20px; color: rgba(128,96,54,0.4);
}
.tc-mobile-ev-row__thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.tc-mobile-ev-row__body { flex: 1; min-width: 0; }
.tc-mobile-ev-row__code {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: var(--gold-dim); margin-bottom: 3px;
}
.tc-mobile-ev-row__title {
  font-size: 13px; font-weight: 600; color: var(--text-pri);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-mobile-ev-row__type {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-muted);
  margin-top: 2px;
}
.tc-mobile-ev-row__badge {
  font-family: var(--font-mono); font-size: 8px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
  background: rgba(242,193,68,0.18); color: var(--gold);
  flex-shrink: 0;
}

/* ============================================================
   === COMPONENT: MobileSuspectRow ===
   ============================================================ */
.tc-mobile-sus-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel-bg);
  border: 1px solid rgba(97,71,40,0.55);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.12s;
  margin-bottom: 6px;
}
.tc-mobile-sus-row:hover { border-color: rgba(163,127,64,0.7); }
.tc-mobile-sus-row--high   { border-left: 3px solid var(--red); }
.tc-mobile-sus-row--medium { border-left: 3px solid var(--orange); }
.tc-mobile-sus-row--locked { opacity: 0.55; }
.tc-mobile-sus-row__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(97,71,40,0.6);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.tc-mobile-sus-row__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tc-mobile-sus-row__body { flex: 1; min-width: 0; }
.tc-mobile-sus-row__name {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--text-pri); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-mobile-sus-row__role {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); margin-top: 2px;
}
.tc-mobile-sus-row__action {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  padding: 6px 12px; border-radius: 6px;
  border: 1.5px solid rgba(242,193,68,0.65);
  background: rgba(242,193,68,0.1);
  color: var(--gold); white-space: nowrap; text-decoration: none;
  flex-shrink: 0;
}
.tc-mobile-sus-row__locked {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted); flex-shrink: 0;
}

/* ============================================================
   === COMPONENT: MobileChatBubble ===
   ============================================================ */
.tc-mobile-chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 88%;
}
.tc-mobile-chat-bubble--detective { align-self: flex-start; }
.tc-mobile-chat-bubble--npc       { align-self: flex-end; }

.tc-mobile-chat-bubble__label {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700; letter-spacing: 1px;
}
.tc-mobile-chat-bubble--detective .tc-mobile-chat-bubble__label { color: var(--gold-dim); }
.tc-mobile-chat-bubble--npc       .tc-mobile-chat-bubble__label { color: var(--red); text-align: right; }

.tc-mobile-chat-bubble__text {
  font-size: 14px; line-height: 1.6;
  padding: 10px 14px;
}
.tc-mobile-chat-bubble--detective .tc-mobile-chat-bubble__text {
  background: var(--card-hov);
  border: 1px solid rgba(97,71,40,0.6);
  color: var(--text-pri);
  border-radius: 4px 14px 14px 14px;
}
.tc-mobile-chat-bubble--npc .tc-mobile-chat-bubble__text {
  background: rgba(209,48,30,0.20);
  border: 1px solid rgba(209,48,30,0.55);
  color: var(--text-pri);
  border-radius: 14px 4px 14px 14px;
}

/* ============================================================
   === COMPONENT: MobileInterviewInput (fixed bottom bar) ===
   ============================================================ */
.tc-mobile-interview-input-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--nav-bg);
  border-top: 1px solid rgba(163,127,64,0.55);
  padding: 10px 12px;
  display: none;   /* shown only in interview on mobile */
  align-items: center;
  gap: 8px;
  z-index: 105;
}
body.tc-mobile .tc-interview-layout ~ .tc-mobile-interview-input-bar { display: flex; }

/* ============================================================
   === COMPONENT: MobileAccusationBar ===
   ============================================================ */
.tc-mobile-accusation-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: 56px;  /* directly above bottom tab bar (command bar is hidden on mobile) */
  height: 40px;
  z-index: 108;
  background: var(--nav-bg);
  border-top: 1px solid;
  padding: 0 12px;
  display: none;  /* activated below */
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body.tc-mobile .tc-mobile-accusation-bar { display: flex; }

.tc-mobile-accusation-bar--not-ready {
  border-top-color: rgba(209,48,30,0.4);
  background: rgba(209,48,30,0.05);
}
.tc-mobile-accusation-bar--partial {
  border-top-color: rgba(239,137,40,0.4);
  background: rgba(239,137,40,0.05);
}
.tc-mobile-accusation-bar--ready {
  border-top-color: rgba(65,186,110,0.5);
  background: rgba(65,186,110,0.05);
}

/* Action buttons inside the strip */
.tc-mobile-action-btn {
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid rgba(128,96,54,0.4);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-sec);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
  letter-spacing: 0.03em;
}
.tc-mobile-action-btn:active { background: rgba(255,255,255,0.06); }
.tc-mobile-action-btn--accuse {
  border-width: 1.5px;
}

/* ============================================================
   === MOBILE: Interview room overrides (no bottom tabs) ===
   When in interview room, hide bottom tabs + show back bar
   ============================================================ */
.tc-interview-back-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 52px;
  background: var(--nav-bg);
  border-top: 1px solid rgba(97,71,40,0.55);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 110;
}
body.tc-mobile.tc-page-interview .tc-interview-back-mobile-bar { display: flex; }
body.tc-mobile.tc-page-interview .tc-bottom-tab-bar { display: none !important; }
body.tc-mobile.tc-page-interview .tc-board-wrap { padding-bottom: 52px !important; }
body.tc-mobile.tc-page-interview .tc-command-bar { display: none !important; }

/* ============================================================
   === MURDER BOARD: mobile panel tabs (already exists, polish) ===
   ============================================================ */
@media (max-width: 767px) {
  .tc-board-mobile-tabs {
    position: sticky;
    top: 56px;  /* below mobile nav */
    z-index: 30;
    background: var(--cork-dark);
    padding: 8px 10px 0;
    gap: 4px;
    border-bottom-color: rgba(97,71,40,0.6);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tc-board-mobile-tabs::-webkit-scrollbar { display: none; }
  .tc-board-mobile-tab {
    padding: 7px 14px;
    font-size: 10px;
    white-space: nowrap;
    min-height: 34px;
  }
}

/* ============================================================
   SAFE AREA: notch / home-bar support on iOS
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .tc-bottom-tab-bar {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(56px + env(safe-area-inset-bottom));
  }
  body.tc-mobile .tc-board-wrap {
    padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
  }
  body.tc-mobile .tc-mobile-accusation-bar {
    bottom: calc(56px + env(safe-area-inset-bottom)) !important;
  }
}

/* ============================================================
   LOBBY: mobile list / desktop grid toggle
   ============================================================ */
.tc-lobby-mobile-list  { display: none; }   /* hidden on desktop/tablet */
.tc-lobby-cases--grid  { display: grid; }   /* visible on desktop/tablet */

body.tc-mobile .tc-lobby-mobile-list  { display: block !important; }
body.tc-mobile .tc-lobby-cases--grid  { display: none !important; }

/* Reduce case cover height on mobile inside the grid (if grid still shows) */
@media (max-width: 767px) {
  .tc-lobby-case-cover { height: 140px !important; }
  .tc-lobby-case-body  { padding: 12px 14px 14px !important; }
  .tc-lobby-case-title { font-size: 14px !important; }
  .tc-lobby-case-summary { font-size: 11px !important; -webkit-line-clamp: 2; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
}

/* Lobby sidebar: collapse to bottom on mobile */
@media (max-width: 767px) {
  .tc-lobby-main { grid-template-columns: 1fr !important; }
  .tc-lobby-sidebar { border-radius: 10px; margin-top: 16px; }
}

/* ============================================================
   === FIGMA MOBILE DESIGN SYSTEM — per-screen overrides ===
   All rules gated to body.tc-mobile or max-width: 767px
   ============================================================ */

/* ── Bottom tab bar: red active state (Figma) ── */
body.tc-mobile .tc-bottom-tab.active {
  color: #d1301e !important;
  background: rgba(209,48,30,0.15) !important;
}
body.tc-mobile .tc-bottom-tab.active::before {
  background: #d1301e !important;
  box-shadow: 0 0 8px rgba(209,48,30,0.5) !important;
}

/* ── Lobby: mobile content needs top padding for fixed mobile nav ── */
body.tc-mobile .tc-lobby-content-wrap { padding-top: 56px !important; }
body.tc-mobile .tc-lobby-wrap {
  padding-top: 14px !important;
  padding-bottom: 90px !important;
}

/* ── Lobby: mobile profile card (shown only on mobile) ── */
.tc-mob-profile-card { display: none; }
body.tc-mobile .tc-mob-profile-card {
  display: block;
  background: #2b2113;
  border-radius: 12px;
  padding: 18px 16px 18px 20px;
  margin-bottom: 18px;
  border-left: 4px solid #f2c144;
}
.tc-mob-profile-card__rank {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  color: #f2c144; letter-spacing: 1px; margin-bottom: 4px;
}
.tc-mob-profile-card__name {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600;
  color: #f5ead8; margin-bottom: 4px;
}
.tc-mob-profile-card__xp-row {
  font-family: var(--font-mono);
  font-size: 12px; color: #c3a779; margin-bottom: 8px;
}
.tc-mob-profile-card__bar-wrap {
  height: 6px; background: #1e170d;
  border-radius: 3px; overflow: hidden;
  width: 240px; max-width: 100%;
}
.tc-mob-profile-card__bar-fill {
  height: 100%; background: #f2c144; border-radius: 3px;
}
.tc-mob-profile-card__bar-sub {
  font-family: var(--font-mono);
  font-size: 10px; color: #8b6d49; margin-top: 4px;
}

/* ── Lobby: YOUR CASES heading ── */
.tc-mob-your-cases { display: none; }
body.tc-mobile .tc-mob-your-cases {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  color: #8b6d49; letter-spacing: 2px;
  margin-bottom: 6px;
}
.tc-mob-your-cases-bar { display: none; }
body.tc-mobile .tc-mob-your-cases-bar {
  display: block;
  height: 2px; width: 32px;
  background: rgba(242,193,68,0.5);
  margin-bottom: 14px;
}

/* ── Lobby bottom tab bar (Cases / Rankings / Profile) ── */
.tc-lobby-tabs {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  background: #0c0905;
  border-top: 1px solid rgba(80,62,38,0.6);
  z-index: 110;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.tc-mobile .tc-lobby-tabs { display: flex; }
.tc-lobby-tab {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 10px; gap: 4px;
  text-decoration: none;
  color: #8b6d49; min-height: 60px;
}
.tc-lobby-tab__pill {
  width: 56px; height: 26px;
  border-radius: 8px;
  background: rgba(30,23,13,0.3);
  display: flex; align-items: center; justify-content: center;
}
.tc-lobby-tab--active { color: #d1301e; }
.tc-lobby-tab--active .tc-lobby-tab__pill { background: rgba(209,48,30,0.2); }
.tc-lobby-tab__label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
}

/* ── Murder board: horizontal sub-tab strip matching Figma ── */
@media (max-width: 767px) {
  .tc-board-mobile-tabs {
    display: flex !important;
    overflow-x: auto; scrollbar-width: none;
    gap: 4px; padding: 8px 8px;
    background: #1e170d;
    border-bottom: 1px solid rgba(80,62,38,0.6);
    position: sticky; top: 56px; z-index: 30;
  }
  .tc-board-mobile-tabs::-webkit-scrollbar { display: none; }
  .tc-board-mobile-tab {
    padding: 6px 16px; border-radius: 6px;
    font-family: var(--font-mono); font-size: 12px; font-weight: 500;
    white-space: nowrap; color: #8b6d49;
    background: rgba(30,23,13,0.35);
    text-decoration: none; border: none; cursor: pointer; flex-shrink: 0;
  }
  .tc-board-mobile-tab--active,
  .tc-board-mobile-tab.active {
    background: rgba(209,48,30,0.85);
    color: #f5ead8; font-weight: 600;
  }
}

/* ── Evidence vault: mobile list ── */
.tc-mob-ev-list { display: none; }
body.tc-mobile .tc-mob-ev-list { display: block; }
body.tc-mobile .tc-evidence-grid { display: none !important; }

.tc-mob-ev-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px; background: #2b2113;
  border-radius: 10px; margin-bottom: 8px;
  text-decoration: none; position: relative;
}
.tc-mob-ev-row__dot {
  width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0;
}
.tc-mob-ev-row__body { flex: 1; min-width: 0; }
.tc-mob-ev-row__code {
  font-family: var(--font-mono); font-size: 10px;
  color: #8b6d49; margin-bottom: 2px;
}
.tc-mob-ev-row__title {
  font-size: 14px; font-weight: 600; color: #f5ead8;
}
.tc-mob-ev-row__type {
  font-family: var(--font-mono); font-size: 11px; color: #8b6d49; margin-top: 2px;
}
.tc-mob-ev-row__chevron { color: #8b6d49; font-size: 16px; flex-shrink: 0; }
.tc-mob-ev-row__badge {
  position: absolute; right: 38px; top: 12px;
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
}
.tc-mob-ev-row__badge--key { background: rgba(242,193,68,0.2); color: #f2c144; }
.tc-mob-ev-row__badge--new { background: rgba(65,186,110,0.2); color: #41ba6e; }

/* ── Suspects list: mobile cards with P/T bars ── */
.tc-mob-sus-list { display: none; }
body.tc-mobile .tc-mob-sus-list { display: block; }
body.tc-mobile .tc-suspect-cards { display: none !important; }

.tc-mob-sus-card {
  background: #2b2113; border-radius: 12px;
  padding: 16px 14px; margin-bottom: 10px;
}
.tc-mob-sus-card__top {
  display: flex; align-items: flex-start;
  gap: 14px; margin-bottom: 10px;
}
.tc-mob-sus-card__avatar {
  width: 56px; height: 56px; border-radius: 28px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.tc-mob-sus-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tc-mob-sus-card__info { flex: 1; }
.tc-mob-sus-card__name {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: #f5ead8; margin-bottom: 2px;
}
.tc-mob-sus-card__role {
  font-family: var(--font-mono); font-size: 12px;
  color: #8b6d49; margin-bottom: 6px;
}
.tc-mob-sus-card__status {
  display: inline-block; padding: 2px 8px;
  border-radius: 6px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
}
.tc-mob-sus-card__status--yes { background: rgba(65,186,110,0.2); color: #41ba6e; }
.tc-mob-sus-card__status--no  { background: rgba(239,137,40,0.2);  color: #ef8928; }
.tc-mob-sus-card__action { margin-left: auto; align-self: center; }
.tc-mob-sus-card__btn {
  padding: 6px 10px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  text-decoration: none; display: block; white-space: nowrap;
}
.tc-mob-sus-card__btn--interview  { background: #d1301e; color: #f5ead8; }
.tc-mob-sus-card__btn--reinterview { background: rgba(30,23,13,0.8); color: #c3a779; }
.tc-mob-sus-card__bars {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px 0 4px; border-top: 1px solid rgba(97,71,40,0.30);
  margin-top: 4px;
}
.tc-mob-sus-card__bar-group {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.tc-mob-sus-card__bar-lbl {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.6px; flex-shrink: 0;
}
.tc-mob-sus-card__bar-val {
  font-family: var(--font-mono); font-size: 10px; text-align: right;
}

/* ── Player Stats: mobile hero (centered avatar + XP bar) ── */
.tc-mob-stats-hero { display: none; }
body.tc-mobile .tc-mob-stats-hero {
  display: flex !important; flex-direction: column;
  align-items: center; padding: 24px 16px 0;
  background: #1e170d;
}
.tc-mob-stats-hero__avatar {
  width: 80px; height: 80px; border-radius: 40px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  background: rgba(185,28,28,0.22); color: #d1301e; margin-bottom: 10px;
  overflow: hidden;
}
.tc-mob-stats-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tc-mob-stats-hero__name {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: #f5ead8; margin-bottom: 4px; text-align: center;
}
.tc-mob-stats-hero__rank {
  font-family: var(--font-mono); font-size: 12px;
  color: #8b6d49; text-align: center; margin-bottom: 14px;
}
.tc-mob-stats-hero__bar-wrap {
  height: 8px; background: #302517; border-radius: 4px;
  overflow: hidden; width: 100%; max-width: 340px; margin-bottom: 6px;
}
.tc-mob-stats-hero__bar-fill { height: 100%; background: #f2c144; border-radius: 4px; }
.tc-mob-stats-hero__bar-labels {
  display: flex; justify-content: space-between;
  width: 100%; max-width: 340px;
  font-family: var(--font-mono); font-size: 10px; color: #8b6d49;
  margin-bottom: 16px;
}

/* Stats grid (2-col) on mobile */
.tc-mob-stats-grid { display: none; }
body.tc-mobile .tc-mob-stats-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 16px;
}
.tc-mob-stats-cell {
  background: #2b2113; border-radius: 8px; padding: 14px;
}
.tc-mob-stats-cell__label {
  font-family: var(--font-mono); font-size: 10px; color: #8b6d49; margin-bottom: 6px;
}
.tc-mob-stats-cell__val {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
}

/* Recent sessions on mobile */
.tc-mob-recent-sessions { display: none; }
body.tc-mobile .tc-mob-recent-sessions { display: block !important; padding: 0 16px 16px; }
.tc-mob-session-row {
  background: #2b2113; border-radius: 8px;
  padding: 14px; margin-bottom: 8px;
  border-left: 4px solid;
  display: flex; flex-direction: column; gap: 4px;
}
.tc-mob-session-row__title {
  font-family: var(--font-display); font-size: 12px; font-weight: 600; color: #f5ead8;
}
.tc-mob-session-row__footer {
  display: flex; align-items: center; gap: 8px;
}
.tc-mob-session-row__badge {
  padding: 2px 8px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
}
.tc-mob-session-row__date {
  font-family: var(--font-mono); font-size: 10px; color: rgba(139,109,73,0.6);
  margin-left: auto;
}

/* Hide desktop player-stats content on mobile */
body.tc-mobile .tc-ps-desktop { display: none !important; }

/* ── Leaderboard: mobile layout ── */
.tc-mob-lb-rank { display: none; }
body.tc-mobile .tc-mob-lb-rank {
  display: flex !important; align-items: center; justify-content: space-between;
  background: #2b2113; border-radius: 10px;
  padding: 12px 16px; margin: 12px 12px 0;
  border-left: 4px solid rgba(242,193,68,0.8);
}
.tc-mob-lb-rank__left {}
.tc-mob-lb-rank__label {
  font-family: var(--font-mono); font-size: 11px; color: #8b6d49; margin-bottom: 2px;
}
.tc-mob-lb-rank__val {
  font-family: var(--font-display); font-size: 14px; font-weight: 700; color: #c3a779;
}
.tc-mob-lb-rank__xp {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: #f2c144;
}
.tc-mob-lb-list { display: none; }
body.tc-mobile .tc-mob-lb-list { display: block !important; padding: 12px; }
.tc-mob-lb-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(30,23,13,0.5); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 6px;
}
.tc-mob-lb-row--me {
  background: #2b2113;
  border: 1px solid rgba(242,193,68,0.08);
  border-left: 3px solid rgba(242,193,68,0.8);
}
.tc-mob-lb-row__rank {
  font-family: var(--font-mono); font-size: 13px; color: #8b6d49; width: 28px;
}
.tc-mob-lb-row__rank--me { color: #f2c144; }
.tc-mob-lb-row__name { flex: 1; font-family: var(--font-display); font-size: 13px; color: #c3a779; }
.tc-mob-lb-row__name--me { color: #f5ead8; }
.tc-mob-lb-row__xp { font-family: var(--font-mono); font-size: 12px; color: #8b6d49; }
.tc-mob-lb-row__xp--me { color: #f2c144; }
body.tc-mobile .tc-lb-desktop { display: none !important; }

/* ── Session history: mobile ── */
.tc-mob-sh-list { display: none; }
body.tc-mobile .tc-mob-sh-list { display: block !important; }
body.tc-mobile .tc-sh-desktop { display: none !important; }
.tc-mob-sh-card {
  background: #2b2113; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px;
  border-left: 4px solid; position: relative;
}
.tc-mob-sh-card--solved   { border-left-color: rgba(65,186,110,0.8); }
.tc-mob-sh-card--active   { border-left-color: rgba(242,193,68,0.8); }
.tc-mob-sh-card--abandoned{ border-left-color: rgba(139,109,73,0.8); }
.tc-mob-sh-card__num {
  font-family: var(--font-mono); font-size: 10px; color: #8b6d49; margin-bottom: 4px;
}
.tc-mob-sh-card__title {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  color: #f5ead8; margin-bottom: 4px;
}
.tc-mob-sh-card__phase { font-family: var(--font-mono); font-size: 11px; color: #8b6d49; }
.tc-mob-sh-card__meta { font-family: var(--font-mono); font-size: 10px; color: rgba(139,109,73,0.6); }
.tc-mob-sh-card__badge {
  position: absolute; top: 14px; right: 14px;
  padding: 3px 8px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
}
.tc-mob-sh-card__badge--solved   { background: rgba(65,186,110,0.2);  color: #41ba6e; }
.tc-mob-sh-card__badge--active   { background: rgba(242,193,68,0.2);  color: #f2c144; }
.tc-mob-sh-card__badge--abandoned{ background: rgba(139,109,73,0.2); color: #8b6d49; }

/* ── Achievements: mobile list ── */
.tc-mob-ach-list { display: none; }
body.tc-mobile .tc-mob-ach-list { display: block !important; }
body.tc-mobile .tc-ach-desktop { display: none !important; }
.tc-mob-ach-card {
  background: #2b2113; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 14px;
  border-left: 4px solid;
}
.tc-mob-ach-card--locked { opacity: 0.45; }
.tc-mob-ach-card__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.tc-mob-ach-card__body { flex: 1; min-width: 0; }
.tc-mob-ach-card__name {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  color: #f5ead8; margin-bottom: 2px;
}
.tc-mob-ach-card__desc { font-size: 11px; color: rgba(139,109,73,0.8); }
.tc-mob-ach-card__xp {
  padding: 3px 8px; border-radius: 6px;
  background: rgba(242,193,68,0.18); color: #f2c144;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; flex-shrink: 0;
}

/* ── Auth / Login: mobile layout ── */
.auth-mobile-hero { display: none; }
@media (max-width: 767px) {
  .auth-root { grid-template-columns: 1fr !important; min-height: 100vh; }
  .auth-hero { display: none !important; }
  .auth-form-panel { padding: 0 !important; }
  .auth-form-inner { padding: 0 !important; max-width: 100% !important; }
  .auth-mobile-hero {
    display: block !important;
    background: #0c0905;
    padding: 60px 16px 28px;
    text-align: center;
    border-bottom: 1px solid rgba(80,62,38,0.6);
  }
  .auth-mobile-hero__logo {
    width: 80px; height: 80px; border-radius: 40px;
    background: rgba(185,28,28,0.15);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: #d1301e;
  }
  .auth-mobile-hero__title {
    font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #f5ead8;
  }
  .auth-mobile-hero__title span { color: #d1301e; }
  .auth-mobile-hero__sub { font-family: var(--font-mono); font-size: 14px; color: #8b6d49; margin-top: 4px; }
  .auth-mobile-form-area { padding: 28px 16px 40px; background: #1e170d; min-height: calc(100vh - 220px); }
  .auth-eyebrow { text-align: center; }
  .auth-heading { text-align: center; font-size: 16px !important; }
  .auth-subheading { display: none; }
  .auth-input {
    background: #302517 !important; border: none !important;
    border-radius: 10px !important; height: 44px !important;
  }
  .auth-btn { background: #d1301e !important; border-radius: 10px !important; height: 48px !important; }
}

/* ── Timeline: prevent horizontal scroll on full-page vertical layout ── */
@media (max-width: 767px) {
  .tc-timeline-wrap.tc-timeline-page { overflow-x: visible !important; padding: 0 !important; }
  .tc-timeline-wrap.tc-timeline-page .tc-panel,
  .tc-timeline-wrap.tc-timeline-page .tc-timeline { min-width: unset !important; width: 100% !important; }
  .tc-timeline-wrap.tc-timeline-page .tc-timeline__events { flex-direction: column !important; gap: 0 !important; }
  .tc-timeline-wrap.tc-timeline-page .tc-timeline__event { flex: none !important; align-items: flex-start !important; flex-direction: row !important; gap: 10px !important; }
}

/* ── Notes: gold left border on cards ── */
@media (max-width: 767px) {
  .tc-note-card {
    border-left: 4px solid rgba(242,193,68,0.85) !important;
    background: #2b2113 !important;
    border-radius: 10px !important;
  }
}

/* ── Tasks: XP badge in task rows ── */
@media (max-width: 767px) {
  .tc-task-row { background: #1e170d !important; border-radius: 6px !important; margin-bottom: 2px !important; }
  .tc-task-group { margin-bottom: 12px !important; }
  .tc-task-group__header {
    background: #2b2113 !important; border-radius: 8px !important;
    margin-bottom: 4px !important; border-left: 4px solid !important;
  }
}

/* ── Verdict: mobile green/red header strip ── */
@media (max-width: 767px) {
  .tc-verdict-wrap { padding: 0 !important; min-height: calc(100vh - 56px); }
  .tc-verdict-card {
    max-width: 100% !important; border-radius: 0 !important;
    border: none !important; min-height: calc(100vh - 56px);
  }
  .tc-verdict-card__accent { height: 6px !important; border-radius: 0 !important; }
  .tc-verdict-body { padding: 20px 16px !important; }
  .tc-verdict-stats { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .tc-verdict-xp__value { font-size: 28px !important; }
  .tc-verdict-actions { grid-template-columns: 1fr !important; gap: 8px !important; }
}

/* ── Suspect Dossier: mobile centered header ── */
@media (max-width: 767px) {
  .tc-dossier-mobile-header {
    display: flex !important; flex-direction: column;
    align-items: center; padding: 24px 16px 16px;
    background: #1e170d;
  }
  .tc-dossier-mobile-header__avatar {
    width: 88px; height: 88px; border-radius: 44px;
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 20px; font-weight: 700;
    margin-bottom: 12px; overflow: hidden;
  }
}

/* ── Interview room: mobile pressure/trust in header ── */
@media (max-width: 767px) {
  .tc-interview-statusbar {
    padding: 10px 12px !important;
    background: #1e170d !important;
    border-bottom: 1px solid rgba(80,62,38,0.6) !important;
  }
  .tc-interview-pt-bars {
    display: flex !important; gap: 12px;
    align-items: center; margin-top: 6px;
  }
}

/* ── Evidence viewer: mobile photo + analysis ── */
@media (max-width: 767px) {
  .tc-ev-viewer { gap: 0 !important; }
  .tc-ev-photo-section {
    background: #2b2113; padding: 20px; display: flex;
    flex-direction: column; align-items: center; gap: 8px;
  }
  .tc-ev-photo-placeholder {
    width: 128px; height: 128px; border-radius: 12px;
    background: #1e170d;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 11px; color: #8b6d49;
  }
}

/* ============================================================
   === HIDE DESKTOP CHROME ON MOBILE — critical missing rules ===
   These elements were restyled but never hidden, causing the
   "PC UI just smaller" appearance on mobile.
   ============================================================ */

/* ── Lobby: hide desktop header & sidebar entirely ── */
body.tc-mobile .tc-lobby-header  { display: none !important; }
body.tc-mobile .tc-lobby-sidebar { display: none !important; }

/* ── Case pages: hide desktop tcp-header (mobile nav shows page context) ── */
body.tc-mobile .tcp-header { display: none !important; }

/* ── Case pages: tighten content area top padding without big header ── */
body.tc-mobile .tc-content-page {
  padding-top: 12px !important;
}

/* ── Murder board: hide desktop panel chrome on mobile ── */
body.tc-mobile .tc-board .tc-panel__header { display: none !important; }
body.tc-mobile .tc-board .tc-pin           { display: none !important; }

/* ── Notes add-input: keep visible full-width on mobile ── */
body.tc-mobile .tc-note-add-wrap {
  padding: 10px 12px;
  background: #1e170d;
  border-bottom: 1px solid rgba(80,62,38,0.6);
}
body.tc-mobile .tc-note-add-input {
  width: 100%; background: #302517 !important;
  border: none !important; border-radius: 10px !important;
  height: 44px; padding: 0 50px 0 16px;
}

/* ── Filter tabs: horizontal scroll on mobile ── */
body.tc-mobile .tc-filter-tabs {
  display: flex !important;
  overflow-x: auto; scrollbar-width: none;
  flex-wrap: nowrap !important;
  gap: 6px; padding: 10px 12px;
  background: #1e170d;
  border-bottom: 1px solid rgba(80,62,38,0.6);
}
body.tc-mobile .tc-filter-tabs::-webkit-scrollbar { display: none; }
body.tc-mobile .tc-filter-tab {
  flex-shrink: 0;
  height: 26px !important; padding: 0 12px !important;
  border-radius: 6px !important; font-size: 11px !important;
  background: rgba(30,23,13,0.35);
  border: 1px solid rgba(80,62,38,0.4) !important;
  color: #8b6d49; white-space: nowrap;
}
body.tc-mobile .tc-filter-tab--active {
  background: rgba(245,234,216,0.9) !important;
  color: #0c0905 !important;
  border-color: transparent !important;
  font-weight: 600 !important;
}

/* ── Evidence index: count/status row still visible ── */
body.tc-mobile .tc-mob-ev-count-row {
  display: flex; justify-content: space-between;
  padding: 8px 12px 4px;
  font-family: var(--font-mono); font-size: 12px;
}

/* ── Player stats / leaderboard / session history / achievements:
      desktop wrappers already hidden via .tc-xx-desktop rules above.
      Also hide any inline-styled desktop wrappers that slipped through. ── */
body.tc-mobile .tc-stats-grid { display: none !important; }
body.tc-mobile .tc-profile-hero { display: none !important; }

/* ── Lobby: hide the "How to play" link on mobile (replaced by bottom nav) ── */
body.tc-mobile .tc-lobby-eyebrow { display: none !important; }
body.tc-mobile .tc-lobby-title   { display: none !important; }
body.tc-mobile .tc-lobby-subtitle { display: none !important; }

/* ── Bottom tab bar: use Figma 5-tab layout on case pages ── */
@media (max-width: 767px) {
  .tc-bottom-tab-bar { justify-content: space-around !important; }
  .tc-bottom-tab { min-height: 56px !important; }
}

/* ── Lobby: hide desktop divider on mobile ── */
body.tc-mobile .tc-lobby-divider { display: none !important; }

/* ── Lobby mobile list: remove top margin since header is gone ── */
body.tc-mobile .tc-lobby-mobile-list { margin-top: 0 !important; }

/* ── Mobile top nav on lobby: show logo as "true crAIme" ── */
body.tc-mobile .tc-mobile-top-nav {
  justify-content: space-between;
}

/* ── Case pages: mobile list container gets padding ── */
body.tc-mobile .tc-mob-ev-list,
body.tc-mobile .tc-mob-sus-list {
  padding: 10px 12px 0;
}

/* ── Player stats: hide desktop inline grid on mobile ── */
body.tc-mobile [style*="grid-template-columns:repeat(12"] { display: none !important; }
body.tc-mobile [style*="grid-column:span 3"] { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   MOBILE FIXES — footer, content pages, drawer overlay
   ══════════════════════════════════════════════════════════════ */

/* ── Footer: hidden on mobile (bottom tab bar serves as bottom chrome) ── */
body.tc-mobile footer { display: none !important; }

/* ── Settings / locked-case / case-preview: reduce inline padding on mobile ── */
body.tc-mobile [style*="max-width:900px"],
body.tc-mobile [style*="max-width:1000px"],
body.tc-mobile [style*="max-width:1100px"] {
  padding-left: 16px !important;
  padding-right: 16px !important;
  padding-top: 16px !important;
  padding-bottom: 110px !important;
}

/* ── Mobile menu drawer overlay ── */
.tc-mob-menu-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 500;
  backdrop-filter: blur(4px);
}
body.tc-mobile .tc-mob-menu-overlay { display: block; }

/* ── Mobile menu drawer ── */
.tc-mob-menu-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px;
  background: #0c0905;
  border-left: 1px solid rgba(144,112,46,0.25);
  z-index: 501;
  display: flex; flex-direction: column;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
}
.tc-mob-menu-drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(144,112,46,0.15);
}
.tc-mob-menu-drawer__logo {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; color: var(--gold-dim);
  text-transform: uppercase;
}
.tc-mob-menu-drawer__close {
  background: rgba(76,55,31,0.25);
  border: 1px solid rgba(110,81,48,0.4);
  color: var(--text-sec);
  width: 32px; height: 32px; border-radius: 6px;
  font-size: 18px; cursor: pointer;
  display: grid; place-items: center;
}
.tc-mob-menu-drawer__links {
  flex: 1; overflow-y: auto;
  padding: 12px 0;
}
.tc-mob-menu-drawer__link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-sec); text-decoration: none;
  border-bottom: 1px solid rgba(144,112,46,0.08);
  transition: color 0.15s, background 0.15s;
}
.tc-mob-menu-drawer__link:hover { color: var(--gold); background: rgba(144,112,46,0.06); }
.tc-mob-menu-drawer__link--danger { color: rgba(209,48,30,0.7); }
.tc-mob-menu-drawer__link--danger:hover { color: var(--red); }
.tc-mob-menu-drawer__icon { font-size: 16px; opacity: 0.8; }
.tc-mob-menu-drawer__footer {
  padding: 16px 22px;
  border-top: 1px solid rgba(144,112,46,0.12);
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE BOARD: show tc-mob-board, hide tc-desk-board
   These classes had no CSS rules at all — both were rendering.
   ══════════════════════════════════════════════════════════════ */

/* Desktop: show desk board, hide mob board */
.tc-desk-board { display: block; height: 100vh; overflow: hidden; }
.tc-mob-board  { display: none; }

/* Mobile: flip — show mobile layout, hide desktop */
@media (max-width: 767px) {
  .tc-desk-board { display: none !important; }
  .tc-mob-board  { display: block !important; }
}

/* ── tc-mobile-nav: hide on mobile (tc-bottom-tab-bar replaces it) ── */
/* The main CSS shows .tc-mobile-nav at max-width:1024px, but on mobile
   the tc-bottom-tab-bar serves as the nav. */
@media (max-width: 767px) {
  .tc-mobile-nav { display: none !important; }
}

/* ── Hide desktop sidebar on mobile (safety rule) ── */
@media (max-width: 767px) {
  .tc-sidebar { display: none !important; }
}
