/* hub/ui/css/mobile.css · Hub Mobile · Sprint 1 of 6.
 *
 * The responsive shell · 3 breakpoints layered over the existing
 * desktop styles. Desktop unchanged. Tablet collapses the sidebar to
 * icon-only. Mobile hides the sidebar and shows a 56px bottom nav.
 *
 * Touch ergonomics ·
 *   · 48px minimum tap targets (Apple HIG / Material both agree)
 *   · safe-area insets so the iPhone home bar doesn't eat content
 *   · gold active state matches the rest of the brand
 *   · respects prefers-reduced-motion
 *
 * Loaded AFTER hub.css so the @media rules win on cascade.
 */

/* ── Tablet · 768-1024 px · sidebar collapses to icon-only ─── */

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --gs-sidebar-width: 56px;
  }
  #gs-sidebar {
    overflow-x: hidden;
  }
  /* Hide the section header labels and badges · keep only the icon */
  .gs-nav-os-label,
  .gs-nav-os-badge,
  .gs-nav-mywork-badge {
    display: none !important;
  }
  /* In sub-items, hide the text label · keep the leading icon */
  .gs-nav-item > span:not(.gs-nav-icon):not(.gs-nav-os-icon) {
    display: none;
  }
  .gs-nav-os-header {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  .gs-nav-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  .gs-nav-icon {
    margin: 0;
    font-size: 18px;
  }
  /* Tooltip on hover · pure CSS · the label appears to the right */
  .gs-nav-item[data-module]:hover::after {
    content: attr(data-module);
    position: absolute;
    left: calc(var(--gs-sidebar-width) + 8px);
    background: var(--ink-2, #0C0C14);
    color: var(--w90, #e8dcc0);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(200, 160, 74, .25);
    white-space: nowrap;
    font-size: 12px;
    z-index: 200;
    text-transform: capitalize;
  }
}

/* ── Mobile · < 768 px · sidebar hidden · bottom nav shown ── */

@media (max-width: 768px) {
  :root {
    --gs-topbar-height: 44px;  /* spec says 44 on mobile */
    --gs-bottomnav-height: 56px;
  }

  /* The legacy mobile sidebar (slide-in over content) is replaced by
   * the bottom-nav model. Keep the existing slide-in for the More
   * sheet · but hide the desktop sidebar entirely. */
  #gs-sidebar {
    display: none !important;
  }
  .gs-mobile-toggle {
    display: none !important;  /* superseded by the More tab */
  }

  /* Workspace gets bottom padding for the nav + safe-area inset. */
  #gs-workspace {
    padding-bottom: calc(var(--gs-bottomnav-height) + env(safe-area-inset-bottom, 0px) + 14px);
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Topbar trims · drop the search input + user name (icons stay). */
  .gs-search,
  .gs-user-name { display: none; }
  #gs-topbar {
    padding: 0 12px;
  }

  /* 48px min tap targets across the board on mobile. */
  .gs-nav-item,
  button,
  .btn,
  .gs-mobile-nav-item,
  .gs-mobile-sheet-item {
    min-height: 44px;
  }
}

/* ── Bottom navigation · only renders at mobile breakpoint ── */

#gs-bottom-nav {
  display: none;  /* desktop default */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--gs-bottomnav-height, 56px) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--ink-2, #0C0C14);
  border-top: 1px solid var(--gs-hairline);
  z-index: 40;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-around;
}

@media (max-width: 768px) {
  #gs-bottom-nav {
    display: flex;
  }
}

.gs-mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--w60, #8a8898);
  font-size: 10px;
  font-family: var(--mono, ui-monospace, monospace);
  letter-spacing: .04em;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 4px;
  transition: color .12s ease;
}
.gs-mobile-nav-item:active {
  background: rgba(200, 160, 74, .06);
}
.gs-mobile-nav-item.active {
  color: var(--gold, #c9a84c);
}
.gs-mobile-nav-icon {
  font-size: 18px;
  line-height: 1;
  position: relative;
}
.gs-mobile-nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  background: #dc4c4c;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.gs-mobile-nav-badge:empty { display: none; }

/* ── Mobile module sheet · slide-up drawer for the More tab ── */

#gs-mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 12, .65);
  backdrop-filter: blur(2px);
  z-index: 60;
  display: none;
  opacity: 0;
  transition: opacity .15s ease;
}
#gs-mobile-sheet-backdrop.open {
  display: block;
  opacity: 1;
}

