/* ============================================================
   shell.css — App Shell Visual System
   Design: ChatGPT / Gemini / Cursor / Notion style
   Layout: Sidebar | Workspace
   Typography: Inter + system fallback
   Grid: 8px spacing system
   Works alongside overlay.css (which is not modified)
   ============================================================ */

/* ══════════════════════════════════════════
   DESIGN TOKENS
   ══════════════════════════════════════════ */

:root {
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --sb-w: 240px;
  --sb-w-collapsed: 64px;

  /* Background layering — rich dark with subtle cool undertone */
  --bg-main: #0c0d10;
  --bg-sidebar: #111214;
  --bg-hover: rgba(255,255,255,0.05);
  --bg-active: rgba(255,255,255,0.10);
  --bg-elevated: rgba(255,255,255,0.04);

  /* Borders — softer */
  --border-subtle: rgba(255,255,255,0.07);
  --border-card: rgba(255,255,255,0.09);

  /* Text hierarchy — refined contrast */
  --text-primary: #f0f0f3;
  --text-secondary: #8b8fa3;
  --text-tertiary: #5a5e72;
  --text-section: #5a5e72;

  /* Accent */
  --accent-green: var(--mg, #22c55e);
  --accent: #22c55e;

  /* Cards */
  --bg-card: rgba(255,255,255,0.03);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
}

/* Global smooth transitions */
::selection { background: rgba(34,197,94,0.25); color: inherit; }
html.light ::selection { background: rgba(22,163,106,0.2); }

:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 2px; }

/* Override body flex from overlay.css */
body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   APP SHELL — Sidebar | Workspace (no Top Bar)
   ══════════════════════════════════════════ */

#app-shell {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
}

/* ══════════════════════════════════════════
   LANDING PAGE — XiaChat-inspired sacred entrance
   ══════════════════════════════════════════ */

/* Shell: hide sidebar + header on landing page */
#app-shell.landing-mode #app-sidebar { display: none; }
#app-shell.landing-mode #app-header { display: none; }

/* Landing page: full-screen dark canvas background */
#page-landing {
  position: relative;
  background: #050505;
  overflow: hidden;
  /* Viewport-absolute height — not dependent on flex parent chain */
  height: 100vh;
  height: 100dvh;
}

/* Particle canvas — absolute background layer */
#landing-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Content sits above canvas */
#landing-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── Animations ── */
@keyframes lpFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes lpBreathe {
  0%, 100% {
    box-shadow: 0 0 20px 4px rgba(0, 255, 120, 0.10), 0 0 60px 12px rgba(74, 222, 128, 0.04);
    border-color: rgba(74, 222, 128, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 32px 8px rgba(0, 255, 120, 0.22), 0 0 80px 24px rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.45);
    transform: scale(1.025);
  }
}

/* ── Atmosphere (space fog) ── */
.lp-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 25% 20%, rgba(10, 40, 25, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 78% 75%, rgba(10, 40, 50, 0.10) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 60% 35%, rgba(8, 30, 20, 0.08) 0%, transparent 60%);
}

/* ── Glow Field (center stage) ── */
.lp-glow-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-glow-outer {
  position: absolute;
  width: 100vh;
  height: 100vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 60, 40, 0.06) 0%, transparent 70%);
}

.lp-glow-mid {
  position: absolute;
  width: 50vh;
  height: 50vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, transparent 70%);
}

.lp-glow-core {
  position: absolute;
  width: 24vh;
  height: 24vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 70%);
}

/* #6 Dark spotlight behind hero — focus attention, dim particles at center */
.lp-stage::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120vw;
  height: 80vh;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(5, 5, 8, 0.65) 0%, rgba(5, 5, 8, 0.3) 35%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ── Top Bar (language + user) ── */
.lp-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  pointer-events: auto;
  opacity: 0;
  animation: lpFadeIn 1.0s cubic-bezier(0.16, 1, 0.3, 1) 2.6s forwards;
}

/* ── Language flags (right-aligned row) ── */
.lp-lang-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lp-lang-item {
  background: none;
  border: none;
  font-size: 17px;
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 6px;
  opacity: 0.35;               /* #7 lightweight by default */
  transition: opacity 0.3s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.lp-lang-item:hover {
  opacity: 0.75;
  transform: scale(1.08);
}

.lp-lang-item.lp-lang-active {
  opacity: 0.85;               /* #7 active but not loud */
}

.lp-user-wrap {
  position: relative;
}

.lp-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-sans);
  font-size: 13px;
  transition: border-color 0.3s, color 0.3s;
}

.lp-user-btn:hover {
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
}

.lp-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(74,222,128,0.15);
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-user-name {
  white-space: nowrap;
}

.lp-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: rgba(12, 14, 20, 0.94);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 4px 0;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.lp-user-menu.show { display: block; }

.lp-user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: none;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.lp-user-menu button:hover {
  background: rgba(255,255,255,0.06);
}

.lp-user-menu hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 4px 0;
}

/* ── Stage (centered content) ── */
.lp-stage {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

/* ── Identity (Logo + Brand + Slogan) ── */
.lp-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lp-logo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;  /* #1 tighter logo→title grouping */
  opacity: 0;
  animation: lpFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  background: none;
  border: none;
  border-radius: 50%;
  overflow: hidden;
}

.lp-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.lp-brand {
  font-size: clamp(52px, 7vw, 80px);
  font-weight: 800;               /* #2 stronger anchor */
  letter-spacing: -0.03em;        /* #2 tighter, modern */
  color: #ffffff;
  line-height: 1;
  margin: 0;
  opacity: 0;
  transform: translateY(15px);
  animation: lpFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

/* ── Declaration Group (XiaChat-style staggered slogan) ── */
.lp-declaration {
  margin-top: 64px;               /* #3 more breathing space below title */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lp-decl-line {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  color: #e8e8e8;
  letter-spacing: -1px;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(15px);
}

.lp-decl-1 {
  animation: lpFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}

.lp-decl-2 {
  animation: lpFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.6s forwards;
}

/* CJK typography adjustments (matching XiaChat) */
:lang(zh) .lp-declaration,
.lang-zh .lp-declaration { gap: 8px; }
:lang(zh) .lp-decl-line,
.lang-zh .lp-decl-line { font-size: clamp(48px, 6vw, 68px); letter-spacing: 8px; }
:lang(ja) .lp-declaration,
.lang-ja .lp-declaration { gap: 8px; }
:lang(ja) .lp-decl-line,
.lang-ja .lp-decl-line { font-size: clamp(40px, 5vw, 56px); letter-spacing: 4px; }
:lang(ko) .lp-declaration,
.lang-ko .lp-declaration { gap: 8px; }
:lang(ko) .lp-decl-line,
.lang-ko .lp-decl-line { font-size: clamp(40px, 5vw, 56px); letter-spacing: 4px; }

/* ── CTA Group ── */
.lp-cta-group {
  margin-top: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* CTA row — side by side, same size */
.lp-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Primary: Voice Scoring — breathing glow */
.lp-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 600;
  letter-spacing: 2px;
  color: #fff;
  background: rgba(74, 222, 128, 0.12);
  border: 1.5px solid rgba(74, 222, 128, 0.30);
  border-radius: 28px;
  padding: 14px 40px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transition: background 0.3s ease, color 0.3s ease, transform 0.15s ease;
  animation:
    lpFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2.0s forwards,
    lpBreathe 3.2s ease-in-out 3.4s infinite;
  -webkit-tap-highlight-color: transparent;
}

.lp-cta-primary:hover {
  background: rgba(74, 222, 128, 0.22);
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.25) !important;
  border-color: rgba(74, 222, 128, 0.55);
  animation-play-state: paused;
}

.lp-cta-primary:active {
  transform: scale(0.97);
}

.lp-cta-primary-text {
  position: relative;
}

/* Secondary: Hub — visually quieter */
.lp-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.4vw, 15px);  /* #5 slightly smaller */
  font-weight: 400;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.38);      /* #5 quieter */
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.08); /* #5 thinner border */
  border-radius: 28px;
  padding: 14px 40px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
  animation: lpFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2.2s forwards;
  -webkit-tap-highlight-color: transparent;
}

.lp-cta-secondary:hover {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
}

.lp-cta-secondary:active {
  transform: scale(0.97);
}

/* Auth row */
.lp-auth-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  opacity: 0;
  animation: lpFadeIn 1.0s cubic-bezier(0.16, 1, 0.3, 1) 2.8s forwards;
}

.lp-auth-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.22);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
  cursor: pointer;
  pointer-events: auto;
  padding: 4px 2px;
  transition: color 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.lp-auth-link:hover {
  color: rgba(255, 255, 255, 0.55);
}

.lp-auth-sep {
  color: rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

/* ── Landing footer ── */
.lp-footer {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  animation: lpFooterIn 1.5s ease 3s forwards;
}
@keyframes lpFooterIn { to { opacity: 0.25; } }
.lp-footer:hover { opacity: 0.55; }
.lp-footer-text {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
}
.lp-footer-qr {
  position: relative;
}
.lp-footer-qr-img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.34,1.56,0.64,1),
              height 0.35s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.35s;
}

/* Desktop: hover to enlarge */
@media (hover: hover) {
  .lp-footer-qr-img:hover {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    z-index: 100;
  }
}

/* QR lightbox overlay — full-screen tap-to-dismiss */
.lp-qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lp-qr-overlay--show {
  opacity: 1;
  pointer-events: auto;
}
.lp-qr-overlay-img {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

/* ── Landing responsive ── */
@media (max-width: 768px) {
  .lp-topbar { padding: 14px 16px; }
  .lp-glow-outer { display: none; }
  .lp-glow-mid { width: 60vw; height: 60vw; }
  .lp-glow-core { width: 35vw; height: 35vw; }
  .lp-logo-wrap { width: 72px; height: 72px; }
  .lp-cta-group { margin-top: 36px; }
  .lp-cta-row { flex-direction: column; gap: 12px; }
  .lp-cta-primary { padding: 12px 32px; }
  .lp-cta-secondary { padding: 12px 32px; }
  .lp-decl-line { font-size: clamp(28px, 7vw, 40px); }
  .lp-declaration { margin-top: 40px; }
  .lp-atmosphere {
    background: radial-gradient(ellipse 80% 60% at 40% 30%, rgba(10, 40, 25, 0.12) 0%, transparent 70%);
  }
  /* Mobile: make footer QR more visible and tappable */
  .lp-footer { opacity: 0; animation: lpFooterIn 1.5s ease 2s forwards; }
  @keyframes lpFooterIn { to { opacity: 0.4; } }
  .lp-footer-qr-img { width: 48px; height: 48px; border-radius: 6px; }
}

/* Light theme — landing is always dark, no override */

/* ══════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════ */

#app-sidebar {
  width: var(--sb-w);
  background: rgba(17,18,20,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  transition: width 0.25s var(--ease-out, ease);
  z-index: 600;
}

/* ── Collapsed state ── */
#app-sidebar.sb-collapsed {
  width: var(--sb-w-collapsed);
}

#app-sidebar.sb-collapsed .sb-label,
#app-sidebar.sb-collapsed .sb-brand-text,
#app-sidebar.sb-collapsed .sb-version {
  display: none;
}

#app-sidebar.sb-collapsed .sb-new-label {
  display: none;
}

#app-sidebar.sb-collapsed .sb-new-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  min-width: 0;
}

#app-sidebar.sb-collapsed .sb-new-wrap {
  padding: 0 8px 4px;
  display: flex;
  justify-content: center;
}

#app-sidebar.sb-collapsed .sb-search-btn {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

#app-sidebar.sb-collapsed .sb-search-wrap {
  padding: 0 8px 4px;
}

#app-sidebar.sb-collapsed .sb-section-label {
  visibility: hidden;
  height: 8px;
  margin: 0;
  padding: 0;
}

#app-sidebar.sb-collapsed .sb-item,
#app-sidebar.sb-collapsed .sb-footer-btn {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

#app-sidebar.sb-collapsed .sb-icon {
  margin: 0;
}

#app-sidebar.sb-collapsed .sb-header {
  padding: 14px 8px 10px;
  justify-content: center;
}

#app-sidebar.sb-collapsed .sb-brand {
  display: none;
}

#app-sidebar.sb-collapsed .sb-toggle-btn {
  margin: 0 auto;
}

#app-sidebar.sb-collapsed #sb-live-recent {
  display: none;
}

#app-sidebar.sb-collapsed .sb-body {
  padding: 0 8px;
}

#app-sidebar.sb-collapsed .sb-footer {
  padding: 0 8px 12px;
}

#app-sidebar.sb-collapsed .sb-footer-btn .sb-label {
  display: none;
}

#app-sidebar.sb-collapsed .sb-lang-wrap {
  display: none;
}

#app-sidebar.sb-collapsed .sb-footer-account {
  flex-direction: column;
}

/* Collapsed tooltips */
#app-sidebar.sb-collapsed [data-tooltip] {
  position: relative;
}

#app-sidebar.sb-collapsed [data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(var(--sb-w-collapsed) + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #262626;
  color: #fff;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 700;
  pointer-events: none;
}

/* ── Sidebar Header: Brand + Toggle ── */
.sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 16px 12px;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* ── Toggle Button ── */
.sb-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-section);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.sb-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* ── New Button Wrap ── */
.sb-new-wrap {
  padding: 0 16px 4px;
  flex-shrink: 0;
}

/* ── New Button (global primary action) ── */
.sb-new-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-out, ease);
  box-shadow: 0 2px 8px rgba(34,197,94,0.2);
}

.sb-new-btn:hover {
  box-shadow: 0 4px 14px rgba(34,197,94,0.35);
  transform: translateY(-1px);
}

.sb-new-icon {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.sb-new-label {
  white-space: nowrap;
}

/* ── Search Button ── */
.sb-search-wrap {
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.sb-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-section);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sb-search-btn:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-color: transparent;
}

.sb-search-icon {
  flex-shrink: 0;
  opacity: 0.6;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}

.sb-logo {
  height: 22px;
  width: auto;
  flex-shrink: 0;
  border-radius: 50%;
}

.sb-brand-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sidebar Body (scrollable) ── */
.sb-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Scrollbar styling */
.sb-body::-webkit-scrollbar {
  width: 4px;
}

.sb-body::-webkit-scrollbar-track {
  background: transparent;
}

.sb-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* ── Section Labels ── */
.sb-section-label {
  padding: 16px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-section);
}

/* ── Nav Items ── */
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.sb-item:hover {
  background: var(--bg-hover);
  color: rgba(255,255,255,0.85);
}

.sb-item.sb-active {
  background: var(--bg-active);
  color: #fff;
  font-weight: 600;
  position: relative;
}
.sb-item.sb-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent-green);
  border-radius: 0 3px 3px 0;
}

/* (sb-new-round removed — replaced by .sb-new-btn) */

/* ── Icons ── */
.sb-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Sub-level nav items (under section labels) ── */
.sb-item-sub {
  padding-left: 20px;
}

/* ── Divider ── */
.sb-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 12px;
}

/* ── Live & Recent round items ── */
.sb-round-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 0;
}

.sb-round-item:hover {
  background: var(--bg-hover);
}

.sb-round-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-round-dot-live { background: #22c55e; }
.sb-round-dot-planned { background: #60a5fa; }
.sb-round-dot-finished { background: var(--text-section); }

.sb-round-name {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sb-round-meta {
  font-size: 11px;
  color: var(--text-section);
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Footer: Account row + Version ── */
.sb-footer {
  flex-shrink: 0;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border-subtle);
}

/* Account row: avatar left, lang right */
.sb-footer-account {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sb-avatar-btn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.sb-avatar-btn .sb-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-footer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.sb-footer-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sb-footer-btn .sb-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Lang toggle button (right side of account row) */
.sb-lang-wrap {
  position: relative;
  flex-shrink: 0;
}

.sb-lang-toggle {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-section);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sb-lang-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Language dropdown (opens upward) */
.sb-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  background: rgba(28,28,32,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 4px 0;
  z-index: 9000;
  min-width: 140px;
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
}

.sb-lang-menu.show { display: block; }

.sb-lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.sb-lang-menu button:hover {
  background: var(--bg-hover);
}

.sb-version {
  font-size: 10px;
  color: var(--text-section);
  padding: 8px 12px 0;
  letter-spacing: 0.3px;
}

/* ── Sidebar sync indicator ── */
.sb-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-section);
  padding: 0 12px;
  cursor: default;
}
.sb-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sb-sync-dot-idle    { background: #6b7280; }
.sb-sync-dot-syncing { background: #4ade80; animation: sb-sync-pulse 1.2s infinite; }
.sb-sync-dot-pending { background: #fbbf24; }
.sb-sync-dot-error   { background: #ef4444; }
.sb-sync-dot-offline { background: #4b5563; }
@keyframes sb-sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Light theme footer */
html.light .sb-lang-toggle { border-color: rgba(0,0,0,0.10); }
html.light .sb-lang-menu { background: #fff; border-color: rgba(0,0,0,0.08); }
html.light .sb-lang-menu button { color: #374151; }
html.light .sb-lang-menu button:hover { background: var(--bg-hover); }

/* ── Sidebar Backdrop (mobile drawer) ── */
#sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 599;
}

/* ── Hide overlay center's internal header ── */
#overlay-center #hdr {
  display: none;
}

#overlay-center #lang-wrap,
#overlay-center #btn-settings,
#overlay-center #btn-skin-narrow {
  display: none;
}

/* ══════════════════════════════════════════
   WORKSPACE
   ══════════════════════════════════════════ */

#app-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: var(--bg-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

/* ── App Header (independent top bar) ── */
#app-header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  background: rgba(17,18,20,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 12px;
  z-index: 10;
}

.ws-menu-btn {
  display: none; /* shown only on mobile via media query */
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.ws-menu-btn:hover {
  background: var(--bg-hover);
}

.hdr-brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
}

.hdr-spacer {
  flex: 1;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Header language dropdown */
.hdr-lang-wrap {
  position: relative;
}

.hdr-lang-btn {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.hdr-lang-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.hdr-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: rgba(28,28,32,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 4px 0;
  z-index: 9000;
  min-width: 140px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.hdr-lang-menu.show { display: block; }

.hdr-lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.hdr-lang-menu button:hover {
  background: var(--bg-hover);
}

/* Header settings button */
.hdr-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.hdr-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── Content area ── */
#app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Content scrollbar */
#app-content::-webkit-scrollbar {
  width: 4px;
}

#app-content::-webkit-scrollbar-track {
  background: transparent;
}

#app-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}

#page-home, #page-rounds, #page-courses, #page-course-detail, #page-course-structure, #page-course-import, #page-new-round, #page-teetimes, #page-teams, #page-mycourses, #page-buddies, #page-auth, #page-profile, #page-settings {
  overflow-y: auto;
  flex: 1;
}

/* AI Scoring & Voice Scoring — page elements need flex:1 for proper sizing */
#page-ai-scoring,
#page-voice-scoring {
  flex: 1;
  overflow: hidden;
  position: relative;
}

#overlay-center.page-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  background: #fff;
}

.app-page { display: block; }
.app-page.page-hidden { display: none; }

#overlay-center #main {
  flex: 1;
  min-height: 0;
}


/* ══════════════════════════════════════════
   PAGE CONTENT STYLES
   ══════════════════════════════════════════ */

.sh-page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4px 32px 32px;
}

.sh-section { margin-bottom: 28px; }

.sh-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-section);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.sh-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.sh-page-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sh-page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.sh-page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.sh-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Cards ── */
.sh-card {
  background: var(--bg-elevated, var(--bg-hover));
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out, ease);
  box-shadow: var(--shadow-sm, none);
}