#gs-mobile-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80vh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--ink-2, #0C0C14);
  border-top: 1px solid var(--gs-hairline);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .45);
  z-index: 70;
  transform: translateY(100%);
  transition: transform .2s ease;
  overflow-y: auto;
}
#gs-mobile-sheet.open {
  transform: translateY(0);
}
.gs-mobile-sheet-grip {
  width: 40px;
  height: 4px;
  margin: 8px auto 4px;
  background: rgba(200, 160, 74, .35);
  border-radius: 2px;
}
.gs-mobile-sheet-h {
  padding: 8px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gs-hairline);
}
.gs-mobile-sheet-h h2 {
  margin: 0;
  font-size: 14px;
  color: var(--w90, #e8dcc0);
}
.gs-mobile-sheet-close {
  background: transparent;
  border: none;
  color: var(--w60);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.gs-mobile-sheet-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--gs-hairline);
}
.gs-mobile-sheet-section:last-child { border-bottom: none; }
.gs-mobile-sheet-section-h {
  padding: 0 18px 8px;
  font: 600 10px var(--mono, monospace);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--w60, #8a8898);
}
.gs-mobile-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--w90, #e8dcc0);
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.gs-mobile-sheet-item:active {
  background: rgba(200, 160, 74, .08);
}
.gs-mobile-sheet-item-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Reduced motion · disable slide animations ──────────────── */

@media (prefers-reduced-motion: reduce) {
  #gs-mobile-sheet,
  #gs-mobile-sheet-backdrop {
    transition: none;
  }
}


/* hub-mobile-sprint2 · Command Center mobile dashboard ───────── */

.cc-mobile {
  padding: 16px 0 4px;
  max-width: 100%;
  color: var(--w90, #e8dcc0);
}
.cc-mobile-greeting {
  padding: 0 4px 14px;
}
.cc-mobile-greeting h1 {
  margin: 0;
  font-family: var(--serif, Georgia, serif);
  font-weight: 900;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--w90);
}
.cc-mobile-greeting .cc-mobile-date {
  margin-top: 4px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--w60, #8a8898);
  text-transform: uppercase;
}

.cc-mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}
.cc-mobile-card {
  background: var(--ink-2, #0C0C14);
  border: 1px solid var(--gs-hairline);
  border-radius: 8px;
  padding: 14px 12px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
}
.cc-mobile-card:active {
  background: rgba(200, 160, 74, .04);
}
.cc-mobile-card .lbl {
  font: 600 9px var(--mono, monospace);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--w60, #8a8898);
  margin-bottom: 6px;
}
.cc-mobile-card .num {
  font-family: var(--mono, monospace);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--w90);
}
.cc-mobile-card .sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--w60);
}
.cc-mobile-card.alert .num   { color: #dc4c4c; }
.cc-mobile-card.good .num    { color: #6a9a6a; }
.cc-mobile-card.gold .num    { color: var(--gold, #c9a84c); }

.cc-mobile-section {
  margin: 0 0 14px;
}
.cc-mobile-section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 6px;
  border-bottom: 1px solid var(--gs-hairline);
  margin-bottom: 8px;
}
.cc-mobile-section-h .t {
  font: 600 10px var(--mono, monospace);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--w60, #8a8898);
}
.cc-mobile-section-h a {
  font: 600 10px var(--mono, monospace);
  letter-spacing: .08em;
  color: var(--gold, #c9a84c);
  text-decoration: none;
}

.cc-mobile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px dotted rgba(255, 255, 255, .04);
  font-size: 13px;
  color: var(--w90);
  text-decoration: none;
  min-height: 44px;
}
.cc-mobile-row:last-child { border-bottom: none; }
.cc-mobile-row:active {
  background: rgba(200, 160, 74, .04);
}
.cc-mobile-row .sev {
  flex: 0 0 auto;
  font: 600 9px var(--mono, monospace);
  letter-spacing: .04em;
  padding: 2px 6px;
  border-radius: 2px;
  color: #0a0a0a;
}
.cc-mobile-row .ttl {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-mobile-row .meta {
  flex: 0 0 auto;
  font: 500 10px var(--mono, monospace);
  color: var(--w60);
}

.cc-mobile-empty {
  padding: 14px;
  text-align: center;
  color: #6a9a6a;
  font-style: italic;
  font-size: 12px;
}

.cc-mobile-pipeline-card {
  background: var(--ink-2);
  border: 1px solid var(--gs-hairline);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.cc-mobile-pipeline-card .b-title {
  font: 700 14px var(--serif, Georgia);
  color: var(--w90);
  margin-bottom: 2px;
}
.cc-mobile-pipeline-card .b-phase {
  font: 600 10px var(--mono, monospace);
  color: var(--gold);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cc-mobile-pipeline-card .b-meta {
  font-size: 12px;
  color: var(--w60);
}

.cc-mobile-overnight {
  font-size: 12px;
  color: var(--w90);
  line-height: 1.6;
  padding: 0 4px;
}
.cc-mobile-overnight .pass { color: #6a9a6a; }
.cc-mobile-overnight .warn { color: #c9a84c; }
.cc-mobile-overnight .fail { color: #dc4c4c; }


/* hub-mobile-sprint3 · My Work mobile ─────────────────────────── */

.mw-mobile { padding: 14px 0 8px; color: var(--w90, #e8dcc0); }

.mw-mobile-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 14px;
}
.mw-mobile-header h1 {
  margin: 0;
  font-family: var(--serif, Georgia);
  font-weight: 900;
  font-size: 22px;
  line-height: 1.15;
}
.mw-mobile-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: var(--gold, #c9a84c);
  color: #0a0a0a;
  font: 700 14px var(--mono, monospace);
}
.mw-mobile-count.zero { background: rgba(200,160,74,.12); color: var(--gold); }

.mw-mobile-pills { display: flex; gap: 8px; overflow-x: auto; padding: 0 4px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mw-mobile-pills::-webkit-scrollbar { display: none; }
.mw-mobile-pill { flex: 0 0 auto; background: var(--ink-2, #0C0C14); border: 1px solid var(--gs-hairline); border-radius: 16px; padding: 7px 14px; font: 600 11px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--w70, #8a8898); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.mw-mobile-pill.active { background: rgba(200,160,74,.12); color: var(--gold, #c9a84c); border-color: rgba(200,160,74,.35); }
.mw-mobile-pill .n { background: rgba(200,160,74,.12); padding: 1px 6px; border-radius: 8px; font-size: 10px; }

.mw-mobile-cards { display: flex; flex-direction: column; gap: 10px; }

.mw-mobile-card { background: var(--ink-2, #0C0C14); border: 1px solid var(--gs-hairline); border-left-width: 3px; border-radius: 8px; padding: 14px; }
.mw-mobile-card.sev-blocking, .mw-mobile-card.sev-high { border-left-color: #dc4c4c; }
.mw-mobile-card.sev-warning, .mw-mobile-card.sev-normal { border-left-color: #c9a84c; }
.mw-mobile-card.sev-info { border-left-color: rgba(200,160,74,.3); }

.mw-mobile-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 10px; }
.mw-mobile-card-source { font: 600 10px var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--w60, #8a8898); }
.mw-mobile-card-sev { font: 600 9px var(--mono, monospace); letter-spacing: .06em; padding: 2px 7px; border-radius: 2px; color: #0a0a0a; }
.mw-mobile-card-sev.sev-blocking, .mw-mobile-card-sev.sev-high { background: #dc4c4c; }
.mw-mobile-card-sev.sev-warning, .mw-mobile-card-sev.sev-normal { background: #c9a84c; }
.mw-mobile-card-sev.sev-info { background: rgba(200,160,74,.3); color: var(--w90); }

.mw-mobile-card-title { font-size: 14px; font-weight: 600; color: var(--w90); margin: 0 0 4px; line-height: 1.3; }
.mw-mobile-card-ctx { font-family: var(--mono, monospace); font-size: 10px; letter-spacing: .04em; color: var(--w60); margin-bottom: 4px; }
.mw-mobile-card-decision { font-size: 12px; font-style: italic; color: var(--w70); margin-bottom: 10px; line-height: 1.4; }

.mw-mobile-card-actions { display: flex; gap: 8px; margin-top: 8px; }
.mw-mobile-btn { flex: 1; min-height: 44px; border-radius: 6px; font: 600 13px var(--sans, system-ui); cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.mw-mobile-btn.primary { background: var(--gold, #c9a84c); color: #0a0a0a; }
.mw-mobile-btn.primary:active { background: #b89a45; }
.mw-mobile-btn.secondary { background: transparent; color: var(--w90); border-color: var(--gs-hairline); }
.mw-mobile-btn.secondary:active { background: rgba(200,160,74,.06); }
.mw-mobile-btn[disabled] { opacity: .55; cursor: wait; }

.mw-mobile-empty { padding: 36px 18px; text-align: center; color: var(--w60); font-style: italic; font-size: 13px; }
.mw-mobile-empty .icon { font-size: 32px; opacity: .35; margin-bottom: 10px; font-style: normal; }

.mw-mobile-footer { margin-top: 18px; padding: 0 4px 6px; font: 500 11px var(--mono, monospace); color: var(--w60); text-align: center; letter-spacing: .04em; }


/* hub-mobile-sprint4 · Chester Videos mobile ─────────────────── */

.cv-mobile {
  padding: 12px 4px 8px;
  color: var(--w90, #e8dcc0);
  touch-action: pan-y;  /* allow horizontal swipe · vertical scroll still works */
}

.cv-mobile-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 12px;
}
.cv-mobile-header h1 {
  margin: 0;
  font-family: var(--serif, Georgia);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.cv-mobile-counter {
  font: 700 12px var(--mono, monospace);
  color: var(--gold, #c9a84c);
  letter-spacing: .08em;
}

.cv-mobile-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 4px 14px;
  scrollbar-width: none;
}
.cv-mobile-pills::-webkit-scrollbar { display: none; }
.cv-mobile-pill {
  flex: 0 0 auto;
  background: var(--ink-2, #0C0C14);
  border: 1px solid var(--gs-hairline);
  border-radius: 14px;
  padding: 5px 12px;
  font: 600 11px var(--mono, monospace);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--w70);
  cursor: pointer;
  white-space: nowrap;
}
.cv-mobile-pill.active {
  background: rgba(201, 168, 76, .12);
  color: var(--gold);
  border-color: rgba(201, 168, 76, .35);
}

.cv-mobile-player-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
}
.cv-mobile-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.cv-mobile-player-wrap.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--w60);
  font-size: 32px;
  opacity: .35;
}

.cv-mobile-meta {
  padding: 0 4px 14px;
}
.cv-mobile-meta-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--w90);
  margin: 0 0 6px;
  line-height: 1.3;
  font-family: var(--mono, monospace);
}
.cv-mobile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.cv-mobile-badge {
  font: 600 10px var(--mono, monospace);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(74, 122, 90, .25);
  color: var(--w90);
}
.cv-mobile-badge.gold {
  background: rgba(201, 168, 76, .18);
  color: var(--gold);
}
.cv-mobile-badge.green {
  background: rgba(106, 154, 106, .2);
  color: #6a9a6a;
}
.cv-mobile-badge.red {
  background: rgba(220, 76, 76, .18);
  color: #dc4c4c;
}
.cv-mobile-script {
  font-size: 13px;
  font-style: italic;
  color: var(--w70);
  margin-top: 6px;
  line-height: 1.45;
  padding: 8px 10px;
  border-left: 2px solid var(--gs-hairline);
  background: rgba(255, 255, 255, .02);
  border-radius: 0 4px 4px 0;
}

.cv-mobile-primary-actions {
  display: flex;
  gap: 10px;
  padding: 12px 4px;
  border-top: 1px solid var(--gs-hairline);
  border-bottom: 1px solid var(--gs-hairline);
  margin-bottom: 10px;
}
.cv-mobile-btn {
  flex: 1;
  min-height: 48px;
  border-radius: 6px;
  font: 700 14px var(--sans, system-ui);
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cv-mobile-btn.approve {
  background: #6a9a6a;
  color: #0a0a0a;
}
.cv-mobile-btn.approve:active { background: #5c8a5c; }
.cv-mobile-btn.hold {
  background: transparent;
  color: var(--w90);
  border-color: var(--gs-hairline);
}
.cv-mobile-btn.hold:active { background: rgba(255,255,255,.04); }
.cv-mobile-btn.reject {
  background: transparent;
  color: #dc4c4c;
  border-color: rgba(220, 76, 76, .35);
}
.cv-mobile-btn.reject:active { background: rgba(220, 76, 76, .08); }
.cv-mobile-btn[disabled] { opacity: .5; cursor: wait; }

.cv-mobile-secondary {
  display: flex;
  gap: 8px;
  padding: 0 4px 10px;
}
.cv-mobile-nav-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 6px;
  background: transparent;
  color: var(--w90);
  border: 1px solid var(--gs-hairline);
  font: 600 13px var(--sans, system-ui);
  cursor: pointer;
}
.cv-mobile-nav-btn:active { background: rgba(200,160,74,.06); }
.cv-mobile-nav-btn[disabled] {
  opacity: .35;
  cursor: not-allowed;
}

.cv-mobile-footer {
  padding: 6px 4px 4px;
  text-align: center;
  font: 500 11px var(--mono, monospace);
  color: var(--w60);
  letter-spacing: .04em;
}

.cv-mobile-empty {
  padding: 60px 18px;
  text-align: center;
  color: var(--w60);
  font-style: italic;
}
.cv-mobile-empty .glyph {
  font-size: 48px;
  margin-bottom: 14px;
  font-style: normal;
  opacity: .6;
}


/* hub-mobile-sprint5 · Canon Gate ─────────────────────────────── */

.cg-mobile { padding: 14px 4px 80px; color: var(--w90, #e8dcc0); }

.cg-mobile-header {
  padding: 0 4px 14px;
}
.cg-mobile-header h1 {
  margin: 0;
  font-family: var(--serif, Georgia);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cg-mobile-header h1 .icon { font-size: 18px; }
.cg-mobile-header .book {
  font-family: var(--mono, monospace);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold, #c9a84c);
  margin-top: 4px;
}

.cg-mobile-status {
  padding: 12px 14px;
  background: var(--ink-2, #0C0C14);
  border: 1px solid var(--gs-hairline);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--w90);
}
.cg-mobile-status .small {
  font: 500 11px var(--mono, monospace);
  color: var(--w60);
  margin-top: 4px;
}

.cg-mobile-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 4px 12px;
  scrollbar-width: none;
}
.cg-mobile-pills::-webkit-scrollbar { display: none; }
.cg-mobile-pill {
  flex: 0 0 auto;
  background: var(--ink-2);
  border: 1px solid var(--gs-hairline);
  border-radius: 14px;
  padding: 5px 10px;
  font: 600 11px var(--mono, monospace);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--w70);
  cursor: pointer;
  white-space: nowrap;
}
.cg-mobile-pill.active {
  background: rgba(201, 168, 76, .12);
  color: var(--gold);
  border-color: rgba(201, 168, 76, .35);
}

.cg-mobile-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cg-mobile-name-card {
  background: var(--ink-2);
  border: 1px solid var(--gs-hairline);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 12px 14px;
}
.cg-mobile-name-card.state-approve  { border-left-color: #6a9a6a; }
.cg-mobile-name-card.state-forbid   { border-left-color: #dc4c4c; }
.cg-mobile-name-card.state-ignore   { border-left-color: rgba(200,160,74,.3); }
.cg-mobile-name-card.state-pending  { border-left-color: var(--gold, #c9a84c); }
.cg-mobile-name-card.state-changed  { border-left-color: #7ca8c8; box-shadow: 0 0 0 1px rgba(124,168,200,.18); }

.cg-mobile-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cg-mobile-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--w90);
}
.cg-mobile-name-meta {
  font: 600 9px var(--mono, monospace);
  color: var(--w60);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cg-mobile-name-meta.approve  { color: #6a9a6a; }
.cg-mobile-name-meta.forbid   { color: #dc4c4c; }
.cg-mobile-name-meta.ignore   { color: var(--w60); }
.cg-mobile-name-meta.pending  { color: var(--gold); }

.cg-mobile-name-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.cg-mobile-name-btn {
  min-height: 44px;
  border-radius: 5px;
  font: 700 12px var(--sans, system-ui);
  cursor: pointer;
  border: 1px solid var(--gs-hairline);
  background: transparent;
  color: var(--w90);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cg-mobile-name-btn:active { background: rgba(200,160,74,.06); }
.cg-mobile-name-btn.active.approve { background: #6a9a6a; color: #0a0a0a; border-color: #6a9a6a; }
.cg-mobile-name-btn.active.forbid  { background: #dc4c4c; color: #fff;    border-color: #dc4c4c; }
.cg-mobile-name-btn.active.ignore  { background: rgba(200,160,74,.18); color: var(--w90); border-color: rgba(200,160,74,.35); }

.cg-mobile-fab {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--gs-bottomnav-height, 56px) + env(safe-area-inset-bottom, 0px) + 12px);
  display: flex;
  gap: 8px;
  z-index: 35;
}
@media (min-width: 769px) {
  .cg-mobile-fab { left: 50%; right: auto; transform: translateX(-50%); width: 460px; bottom: 24px; }
}
.cg-mobile-fab-status {
  flex: 0 0 auto;
  background: rgba(201, 168, 76, .12);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, .35);
  border-radius: 8px;
  padding: 12px 14px;
  font: 600 12px var(--mono, monospace);
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.cg-mobile-fab-btn {
  flex: 1;
  min-height: 48px;
  background: var(--gold, #c9a84c);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  font: 700 14px var(--sans, system-ui);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cg-mobile-fab-btn:active { background: #b89a45; }
.cg-mobile-fab-btn[disabled] {
  background: rgba(200, 160, 74, .18);
  color: rgba(255, 255, 255, .55);
  cursor: not-allowed;
  box-shadow: none;
}

.cg-mobile-empty {
  padding: 60px 18px;
  text-align: center;
  color: var(--w60);
  font-style: italic;
}
.cg-mobile-empty .glyph {
  font-size: 48px;
  margin-bottom: 14px;
  font-style: normal;
  opacity: .5;
}

.cg-mobile-book-picker {
  background: var(--ink-2);
  border: 1px solid var(--gs-hairline);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
}
.cg-mobile-book-picker label {
  display: block;
  font: 600 10px var(--mono, monospace);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--w60);
  margin-bottom: 6px;
}
.cg-mobile-book-picker select {
  width: 100%;
  min-height: 44px;
  background: var(--ink, #06060C);
  color: var(--w90);
  border: 1px solid var(--gs-hairline);
  border-radius: 4px;
  padding: 10px;
  font-size: 14px;
}


/* hub-mobile-sprint6 · Mobile Search · full-screen ────────────── */

/* Make the topbar search button icon-only at the mobile breakpoint
   so the [⌘] button stays visible. Sprint 1 hid all .gs-search ·
   override that for the mobile flow. */
@media (max-width: 768px) {
  .gs-search { display: inline-flex !important; }
  .gs-search-placeholder,
  .gs-search-shortcut { display: none !important; }
  .gs-search {
    padding: 6px 10px !important;
    min-height: 36px;
    min-width: 36px;
    background: transparent;
    border: 1px solid var(--gs-hairline);
    border-radius: 6px;
  }
  .gs-search-icon { font-size: 16px; margin: 0; }
}

#gs-mobile-search {
  position: fixed;
  inset: 0;
  background: var(--ink, #06060C);
  z-index: 9000;
  display: none;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#gs-mobile-search.open { display: flex; }

.gs-mob-search-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gs-hairline);
  background: var(--ink-2, #0C0C14);
}
.gs-mob-search-back {
  background: transparent;
  border: none;
  color: var(--w90);
  font-size: 22px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gs-mob-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--w90);
  font-size: 16px;       /* 16px stops iOS zoom-on-focus */
  padding: 8px 4px;
  outline: none;
  font-family: var(--sans, system-ui);
}
.gs-mob-search-clear {
  background: transparent;
  border: none;
  color: var(--w60);
  font-size: 18px;
  padding: 8px;
  cursor: pointer;
  display: none;
}
.gs-mob-search-clear.visible { display: inline-flex; }

.gs-mob-search-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 10px 22px;
  -webkit-overflow-scrolling: touch;
}

.gs-mob-search-section {
  margin-bottom: 18px;
}
.gs-mob-search-section-h {
  font: 600 10px var(--mono, monospace);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--w60, #8a8898);
  padding: 0 6px 8px;
}
.gs-mob-search-list {
  background: var(--ink-2, #0C0C14);
  border: 1px solid var(--gs-hairline);
  border-radius: 8px;
  overflow: hidden;
}
.gs-mob-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  min-height: 52px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gs-hairline);
  color: var(--w90);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
}
.gs-mob-search-list .gs-mob-search-item:last-child { border-bottom: none; }
.gs-mob-search-item:active { background: rgba(200, 160, 74, .06); }
.gs-mob-search-item .icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.gs-mob-search-item .body {
  flex: 1;
  min-width: 0;
}
.gs-mob-search-item .title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-mob-search-item .meta {
  font: 500 10px var(--mono, monospace);
  letter-spacing: .04em;
  color: var(--w60);
  text-transform: uppercase;
  margin-top: 2px;
}
.gs-mob-search-item .arrow {
  color: var(--w60);
  font-size: 14px;
  flex-shrink: 0;
}
.gs-mob-search-item.quick .icon { color: var(--gold, #c9a84c); }
.gs-mob-search-item.quick .title { color: var(--gold); }

.gs-mob-search-empty {
  padding: 30px 12px;
  text-align: center;
  color: var(--w60);
  font-style: italic;
  font-size: 13px;
}
.gs-mob-search-empty .glyph {
  font-size: 36px;
  margin-bottom: 10px;
  font-style: normal;
  opacity: .4;
}