.sh-card:hover {
  background: var(--bg-active);
  border-color: rgba(255,255,255,0.12);
  box-shadow: var(--shadow-md, none);
  transform: translateY(-1px);
}

.sh-card-active {
  border-color: var(--accent-green);
  border-width: 2px;
}

.sh-card-compact { padding: 12px 16px; }
.sh-card + .sh-card { margin-top: 8px; }

.sh-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sh-card-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}

.sh-status-planned, .sh-status-scheduled { background: rgba(96,165,250,0.15); color: #60a5fa; }
.sh-status-playing, .sh-status-in_progress { background: rgba(74,222,128,0.15); color: #4ade80; }
.sh-status-finished { background: rgba(107,114,128,0.15); color: #9ca3af; }
.sh-status-abandoned { background: rgba(239,68,68,0.15); color: #ef4444; }

.sh-card-date {
  font-size: 12px;
  color: #71717a;
  margin-left: auto;
}

.sh-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0;
}

.sh-card-meta {
  font-size: 12px;
  color: #71717a;
}

.sh-card-score {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-green);
  margin-top: 8px;
}

.sh-card-gameplay {
  font-size: 11px;
  color: var(--gold, #d4a843);
  font-weight: 500;
}

.sh-card-players {
  font-size: 12px;
  color: #71717a;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-more { color: #71717a; font-size: 12px; }

.sh-card-stats {
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 12px;
  color: #a1a1aa;
}
.sh-stat-line { line-height: 1.6; }
.sh-abandon-reason {
  margin-top: 4px;
  font-size: 11px;
  color: #ef4444;
  font-style: italic;
}

.sh-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ── Buttons ── */
.sh-btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out, ease);
  box-shadow: 0 2px 8px rgba(34,197,94,0.25);
}

.sh-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(34,197,94,0.35);
  transform: translateY(-1px);
}

.sh-btn-sm {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sh-btn-sm:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.sh-btn-danger { color: #f87171; border-color: rgba(248,113,113,0.2); }
.sh-btn-danger:hover { background: rgba(248,113,113,0.08); }

.sh-btn-warn { color: #fbbf24; border-color: rgba(251,191,36,0.25); }
.sh-btn-warn:hover { background: rgba(251,191,36,0.08); }

.sh-btn-reopen { color: #34d399; border-color: rgba(52,211,153,0.25); }
.sh-btn-reopen:hover { background: rgba(52,211,153,0.08); }

/* ── Dropdown Menu ── */
.sh-dropdown, .sh-action-dropdown { position: relative; display: inline-block; }
.sh-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 200px;
  background: rgba(28,28,32,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 100;
  padding: 4px;
}
.sh-dropdown-menu.sh-dropdown-open { display: block; }
.sh-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.sh-dropdown-item:hover { background: var(--bg-hover); }

/* ── Score Chips (round card) ── */
.sh-card-scores-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.sh-score-chip {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
}
.sh-score-name {
  font-size: 11px;
  color: #71717a;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sh-score-gross {
  font-size: 18px;
  font-weight: 700;
  color: #e5e5e5;
  line-height: 1;
}
.sh-score-topar {
  font-size: 12px;
  font-weight: 600;
}
.sh-score-over  { color: #f87171; }
.sh-score-under { color: #34d399; }
.sh-score-even  { color: #a1a1aa; }

/* ── Improved Player Name in Score Chip ── */
.sh-score-name-lg {
  font-size: 13px;
  font-weight: 500;
  color: #d4d4d8;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.light .sh-score-name-lg { color: #3f3f46; }

/* ── Card "..." More Button ── */
.sh-card-spacer { flex: 1; }
.sh-more-btn {
  background: none;
  border: none;
  color: #71717a;
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.sh-more-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sh-card-menu {
  right: 0;
  top: 100%;
  min-width: 160px;
}
.sh-dropdown-warn { color: #fbbf24 !important; }
.sh-dropdown-danger { color: #f87171 !important; }

/* ── Card clickable cursor ── */
.sh-card-round { cursor: pointer; }

.sh-grace-badge {
  display: inline-block;
  font-size: 11px;
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 4px;
  padding: 2px 8px;
  margin-top: 4px;
}

.sh-locked-badge {
  display: inline-block;
  font-size: 11px;
  color: #9ca3af;
  background: rgba(156,163,175,0.1);
  border: 1px solid rgba(156,163,175,0.2);
  border-radius: 4px;
  padding: 2px 8px;
  margin-top: 4px;
}

/* ── Sync badge on round cards ── */
.sh-sync-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 4px;
}
.sh-sync-local    { background: rgba(156,163,175,0.12); color: #9ca3af; }
.sh-sync-pending  { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.sh-sync-synced   { background: rgba(74,222,128,0.12);  color: #4ade80; }
.sh-sync-failed   { background: rgba(239,68,68,0.15);   color: #ef4444; }
.sh-sync-conflict { background: rgba(168,85,247,0.15);  color: #a855f7; }

/* ── My Rounds: Filters ── */
.mr-filters {
  margin-bottom: 16px;
}

.mr-status-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mr-tab {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mr-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mr-tab-active {
  background: var(--bg-active);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.mr-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mr-select {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-width: 140px;
}

.mr-select:focus {
  outline: none;
  border-color: var(--accent-green);
}

.mr-search {
  flex: 1;
  min-width: 120px;
}

/* ── My Rounds: Round list ── */
.sh-round-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Quick Actions ── */
.sh-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sh-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  background: var(--bg-elevated, var(--bg-hover));
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out, ease);
  box-shadow: var(--shadow-sm, none);
}

.sh-action-btn:hover {
  background: var(--bg-active);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, none);
}

.sh-action-icon { font-size: 28px; opacity: 0.85; }

/* ── Hero Card ── */
.sh-hero-card {
  background: linear-gradient(135deg, rgba(34,197,94,0.06) 0%, transparent 50%);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 0 30px rgba(34,197,94,0.06);
  position: relative;
  overflow: hidden;
}

.sh-hero-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sh-hero-gameplay { font-size: 12px; color: var(--gold, #d4a843); font-weight: 500; }
.sh-hero-date { font-size: 12px; color: #71717a; margin-left: auto; }

.sh-hero-course {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: 0;
}

.sh-hero-routing { font-size: 12px; color: #71717a; margin-top: 4px; }

.sh-hero-stats { display: flex; gap: 24px; margin-top: 16px; }

.sh-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sh-hero-stat-val { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.sh-hero-stat-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #71717a; }

.sh-hero-progress {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.sh-hero-progress-bar {
  height: 100%;
  background: var(--accent-green);
  border-radius: 2px;
  transition: width 0.3s;
}

.sh-hero-players { font-size: 12px; color: #71717a; margin-top: 12px; }

.sh-hero-actions { display: flex; gap: 8px; margin-top: 16px; }
.sh-btn-lg { padding: 12px 24px; font-size: 15px; }

.sh-btn-outline {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sh-btn-outline:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── Management pills ── */
.sh-section-subdued { opacity: 0.7; }
.sh-section-subdued:hover { opacity: 1; }

.sh-mgmt-row { display: flex; gap: 8px; flex-wrap: wrap; }

.sh-mgmt-pill {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 10px 22px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease-out, ease);
  box-shadow: var(--shadow-sm, none);
}

.sh-mgmt-pill:hover {
  background: var(--bg-active);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, none);
}

/* ── Round group headers ── */
.sh-round-group { margin-bottom: 24px; }

.sh-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.sh-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-section);
}

.sh-group-count {
  font-size: 11px;
  color: var(--text-section);
  background: var(--bg-hover);
  padding: 1px 8px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}

/* ── Search ── */

.sh-search-input {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  width: 200px;
  outline: none;
  transition: border-color 0.15s;
}

.sh-search-input::placeholder { color: var(--text-section); }
.sh-search-input:focus { border-color: var(--accent-green); box-shadow: 0 0 0 3px rgba(34,197,94,0.1); }

/* ── Inline delete confirm ── */
.sh-btn-confirm-del {
  color: #f87171 !important;
  border-color: rgba(248,113,113,0.3) !important;
  background: rgba(248,113,113,0.08) !important;
  animation: sh-pulse-del 0.6s ease;
}

@keyframes sh-pulse-del {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ── Empty States ── */
.sh-empty-compact { padding: 32px 20px; }

.sh-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-section);
  font-size: 14px;
}

.sh-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 20px;
  gap: 16px;
}

.sh-empty-icon { font-size: 48px; opacity: 0.3; }
.sh-empty-text { font-size: 14px; color: var(--text-section); }

/* ── Placeholder Pages ── */
.sh-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.sh-placeholder-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.25; }
.sh-placeholder-title { font-size: 16px; font-weight: 600; color: #d1d5db; margin-bottom: 8px; }
.sh-placeholder-text { font-size: 14px; color: #71717a; }

/* ══════════════════════════════════════════
   SETTINGS PAGE
   ══════════════════════════════════════════ */

.st-section {
  margin-bottom: 28px;
}

.st-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-section);
  margin-bottom: 12px;
}

.st-btn-group {
  display: flex;
  gap: 4px;
}

.st-btn-group-wrap {
  flex-wrap: wrap;
}

.st-btn-group-sm {
  gap: 4px;
}

.st-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.st-btn:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.st-btn-active {
  background: var(--bg-active);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.st-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px 0;
}

.st-toggle input[type="checkbox"],
.st-toggle input[type="radio"] {
  accent-color: var(--accent-green);
}

.st-indent {
  margin-left: 24px;
  padding: 4px 0;
}

.st-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.st-row-label {
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 64px;
}

.st-range-val {
  font-size: 13px;
  color: var(--text-secondary);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.st-input {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  flex: 1;
  outline: none;
  transition: border-color 0.15s;
}

.st-input:focus {
  border-color: var(--accent-green);
}

.st-select {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.st-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.st-action-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.st-action-btn:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.st-action-danger {
  color: #f87171;
}

.st-action-danger:hover {
  color: #fca5a5;
}

/* Settings page range inputs */
#page-settings input[type="range"] {
  accent-color: var(--accent-green);
  height: 4px;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Prevent horizontal overflow on mobile */
  html, body { overflow-x: hidden; max-width: 100vw; }
  #app-shell { max-width: 100vw; }
  #app-workspace { width: 100%; max-width: 100vw; overflow-x: hidden; }

  /* Sidebar = off-screen drawer */
  #app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--sb-w);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 700;
  }

  #app-sidebar.sb-collapsed {
    width: var(--sb-w);
    transform: translateX(-100%);
  }

  /* Drawer open */
  #app-sidebar.sb-drawer-open {
    transform: translateX(0);
  }

  #sb-backdrop.sb-backdrop-show {
    display: block;
  }

  /* On mobile, show hamburger in header */
  .ws-menu-btn { display: flex; }


  /* workspace-header removed */
  .sh-page-container { padding: 4px 16px 24px; }
}

@media (max-width: 480px) {
  .sh-page-header { flex-wrap: wrap; gap: 8px; }
  .sh-header-right { width: 100%; }
  .sh-search-input { flex: 1; width: auto; min-width: 0; }
  .sh-actions { gap: 8px; }
  .sh-action-btn { padding: 16px 8px; font-size: 12px; }
  .sh-action-icon { font-size: 24px; }
  .sh-hero-stats { gap: 16px; }
  .sh-hero-actions { flex-direction: column; }
}

/* ── Landscape on mobile — reduce chrome height ── */
@media (max-height: 500px) and (orientation: landscape) {
  .sh-page-container { padding: 4px 16px 16px; }
}

/* ══════════════════════════════════════════
   LIGHT THEME
   Note: theme toggle uses html.light class (set by applyUITheme in app.js)
   ══════════════════════════════════════════ */

html.light {
  --bg-main: #f8f9fb;
  --bg-sidebar: #ffffff;
  --bg-hover: rgba(0,0,0,0.035);
  --bg-active: rgba(0,0,0,0.065);
  --bg-elevated: rgba(255,255,255,0.8);
  --border-subtle: rgba(0,0,0,0.08);
  --border-card: rgba(0,0,0,0.06);
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-section: #9ca3af;
  --accent-green: var(--mg, #16a34a);
  --accent: #16a34a;
  --bg-card: rgba(0,0,0,0.015);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
}

/* Sidebar — glass */
html.light #app-sidebar { background: rgba(255,255,255,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-right: 1px solid rgba(0,0,0,0.06); }
html.light #app-header { background: rgba(255,255,255,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
html.light .sb-brand-text { color: #1a1a1a; }
html.light .sb-toggle-btn { color: #9ca3af; }
html.light .sb-toggle-btn:hover { background: var(--bg-hover); color: #374151; }
html.light .sb-divider { background: rgba(0,0,0,0.08); }
html.light .sb-item { color: rgba(0,0,0,0.45); }
html.light .sb-item:hover { color: rgba(0,0,0,0.75); }
html.light .sb-item.sb-active { color: #1a1a1a; }
html.light .sb-round-name { color: #374151; }
html.light .sb-round-dot-finished { background: #d1d5db; }
html.light .sb-version { color: #c0c4cc; }

/* Language menu */
html.light .sb-lang-menu { background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-color: rgba(0,0,0,0.06); box-shadow: 0 -8px 32px rgba(0,0,0,.1); }
html.light .sb-lang-menu button { color: #374151; }
html.light .sb-lang-menu button:hover { background: var(--bg-hover); }

/* Collapsed tooltips */
html.light #app-sidebar.sb-collapsed .sb-item[data-tooltip]:hover::after {
  background: #374151;
  color: #fff;
}

/* Header */
html.light #app-header { background: #f7f7f8; }
html.light .hdr-brand { color: #1a1a1a; }
html.light .hdr-lang-btn { border-color: rgba(0,0,0,0.10); color: #6b7280; }
html.light .hdr-lang-btn:hover { background: var(--bg-hover); color: #374151; border-color: rgba(0,0,0,0.15); }
html.light .hdr-lang-menu { background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-color: rgba(0,0,0,0.06); box-shadow: 0 8px 32px rgba(0,0,0,.1); }
html.light .hdr-lang-menu button { color: #374151; }
html.light .hdr-lang-menu button:hover { background: var(--bg-hover); }
html.light .hdr-icon-btn { color: #6b7280; }
html.light .hdr-icon-btn:hover { background: var(--bg-hover); color: #374151; }

/* Workspace */
html.light .ws-menu-btn { color: #6b7280; }
html.light .ws-menu-btn:hover { background: var(--bg-hover); }

/* Cards */
html.light .sh-card { background: #ffffff; border-color: rgba(0,0,0,0.06); box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02); }
html.light .sh-card:hover { background: #ffffff; border-color: rgba(0,0,0,0.1); box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04); transform: translateY(-1px); }
html.light .sh-card-title { color: #1a1a1a; }
html.light .sh-card-date { color: #9ca3af; }

/* Status badges */
html.light .sh-status-planned, html.light .sh-status-scheduled { background: rgba(37,99,235,0.08); color: #2563eb; }
html.light .sh-status-playing, html.light .sh-status-in_progress { background: rgba(22,163,106,0.08); color: #16a34a; }
html.light .sh-status-finished { background: rgba(107,114,128,0.08); color: #6b7280; }
html.light .sh-status-abandoned { background: rgba(239,68,68,0.08); color: #dc2626; }

/* Hero card */
html.light .sh-hero-card { background: linear-gradient(135deg, rgba(22,163,106,0.04) 0%, #fff 50%); border-color: rgba(22,163,106,0.2); box-shadow: 0 0 30px rgba(22,163,106,0.04); }
html.light .sh-hero-course { color: #1a1a1a; }
html.light .sh-hero-stat-val { color: #1a1a1a; }
html.light .sh-hero-progress { background: rgba(0,0,0,0.06); }

/* Action buttons */
html.light .sh-action-btn { background: #ffffff; border-color: rgba(0,0,0,0.06); color: #374151; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
html.light .sh-action-btn:hover { background: #ffffff; border-color: rgba(0,0,0,0.1); box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-2px); }

/* Buttons */
html.light .sh-btn-sm { background: #f5f5f5; border-color: rgba(0,0,0,0.08); color: #374151; }
html.light .sh-btn-sm:hover { background: rgba(0,0,0,0.06); color: #1a1a1a; }
html.light .sh-btn-outline { border-color: rgba(0,0,0,0.1); color: #6b7280; }
html.light .sh-btn-outline:hover { background: var(--bg-hover); color: #1a1a1a; }
html.light .sh-dropdown-menu { background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-color: rgba(0,0,0,0.08); box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04); }
html.light .sh-dropdown-item { color: #1a1a1a; }
html.light .sh-dropdown-item:hover { background: #f5f5f5; }
html.light .sh-score-chip { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.04); }
html.light .sh-card-stats { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.04); color: #6b7280; }
html.light .sh-score-gross { color: #1a1a1a; }
html.light .sh-score-over { color: #dc2626; }
html.light .sh-score-under { color: #16a34a; }
html.light .sh-score-even { color: #6b7280; }
html.light .sh-btn-danger { color: #dc2626; border-color: rgba(220,38,38,0.2); }
html.light .sh-btn-danger:hover { background: rgba(220,38,38,0.06); }
html.light .sh-btn-warn { color: #d97706; border-color: rgba(217,119,6,0.2); }
html.light .sh-btn-warn:hover { background: rgba(217,119,6,0.06); }
html.light .sh-btn-reopen { color: #059669; border-color: rgba(5,150,105,0.2); }
html.light .sh-btn-reopen:hover { background: rgba(5,150,105,0.06); }
html.light .sh-grace-badge { color: #d97706; background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.15); }
html.light .sh-locked-badge { color: #6b7280; background: rgba(107,114,128,0.08); border-color: rgba(107,114,128,0.15); }
html.light .sh-sync-local    { background: rgba(107,114,128,0.08); color: #6b7280; }
html.light .sh-sync-pending  { background: rgba(217,119,6,0.08);  color: #d97706; }
html.light .sh-sync-synced   { background: rgba(22,163,106,0.08); color: #16a34a; }
html.light .sh-sync-failed   { background: rgba(220,38,38,0.08);  color: #dc2626; }
html.light .sh-sync-conflict { background: rgba(147,51,234,0.08); color: #9333ea; }
html.light .sh-btn-confirm-del { background: rgba(220,38,38,0.04) !important; color: #dc2626 !important; border-color: rgba(220,38,38,0.2) !important; }

/* Pills */
html.light .sh-mgmt-pill { background: #fff; border-color: rgba(0,0,0,0.06); color: #6b7280; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
html.light .sh-mgmt-pill:hover { background: #fff; color: #1a1a1a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* My Rounds filters */
html.light .mr-tab { color: #6b7280; }
html.light .mr-tab:hover { background: rgba(0,0,0,0.04); color: #374151; }
html.light .mr-tab-active { background: rgba(0,0,0,0.06); color: #1a1a1a; border-color: rgba(0,0,0,0.08); }
html.light .mr-select { background: #fff; border-color: rgba(0,0,0,0.08); color: #1a1a1a; }

/* Search */
html.light .sh-search-input { background: #fff; border-color: rgba(0,0,0,0.08); color: #1a1a1a; }
html.light .sh-search-input::placeholder { color: #9ca3af; }
html.light .sh-search-input:focus { border-color: var(--accent-green); }

/* Group */
html.light .sh-group-count { background: rgba(0,0,0,0.04); color: #9ca3af; }

/* Page */
html.light .sh-page-title { color: #6b7280; }
html.light .sh-section-title { color: #9ca3af; }

/* Placeholder pages */
html.light .sh-placeholder-title { color: #6b7280; }
html.light .sh-placeholder-text { color: #9ca3af; }
html.light .sh-empty-text { color: #9ca3af; }

/* Settings page */
html.light .st-section-title { color: #9ca3af; }
html.light .st-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); color: #6b7280; }
html.light .st-btn:hover { background: rgba(0,0,0,0.06); color: #374151; }
html.light .st-btn-active { background: rgba(0,0,0,0.06); color: #1a1a1a; border-color: rgba(0,0,0,0.15); }
html.light .st-toggle { color: #374151; }
html.light .st-input { background: #fff; border-color: rgba(0,0,0,0.1); color: #1a1a1a; }
html.light .st-select { background: #fff; border-color: rgba(0,0,0,0.1); color: #1a1a1a; }
html.light .st-action-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); color: #6b7280; }
html.light .st-action-btn:hover { background: rgba(0,0,0,0.06); color: #374151; }
html.light .st-action-danger { color: #dc2626; }
html.light .st-row-label { color: #6b7280; }
html.light .st-range-val { color: #6b7280; }


/* Scrollbars */
html.light .sb-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); }
html.light #app-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); }

/* Backdrop */
html.light #sb-backdrop { background: rgba(0,0,0,.3); }

/* ══════════════════════════════════════════
   COURSES PAGE
   ══════════════════════════════════════════ */

#page-courses .sh-page-container {
  max-width: 1000px;
}

/* Header */
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cs-page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.cs-header-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.cs-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.cs-btn-primary {
  background: var(--text-primary);
  color: var(--bg-main);
}

.cs-btn-primary:hover { opacity: 0.85; }

.cs-btn-default {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.cs-btn-default:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text-primary);
}

.cs-btn-danger {
  background: none;
  border: 1px solid rgba(248,113,113,0.2);
  color: #f87171;
}

.cs-btn-danger:hover {
  background: rgba(248,113,113,0.08);
}

/* Filters */
.cs-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.cs-search {
  flex: 1;
  min-width: 180px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.cs-search::placeholder { color: var(--text-section); }
.cs-search:focus { border-color: var(--accent-green); background: var(--bg-hover); }

.cs-select {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.cs-select:focus, .cs-select:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text-primary);
}

/* Stats bar */
.cs-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.cs-stats-count {
  font-size: 12px;
  color: var(--text-section);
}

.cs-stats-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-pagesize-select {
  font-size: 12px;
  padding: 3px 8px;
  min-width: auto;
}

.cs-link-btn {
  background: none;
  border: none;
  color: var(--text-section);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.cs-link-btn:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

/* Table */
.cs-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cs-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-section);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg-main);
  z-index: 2;
}

.cs-th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.cs-th-sortable:hover {
  color: var(--text-primary);
}

.cs-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.cs-table tbody tr:hover {
  background: var(--bg-hover);
}

/* Zebra striping — disabled for minimal look */
.cs-row-alt {
  background: transparent;
}

.cs-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.cs-th-name { min-width: 200px; }
.cs-th-city { min-width: 80px; }
.cs-th-holes, .cs-th-layouts { min-width: 60px; text-align: center; }
.cs-th-status { min-width: 80px; }
.cs-th-updated { min-width: 90px; }
.cs-th-actions { min-width: 100px; text-align: right; }

.cs-td-holes, .cs-td-layouts { text-align: center; }
.cs-td-updated { font-size: 12px; color: var(--text-section); }

/* Row action buttons */
.cs-td-actions {
  text-align: right;
  white-space: nowrap;
}

.cs-row-btn {
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  opacity: 0;
}

.cs-row:hover .cs-row-btn {
  opacity: 1;
}

.cs-row-btn-edit {
  background: var(--bg-hover);
  color: var(--text-primary);
  margin-right: 4px;
}

.cs-row-btn-edit:hover {
  background: var(--bg-active);
}

.cs-row-btn-del {
  background: none;
  color: #f87171;
}

.cs-row-btn-del:hover {
  background: rgba(248,113,113,0.1);
}

/* Pagination */
.cs-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  padding-bottom: 8px;
}

.cs-page-btn {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  min-width: 34px;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.cs-page-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.cs-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.cs-page-active {
  background: var(--text-primary);
  color: var(--bg-main);
  border-color: var(--text-primary);
  font-weight: 600;
}

.cs-page-active:hover {
  background: var(--text-primary) !important;
  color: var(--bg-main) !important;
}

/* Club name secondary line */
.cs-club-name-en {
  font-size: 11px;
  color: var(--text-section);
  margin-top: 2px;
}

.cs-club-name {
  font-weight: 500;
  color: var(--text-primary);
}

.cs-td-name:hover .cs-club-name {
  color: var(--accent-green);
}

/* Completeness bar */
.cs-completeness-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  max-width: 120px;
}

.cs-completeness-lg {
  height: 6px;
  max-width: none;
  flex: 1;
}

.cs-completeness-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

/* Status badge */
.cs-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.cs-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.cs-status-operating { background: rgba(74,222,128,0.15); color: #4ade80; }
.cs-status-closed { background: rgba(248,113,113,0.15); color: #f87171; }
.cs-status-archived { background: rgba(107,114,128,0.15); color: #9ca3af; }
.cs-status-unknown { background: rgba(234,179,8,0.15); color: #eab308; }

.cs-verification {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.cs-veri-partial { background: rgba(234,179,8,0.1); color: #eab308; }
.cs-veri-verified { background: rgba(74,222,128,0.1); color: #4ade80; }

/* Empty state */
.cs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
  gap: 12px;
}

.cs-empty-icon { font-size: 48px; opacity: 0.25; }
.cs-empty-title { font-size: 16px; font-weight: 600; color: #d1d5db; }
.cs-empty-text { font-size: 14px; color: #71717a; }

/* ══════════════════════════════════════════
   MY COURSES (Played History)
   ══════════════════════════════════════════ */

.mc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-section);
}

.mc-stats-sep { opacity: 0.4; }

.mc-sort-row {
  display: flex;
  gap: 4px;
}

.mc-sort-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mc-sort-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mc-sort-active {
  background: var(--bg-active);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.mc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.mc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.mc-card:hover {
  background: var(--bg-hover);
}

.mc-card + .mc-card {
  border-top: 1px solid var(--border-subtle);
}

.mc-card-rank {
  width: 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-section);
  flex-shrink: 0;
}

.mc-card-main {
  flex: 1;
  min-width: 0;
}

.mc-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-card:hover .mc-card-name {
  color: var(--accent-green);
}

.mc-card-city {
  font-size: 12px;
  color: var(--text-section);
  margin-top: 2px;
}

.mc-card-stats {
  text-align: right;
  flex-shrink: 0;
  margin-left: 16px;
}

.mc-card-count {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.mc-card-unit {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-section);
  margin-left: 4px;
}

.mc-card-date {
  font-size: 11px;
  color: var(--text-section);
  margin-top: 4px;
}

/* Light theme */
html.light .mc-card:hover { background: rgba(0,0,0,0.02); }
html.light .mc-card-name { color: #111827; }
html.light .mc-card:hover .mc-card-name { color: var(--accent-green); }
html.light .mc-card-city { color: #9ca3af; }
html.light .mc-card-count { color: #111827; }
html.light .mc-card-unit { color: #9ca3af; }
html.light .mc-card-date { color: #9ca3af; }
html.light .mc-stats { color: #9ca3af; }
html.light .mc-sort-btn { color: #6b7280; }
html.light .mc-sort-btn:hover { background: #f3f4f6; color: #111827; }
html.light .mc-sort-active { background: #f3f4f6; color: #111827; border-color: rgba(0,0,0,0.08); }
html.light .mc-card-rank { color: #9ca3af; }
html.light .mc-list { border-color: rgba(0,0,0,0.08); }
html.light .mc-card + .mc-card { border-color: rgba(0,0,0,0.06); }

/* ══════════════════════════════════════════
   COURSES DRAWER (Right-side detail)
   ══════════════════════════════════════════ */

.cs-drawer-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 800;
}

.cs-drawer-bg.cs-drawer-bg-show {
  display: block;
}

.cs-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: var(--bg-sidebar);
  z-index: 801;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.cs-drawer.cs-drawer-open {
  transform: translateX(0);
}

.cs-drawer-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.cs-drawer-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-section);
}

.cs-drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.cs-drawer-close:hover { background: var(--bg-hover); }

.cs-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cs-drawer-body::-webkit-scrollbar { width: 4px; }
.cs-drawer-body::-webkit-scrollbar-track { background: transparent; }
.cs-drawer-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Drawer content */
.cs-drawer-header {
  margin-bottom: 24px;
}

.cs-drawer-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.cs-drawer-name-en {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cs-drawer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cs-drawer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-drawer-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.cs-drawer-section {
  margin-bottom: 20px;
}

.cs-drawer-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-section);
  margin-bottom: 6px;
}

.cs-drawer-value {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.cs-drawer-value + .cs-drawer-value {
  margin-top: 4px;
}

.cs-drawer-nines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cs-nine-chip {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 10px;
}

.cs-layout-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}

.cs-layout-name { color: var(--text-primary); }
.cs-layout-holes { color: var(--text-section); font-size: 12px; }
.cs-layout-default {
  font-size: 10px;
  color: #4ade80;
  background: rgba(74,222,128,0.1);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 500;
}

.cs-tee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cs-tee-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid;
  border-radius: 12px;
  padding: 3px 10px;
}

.cs-tee-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cs-tee-gender {
  font-size: 10px;
  color: var(--text-section);
}

.cs-drawer-actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.cs-drawer-actions .cs-btn {
  flex: 1;
  text-align: center;
}

/* ── Courses Page — Light Theme ── */
html.light .cs-page-title { color: #111827; }
html.light .cs-search { background: transparent; border-color: rgba(0,0,0,0.1); color: #1a1a1a; }
html.light .cs-search::placeholder { color: #9ca3af; }
html.light .cs-search:focus { border-color: var(--accent-green); background: #fff; }
html.light .cs-select { background: transparent; border-color: rgba(0,0,0,0.1); color: #6b7280; }
html.light .cs-select:hover { border-color: rgba(0,0,0,0.2); color: #374151; }
html.light .cs-table-wrap { border-color: rgba(0,0,0,0.08); }
html.light .cs-table thead th { color: #9ca3af; border-color: rgba(0,0,0,0.06); background: #fafafa; }
html.light .cs-table tbody tr:hover { background: rgba(0,0,0,0.02); }
html.light .cs-row-alt { background: transparent; }
html.light .cs-btn-primary { background: #111827; color: #fff; }
html.light .cs-page-active { background: #111827; color: #fff; border-color: #111827; }
html.light .cs-table tbody td { border-color: rgba(0,0,0,0.04); color: #374151; }
html.light .cs-row-btn-edit { background: rgba(0,0,0,0.04); color: #374151; }
html.light .cs-row-btn-edit:hover { background: rgba(0,0,0,0.08); }
html.light .cs-page-btn { border-color: rgba(0,0,0,0.08); color: #6b7280; }
html.light .cs-page-btn:hover:not(:disabled) { background: rgba(0,0,0,0.04); color: #374151; }
html.light .cs-club-name-en { color: #9ca3af; }
html.light .cs-club-name { color: #1a1a1a; }
html.light .cs-completeness-bar { background: rgba(0,0,0,0.04); }
html.light .cs-status-operating { background: rgba(22,163,106,0.08); color: #16a34a; }
html.light .cs-status-closed { background: rgba(220,38,38,0.08); color: #dc2626; }
html.light .cs-status-archived { background: rgba(107,114,128,0.08); color: #6b7280; }
html.light .cs-status-unknown { background: rgba(202,138,4,0.08); color: #ca8a04; }
html.light .cs-empty-title { color: #6b7280; }
html.light .cs-empty-text { color: #9ca3af; }
html.light .cs-link-btn { color: #9ca3af; }
html.light .cs-link-btn:hover { color: #6b7280; background: rgba(0,0,0,0.04); }

/* Drawer light */
html.light .cs-drawer { background: #fff; }
html.light .cs-drawer-hdr { border-color: rgba(0,0,0,0.06); }
html.light .cs-drawer-name { color: #1a1a1a; }
html.light .cs-drawer-name-en { color: #6b7280; }
html.light .cs-drawer-label { color: #9ca3af; }
html.light .cs-drawer-value { color: #374151; }
html.light .cs-nine-chip { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); color: #6b7280; }
html.light .cs-drawer-actions { border-color: rgba(0,0,0,0.06); }
html.light .cs-btn-default { background: transparent; border-color: rgba(0,0,0,0.1); color: #6b7280; }
html.light .cs-btn-default:hover { border-color: rgba(0,0,0,0.2); color: #374151; }
html.light .cs-btn-danger { border-color: rgba(220,38,38,0.15); color: #dc2626; }
html.light .cs-btn-danger:hover { background: rgba(220,38,38,0.04); }
html.light .cs-drawer-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); }
html.light .cs-drawer-bg { background: rgba(0,0,0,.2); }
html.light .cs-tee-chip { color: #6b7280; }
html.light .cs-tee-gender { color: #9ca3af; }

/* ── Courses Drawer mobile ── */
@media (max-width: 768px) {
  .cs-drawer { width: 100%; max-width: 100vw; }
}

/* ══════════════════════════════════════════
   COURSE DETAIL PAGE
   ══════════════════════════════════════════ */

#page-course-detail .sh-page-container {
  max-width: 720px;
}

/* Header */
.cd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.cd-header-left {
  flex: 1;
  min-width: 0;
}

.cd-back-btn {
  background: none;
  border: none;
  color: var(--text-section);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 8px;
  display: inline-block;
  transition: color 0.15s;
}

.cd-back-btn:hover { color: var(--text-secondary); }

.cd-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.3;
}

.cd-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cd-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-section);
}

.cd-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 28px;
}

/* Section */
.cd-section {
  margin-bottom: 32px;
}

.cd-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-section);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Form grid */
.cd-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.cd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cd-field-wide {
  grid-column: 1 / -1;
}

.cd-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.cd-label-hint {
  font-weight: 400;
  color: var(--text-section);
  font-size: 11px;
}

.cd-input {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}

.cd-input:focus {
  border-color: var(--accent-green);
}

.cd-input::placeholder {
  color: var(--text-section);
}

.cd-select {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.cd-select:focus {
  border-color: var(--accent-green);
}

.cd-readonly {
  font-size: 14px;
  color: var(--text-section);
  padding: 8px 0;
  line-height: 1.5;
}

.cd-textarea {
  width: 100%;
  min-height: 80px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.cd-textarea:focus {
  border-color: var(--accent-green);
}

.cd-textarea::placeholder {
  color: var(--text-section);
}

/* Stats grid */
.cd-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.cd-stat {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}

.cd-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.cd-stat-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-section);
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   OCR IMPORT MODAL
   ══════════════════════════════════════════ */

.ocr-modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1200;
}
.ocr-modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1201; padding: 16px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ocr-modal-inner {
  background: rgba(22,22,28,0.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  width: 100%; max-width: 740px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

/* Header */
.ocr-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.ocr-modal-title {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
}
.ocr-header-right {
  display: flex; align-items: center; gap: 12px;
}
.ocr-debug-toggle {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-secondary);
  cursor: pointer; user-select: none;
}
.ocr-debug-toggle input { accent-color: var(--accent-green); }
.ocr-close-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 16px; line-height: 1;
  padding: 4px 6px; border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.ocr-close-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Body */
.ocr-modal-body {
  flex: 1; overflow-y: auto;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Footer */
.ocr-modal-footer { flex-shrink: 0; }
.ocr-footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
}
.ocr-footer-left, .ocr-footer-right {
  display: flex; align-items: center; gap: 8px;
}

/* ── State A: Idle ── */

.ocr-overwrite-warn {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: #fca5a5; line-height: 1.5;
}
.ocr-auth-warn {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: #fcd34d;
  display: flex; align-items: center; gap: 8px;
}
.ocr-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: 12px; padding: 36px 24px;
  text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ocr-dropzone:hover, .ocr-drag-over {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.05);
}
.ocr-drop-icon { font-size: 36px; margin-bottom: 10px; }
.ocr-drop-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.ocr-drop-sub   { font-size: 13px; color: var(--text-secondary); }
.ocr-hints {
  margin: 0; padding: 0 0 0 18px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.8;
}
.ocr-hint-warn { color: #fcd34d; }
.ocr-link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--accent-green); font-size: 12px;
  padding: 0 4px; text-decoration: underline;
}
.ocr-link-btn:hover { opacity: 0.8; }

/* ── State B: Step Progress ── */

.ocr-steps {
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 0;
}
.ocr-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; padding: 6px 0;
}
.ocr-step-icon {
  width: 20px; text-align: center; font-size: 14px; flex-shrink: 0;
}
.ocr-step-label { flex: 1; }
.ocr-step-dur   { font-size: 11px; color: var(--text-section); }

.ocr-step-waiting { color: var(--text-section); }
.ocr-step-running { color: #60a5fa; }
.ocr-step-running .ocr-step-icon { animation: ocr-spin 1s linear infinite; }
.ocr-step-done    { color: var(--accent-green); }
.ocr-step-error   { color: #ef4444; }

@keyframes ocr-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Blocks (shared) ── */

.ocr-block {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 14px 16px;
}
.ocr-block-title {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-section); margin-bottom: 10px;
}
.ocr-block-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.ocr-title-error { color: #f87171; }
.ocr-title-warn  { color: #fbbf24; }
.ocr-title-mt    { margin-top: 12px; }

/* Block 1: Summary pills */
.ocr-summary-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ocr-pill {
  background: var(--bg-active); border-radius: 20px;
  padding: 3px 10px; font-size: 12px; color: var(--text-secondary);
}
.ocr-conf-high { background: rgba(34,197,94,0.15); color: #4ade80; }
.ocr-conf-mid  { background: rgba(251,191,36,0.12); color: #fbbf24; }
.ocr-conf-low  { background: rgba(239,68,68,0.12);  color: #f87171; }
.ocr-conf-note {
  margin-top: 8px; font-size: 12px; border-radius: 6px; padding: 6px 10px;
}
.ocr-conf-note-ok   { background: rgba(34,197,94,0.1);  color: #4ade80; }
.ocr-conf-note-warn { background: rgba(245,158,11,0.1); color: #fbbf24; }

/* Block 2: Info grid */
.ocr-info-grid { display: flex; flex-direction: column; gap: 4px; }
.ocr-info-row  { display: flex; gap: 8px; font-size: 13px; }
.ocr-info-lbl  { color: var(--text-section); min-width: 72px; flex-shrink: 0; }
.ocr-info-val  { color: var(--text-primary); }
.ocr-tag-warn  { background: rgba(245,158,11,0.15); color: #fbbf24; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.ocr-tag-muted { color: var(--text-section); font-size: 12px; }

/* Block 3: Issues */
.ocr-issue-error {
  font-size: 13px; color: #f87171; padding: 5px 0;
  border-bottom: 1px solid rgba(239,68,68,0.1);
}
.ocr-issue-error:last-child { border-bottom: none; }
.ocr-issue-warn {
  font-size: 13px; color: #fbbf24; padding: 4px 0;
}

/* Block 4: Score grid */
.ocr-score-tabs { display: flex; gap: 4px; }
.ocr-tab {
  background: var(--bg-hover); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); font-size: 11px; font-weight: 500;
  border-radius: 6px; padding: 4px 10px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ocr-tab:hover { background: var(--bg-active); color: var(--text-primary); }
.ocr-tab-active { background: var(--accent-green); border-color: var(--accent-green); color: #fff; }

.ocr-score-grid {
  display: flex; flex-direction: column; gap: 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.ocr-score-row  {
  display: flex; align-items: center; gap: 0;
  min-width: max-content;
}
.ocr-par-row .ocr-score-name { font-size: 11px; font-weight: 600; color: var(--text-section); text-transform: uppercase; }
.ocr-par-row .ocr-hole-cell { font-weight: 500; color: #666; }
.ocr-score-name {
  font-size: 13px; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 72px; max-width: 72px; flex-shrink: 0;
  position: sticky; left: 0; z-index: 2;
  background: var(--bg-sidebar, #171717); padding-right: 6px;
}
.ocr-hole-cells {
  display: flex; gap: 2px; flex-wrap: nowrap;
}
.ocr-hole-cell {
  width: 32px; min-width: 32px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border-radius: 4px;
  background: var(--bg-active); color: #fff;
  flex-shrink: 0;
}
.ocr-hole-hdr-row .ocr-hole-cell { font-size: 10px; color: #666; }
.ocr-hole-num { font-weight: 600; }
.ocr-subtotal-cell { background: rgba(255,255,255,0.04); font-weight: 600; width: 36px; min-width: 36px; border-left: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.1); color: #aaa; }
.ocr-total-cell  { background: var(--bg-hover); font-weight: 700; width: 36px; min-width: 36px; }
.ocr-under       { background: rgba(239,68,68,0.2); color: #f87171; }
.ocr-over        { background: rgba(156,163,175,0.15); color: #9ca3af; }
.ocr-par         { color: var(--text-secondary); }
.ocr-anomaly     { outline: 1px dashed #fbbf24; }
.ocr-badge-warn  { font-size: 10px; background: rgba(245,158,11,0.15); color: #fbbf24; border-radius: 4px; padding: 1px 5px; margin-left: 4px; cursor: default; }

/* Block 2.5: Club/Course/Tee Matching */
.ocr-match-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.ocr-match-label { min-width: 52px; font-size: 12px; font-weight: 600; color: #aaa; }
.ocr-match-select { flex: 1; max-width: 320px; }
.ocr-match-hint { font-size: 11px; color: #666; }
.ocr-match-auto { color: #4ade80; }
.ocr-mismatch-note { font-size: 11px; color: #fbbf24; margin-top: 4px; padding: 4px 6px; background: rgba(245,158,11,0.08); border-radius: 4px; }

/* Block 5: Mapping */
.ocr-mapping-hdr {
  display: grid; grid-template-columns: 90px 90px 1fr 48px 70px;
  gap: 8px; padding: 0 0 6px;
  font-size: 11px; font-weight: 600; color: var(--text-section);
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}
.ocr-mapping-row {
  display: grid; grid-template-columns: 90px 90px 1fr 48px 70px;
  gap: 8px; align-items: center; padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.ocr-mapping-row:last-child { border-bottom: none; }
.ocr-map-name  { color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocr-map-match { color: var(--text-secondary); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocr-map-select {
  background: var(--bg-active); border: 1px solid var(--border-subtle);
  color: var(--text-primary); border-radius: 6px; padding: 4px 6px;
  font-size: 12px; width: 100%;
}
.ocr-map-score  { color: var(--text-primary); text-align: center; font-weight: 600; }
.ocr-map-ok     { color: var(--accent-green); font-size: 12px; }
.ocr-map-needs  { color: #fbbf24; font-size: 12px; }

/* ── Success ── */
.ocr-success {
  text-align: center; padding: 32px 20px;
}
.ocr-success-icon  { font-size: 48px; color: var(--accent-green); line-height: 1; margin-bottom: 12px; }
.ocr-success-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.ocr-success-detail{ font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
.ocr-success-sub   { font-size: 12px; color: var(--text-section); }

/* ── Error state ── */
.ocr-error-state {
  text-align: center; padding: 32px 20px;
}
.ocr-error-icon   { font-size: 40px; color: #ef4444; line-height: 1; margin-bottom: 12px; }
.ocr-error-title  { font-size: 15px; font-weight: 600; color: #f87171; margin-bottom: 10px; }
.ocr-error-detail { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-family: monospace; }

/* ── Buttons ── */
.ocr-btn-primary {
  background: #16a34a; color: #fff; border: none;
  border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.ocr-btn-primary:hover   { opacity: 0.9; }
.ocr-btn-primary:disabled{ opacity: 0.4; cursor: not-allowed; }
.ocr-btn-cancel {
  background: var(--bg-hover); color: var(--text-secondary);
  border: 1px solid var(--border-subtle); border-radius: 8px;
  padding: 8px 14px; font-size: 13px; cursor: pointer; transition: background 0.15s;
}
.ocr-btn-cancel:hover { background: var(--bg-active); color: var(--text-primary); }
.ocr-btn-ghost {
  background: none; border: none; color: var(--text-secondary);
  font-size: 12px; cursor: pointer; padding: 6px 8px; border-radius: 6px;
  transition: background 0.15s;
}
.ocr-btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Debug Panel ── */
.ocr-debug-panel {
  border-top: 1px solid var(--border-subtle);
  background: #141416; max-height: 320px; overflow-y: auto;
  flex-shrink: 0;
}
.ocr-debug-inner  { padding: 12px 16px; }
.ocr-debug-title  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-section); margin-bottom: 8px; }
.ocr-debug-log    { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.ocr-log-entry    { font-size: 11px; font-family: monospace; line-height: 1.6; display: flex; flex-wrap: wrap; gap: 0 6px; }
.ocr-log-tag      { font-weight: 700; min-width: 52px; }
.ocr-log-stage    { color: var(--text-section); }
.ocr-log-msg      { color: var(--text-secondary); }
.ocr-log-ok    .ocr-log-tag { color: #4ade80; }
.ocr-log-warn  .ocr-log-tag { color: #fbbf24; }
.ocr-log-error .ocr-log-tag { color: #f87171; }
.ocr-log-info  .ocr-log-tag { color: #60a5fa; }
.ocr-log-payload { width: 100%; margin-top: 2px; }
.ocr-log-payload summary { font-size: 11px; color: var(--text-section); cursor: pointer; }
.ocr-log-payload pre { font-size: 10px; color: var(--text-secondary); margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; max-height: 120px; overflow-y: auto; }
.ocr-json-section { border-top: 1px solid var(--border-subtle); padding: 8px 0; }
.ocr-json-section summary { font-size: 12px; color: var(--text-secondary); cursor: pointer; font-weight: 500; }
.ocr-json-section pre { font-size: 10px; color: var(--text-secondary); margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow-y: auto; }
.ocr-debug-server { font-size: 11px; color: var(--text-section); padding: 8px 0; display: flex; gap: 12px; }

/* ── Light mode overrides ── */
html.light .ocr-modal-inner { background: #fff; border-color: rgba(0,0,0,0.08); }
html.light .ocr-modal-header { border-color: rgba(0,0,0,0.06); }
html.light .ocr-block { background: #f9fafb; border-color: rgba(0,0,0,0.06); }
html.light .ocr-debug-panel { background: #f1f5f9; border-color: rgba(0,0,0,0.06); }
html.light .ocr-dropzone { border-color: rgba(0,0,0,0.1); }
html.light .ocr-hole-cell { background: rgba(0,0,0,0.05); }
html.light .ocr-score-name { background: #fff; }
html.light .ocr-map-select { background: #fff; border-color: rgba(0,0,0,0.1); color: #1a1a1a; }

/* ── Mobile ── */
@media (max-width: 600px) {
  .ocr-modal-inner { border-radius: 12px 12px 0 0; max-height: 95vh; }
  .ocr-modal { align-items: flex-end; padding: 0; }
  .ocr-mapping-hdr, .ocr-mapping-row { grid-template-columns: 80px 1fr 36px 60px; }
  .ocr-mapping-hdr span:nth-child(2), .ocr-mapping-row .ocr-map-match { display: none; }
  .ocr-score-name { min-width: 56px; max-width: 56px; font-size: 11px; }
}

/* Structure list */
.cd-structure-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cd-structure-sub-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-section);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.cd-structure-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.cd-structure-item:hover {
  background: var(--bg-hover);
}

.cd-structure-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.cd-structure-meta {
  font-size: 12px;
  color: var(--text-section);
}

.cd-default-tag {
  color: #4ade80;
  font-weight: 500;
}

.cd-structure-btn {
  margin-top: 16px;
}

/* Not found */
.cd-not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 20px;
}

/* Bottom actions */
.cd-bottom-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 40px;
}

/* Toast */
.cd-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #22c55e;
  color: #000;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  pointer-events: none;
}

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

/* ── Course Detail — Light Theme ── */
html.light .cd-title { color: #1a1a1a; }
html.light .cd-back-btn { color: #9ca3af; }
html.light .cd-back-btn:hover { color: #6b7280; }
html.light .cd-pct { color: #9ca3af; }
html.light .cd-section-title { color: #9ca3af; border-color: rgba(0,0,0,0.06); }
html.light .cd-label { color: #6b7280; }
html.light .cd-label-hint { color: #9ca3af; }
html.light .cd-input { background: #fff; border-color: rgba(0,0,0,0.08); color: #1a1a1a; }
html.light .cd-input:focus { border-color: var(--accent-green); }
html.light .cd-input::placeholder { color: #9ca3af; }
html.light .cd-select { background: #fff; border-color: rgba(0,0,0,0.08); color: #1a1a1a; }
html.light .cd-select:focus { border-color: var(--accent-green); }
html.light .cd-readonly { color: #9ca3af; }
html.light .cd-textarea { background: #fff; border-color: rgba(0,0,0,0.08); color: #1a1a1a; }
html.light .cd-textarea:focus { border-color: var(--accent-green); }
html.light .cd-textarea::placeholder { color: #9ca3af; }
html.light .cd-stat { background: #fafafa; border-color: rgba(0,0,0,0.06); }
html.light .cd-stat-val { color: #1a1a1a; }
html.light .cd-stat-lbl { color: #9ca3af; }
html.light .cd-structure-name { color: #1a1a1a; }
html.light .cd-structure-meta { color: #9ca3af; }
html.light .cd-structure-item:hover { background: rgba(0,0,0,0.02); }
html.light .cd-bottom-actions { border-color: rgba(0,0,0,0.06); }
html.light .cd-toast { background: #16a34a; color: #fff; }

/* ══════════════════════════════════════════
   NEW ROUND PAGE (#/new-round)
   ══════════════════════════════════════════ */

#page-new-round .sh-page-container { max-width: 600px; }

/* ── New Round v3: Modern Form Layout ── */

.nr-header { margin-bottom: 24px; }

.nr-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Each field = label above + clickable row */
.nr-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.nr-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-section);
  padding-left: 2px;
}

.nr-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.2s var(--ease-out, ease);
}

/* Unfilled — accent-tinted block, inviting click */
.nr-card:not(.nr-card-filled) .nr-card-row {
  background: rgba(34,197,94,0.10);
}
.nr-card:not(.nr-card-filled) .nr-card-row:hover {
  background: rgba(34,197,94,0.18);
}
.nr-card:not(.nr-card-filled) .nr-card-value {
  color: var(--accent-green);
  font-weight: 500;
}

/* Filled — subtle bg */
.nr-card.nr-card-filled .nr-card-row {
  background: var(--bg-hover);
}
.nr-card.nr-card-filled .nr-card-row:hover {
  background: var(--bg-active);
}

.nr-card-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  line-height: 1;
}

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

.nr-card-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-card-secondary {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.nr-card-arrow {
  font-size: 18px;
  color: var(--text-section);
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.5;
}

/* ── New Round v2: Picker Overlay ── */

.nr-picker-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: var(--bg-main);
  display: none;
  flex-direction: column;
}
.nr-picker-overlay.nr-picker-active {
  display: flex;
}

.nr-picker-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.nr-picker-back {
  background: none;
  border: none;
  color: var(--accent-green);
  font-size: 15px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 4px 8px;
  margin-left: -8px;
}
.nr-picker-back:hover { text-decoration: underline; }

.nr-picker-title {
  flex: 1;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.nr-picker-spacer {
  width: 44px;
  flex-shrink: 0;
}

.nr-picker-inline-confirm {
  padding: 20px 16px 8px;
  position: sticky;
  bottom: 0;
  background: var(--bg1);
  z-index: 2;
}

.nr-picker-confirm {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}

/* Legacy — kept for compat */
.nr-picker-done {
  background: none;
  border: none;
  color: var(--accent-green);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 4px 8px;
  margin-right: -8px;
  white-space: nowrap;
}
.nr-picker-done:hover { opacity: 0.8; }

.nr-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.nr-picker-stub {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-section);
  font-size: 14px;
}

/* ── New Round v2: Footer & Hints ── */

.nr-footer {
  margin-top: 32px;
  padding-bottom: 40px;
}

.nr-create-btn {
  padding: 12px 36px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.nr-create-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nr-hints {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nr-hint {
  font-size: 12px;
  color: var(--text-section);
}

/* ── New Round v2: Picker Shared Components ──
   Used by coursePicker, buddyPicker, teeTimePicker, visibilityPicker */

.nr-section { margin-bottom: 24px; }

.nr-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-section);
  margin-bottom: 10px;
}

.nr-search {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  margin-bottom: 12px;
  outline: none;
}
.nr-search:focus { border-color: var(--accent-green); }

.nr-club-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nr-club-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-hover);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nr-club-item:hover { background: var(--bg-active); }
.nr-club-item.nr-selected {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.06);
}

.nr-club-info { flex: 1; min-width: 0; }
.nr-club-name { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-club-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.nr-check { color: var(--accent-green); font-size: 16px; flex-shrink: 0; }

.nr-nine-selector { margin-top: 16px; }
.nr-nine-group { margin-bottom: 12px; }
.nr-nine-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.nr-nine-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nr-nine-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-family: var(--font-sans);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.nr-nine-btn:hover { background: var(--bg-active); color: var(--text-primary); }
.nr-nine-btn.nr-selected {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(34,197,94,0.06);
}
.nr-nine-holes { font-size: 11px; opacity: 0.7; }

.nr-nine-result {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nr-picker-confirm-row {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.nr-picker-confirm-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}
.nr-picker-confirm-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nr-show-all-btn {
  display: block;
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--accent-green);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 4px 0;
}
.nr-show-all-btn:hover { text-decoration: underline; }

.nr-empty-hint {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-section);
}

/* Player/buddy picker shared */
.nr-player-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.nr-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.nr-player-order {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-section);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nr-player-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nr-player-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(34,197,94,0.12);
  color: var(--accent-green);
  flex-shrink: 0;
}

.nr-player-remove {
  background: none;
  border: none;
  color: #f87171;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.nr-player-remove:hover { color: #ef4444; }

/* BuddyPicker — selected area + player items */
.nr-selected-area {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}
.nr-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.nr-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 13px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 16px;
  color: var(--text-primary);
}
.nr-selected-remove {
  cursor: pointer;
  color: var(--text-section);
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
}
.nr-selected-remove:hover { color: #f87171; }

.nr-player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-hover);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nr-player-item:hover { background: var(--bg-active); }
.nr-player-item.nr-selected {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.06);
}
.nr-player-info { flex: 1; min-width: 0; }
.nr-player-check {
  color: var(--accent-green);
  font-size: 16px;
  flex-shrink: 0;
  min-width: 16px;
  text-align: center;
}

.nr-add-guest-btn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: none;
  border: 1px dashed var(--border-subtle);
  border-radius: 10px;
  color: var(--accent-green);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.nr-add-guest-btn:hover { background: var(--bg-hover); }

.nr-add-row {
  display: flex;
  gap: 8px;
}

.nr-add-input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  outline: none;
}
.nr-add-input:focus { border-color: var(--accent-green); }

.nr-add-btn {
  height: 40px;
  padding: 0 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.nr-add-btn:hover { background: var(--bg-active); }

.nr-recent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.nr-recent-chip {
  padding: 6px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.nr-recent-chip:hover { background: var(--bg-active); color: var(--text-primary); border-color: var(--accent-green); }
.nr-recent-chip.nr-chip-selected {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(34,197,94,0.06);
}

/* Tee time picker */
.nr-quick-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.nr-quick-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.nr-quick-btn:hover { background: var(--bg-active); color: var(--text-primary); }
.nr-quick-btn.nr-selected {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(34,197,94,0.06);
}

.nr-datetime-inputs {
  display: flex;
  gap: 10px;
}
.nr-datetime-inputs .nr-input { flex: 1; }

.nr-tee-preview {
  padding: 12px 14px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-green);
  text-align: center;
}

.nr-input {
  width: 100%;
  max-width: 260px;
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  color-scheme: dark;
  outline: none;
}
.nr-input:focus { border-color: var(--accent-green); }

/* Visibility picker */
.nr-vis-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nr-vis-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.nr-vis-option:hover { background: var(--bg-active); }
.nr-vis-option.nr-selected {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.06);
}

.nr-vis-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-section);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nr-vis-option.nr-selected .nr-vis-radio {
  border-color: var(--accent-green);
}
.nr-vis-option.nr-selected .nr-vis-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
}

.nr-vis-body { flex: 1; }
.nr-vis-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.nr-vis-desc { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

/* ── New Round v2: Light Theme ── */
html.light .nr-card.nr-card-filled .nr-card-row { background: #f5f5f5; }
html.light .nr-card.nr-card-filled .nr-card-row:hover { background: #efefef; }
html.light .nr-card:not(.nr-card-filled) .nr-card-row { background: rgba(34,197,94,0.08); }
html.light .nr-card:not(.nr-card-filled) .nr-card-row:hover { background: rgba(34,197,94,0.14); }
html.light .nr-card-arrow { color: #a1a1aa; }
html.light .nr-picker-overlay { background: #f9fafb; }
html.light .nr-picker-header { border-color: rgba(0,0,0,0.06); }
/* picker footer removed — confirm is inline */
html.light .nr-picker-back { color: #16a34a; }
html.light .nr-club-item { background: #fff; border-color: transparent; }
html.light .nr-club-item:hover { background: #f5f5f5; }
html.light .nr-club-item.nr-selected { background: rgba(34,197,94,0.04); }
html.light .nr-search, html.light .nr-add-input, html.light .nr-input {
  background: #fff; border-color: rgba(0,0,0,0.08); color: #1a1a1a;
}
html.light .nr-input { color-scheme: light; }
html.light .nr-nine-btn, html.light .nr-quick-btn { background: #fff; border-color: rgba(0,0,0,0.08); color: #6b7280; }
html.light .nr-nine-btn:hover, html.light .nr-quick-btn:hover { background: #fafafa; color: #1a1a1a; }
html.light .nr-recent-chip { background: #fff; border-color: rgba(0,0,0,0.08); color: #6b7280; }
html.light .nr-recent-chip:hover { background: #fafafa; color: #1a1a1a; }
html.light .nr-player-row { background: #fff; border-color: rgba(0,0,0,0.06); }
html.light .nr-add-btn { background: #fff; border-color: rgba(0,0,0,0.08); color: #16a34a; }
html.light .nr-vis-option { background: #fff; border-color: rgba(0,0,0,0.06); }
html.light .nr-vis-option:hover { background: #fafafa; }
html.light .nr-player-item { background: #fff; }
html.light .nr-player-item:hover { background: #fafafa; }
html.light .nr-player-item.nr-selected { background: rgba(34,197,94,0.04); }
html.light .nr-selected-area { border-color: rgba(0,0,0,0.06); }
html.light .nr-selected-chip { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.15); }
html.light .nr-add-guest-btn { border-color: rgba(0,0,0,0.1); color: #16a34a; }
html.light .nr-add-guest-btn:hover { background: #fafafa; }

/* ══════════════════════════════════════════
   COURSE OCR IMPORT MODAL
   ══════════════════════════════════════════ */

.cocr-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9000;
}
.cocr-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(720px, 92vw); max-height: 88vh;
  background: var(--bg-sidebar, #171717); border-radius: 12px;
  display: flex; flex-direction: column; z-index: 9001;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.cocr-header {
  display: flex; align-items: center; padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.cocr-title { font-size: 15px; font-weight: 600; flex: 1; color: #fff; }
.cocr-close { background: none; border: none; color: #888; font-size: 22px; cursor: pointer; padding: 0 4px; }
.cocr-close:hover { color: #fff; }
.cocr-body { flex: 1; overflow-y: auto; padding: 20px; }
.cocr-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--border-subtle);
}

/* Upload view */
.cocr-upload {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0;
}
.cocr-upload-icon { font-size: 48px; opacity: 0.5; }
.cocr-upload-text { font-size: 15px; font-weight: 600; color: #fff; }
.cocr-upload-hint { font-size: 13px; color: #888; text-align: center; line-height: 1.6; }

/* Loading */
.cocr-loading { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 60px 0; }
.cocr-spinner {
  width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #3b82f6; border-radius: 50%; animation: cocr-spin 0.8s linear infinite;
}
@keyframes cocr-spin { to { transform: rotate(360deg); } }
.cocr-loading-text { font-size: 15px; color: #fff; font-weight: 500; }
.cocr-loading-hint { font-size: 13px; color: #888; }

/* Error */
.cocr-error { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0; }
.cocr-error-icon { font-size: 40px; }
.cocr-error-text { font-size: 14px; color: #f87171; text-align: center; max-width: 400px; }

/* Buttons */
.cocr-btn {
  padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; transition: background 0.15s;
}
.cocr-btn-primary { background: #3b82f6; color: #fff; }
.cocr-btn-primary:hover { background: #2563eb; }
.cocr-btn-default { background: rgba(255,255,255,0.08); color: #ccc; }
.cocr-btn-default:hover { background: rgba(255,255,255,0.15); }

/* Info row */
.cocr-info-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cocr-tag {
  font-size: 12px; padding: 3px 10px; border-radius: 4px;
  background: rgba(255,255,255,0.08); color: #ccc;
}
.cocr-conf-high { background: rgba(34,197,94,0.15); color: #4ade80; }
.cocr-conf-mid  { background: rgba(234,179,8,0.15); color: #facc15; }
.cocr-conf-low  { background: rgba(239,68,68,0.15); color: #f87171; }

/* Warnings */
.cocr-warnings { margin-bottom: 12px; }
.cocr-warn-item {
  font-size: 12px; color: #fbbf24; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Table */
.cocr-table-wrap { overflow-x: auto; margin-bottom: 8px; }
.cocr-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.cocr-table th {
  padding: 6px 4px; text-align: center; font-weight: 600; font-size: 12px;
  color: #aaa; border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.cocr-table td { padding: 2px; text-align: center; }
.cocr-td-hole {
  font-weight: 700; color: #888; width: 32px;
  font-size: 12px; text-align: center;
}
.cocr-cell {
  width: 52px; padding: 5px 4px; text-align: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px; color: #fff; font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.cocr-cell:focus {
  outline: none; border-color: #3b82f6;
  background: rgba(59,130,246,0.1);
}
.cocr-cell::-webkit-outer-spin-button,
.cocr-cell::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cocr-cell[type=number] { -moz-appearance: textfield; }
.cocr-totals td {
  font-weight: 700; font-size: 12px; color: #aaa;
  border-top: 1px solid var(--border-subtle); padding: 6px 4px;
}
.cocr-group-label {
  font-size: 13px; font-weight: 600; color: #aaa; margin: 16px 0 6px;
  padding-bottom: 4px; border-bottom: 1px solid var(--border-subtle);
}
.cocr-group-label:first-of-type { margin-top: 0; }
.cocr-hint { font-size: 12px; color: #666; text-align: center; margin-top: 4px; }

/* Import dropdown in courses header */
.cs-import-dropdown { position: relative; display: inline-block; }
.cs-import-trigger { min-width: 90px; }
.cs-import-menu {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg-sidebar, #1e1e1e); border: 1px solid var(--border-subtle);
  border-radius: 8px; min-width: 180px; z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); overflow: hidden;
}
.cs-import-item {
  padding: 10px 16px; font-size: 13px; color: #ccc; cursor: pointer;
  white-space: nowrap; transition: background 0.12s;
}
.cs-import-item:hover { background: var(--bg-hover); color: #fff; }
.cs-import-item + .cs-import-item { border-top: 1px solid var(--border-subtle); }

/* Course OCR page elements */
.cocr-section { max-width: 720px; margin: 0 auto; }
.cocr-section-title { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.cocr-section-hint { font-size: 13px; color: #888; margin-bottom: 16px; }

.cocr-club-search { margin-bottom: 12px; width: 100%; }
.cocr-club-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--border-subtle); border-radius: 8px; }
.cocr-club-item {
  padding: 10px 16px; cursor: pointer; transition: background 0.12s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cocr-club-item:hover { background: var(--bg-hover); }
.cocr-club-name { font-size: 14px; font-weight: 500; color: #fff; }
.cocr-club-meta { font-size: 12px; color: #888; margin-top: 2px; }
.cocr-empty { padding: 24px; text-align: center; color: #666; font-size: 13px; }
.cocr-or { text-align: center; color: #555; font-size: 13px; margin: 16px 0; }

.cocr-upload-area {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px;
  border: 2px dashed rgba(255,255,255,0.12); border-radius: 12px;
  transition: border-color 0.15s;
}
.cocr-upload-area:hover, .cocr-drag-over { border-color: #3b82f6; }
.cocr-upload-icon { font-size: 48px; opacity: 0.5; }
.cocr-upload-text { font-size: 15px; font-weight: 600; color: #fff; }
.cocr-upload-hint { font-size: 13px; color: #888; text-align: center; line-height: 1.6; }

.cocr-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }

/* ══════════════════════════════════════════
   STRUCTURE EDITOR
   ══════════════════════════════════════════ */

/* Full-width container (not max-width constrained like other pages) */
.se-page-container {
  padding: 4px 24px 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-course-structure {
  overflow: hidden;
}

/* Header */
.se-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  flex-shrink: 0;
}

.se-save-btn {
  flex-shrink: 0;
}

/* 3-column layout */
.se-columns {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}

/* ── Tree (left) ── */
.se-tree {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  overflow-y: auto;
  padding: 12px 0;
}

.se-tree::-webkit-scrollbar { width: 3px; }
.se-tree::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

.se-tree-section {
  margin-bottom: 16px;
}

.se-tree-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  margin-bottom: 4px;
}

.se-tree-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-section);
}

.se-tree-add {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-section);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.se-tree-add:hover {
  color: var(--text-primary);
  border-color: var(--text-section);
  background: var(--bg-hover);
}

.se-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
  color: var(--text-primary);
}

.se-tree-item:hover {
  background: var(--bg-hover);
}

.se-tree-selected {
  background: var(--bg-active);
  border-right: 2px solid var(--accent-green);
}

.se-tree-icon {
  font-size: 8px;
  color: var(--text-section);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.se-tree-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.se-tree-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.se-tree-meta {
  font-size: 11px;
  color: var(--text-section);
  flex-shrink: 0;
}

.se-tree-empty {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-section);
  font-style: italic;
}

/* ── Grid (center) ── */
.se-grid {
  flex: 1;
  min-width: 0;
  background: var(--bg-main);
  overflow: auto;
  padding: 16px;
}

.se-grid::-webkit-scrollbar { width: 4px; height: 4px; }
.se-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.se-grid-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.se-grid-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 14px;
  color: var(--text-section);
}

.se-grid-scroll {
  overflow-x: auto;
}

/* Hole data table */
.se-table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
  min-width: 400px;
}

.se-table thead th {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-section);
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.se-table .se-sub-hdr th {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-section);
  padding: 2px 4px 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.se-th-hole { width: 36px; text-align: center; }
.se-th-num { width: 52px; }
.se-th-tee { min-width: 100px; }
.se-th-sub { font-weight: 400 !important; }

.se-th-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.se-table tbody td {
  padding: 2px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.se-td-hole {
  font-weight: 600;
  color: var(--text-section);
  font-size: 12px;
  width: 36px;
}

/* Editable cell input */
.se-cell {
  width: 100%;
  min-width: 44px;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 5px 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  text-align: center;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -moz-appearance: textfield;
}

.se-cell::-webkit-inner-spin-button,
.se-cell::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.se-cell::placeholder {
  color: var(--text-section);
  opacity: 0.5;
}

.se-cell:hover {
  border-color: var(--border-subtle);
  background: var(--bg-hover);
}

.se-cell:focus {
  border-color: var(--accent-green);
  background: var(--bg-hover);
}

/* Totals row */
.se-totals td {
  border-top: 2px solid var(--border-subtle);
  border-bottom: none;
  padding-top: 8px;
}

.se-td-total {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Layout segments in grid */
.se-layout-segments {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.se-segment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.se-segment-order {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-section);
  width: 24px;
}

.se-segment-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.se-segment-meta {
  font-size: 12px;
  color: var(--text-section);
}

/* ── Inspector (right) ── */
.se-inspector {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  overflow-y: auto;
  padding: 16px;
}

.se-inspector::-webkit-scrollbar { width: 3px; }
.se-inspector::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

.se-insp-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-section);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.se-insp-empty {
  font-size: 13px;
  color: var(--text-section);
  padding: 20px 0;
  text-align: center;
}

.se-insp-field {
  margin-bottom: 14px;
}

.se-insp-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.se-insp-input {
  width: 100%;
  box-sizing: border-box;
}

.se-insp-check {
  margin-top: 4px;
}

.se-insp-check .se-insp-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}

.se-insp-check input[type="checkbox"] {
  accent-color: var(--accent-green);
}

.se-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.se-color-input {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-hover);
  cursor: pointer;
}

.se-color-hex {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-section);
}

/* Inspector segments */
.se-insp-segments {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.se-seg-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-hover);
  border-radius: 6px;
  font-size: 13px;
}

.se-seg-order {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-section);
  width: 20px;
}

.se-seg-name {
  flex: 1;
  color: var(--text-primary);
}

.se-seg-del {
  background: none;
  border: none;
  color: var(--text-section);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.se-seg-del:hover {
  color: #f87171;
  background: rgba(248,113,113,0.08);
}

.se-insp-add-seg {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.se-seg-select {
  flex: 1;
  font-size: 12px !important;
  padding: 6px 8px !important;
}

.se-insp-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.se-insp-del {
  width: 100%;
  text-align: center;
}

/* ── Structure Editor — Light Theme ── */
html.light .se-tree { background: #f7f7f8; }
html.light .se-tree-item:hover { background: rgba(0,0,0,0.04); }
html.light .se-tree-selected { background: rgba(0,0,0,0.06); border-right-color: var(--accent-green); }
html.light .se-tree-add { border-color: rgba(0,0,0,0.1); color: #9ca3af; }
html.light .se-tree-add:hover { color: #374151; background: rgba(0,0,0,0.04); }
html.light .se-tree-empty { color: #9ca3af; }
html.light .se-grid { background: #fff; }
html.light .se-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); }
html.light .se-grid-title { color: #6b7280; }
html.light .se-grid-placeholder { color: #9ca3af; }
html.light .se-table thead th { color: #9ca3af; border-color: rgba(0,0,0,0.06); }
html.light .se-table .se-sub-hdr th { color: #9ca3af; border-color: rgba(0,0,0,0.06); }
html.light .se-table tbody td { border-color: rgba(0,0,0,0.04); }
html.light .se-td-hole { color: #9ca3af; }
html.light .se-cell { color: #1a1a1a; }
html.light .se-cell::placeholder { color: #9ca3af; }
html.light .se-cell:hover { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.02); }
html.light .se-cell:focus { border-color: var(--accent-green); background: rgba(0,0,0,0.02); }
html.light .se-totals td { border-top-color: rgba(0,0,0,0.08); }
html.light .se-td-total { color: #374151; }
html.light .se-segment-item { background: #fafafa; border-color: rgba(0,0,0,0.06); }
html.light .se-segment-name { color: #1a1a1a; }
html.light .se-inspector { background: #f7f7f8; }
html.light .se-inspector::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); }
html.light .se-insp-title { color: #9ca3af; border-color: rgba(0,0,0,0.06); }
html.light .se-insp-empty { color: #9ca3af; }
html.light .se-insp-label { color: #6b7280; }
html.light .se-insp-check .se-insp-label { color: #374151; }
html.light .se-color-input { border-color: rgba(0,0,0,0.1); background: #fff; }
html.light .se-color-hex { color: #9ca3af; }
html.light .se-seg-row { background: rgba(0,0,0,0.03); }
html.light .se-seg-name { color: #1a1a1a; }
html.light .se-seg-del:hover { color: #dc2626; background: rgba(220,38,38,0.06); }
html.light .se-insp-actions { border-color: rgba(0,0,0,0.06); }
html.light .se-columns { border-color: rgba(0,0,0,0.06); background: rgba(0,0,0,0.06); }
html.light .se-tree::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); }

/* ── Structure Editor — Responsive ── */
@media (max-width: 900px) {
  .se-columns {
    flex-direction: column;
    overflow: auto;
  }
  .se-tree {
    width: 100%;
    max-height: 200px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .se-tree-selected {
    border-right: none;
    border-bottom: 2px solid var(--accent-green);
  }
  .se-inspector {
    width: 100%;
    max-height: 300px;
    border-top: 1px solid var(--border-subtle);
  }
  .se-grid {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .se-page-container {
    padding: 4px 12px 24px;
  }
}

/* ── Course Detail — Responsive ── */
@media (max-width: 768px) {
  .cd-form-grid {
    grid-template-columns: 1fr;
  }
  .cd-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cd-header {
    flex-direction: column;
    gap: 12px;
  }
  .cd-header-actions {
    padding-top: 0;
    width: 100%;
  }
  .cd-header-actions .cs-btn {
    flex: 1;
  }
}

/* ══════════════════════════════════════════
   COURSE IMPORT PAGE
   ══════════════════════════════════════════ */

.ci-header {
  margin-bottom: 24px;
}

.ci-back-btn {
  background: none;
  border: none;
  color: var(--text-section);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 8px;
  display: inline-block;
  transition: color 0.15s;
}

.ci-back-btn:hover { color: var(--text-secondary); }

.ci-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Upload area */
.ci-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  border: 2px dashed var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 24px;
}

.ci-upload-area:hover {
  border-color: var(--text-section);
  background: var(--bg-hover);
}

.ci-drag-over {
  border-color: var(--accent-green) !important;
  background: rgba(34,197,94,0.04) !important;
}

.ci-upload-icon {
  font-size: 36px;
  opacity: 0.6;
}

.ci-upload-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.ci-upload-hint {
  font-size: 12px;
  color: var(--text-section);
}

/* Preview */
.ci-preview {
  margin-bottom: 24px;
}

.ci-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.ci-preview-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.ci-preview-stats {
  display: flex;
  gap: 12px;
}

.ci-stat {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.ci-stat-new {
  color: #22c55e;
  background: rgba(34,197,94,0.1);
}

.ci-stat-skip {
  color: #eab308;
  background: rgba(234,179,8,0.1);
}

/* Table */
.ci-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 16px;
}

.ci-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.ci-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-section);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.ci-table tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.ci-table tbody tr:last-child td {
  border-bottom: none;
}

.ci-table tbody tr:hover {
  background: var(--bg-hover);
}

.ci-row-dup {
  opacity: 0.5;
}

/* Stat badges */
.ci-stat-update {
  color: #3b82f6;
  background: rgba(59,130,246,0.1);
}

.ci-stat-alias {
  color: #a78bfa;
  background: rgba(167,139,250,0.1);
}

/* Match strategy badges */
.ci-match {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.ci-match-id {
  color: #3b82f6;
  background: rgba(59,130,246,0.1);
}

.ci-match-name {
  color: #eab308;
  background: rgba(234,179,8,0.1);
}

.ci-match-alias {
  color: #a78bfa;
  background: rgba(167,139,250,0.1);
}

.ci-match-none {
  color: var(--text-section);
  background: var(--bg-hover);
}

.ci-match-target {
  display: block;
  font-size: 11px;
  color: var(--text-section);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

/* Action select */
.ci-action-select {
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-hover);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.ci-action-select:focus {
  border-color: var(--accent-green);
}

/* Table cell sizing */
.ci-td-name { font-weight: 500; }
.ci-td-num { text-align: center; }
.ci-td-nines { font-size: 12px; color: var(--text-secondary); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-td-match { white-space: nowrap; }
.ci-td-action { white-space: nowrap; }

.ci-row-skip {
  opacity: 0.45;
}

/* Actions */
.ci-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.ci-btn-import {
  background: var(--accent-green);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ci-btn-import:hover { opacity: 0.85; }

.ci-btn-cancel {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ci-btn-cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.ci-all-dup {
  font-size: 14px;
  color: var(--text-section);
  padding: 8px 0;
}

/* Result */
.ci-result {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.ci-result-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.ci-result-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.ci-result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ci-result-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.ci-result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-section);
}

.ci-result-imported .ci-result-num { color: #22c55e; }
.ci-result-updated .ci-result-num { color: #3b82f6; }
.ci-result-aliased .ci-result-num { color: #a78bfa; }
.ci-result-skipped .ci-result-num { color: #eab308; }
.ci-result-errors .ci-result-num { color: #ef4444; }

.ci-result-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.ci-error-list {
  margin-bottom: 12px;
}

.ci-error-item {
  font-size: 12px;
  color: #f87171;
  padding: 4px 0;
}

/* ── Course Import — Light Theme ── */
html.light .ci-title { color: #1a1a1a; }
html.light .ci-back-btn { color: #9ca3af; }
html.light .ci-back-btn:hover { color: #6b7280; }
html.light .ci-upload-area { border-color: rgba(0,0,0,0.1); }
html.light .ci-upload-area:hover { border-color: rgba(0,0,0,0.2); background: rgba(0,0,0,0.02); }
html.light .ci-upload-text { color: #1a1a1a; }
html.light .ci-upload-hint { color: #9ca3af; }
html.light .ci-preview-title { color: #1a1a1a; }
html.light .ci-table-wrap { border-color: rgba(0,0,0,0.06); }
html.light .ci-table thead th { color: #9ca3af; border-color: rgba(0,0,0,0.06); }
html.light .ci-table tbody td { border-color: rgba(0,0,0,0.04); color: #374151; }
html.light .ci-table tbody tr:hover { background: rgba(0,0,0,0.02); }
html.light .ci-btn-cancel { border-color: rgba(0,0,0,0.08); color: #6b7280; }
html.light .ci-btn-cancel:hover { background: rgba(0,0,0,0.04); color: #374151; }
html.light .ci-result { background: #fafafa; border-color: rgba(0,0,0,0.06); }
html.light .ci-result-title { color: #1a1a1a; }
html.light .ci-result-actions { border-color: rgba(0,0,0,0.06); }
html.light .ci-error-item { color: #dc2626; }
html.light .ci-action-select { background: #fff; border-color: rgba(0,0,0,0.08); color: #1a1a1a; }
html.light .ci-action-select:focus { border-color: var(--accent-green); }
html.light .ci-match-none { color: #9ca3af; background: rgba(0,0,0,0.03); }
html.light .ci-match-target { color: #9ca3af; }
html.light .ci-td-nines { color: #6b7280; }
html.light .ci-row-skip { opacity: 0.4; }

/* ══════════════════════════════════════════
   AUTH PAGE (Login / Register)
   ══════════════════════════════════════════ */

.auth-card {
  max-width: 400px;
  margin: 40px auto;
  padding: 32px 24px;
  background: var(--bg-elevated, var(--bg-card, #1e1e1e));
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md, none);
}

.auth-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px;
  text-align: center;
}

.auth-error {
  background: rgba(220,38,38,0.12);
  color: #ef4444;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-field input {
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-input, #2a2a2a);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s;
}

.auth-field input:focus {
  border-color: var(--accent-green, #22c55e);
}

.auth-submit {
  padding: 12px 20px;
  background: var(--accent-green, #22c55e);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.auth-submit:hover { opacity: 0.9; }
.auth-submit:disabled { opacity: 0.5; cursor: default; }

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-toggle a {
  color: var(--accent-green, #22c55e);
  text-decoration: none;
  font-weight: 500;
}

.auth-future {
  margin-top: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  font-size: 12px;
  color: var(--text-section);
  text-transform: uppercase;
}

.auth-coming-soon {
  text-align: center;
  font-size: 12px;
  color: var(--text-section);
}

/* ══════════════════════════════════════════
   PROFILE PAGE
   ══════════════════════════════════════════ */

.profile-card {
  max-width: 480px;
  margin: 40px auto;
  padding: 32px 24px;
  background: var(--bg-elevated, var(--bg-card, #1e1e1e));
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md, none);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-green, #22c55e);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-img { object-fit: cover; }
.profile-id-value { display: flex; align-items: center; gap: 8px; }
.profile-id-code { font-family: monospace; font-size: 13px; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; }
.profile-copy-btn { padding: 2px 8px; font-size: 11px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: #60a5fa; cursor: pointer; }
.profile-copy-btn:hover { background: rgba(59,130,246,0.1); }
.profile-avatar-btn { font-size: 12px !important; padding: 5px 10px !important; margin-right: 6px; }
html.light .profile-id-code { background: rgba(0,0,0,0.05); }
html.light .profile-copy-btn { border-color: rgba(0,0,0,0.12); color: #2563eb; }

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

.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-guest {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
}

.profile-success {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.profile-section {
  margin-bottom: 20px;
}

.profile-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-section);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-label {
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.profile-value {
  font-size: 14px;
  color: var(--text-primary);
  text-align: right;
}

.profile-input {
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-input, #2a2a2a);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  text-align: right;
  width: 180px;
  outline: none;
}

.profile-input:focus {
  border-color: var(--accent-green, #22c55e);
}

.profile-input-sm {
  width: 80px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.profile-btn-edit,
.profile-btn-cancel {
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
}

.profile-btn-edit:hover,
.profile-btn-cancel:hover {
  background: var(--bg-hover);
}

.profile-logout {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.profile-btn-logout {
  padding: 10px 20px;
  border: 1px solid rgba(220,38,38,0.3);
  border-radius: 8px;
  background: transparent;
  color: #ef4444;
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
}

.profile-btn-logout:hover {
  background: rgba(220,38,38,0.08);
}

/* ══════════════════════════════════════════
   GUEST HOME PAGE
   ══════════════════════════════════════════ */

.guest-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 40px;
  max-width: 680px;
  margin: 0 auto;
}

.guest-hero {
  text-align: center;
  margin-bottom: 40px;
}

.guest-hero-icon {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}

.guest-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.guest-hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.guest-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
}

.guest-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.guest-feature {
  background: var(--bg-elevated, var(--bg-hover));
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  transition: all 0.25s var(--ease-out, ease);
  box-shadow: var(--shadow-sm, none);
}

.guest-feature:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, none);
}

.guest-feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1;
}

.guest-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.guest-feature-desc {
  font-size: 12px;
  color: var(--text-section);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .guest-features { grid-template-columns: 1fr; }
  .guest-hero-title { font-size: 22px; }
  .guest-home { padding: 32px 16px; }
}

/* ══════════════════════════════════════════
   DASHBOARD (Home page)
   ══════════════════════════════════════════ */

/* ── Primary Action: Create Round ── */
.dash-primary-action {
  display: flex;
  justify-content: center;
  padding: 8px 0 24px;
}

.dash-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  height: 64px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 24px rgba(34,197,94,0.3);
  letter-spacing: 0.02em;
}

.dash-create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(34,197,94,0.45);
}

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

.dash-create-icon {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

/* ── Compact Create Button (v27) ── */
.dash-create-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(34,197,94,0.25);
}
.dash-create-btn-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34,197,94,0.35);
}
.dash-create-icon-sm {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}
html.light .dash-create-btn-compact {
  color: #fff;
}

/* ── System Admin Banner ── */
.dash-admin-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #2a3a5c;
  border-radius: 12px;
  color: #e0e6ed;
}
.dash-admin-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.dash-admin-banner-title {
  font-size: 15px;
  font-weight: 600;
  color: #7eb8ff;
  margin-bottom: 2px;
}
.dash-admin-banner-desc {
  font-size: 13px;
  color: #9ab0cc;
  line-height: 1.4;
}

/* ── Admin Dashboard Stats ── */
.dash-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.dash-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.dash-stat-card:hover {
  border-color: #374151;
}
.dash-stat-icon {
  font-size: 24px;
  flex-shrink: 0;
  opacity: 0.7;
}
.dash-stat-label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
}
.dash-stat-main {
  font-size: 22px;
  font-weight: 700;
  color: #e5e7eb;
  line-height: 1.2;
}
.dash-stat-sub {
  font-size: 12px;
  color: #6b7280;
}
@media (max-width: 640px) {
  .dash-admin-stats { grid-template-columns: 1fr; }
}

/* ── Admin Page Badges ── */
.au-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.au-role-admin {
  background: #1a1a2e;
  color: #7eb8ff;
  border: 1px solid #2a3a5c;
}
.au-role-user {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
.au-status-active {
  background: #0d2818;
  color: #4ade80;
  border: 1px solid #1a4d2e;
}
.au-status-suspended {
  background: #2d1b00;
  color: #fbbf24;
  border: 1px solid #4d3000;
}
.ar-status-scheduled {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
.ar-status-in_progress {
  background: #0c2d48;
  color: #60a5fa;
  border: 1px solid #1e4d7a;
}
.ar-status-finished {
  background: #0d2818;
  color: #4ade80;
  border: 1px solid #1a4d2e;
}
.ar-status-abandoned {
  background: #2d1111;
  color: #f87171;
  border: 1px solid #4d1f1f;
}
.au-actions {
  white-space: nowrap;
}
.au-actions .cs-row-btn {
  margin-right: 4px;
}

/* ── Batch Bar ── */
.cs-batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 8px;
  background: #1a1a2e;
  border: 1px solid #2a3a5c;
  border-radius: 8px;
  color: #e0e6ed;
  font-size: 13px;
}
.cs-batch-count {
  font-weight: 600;
  color: #7eb8ff;
  margin-right: 8px;
}
.cs-batch-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #374151;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.cs-batch-btn:hover {
  background: #374151;
}
.cs-batch-btn-danger {
  border-color: #4d1f1f;
  color: #f87171;
}
.cs-batch-btn-danger:hover {
  background: #2d1111;
}
.cs-batch-btn-cancel {
  margin-left: auto;
  padding: 2px 8px;
  border: none;
  background: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
}
.cs-batch-btn-cancel:hover {
  color: #e5e7eb;
}

/* ── Checkbox column ── */
.cs-th-check,
.cs-td-check {
  width: 32px;
  text-align: center;
  padding: 0 4px !important;
}
.cs-th-check input,
.cs-td-check input {
  cursor: pointer;
  accent-color: var(--accent, #60a5fa);
}

/* ── Date filter ── */
.cs-date {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
}
.cs-date-sep {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 0 2px;
}

/* ── Dashboard Panel ── */
.dash-panel {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
}

.dash-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.dash-panel-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
}

.dash-panel-link:hover {
  text-decoration: underline;
}

/* ── Empty state ── */
.dash-empty {
  padding: 20px;
  text-align: center;
}

.dash-empty-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Round list ── */
.dash-round-list {
  display: flex;
  flex-direction: column;
}

/* ── Round Card ── */
.dash-round-card,
.dash-compact-card {
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-top: 1px solid var(--border-card);
}

.dash-round-card:first-child,
.dash-compact-card:first-child {
  border-top: none;
}

.dash-round-card:hover,
.dash-compact-card:hover {
  background: var(--bg-hover);
}

.dash-round-card.dash-round-active {
  border-left: 3px solid #22c55e;
}

.dash-round-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.dash-round-gameplay {
  font-size: 11px;
  color: var(--text-tertiary);
}

.dash-round-date {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
}

.dash-round-course {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dash-round-routing {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.dash-round-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.dash-round-players {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ── Progress bar ── */
.dash-progress {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.dash-progress-bar {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  transition: width 0.3s;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .dash-create-btn {
    height: 56px;
    font-size: 18px;
    border-radius: 12px;
  }
  .dash-panel-header { padding: 14px 16px 10px; }
  .dash-round-card,
  .dash-compact-card { padding: 12px 16px; }
}

/* ── Light theme overrides ── */
html.light .dash-create-btn {
  box-shadow: 0 4px 24px rgba(22,163,74,0.2);
}
html.light .dash-create-btn:hover {
  box-shadow: 0 8px 32px rgba(22,163,74,0.35);
}
html.light .dash-progress {
  background: rgba(0,0,0,0.06);
}

/* ══════════════════════════════════════════
   AUTH GUARD (login-required prompt)
   ══════════════════════════════════════════ */

.auth-guard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.auth-guard-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.auth-guard-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-guard-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-guard-actions {
  display: flex;
  gap: 12px;
}

/* Outline button variant */
.sh-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sh-btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--text-section);
}

/* Large button size */
.sh-btn-lg {
  padding: 12px 32px;
  font-size: 15px;
}

/* Welcome banner */
.sh-welcome {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-secondary);
}

.sh-welcome strong {
  color: var(--text-primary);
}

/* Legacy data cleanup notice */
.sh-legacy-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: 10px;
  margin-bottom: 24px;
}

.sh-legacy-icon {
  font-size: 22px;
  flex-shrink: 0;
}

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

.sh-legacy-title {
  font-size: 13px;
  font-weight: 600;
  color: #eab308;
  margin-bottom: 2px;
}

.sh-legacy-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sh-btn-danger-sm {
  flex-shrink: 0;
  padding: 6px 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: #f87171;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.sh-btn-danger-sm:hover {
  background: rgba(248,113,113,0.2);
}

/* ── Light theme overrides ── */
html.light .auth-card { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
html.light .auth-field input { background: #f9fafb; color: #1a1a1a; }
html.light .profile-card { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
html.light .profile-input { background: #f9fafb; color: #1a1a1a; }
html.light .guest-feature { background: #fff; border-color: rgba(0,0,0,0.06); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
html.light .guest-feature:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
html.light .guest-hero-title { color: #1a1a1a; }
html.light .auth-guard-title { color: #1a1a1a; }
html.light .sh-btn-outline { color: #374151; border-color: rgba(0,0,0,0.12); }
html.light .sh-btn-outline:hover { background: rgba(0,0,0,0.03); }
html.light .sh-welcome { background: #f9fafb; border-color: rgba(0,0,0,0.06); }
html.light .sh-welcome strong { color: #1a1a1a; }
html.light .sh-legacy-notice { background: rgba(202,138,4,0.06); border-color: rgba(202,138,4,0.15); }
html.light .sh-legacy-title { color: #ca8a04; }

/* ══════════════════════════════════════════
   TEE TIMES PAGE
   ══════════════════════════════════════════ */

#page-teetimes .sh-page-container {
  max-width: 980px;
}

.tt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tt-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.tt-course-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

.tt-course-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.tt-course-location {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.tt-course-meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.tt-rating {
  color: #fbbf24;
  font-weight: 600;
}

.tt-date-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.tt-date-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.tt-date-btn:hover {
  background: var(--bg-active);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.tt-date-active {
  background: rgba(34,197,94,0.10);
  border-color: var(--accent-green);
  color: var(--text-primary);
}

.tt-day-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tt-day-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.tt-month {
  font-size: 11px;
}

.tt-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.tt-tab {
  border: 1px solid var(--border-subtle);
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tt-tab:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.tt-tab-active {
  background: rgba(34,197,94,0.12);
  border-color: var(--accent-green);
  color: var(--text-primary);
}

.tt-loading,
.tt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
  color: var(--text-secondary);
}

.tt-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.10);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: tt-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes tt-spin {
  to { transform: rotate(360deg); }
}

.tt-empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 8px;
}

.tt-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.tt-empty-text,
.tt-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.tt-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tt-hour-group {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
}

.tt-hour-label {
  padding-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-section);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tt-hour-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tt-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.tt-slot:hover {
  background: var(--bg-active);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

.tt-slot-selected {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.2);
}

.tt-slot-main,
.tt-slot-availability,
.tt-slot-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tt-slot-time {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.tt-slot-holes,
.tt-slot-spots,
.tt-price-per {
  font-size: 12px;
  color: var(--text-secondary);
}

.tt-slot-availability {
  align-items: flex-start;
  flex-wrap: wrap;
}

.tt-slot-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tt-badge-popular {
  background: rgba(251,191,36,0.14);
  color: #fbbf24;
}

.tt-badge-limited {
  background: rgba(248,113,113,0.12);
  color: #f87171;
}

.tt-slot-price {
  align-items: baseline;
}

.tt-price-amount {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-green);
}

.tt-slot-btn,
.tt-booking-submit {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  background: var(--accent-green);
  color: #000;
  cursor: pointer;
  transition: opacity 0.15s;
}

.tt-slot-btn:hover,
.tt-booking-submit:hover {
  opacity: 0.88;
}

.tt-policy-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.16);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.tt-policy-icon {
  color: #60a5fa;
}

.tt-modal {
  display: none;
}

.tt-modal-show {
  display: block;
}

.tt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
}

.tt-modal-content {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 460px);
  max-height: 85vh;
  overflow-y: auto;
  background: rgba(17,18,20,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  z-index: 1001;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.tt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.tt-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.tt-modal-close {
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.tt-modal-body {
  padding: 18px 20px 20px;
}

.tt-booking-details,
.tt-policy-box {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
}

.tt-booking-details {
  margin-bottom: 16px;
}

.tt-booking-row,
.tt-booking-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tt-booking-row + .tt-booking-row {
  margin-top: 10px;
}

.tt-booking-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.tt-booking-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tt-price-highlight {
  color: var(--accent-green);
}

.tt-booking-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tt-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.tt-select {
  width: 100%;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
}

.tt-select:focus {
  border-color: var(--accent-green);
}

.tt-policy-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tt-policy-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 12px;
}

.tt-policy-list li + li {
  margin-top: 6px;
}

.tt-booking-total {
  margin: 18px 0 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.tt-auth-required {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 12px 0 4px;
}

.tt-auth-icon {
  font-size: 42px;
  opacity: 0.7;
}

.tt-auth-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.tt-auth-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.tt-auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

html.light .tt-title,
html.light .tt-course-name,
html.light .tt-empty-title,
html.light .tt-modal-header h3,
html.light .tt-booking-value,
html.light .tt-auth-title,
html.light .tt-policy-title {
  color: #1a1a1a;
}

html.light .tt-course-card,
html.light .tt-slot,
html.light .tt-booking-details,
html.light .tt-policy-box,
html.light .tt-modal-content {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
html.light .tt-drawer {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -8px 0 30px rgba(0,0,0,0.08);
}
html.light .ocr-modal-inner {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 24px 64px rgba(0,0,0,0.12);
}

html.light .tt-date-btn,
html.light .tt-tab,
html.light .tt-select {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}

html.light .tt-date-btn:hover,
html.light .tt-tab:hover,
html.light .tt-slot:hover {
  background: rgba(0,0,0,0.03);
}

html.light .tt-policy-summary {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.14);
}

html.light .tt-loading-spinner {
  border-color: rgba(0,0,0,0.10);
  border-top-color: var(--accent-green);
}

@media (max-width: 768px) {
  .tt-date-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tt-hour-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tt-hour-label {
    padding-top: 0;
  }
}

@media (max-width: 560px) {
  .tt-date-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tt-hour-slots {
    grid-template-columns: 1fr;
  }

  .tt-auth-actions {
    width: 100%;
    flex-direction: column;
  }
}

/* ── Buddies Page ── */
.bd-page { max-width: 680px; margin: 0 auto; }
.bd-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.bd-title { font-size: 20px; font-weight: 600; margin: 0; }
.bd-add-btn { font-size: 13px; padding: 6px 14px; }
.bd-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.bd-search-input { flex: 1; min-width: 140px; padding: 7px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: inherit; font-size: 13px; outline: none; }
.bd-search-input:focus { border-color: rgba(59,130,246,0.5); }
.bd-filters { display: flex; gap: 8px; align-items: center; }
.bd-filter-btn { padding: 5px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: #9ca3af; font-size: 12px; cursor: pointer; }
.bd-filter-btn:hover { background: rgba(255,255,255,0.05); }
.bd-filter-btn.bd-filter-active { background: rgba(234,179,8,0.15); color: #eab308; border-color: rgba(234,179,8,0.3); }
.bd-sort-select { padding: 5px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: inherit; font-size: 12px; }

.bd-loading { text-align: center; padding: 40px; color: #6b7280; }
.bd-empty { text-align: center; padding: 60px 20px; }
.bd-empty-icon { font-size: 48px; margin-bottom: 12px; }
.bd-empty-text { color: #6b7280; font-size: 14px; }

.bd-list { display: flex; flex-direction: column; gap: 6px; }
.bd-card { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); transition: background 0.15s; }
.bd-card:hover { background: rgba(255,255,255,0.07); }
.bd-card-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.bd-card-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(59,130,246,0.15); color: #60a5fa; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex-shrink: 0; }
.bd-card-info { flex: 1; min-width: 0; }
.bd-card-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-card-meta { display: flex; gap: 10px; font-size: 11px; color: #6b7280; margin-top: 2px; flex-wrap: wrap; }
.bd-meta-item { white-space: nowrap; }
.bd-card-notes { font-size: 11px; color: #6b7280; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.bd-fav-btn { background: none; border: none; font-size: 18px; color: #4b5563; cursor: pointer; padding: 4px; line-height: 1; }
.bd-fav-btn:hover { color: #eab308; }
.bd-fav-btn.bd-fav-active { color: #eab308; }

.bd-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: 12px; color: #6b7280; }
.bd-page-btn { padding: 4px 10px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: inherit; cursor: pointer; font-size: 13px; }
.bd-page-btn:hover:not(:disabled) { background: rgba(255,255,255,0.05); }
.bd-page-btn:disabled { opacity: 0.3; cursor: default; }

/* Modal */
.bd-modal-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }
.bd-modal { background: rgba(22,22,28,0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-radius: 16px; width: 90%; max-width: 400px; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.bd-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.bd-modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.bd-modal-close { background: none; border: none; color: #6b7280; font-size: 22px; cursor: pointer; line-height: 1; padding: 0; }
.bd-modal-body { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.bd-form-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9ca3af; }
.bd-form-input, .bd-form-textarea { padding: 7px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: inherit; font-size: 13px; outline: none; font-family: inherit; }
.bd-form-input:focus, .bd-form-textarea:focus { border-color: rgba(59,130,246,0.5); }
.bd-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 16px 14px; }
/* Golf ID search row */
.bd-search-row { display: flex; gap: 8px; align-items: center; }
.bd-golfid-input { flex: 1; font-family: monospace; font-size: 16px; letter-spacing: 2px; }
.bd-search-btn { flex-shrink: 0; white-space: nowrap; }
.bd-golfid-found { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 10px; border-radius: 8px; background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); }
.bd-golfid-found .bd-user-info { flex: 1; }
.bd-follow-btn { flex-shrink: 0; padding: 6px 16px !important; font-size: 13px !important; border-radius: 6px !important; }
.bd-golfid-error { margin-top: 8px; font-size: 13px; color: #ef4444; }
.bd-golfid-loading { margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
html.light .bd-golfid-found { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.15); }

.bd-modal-divider { text-align: center; font-size: 11px; color: rgba(255,255,255,0.35); padding: 4px 0; }
html.light .bd-modal-divider { color: #9ca3af; }
.bd-linked-indicator { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 6px; background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); font-size: 12px; margin-bottom: 6px; }
.bd-linked-badge { font-size: 10px; opacity: 0.6; }
.bd-clear-link { background: none; border: none; color: #ef4444; font-size: 11px; cursor: pointer; text-decoration: underline; }
.bd-user-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; max-height: 180px; overflow-y: auto; }
.bd-user-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.bd-user-item:hover { background: rgba(255,255,255,0.06); }
.bd-user-avatar, .bd-user-avatar-letter { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.bd-user-avatar { object-fit: cover; }
.bd-user-avatar-letter { background: rgba(59,130,246,0.15); color: #60a5fa; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.bd-user-info { display: flex; flex-direction: column; }
.bd-user-name { font-size: 13px; font-weight: 500; }
.bd-user-id { font-size: 10px; color: #6b7280; font-family: monospace; }

/* Light theme overrides */
html.light .bd-search-input { background: #f9fafb; border-color: rgba(0,0,0,0.1); }
html.light .bd-filter-btn { border-color: rgba(0,0,0,0.1); color: #6b7280; }
html.light .bd-filter-btn:hover { background: rgba(0,0,0,0.03); }
html.light .bd-sort-select { background: #f9fafb; border-color: rgba(0,0,0,0.1); }
html.light .bd-card { background: #fff; border-color: rgba(0,0,0,0.06); }
html.light .bd-card:hover { background: #f9fafb; }
html.light .bd-card-avatar { background: rgba(59,130,246,0.1); }
html.light .bd-fav-btn { color: #9ca3af; }
html.light .bd-page-btn { border-color: rgba(0,0,0,0.1); }
html.light .bd-modal { background: rgba(255,255,255,0.97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-color: rgba(0,0,0,0.08); box-shadow: 0 20px 60px rgba(0,0,0,0.12); }
html.light .bd-form-input, html.light .bd-form-textarea { background: #f9fafb; border-color: rgba(0,0,0,0.1); }
html.light .bd-title { color: #1a1a1a; }

/* ============================================================
   TeeTimes Page Styles
   ============================================================ */

.tt-course-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.tt-course-list::-webkit-scrollbar { display: none; }
.tt-course-card { flex-shrink: 0; width: 200px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: all 0.2s; }
.tt-course-card:hover { border-color: rgba(255,255,255,0.2); }
.tt-course-active { border-color: var(--accent-green); box-shadow: 0 0 0 2px rgba(34,197,94,0.2); }
.tt-course-img { width: 100%; height: 100px; object-fit: cover; }
.tt-course-info { padding: 10px; }
.tt-course-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-course-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.tt-course-price { font-size: 14px; font-weight: 600; color: var(--accent-green); margin-top: 6px; }
.tt-price-unit { font-size: 11px; font-weight: 400; color: var(--text-secondary); }

.tt-date-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.tt-date-list::-webkit-scrollbar { display: none; }
.tt-date-btn { flex-shrink: 0; min-width: 70px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: inherit; cursor: pointer; text-align: center; transition: all 0.2s; }
.tt-date-btn:hover { background: rgba(255,255,255,0.08); }
.tt-date-active { border-color: var(--accent-green); background: rgba(34,197,94,0.1); }
.tt-date-label { display: block; font-size: 11px; color: var(--text-secondary); }
.tt-date-full { display: block; font-size: 13px; font-weight: 600; margin-top: 2px; }

.tt-period-tabs { display: flex; gap: 8px; }
.tt-period-tab { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: inherit; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.tt-period-tab:hover { background: rgba(255,255,255,0.08); }
.tt-period-active { border-color: var(--accent-green); background: rgba(34,197,94,0.1); }

.tt-slots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tt-slot-btn { padding: 12px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: inherit; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.tt-slot-btn:hover { background: rgba(255,255,255,0.08); }
.tt-slot-active { border-color: var(--accent-green); background: var(--accent-green); color: white; }

.tt-players-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tt-player-btn { padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: inherit; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.tt-player-btn:hover { background: rgba(255,255,255,0.08); }
.tt-player-active { border-color: var(--accent-green); background: var(--accent-green); color: white; }

.tt-summary-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 16px; }
.tt-summary-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.tt-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tt-summary-row:last-child { border-bottom: none; }
.tt-summary-total { margin-top: 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); }
.tt-summary-price { font-size: 18px; font-weight: 700; color: var(--accent-green); }
.tt-summary-note { font-size: 11px; color: var(--text-secondary); margin-top: 8px; text-align: right; }

.tt-book-btn { width: 100%; padding: 14px; border-radius: 12px; border: none; background: var(--accent-green); color: white; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.tt-book-btn:hover { background: #16a34a; }

.tt-empty-state { text-align: center; padding: 40px; color: var(--text-secondary); font-size: 14px; }

/* ══════════════════════════════════════════
   TEE TIMES PAGE - INTENT BAR (Step 4)
   ══════════════════════════════════════════ */

/* Page Header */
.tt-page-header {
  margin-bottom: 24px;
}

.tt-page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Intent Bar Container */
.tt-intent-bar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  flex-wrap: wrap;
}

/* Intent Field */
.tt-intent-field {
  position: relative;
  flex: 1;
  min-width: 160px;
}

.tt-field-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tt-field-inner:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
}

.tt-field-active .tt-field-inner {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.2);
}

.tt-field-filled .tt-field-inner {
  background: rgba(34,197,94,0.06);
  border-color: rgba(34,197,94,0.2);
}

.tt-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-section);
}

.tt-field-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tt-field-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-section);
  pointer-events: none;
}

/* Dropdown */
.tt-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 360px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 100;
  padding: 8px 0;
}

.tt-dropdown-wide {
  min-width: 320px;
}

.tt-dropdown-narrow {
  min-width: 200px;
}

.tt-dropdown-section {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.tt-dropdown-section:last-child {
  border-bottom: none;
}

.tt-dropdown-title {
  padding: 4px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-section);
}

.tt-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.tt-dropdown-item:hover {
  background: var(--bg-hover);
}

.tt-dropdown-item-selected {
  background: rgba(34,197,94,0.1);
}

.tt-dropdown-item-selected:hover {
  background: rgba(34,197,94,0.15);
}

.tt-dropdown-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tt-dropdown-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.tt-dropdown-meta {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Search Button */
.tt-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-green);
  border: none;
  border-radius: 12px;
  color: #000;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.tt-search-btn:hover {
  opacity: 0.88;
}

.tt-search-icon {
  font-size: 16px;
}

/* Mini Calendar */
.tt-calendar {
  padding: 0 16px 8px;
}

.tt-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tt-calendar-nav {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.tt-calendar-nav:hover {
  background: var(--bg-hover);
}

.tt-calendar-month {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tt-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.tt-calendar-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-section);
  padding: 4px;
}

.tt-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.tt-calendar-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  color: var(--text-primary);
}

.tt-calendar-cell:hover:not(.tt-calendar-cell-empty):not(.tt-calendar-cell-past) {
  background: var(--bg-hover);
}

.tt-calendar-cell-empty {
  cursor: default;
}

.tt-calendar-cell-past {
  color: var(--text-section);
  opacity: 0.4;
  cursor: not-allowed;
}

.tt-calendar-cell-today {
  font-weight: 700;
  color: var(--accent-green);
}

.tt-calendar-cell-selected {
  background: var(--accent-green);
  color: #000;
  font-weight: 600;
}

.tt-calendar-cell-selected:hover {
  background: var(--accent-green);
}

/* Results Area */
.tt-results-area {
  min-height: 300px;
}

.tt-results-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.tt-results-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.tt-results-list {
  min-height: 200px;
}

.tt-results-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.tt-results-empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.tt-results-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tt-results-empty-text {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
}

/* ── TeeTimes Intent Bar - Light Theme ── */
html.light .tt-page-title { color: #1a1a1a; }
html.light .tt-intent-bar { background: #f9fafb; border-color: rgba(0,0,0,0.06); }
html.light .tt-field-inner { background: #fff; border-color: rgba(0,0,0,0.08); }
html.light .tt-field-inner:hover { border-color: rgba(0,0,0,0.12); background: #fafafa; }
html.light .tt-field-active .tt-field-inner { border-color: var(--accent-green); }
html.light .tt-field-filled .tt-field-inner { background: rgba(34,197,94,0.04); border-color: rgba(34,197,94,0.15); }
html.light .tt-dropdown { background: #fff; border-color: rgba(0,0,0,0.08); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
html.light .tt-dropdown-section { border-color: rgba(0,0,0,0.06); }
html.light .tt-dropdown-item:hover { background: rgba(0,0,0,0.03); }
html.light .tt-dropdown-item-selected { background: rgba(34,197,94,0.08); }
html.light .tt-dropdown-item-selected:hover { background: rgba(34,197,94,0.12); }
html.light .tt-calendar-nav:hover { background: rgba(0,0,0,0.04); }
html.light .tt-calendar-cell:hover:not(.tt-calendar-cell-empty):not(.tt-calendar-cell-past) { background: rgba(0,0,0,0.04); }
html.light .tt-results-header { border-color: rgba(0,0,0,0.06); }
html.light .tt-results-empty-title { color: #1a1a1a; }

/* ── TeeTimes Intent Bar - Responsive ── */
@media (max-width: 768px) {
  .tt-intent-bar {
    flex-direction: column;
  }

  .tt-intent-field {
    min-width: 100%;
  }

  .tt-dropdown,
  .tt-dropdown-wide,
  .tt-dropdown-narrow {
    min-width: 100%;
    max-width: 100%;
  }

  .tt-search-btn {
    width: 100%;
  }
}


/* ============================================================
   TeeTimes Page Styles (重构版)
   ============================================================ */

/* Intent Bar */
.tt-intent-bar {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  margin: 0 16px 16px;
}

.tt-intent-field {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.tt-intent-field:hover {
  border-color: rgba(255,255,255,0.2);
}

.tt-intent-field-active {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.1);
}

.tt-intent-field label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tt-intent-field .tt-field-value {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.tt-intent-field .tt-field-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-secondary);
}

/* Intent Panel */
.tt-intent-panel {
  margin: 0 16px 16px;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
}

.tt-panel-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* Where Panel */
.tt-where-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tt-where-section-title {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.tt-where-option {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.tt-where-option:hover {
  background: rgba(255,255,255,0.08);
}

.tt-where-option.tt-option-selected {
  background: rgba(34,197,94,0.15);
  border: 1px solid var(--accent-green);
}

.tt-where-price {
  font-size: 12px;
  color: var(--accent-green);
}

/* When Panel */
.tt-when-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tt-when-preset {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.tt-when-preset:hover {
  background: rgba(255,255,255,0.08);
}

.tt-when-preset.tt-option-selected {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.15);
}

.tt-when-calendar {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
}

.tt-calendar-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tt-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.tt-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.tt-calendar-day:hover {
  background: rgba(255,255,255,0.08);
}

.tt-calendar-day.tt-calendar-day-selected {
  background: var(--accent-green);
  color: white;
}

/* Players & Access Panels */
.tt-players-options,
.tt-access-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tt-players-option,
.tt-access-option {
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.tt-players-option:hover,
.tt-access-option:hover {
  background: rgba(255,255,255,0.08);
}

.tt-players-option.tt-option-selected,
.tt-access-option.tt-option-selected {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.15);
}

/* Results Summary */
.tt-results-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin: 0 16px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 13px;
}

.tt-summary-filters {
  color: var(--text-secondary);
}

/* Results Placeholder */
.tt-results-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.tt-placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.tt-placeholder-text {
  font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .tt-intent-bar {
    flex-wrap: wrap;
  }
  
  .tt-intent-field {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }
  
  .tt-players-options,
  .tt-access-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════
   TEE TIME CARD 列表
   ══════════════════════════════════════════ */

/* Card 列表容器 */
.tt-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 32px;
}

/* TeeTime Card */
.tt-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tt-card:hover {
  background: var(--bg-active);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* L1: 时间 + 价格 + 可用性 */
.tt-card-l1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tt-card-time {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.tt-card-price-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tt-card-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-green);
}

.tt-card-original-price {
  font-size: 14px;
  color: var(--text-section);
  text-decoration: line-through;
}

.tt-card-availability {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(74,222,128,0.15);
  color: #4ade80;
}

.tt-card-availability.limited {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}

.tt-card-availability.full {
  background: rgba(248,113,113,0.15);
  color: #f87171;
}

.tt-card-availability.waitlist {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
}

/* L2: 球场名 + 球场信息 */
.tt-card-l2 {
  margin-bottom: 12px;
}

.tt-card-course-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tt-card-course-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tt-card-divider {
  color: var(--text-section);
  opacity: 0.5;
}

/* L3: Access Label + 预订方式 + 限制 */
.tt-card-l3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* Access Label 体系 */
.tt-access-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tt-access-public {
  background: rgba(74,222,128,0.15);
  color: #4ade80;
}

.tt-access-member {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}

.tt-access-guest {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
}

.tt-access-limited {
  background: rgba(234,179,8,0.15);
  color: #eab308;
}

.tt-access-private {
  background: rgba(248,113,113,0.15);
  color: #f87171;
}

.tt-booking-method {
  font-size: 12px;
  color: var(--text-secondary);
}

.tt-restriction {
  font-size: 11px;
  color: var(--text-section);
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

/* L4: 辅助信息 */
.tt-card-l4 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tt-extra {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* L5: Book + Start Round 按钮 */
.tt-card-l5 {
  display: flex;
  gap: 10px;
}

/* Book 按钮 - 4种状态 */
.tt-btn-book {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--accent-green);
  color: #000;
}

.tt-btn-book:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-1px);
}

.tt-btn-book:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Book 按钮状态变体 */
.tt-btn-book.tt-btn-limited {
  background: #fbbf24;
  color: #000;
}

.tt-btn-book.tt-btn-full {
  background: rgba(248,113,113,0.2);
  color: #f87171;
}

.tt-btn-book.tt-btn-waitlist {
  background: #60a5fa;
  color: #fff;
}

/* Start Round 按钮 */
.tt-btn-start-round {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-secondary);
}

.tt-btn-start-round:hover {
  background: var(--bg-hover);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
}

/* Light Theme - TeeTime Card */
html.light .tt-card {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}

html.light .tt-card:hover {
  background: #fafafa;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

html.light .tt-card-time,
html.light .tt-card-course-name {
  color: #1a1a1a;
}

html.light .tt-card-original-price {
  color: #9ca3af;
}

html.light .tt-card-availability {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
}

html.light .tt-card-availability.limited {
  background: rgba(234,179,8,0.1);
  color: #ca8a04;
}

html.light .tt-card-availability.full {
  background: rgba(220,38,38,0.1);
  color: #dc2626;
}

html.light .tt-card-availability.waitlist {
  background: rgba(37,99,235,0.1);
  color: #2563eb;
}

html.light .tt-access-public {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
}

html.light .tt-access-member {
  background: rgba(234,179,8,0.1);
  color: #ca8a04;
}

html.light .tt-access-guest {
  background: rgba(37,99,235,0.1);
  color: #2563eb;
}

html.light .tt-access-limited {
  background: rgba(202,138,4,0.1);
  color: #a16207;
}

html.light .tt-access-private {
  background: rgba(220,38,38,0.1);
  color: #dc2626;
}

html.light .tt-restriction {
  background: rgba(0,0,0,0.03);
}

html.light .tt-btn-book.tt-btn-full {
  background: rgba(220,38,38,0.1);
  color: #dc2626;
}

html.light .tt-btn-start-round {
  border-color: rgba(0,0,0,0.08);
  color: #6b7280;
}

html.light .tt-btn-start-round:hover {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.15);
  color: #374151;
}

/* Responsive - TeeTime Card */
@media (max-width: 640px) {
  .tt-card {
    padding: 14px 16px;
  }
  
  .tt-card-time {
    font-size: 24px;
  }
  
  .tt-card-price {
    font-size: 20px;
  }
  
  .tt-card-l5 {
    flex-direction: column;
  }
  
  .tt-btn-book,
  .tt-btn-start-round {
    width: 100%;
  }
}

/* ============================================================
   TeeTime Card Styles
   ============================================================ */

/* Results List */
.tt-results-list {
  padding: 0 16px 100px;
}

.tt-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.tt-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.tt-empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tt-empty-text {
  font-size: 14px;
}

/* TeeTime Card */
.tt-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.tt-card:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
}

/* L1: Primary Info */
.tt-card-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tt-card-time {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.tt-card-availability {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.tt-avail-open {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.tt-avail-low {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}

.tt-avail-full {
  background: rgba(107,114,128,0.15);
  color: #6b7280;
}

.tt-card-price {
  text-align: right;
}

.tt-price-note {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.tt-price-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
}

/* L2: Course Info */
.tt-card-course {
  margin-bottom: 12px;
}

.tt-course-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tt-course-routing {
  font-size: 13px;
  color: var(--text-secondary);
}

/* L3: Decision Info */
.tt-card-decision {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.tt-access-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tt-access-public {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.tt-access-member {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}

.tt-access-guest {
  background: rgba(6,182,212,0.15);
  color: #22d3ee;
}

.tt-access-limited {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}

.tt-access-private {
  background: rgba(107,114,128,0.15);
  color: #9ca3af;
}

.tt-booking-method {
  font-size: 12px;
  color: var(--text-secondary);
}

.tt-restriction {
  font-size: 11px;
  color: #f59e0b;
  padding: 2px 8px;
  background: rgba(245,158,11,0.1);
  border-radius: 4px;
}

/* L4: Meta Info */
.tt-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* L5: Actions */
.tt-card-actions {
  display: flex;
  gap: 12px;
}

.tt-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.tt-btn-primary {
  background: var(--accent-green);
  color: white;
}

.tt-btn-primary:hover:not(:disabled) {
  background: #16a34a;
}

.tt-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.2);
}

.tt-btn-secondary:hover:not(:disabled) {
  background: rgba(255,255,255,0.05);
}

.tt-btn-disabled {
  background: rgba(107,114,128,0.2);
  color: #6b7280;
  cursor: not-allowed;
}

/* ============================================================
   TeeTime Detail Drawer Styles
   ============================================================ */

/* Drawer Overlay */
.tt-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  animation: tt-fade-in 0.2s ease;
}

@keyframes tt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Drawer */
.tt-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: rgba(17,18,20,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -8px 0 30px rgba(0,0,0,0.3);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  animation: tt-slide-in 0.3s ease;
}

@keyframes tt-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Drawer Header */
.tt-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tt-drawer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.tt-drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.tt-drawer-close:hover {
  color: var(--text-primary);
}

/* Drawer Content */
.tt-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.tt-drawer-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tt-drawer-section:last-of-type {
  border-bottom: none;
}

.tt-drawer-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.tt-drawer-value {
  font-size: 14px;
  color: var(--text-primary);
}

.tt-drawer-course {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tt-drawer-routing {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tt-drawer-datetime {
  font-size: 16px;
  color: var(--accent-green);
  font-weight: 600;
}

.tt-drawer-access-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.tt-drawer-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-green);
}

.tt-drawer-price-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.tt-drawer-phone {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-family: monospace;
}

.tt-drawer-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tt-drawer-restrictions {
  font-size: 13px;
  color: #f59e0b;
  margin-bottom: 8px;
}

.tt-drawer-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Drawer Footer */
.tt-drawer-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 12px;
}

.tt-drawer-footer .tt-btn {
  flex: 1;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .tt-drawer {
    max-width: 100%;
  }
}

/* ============================================================
   苏妲己 Avatar 样式
   ============================================================ */

.daji-avatar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  text-align: center;
  z-index: 1000;
  transition: all 0.3s ease;
}

.daji-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-green);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.daji-avatar img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.daji-greeting {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.7);
  border-radius: 20px;
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.daji-avatar:hover .daji-greeting {
  opacity: 1;
  transform: translateY(0);
}

/* 夜晚模式滤镜 */
.daji-avatar.daji-night img {
  filter: brightness(0.7) contrast(1.1);
}

/* Landing write-proof smiley */
.landing-write-proof {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 32px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 999;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.8));
}

/* 移动端适配 */
@media (max-width: 768px) {
  .daji-avatar {
    width: 80px;
    bottom: 10px;
    right: 10px;
  }
  
  .daji-avatar img {
    width: 60px;
    height: 60px;
  }
  
  .daji-greeting {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* ══════════════════════════════════════════
   VOICE SCORING — Chat Terminal Interface
   Dark cosmic + Bloomberg Terminal feel
   ══════════════════════════════════════════ */

/* Container: full-height, input pinned to bottom */
.vs-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: #050508;
  overflow: hidden;
}

/* page-voice-scoring: no special CSS — .vs-container uses 100dvh */

/* ── Top Bar ── */
.vs-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: 48px;
  background: rgba(8, 8, 12, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.vs-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.vs-back:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.vs-topbar-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.5px;
}

.vs-done-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: rgba(74, 222, 128, 0.8);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.vs-done-btn:hover {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
}

/* ── Chat Flow ── */
.vs-chat {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 64px 16px 72px;  /* top for fixed topbar, bottom for fixed input */
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.vs-chat::-webkit-scrollbar {
  width: 3px;
}

.vs-chat::-webkit-scrollbar-track {
  background: transparent;
}

.vs-chat::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

/* ── Messages ── */
.vs-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: vsMsgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* AI message — left */
.vs-msg-ai {
  justify-content: flex-start;
  padding-right: 48px;
}

.vs-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(74, 222, 128, 0.15);
}

.vs-msg-bubble {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  border-radius: 14px;
  padding: 10px 14px;
  max-width: 100%;
  word-break: break-word;
}

.vs-bubble-ai {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top-left-radius: 4px;
}

/* User message — right */
.vs-msg-user {
  justify-content: flex-end;
  padding-left: 48px;
}

.vs-bubble-user {
  background: rgba(74, 222, 128, 0.10);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(74, 222, 128, 0.12);
  border-top-right-radius: 4px;
}

/* System message — center */
.vs-msg-system {
  justify-content: center;
  padding: 4px 0;
}

.vs-msg-system-text {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.5px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

/* ── Input Area — always pinned to screen bottom ── */
.vs-input-area {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  background: rgba(8, 8, 12, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.vs-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 8px 8px 8px 16px;
  position: relative;
  transition: border-color 0.25s;
}

.vs-input-wrap:focus-within {
  border-color: rgba(74, 222, 128, 0.25);
}

.vs-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  padding: 0;
  min-height: 24px;
  max-height: 120px;
  overflow-y: auto;
  caret-color: #4ade80;
}

.vs-input::placeholder {
  color: transparent; /* We use custom hint instead */
}

/* ── Hint overlay (typing cursor animation) ── */
.vs-hint {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 56px);
  transition: opacity 0.3s;
}

.vs-hint-prefix {
  color: rgba(255, 255, 255, 0.18);
}

.vs-hint-cursor {
  color: rgba(74, 222, 128, 0.5);
  font-weight: 300;
  animation: vsCursorBlink 0.8s step-end infinite;
}

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

/* ── Send button ── */
.vs-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.vs-send.vs-send-active {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.vs-send:active {
  transform: scale(0.92);
}

/* ── Done Menu Overlay ── */
.vs-done-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  animation: vsFadeIn 0.2s ease forwards;
}

@keyframes vsFadeIn {
  to { opacity: 1; }
}

.vs-done-sheet {
  width: 100%;
  max-width: 400px;
  background: rgba(20, 20, 26, 0.98);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: none;
  padding: 20px 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: vsSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vsSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.vs-done-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 4px 0 12px;
}

.vs-done-action {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.vs-done-finish {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.vs-done-finish:hover {
  background: rgba(74, 222, 128, 0.2);
}

.vs-done-delete {
  background: rgba(239, 68, 68, 0.10);
  color: #ef4444;
}

.vs-done-delete:hover {
  background: rgba(239, 68, 68, 0.18);
}

.vs-done-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
}

.vs-done-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ── Voice Scoring responsive ── */
@media (min-width: 769px) {
  /* Desktop: constrain chat width */
  .vs-chat {
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
  }
  .vs-input-area {
    left: 50%;
    transform: translateX(-50%);
    max-width: 680px;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .vs-topbar { padding: 8px 12px; min-height: 44px; }
  .vs-msg-bubble { font-size: 14px; }
  .vs-msg-ai { padding-right: 32px; }
  .vs-msg-user { padding-left: 32px; }
}

/* ══════════════════════════════════════════
   AI SCORING PAGE — single-scroll chat
   ══════════════════════════════════════════ */

.ai-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 900;
  display: flex;
  flex-direction: column;
  /* Light mode: warm parchment */
  background: #faf8f5;
  color: #1a1a1a;
  overflow: hidden;
}

/* ── Top bar — sticky, collapses on scroll ── */
.ai-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 48px;
  flex-shrink: 0;
  transition: min-height 0.25s ease, padding 0.25s ease;
  position: sticky;
  top: 0;
  z-index: 10;
  background: inherit;
}
.ai-topbar.ai-topbar--compact {
  min-height: 32px;
  padding: 4px 16px;
}
.ai-topbar-title {
  font-size: 17px;
  font-weight: 700;
  flex: 1;
  letter-spacing: -0.01em;
  transition: font-size 0.25s ease;
}
.ai-topbar--compact .ai-topbar-title {
  font-size: 14px;
  font-weight: 600;
}
.ai-back-btn, .ai-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: #888;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.ai-back-btn:hover, .ai-menu-btn:hover {
  color: #555;
}

/* ── Menu dropdown ── */
.ai-menu-wrap { position: relative; }
.ai-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  justify-content: center;
  padding: 0;
}
.ai-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
  display: none;
}
.ai-menu-dropdown.ai-menu--open { display: block; }
.ai-menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.ai-menu-item:hover { background: #f5f5f5; }
.ai-menu-item--danger { color: #dc2626; }
.ai-menu-item--danger:hover { background: #fef2f2; }

/* ── Single scroll container — everything scrolls together ── */
.ai-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

/* ── Messages — Warp-style block text ── */
.ai-messages {
  padding: 12px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 720px;
  margin: 0 auto;
}
.ai-blk {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
  padding: 4px 8px;
  border-radius: 6px;
}
.ai-blk-text { display: inline; }
/* User input: prompt indicator + subtle highlight */
.ai-blk-user {
  color: #e8e8e8;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid #22c55e;
  margin-top: 8px;
}
.ai-prompt {
  color: #22c55e;
  font-weight: 700;
  margin-right: 6px;
  font-family: 'SF Mono', 'Menlo', monospace;
  user-select: none;
}
/* Assistant output: clean text, accent color */
.ai-blk-assistant {
  color: #c8c8c8;
  padding-left: 16px;
}
/* System: dim, compact */
.ai-blk-system {
  color: #666;
  font-size: 12px;
  padding: 2px 8px;
  padding-left: 16px;
}
/* Card (scorecard etc.) */
.ai-msg-card { padding: 4px 0 !important; }

/* ── Hint chip — single item inside input area ── */
.ai-hints {
  padding: 0 0 4px;
}
.ai-hint-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  border: none;
  background: rgba(0,0,0,0.04);
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ai-hint-chip:hover {
  background: rgba(0,0,0,0.07);
  color: #666;
}

/* ── Input area — inside scroll, thin double-line ── */
.ai-input-area {
  padding: 4px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.ai-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 4px 0;
}
/* Voice toggle button */
.ai-voice-toggle {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #888;
  flex-shrink: 0;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.ai-voice-toggle:hover { color: #555; }
.ai-voice-toggle--active {
  color: #22c55e !important;
  background: rgba(34,197,94,0.1);
}
/* Voice hold bar */
.ai-voice-bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 18px;
  background: rgba(34,197,94,0.08);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: background 0.15s;
}
.ai-voice-bar:active {
  background: rgba(34,197,94,0.2);
}
.ai-voice-label {
  font-size: 13px;
  color: #888;
  pointer-events: none;
}
.ai-input {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 4px 6px;
  font-size: 15px;
  line-height: 1.4;
  resize: none;
  overflow-y: auto;
  max-height: 100px;
  background: transparent;
  color: #1a1a1a;
  font-family: inherit;
  outline: none;
  caret-color: #1a1a1a;
}
.ai-input::placeholder {
  color: #bbb;
  font-style: normal;
}
.ai-input:focus {
  border: none;
  box-shadow: none;
}
.ai-send-btn {
  background: #22c55e;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.15s;
}
.ai-send-btn:hover { background: #16a34a; }
.ai-send-btn:disabled { background: #d1d5db; cursor: not-allowed; }

/* ── Typing indicator ── */
.ai-typing-bubble {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 16px !important;
  background: none !important;
  border: none !important;
}
.ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  animation: ai-dot-bounce 1.2s infinite;
}
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ── Action bar ── */
.ai-actions {}
.ai-action-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
}
.ai-action-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.ai-action-btn:hover { background: #f5f5f5; }
.ai-action-confirm {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.ai-action-confirm:hover { opacity: 0.85; background: #1a1a1a; }
.ai-action-cancel {
  color: #999;
  border-color: rgba(0,0,0,0.08);
}
.ai-action-hint {
  font-size: 13px;
  color: #999;
  padding: 4px 0;
}

/* ── Scorecard card (reuses broadcast .sg-* styles from overlay.css) ── */
.ai-msg-card { padding: 0 !important; }
.ai-sc-grid {
  display: grid;
  gap: 1px;
  background: var(--bd);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
/* Remove interactive effects inside AI chat scorecard */
.ai-sc-grid .sg-cell { cursor: default; transition: none; }
.ai-sc-grid .sg-cell:active { transform: none; }
.ai-sc-grid .sg-score-cell:hover { background: var(--panel-bg); }
.ai-sc-grid .sg-label { position: static; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .ai-msg-user { padding-left: 32px; }
  .ai-msg-assistant, .ai-msg-system { padding-right: 32px; }
  .ai-topbar { padding: 8px 12px; }
  .ai-sc-grid .sg-score { width: 18px; height: 18px; font-size: 11px; }
  .ai-sc-grid .sg-label { font-size: 10px; }
  .ai-sc-grid .sg-cell { min-height: 24px; font-size: 10px; }
}

/* ── Dark mode — #050505 matches landing page ── */
/* Dark mode is the DEFAULT for this page — styles above are already dark-first */
/* Light mode overrides below */
html:not(.light) .ai-container { background: #050505; color: #e5e5e5; }
html:not(.light) .ai-topbar-title { color: #e5e5e5; }
html:not(.light) .ai-back-btn, html:not(.light) .ai-menu-btn { color: #666; }
html:not(.light) .ai-back-btn:hover, html:not(.light) .ai-menu-btn:hover { color: #aaa; }
html:not(.light) .ai-menu-btn { border-color: rgba(255,255,255,0.08); }
html:not(.light) .ai-menu-dropdown { background: #111; box-shadow: 0 4px 24px rgba(0,0,0,0.6); }
html:not(.light) .ai-menu-item { color: #ccc; }
html:not(.light) .ai-menu-item:hover { background: rgba(255,255,255,0.05); }
html:not(.light) .ai-menu-item--danger { color: #f87171; }
html:not(.light) .ai-input { color: #e5e5e5; caret-color: #e5e5e5; }
html:not(.light) .ai-input::placeholder { color: #444; }
html:not(.light) .ai-input-row { border-color: rgba(255,255,255,0.06); }
html:not(.light) .ai-send-btn { background: #16a34a; }
html:not(.light) .ai-send-btn:hover { background: #22c55e; }
html:not(.light) .ai-send-btn:disabled { background: #333; }
html:not(.light) .ai-hint-chip { background: rgba(255,255,255,0.05); color: #555; }
html:not(.light) .ai-hint-chip:hover { background: rgba(255,255,255,0.08); color: #888; }
html:not(.light) .ai-action-btn { background: #111; border-color: rgba(255,255,255,0.08); color: #ccc; }
html:not(.light) .ai-action-btn:hover { background: #1a1a1a; }
html:not(.light) .ai-action-confirm { background: #22c55e; border-color: #22c55e; color: #fff; }
html:not(.light) .ai-voice-toggle { color: #555; }
html:not(.light) .ai-voice-toggle:hover { color: #888; }
html:not(.light) .ai-voice-bar { background: rgba(34,197,94,0.06); }
html:not(.light) .ai-voice-bar:active { background: rgba(34,197,94,0.15); }
html:not(.light) .ai-voice-label { color: #555; }

/* ── Light mode overrides ── */
html.light .ai-blk-user { color: #1a1a1a; background: rgba(0,0,0,0.03); border-left-color: #16a34a; }
html.light .ai-prompt { color: #16a34a; }
html.light .ai-blk-assistant { color: #333; }
html.light .ai-blk-system { color: #999; }
