/* ============================================================
   StrikeBoard – Main Stylesheet
   Covers: index.html, games.html, members.html,
           customers.html, scorer.html, dashboard.html
   ============================================================ */

@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ChakraPetch-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/ChakraPetch-Bold.ttf') format('truetype');
}

/* ── 1. CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
  --color-primary:       #1a237e;
  --color-primary-dark:  #0d1257;
  --color-primary-light: #3949ab;
  --color-accent:        #ffa000;
  --color-accent-dark:   #c67600;
  --color-accent-light:  #ffd740;
  --color-danger:        #d32f2f;
  --color-success:       #388e3c;
  --color-warning:       #f57c00;
  --color-info:          #0288d1;

  --color-bg:            #f5f6fa;
  --color-surface:       #ffffff;
  --color-border:        #dde1f0;
  --color-text:          #1c1f3b;
  --color-text-muted:    #6b7280;
  --color-text-light:    #9ca3af;

  /* dark theme (dashboard) */
  --db-bg:               #0a0c1a;
  --db-surface:          #111428;
  --db-surface-2:        #1a1e35;
  --db-border:           #252a48;
  --db-text:             #e8eaf6;
  --db-text-muted:       #9fa8da;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.10);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.16);
  --shadow-accent: 0 4px 18px rgba(255,160,0,.30);

  --font-sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Consolas', 'Fira Code', monospace;

  --transition: 180ms ease;
  --nav-h: 62px;
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Heading hierarchy uses Chakra Petch — display font for brand consistency */
h1, h2, h3,
.nav-card__title,
.feature-item__title,
.hero__subtitle,
.dashboard-title-gradient {
  font-family: 'Chakra Petch', var(--font-sans);
  letter-spacing: .01em;
}
/* Numeric content everywhere gets tabular-nums so scores line up */
.stat-num, .score-num, .hero__stat-number, .gs-score-val,
[data-number], .tabular {
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── 3. LAYOUT HELPERS ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── 4. NAVBAR ────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--color-primary);
  box-shadow: 0 2px 10px rgba(0,0,0,.30);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
  padding-inline: 1rem;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar__brand svg,
.navbar__brand img { width: 32px; height: 32px; }

.navbar nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

.navbar__link {
  color: rgba(255,255,255,.80);
  padding: .4rem .8rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.navbar__link:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.navbar__link--active { background: var(--color-accent); color: var(--color-primary); font-weight: 700; }
.navbar__link--active:hover { background: var(--color-accent-light); }

.navbar .navbar__logout-btn {
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.4);
  flex-shrink: 0;
  padding: .2rem .7rem;
  font-size: .75rem;
  min-height: 0;
}
.navbar .navbar__logout-btn:hover { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.7); }

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: .4rem;
  border-radius: var(--radius-sm);
}

#mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--color-primary-dark);
  padding: .5rem 1rem 1rem;
}

#mobile-nav .navbar__link { display: block; padding: .6rem .8rem; }
#mobile-nav.is-open { display: flex; }

/* ── 5. HERO ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 4rem 1rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 背景光暈層 — 增加深度 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(255,160,0,.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(57,73,171,.25) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(13,18,87,.40) 0%, transparent 60%);
  pointer-events: none;
}

/* 微妙幾何紋理 */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero__content { position: relative; z-index: 1; }

.hero__logo {
  max-width: 480px;
  width: 100%;
  display: block;
  margin: 0 auto 1rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.hero__title span { color: var(--color-accent-light); }

.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full);
  padding: .4rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: .95rem;
  letter-spacing: .08em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.85);
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Hero 統計數字 */
.hero__stats {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 1rem 2rem;
  margin-top: .5rem;
}

.hero__stat { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.hero__stat-number {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-accent-light);
  line-height: 1;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 18px rgba(255,215,64,.45);
}
.hero__stat-label {
  font-size: .72rem;
  color: rgba(255,255,255,.72);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
}
.hero__stat-divider { width: 1px; height: 2.6rem; background: linear-gradient(180deg, transparent, rgba(255,215,64,.4), transparent); }

/* ── 6. SECTION ───────────────────────────────────────────── */
.section {
  padding: 3rem 1rem;
}

.section--alt { background: #eef0fb; }
.section--cards { background: var(--color-bg); }
.section--features { }

/* ── Announcements ── */
.announcements-section { padding-top: 1.5rem; padding-bottom: 1.5rem; background: linear-gradient(180deg, #fff 0%, #fef9f0 100%); }
.announcements-list { display: flex; flex-direction: column; gap: .75rem; max-width: 800px; margin: 1rem auto 0; }
.announcement-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--color-primary);
  border-radius: .5rem;
  padding: .85rem 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  transition: box-shadow .15s, transform .15s;
}
.announcement-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); transform: translateY(-1px); }
.announcement-card--pinned { border-left-color: #f59e0b; background: #fffbeb; }
.announcement-card__header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.announcement-card__title { font-size: 1rem; font-weight: 700; margin: 0; color: var(--color-text); }
.announcement-card__date { font-size: .75rem; color: #9ca3af; white-space: nowrap; }
.announcement-card__body { font-size: .88rem; color: #4b5563; line-height: 1.55; }

.section__title {
  font-family: 'Chakra Petch', var(--font-sans);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: .5rem;
  position: relative;
  display: inline-block;
  letter-spacing: .01em;
}

/* 標題底部裝飾線 — 漸層金帶 */
.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  border-radius: 2px;
  margin-top: .55rem;
  box-shadow: 0 2px 6px rgba(255,160,0,.3);
}

.section__title--sm { font-size: 1.25rem; }

.section__subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* ── 7. CARDS ─────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  padding: 1rem 1.25rem .5rem;
  border-bottom: 1px solid var(--color-border);
}

.card__body { padding: 1rem 1.25rem 1.25rem; }

/* card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card-grid--screens { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* ── 8. BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Sheen sweep on hover — sports feel without distraction */
.btn--primary::before,
.btn--secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .55s ease;
  pointer-events: none;
}
.btn--primary:hover:not(:disabled)::before,
.btn--secondary:hover:not(:disabled)::before { transform: translateX(120%); }

.btn--primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}
.btn--primary:hover:not(:disabled) {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  box-shadow: var(--shadow-accent);
  text-decoration: none;
}

.btn--secondary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--secondary:hover:not(:disabled) { background: var(--color-primary-dark); border-color: var(--color-primary-dark); text-decoration: none; }

.btn--danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn--danger:hover:not(:disabled) { background: #b71c1c; border-color: #b71c1c; text-decoration: none; }

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover:not(:disabled) { background: var(--color-primary); color: #fff; text-decoration: none; }

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}
.btn--ghost:hover:not(:disabled) { background: var(--color-border); color: var(--color-text); text-decoration: none; }

.btn--sm { padding: .35rem .8rem; font-size: .82rem; }
.btn--lg { padding: .75rem 1.75rem; font-size: 1.05rem; }
.btn--full { width: 100%; }

/* ── 9. FORMS ─────────────────────────────────────────────── */
.form-group,
.form-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: 1rem;
}

.form-field--col-2,
.form-field--inline { flex-direction: row; align-items: center; gap: .75rem; }

.form-field--row { flex-direction: row; align-items: flex-start; gap: .75rem; }

.form-field--toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 0;
  border-top: 1px solid var(--color-border);
}

.form-fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.form-fieldset legend,
.form-field--col-full { grid-column: 1 / -1; }

.form-label,
.form-field__label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-field__required { color: var(--color-danger); margin-left: 2px; }
.form-field__hint { font-size: .8rem; color: var(--color-text-muted); }

.form-input,
.form-field__input,
.form-field__textarea {
  padding: .55rem .85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-surface);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-field__input:focus,
.form-field__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255,160,0,.22), 0 2px 8px rgba(255,160,0,.1);
}

.form-field__textarea { resize: vertical; min-height: 80px; }

.form-field__input-wrap { position: relative; display: flex; align-items: center; }
.form-field__prefix-icon {
  position: absolute;
  left: .75rem;
  width: 1.1rem;
  height: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}
.form-field__input--with-prefix { padding-left: 2.25rem; }

.form-error,
.form-field__error {
  font-size: .8rem;
  color: var(--color-danger);
  font-weight: 500;
}

.form-field__error--block { display: block; margin-top: .25rem; }
.form-field__link { font-size: .85rem; color: var(--color-primary-light); }

.form-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* toggle switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-switch__thumb {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-switch__thumb::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle-switch input:checked + .toggle-switch__thumb { background: var(--color-primary-light); }
.toggle-switch input:checked + .toggle-switch__thumb::before { transform: translateX(20px); }
.toggle-switch--on .toggle-switch__thumb { background: var(--color-primary-light); }
.toggle-switch--on .toggle-switch__thumb::before { transform: translateX(20px); }

.form-field__toggle-label { font-weight: 600; font-size: .9rem; }
.form-field__toggle-desc { font-size: .8rem; color: var(--color-text-muted); }
.form-field__toggle-vis { display: flex; align-items: center; background: none; border: none; cursor: pointer; padding: 0.25rem; }
.form-field__toggle-vis svg { width: 1.2rem; height: 1.2rem; }

/* checkbox */
.form-field__checkbox-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-size: .9rem;
}

.form-field__checkbox { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; }

/* copy field */
.copy-field { display: flex; gap: .5rem; align-items: center; }
.copy-field__input { flex: 1; font-size: .85rem; font-family: var(--font-mono); }
.copy-field__feedback { font-size: .8rem; color: var(--color-success); font-weight: 600; }

/* collapsible form */
.collapsible-form { border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.5rem; }
.collapsible-form__title {
  background: var(--color-primary);
  color: #fff;
  padding: .85rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── 10. TABLES ───────────────────────────────────────────── */
.table-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table,
.score-table,
.db-score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td,
.score-table th,
.score-table td,
.db-score-table th,
.db-score-table td {
  padding: .6rem .9rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.table thead th,
.score-table thead th,
.db-score-table thead th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table__header { /* synonym */ }

.table tbody tr:nth-child(even),
.score-table tbody tr:nth-child(even) { background: #f0f2fb; }

.table tbody tr:hover,
.score-table tbody tr:hover { background: #e3e7f5; }

.table__row--top1 td,
.score-table tbody tr:nth-child(1) td { background: #fff8e1; font-weight: 700; }
.score-table tbody tr:nth-child(2) td { background: #f3f4f9; }
.score-table tbody tr:nth-child(3) td { background: #faf8f0; }

.score-table__th--rank   { width: 50px; text-align: center; }
.score-table__th--player { min-width: 120px; }
.score-table__th--lane   { width: 70px; text-align: center; }
.score-table__th--total  { width: 80px; text-align: right; }
.score-table__th--frames { font-size: .75rem; }
.score-table__th--status { width: 90px; }
.score-table__th--actions { width: 110px; text-align: right; }

.score-table__placeholder-row td { text-align: center; color: var(--color-text-muted); padding: 2rem; }
.score-val--high { color: var(--color-accent-dark); font-weight: 800; }
.score-table__td--rank { font-family: 'Chakra Petch', var(--font-sans); font-weight: 700; text-align: center; }
.score-table__td--total { font-family: 'Chakra Petch', var(--font-sans); font-weight: 700; text-align: right; }

/* column helpers for score grid */
.col-rank   { width: 48px; text-align: center; font-family: 'Chakra Petch', var(--font-sans); font-weight: 700; }
.col-player { min-width: 110px; }
.col-frame  { width: 52px; text-align: center; font-family: 'Chakra Petch', var(--font-sans); }
.col-total  { width: 72px; text-align: right; font-weight: 700; font-family: 'Chakra Petch', var(--font-sans); }

.frame-cell--locked { opacity: .45; }

/* ── 11. TABS ─────────────────────────────────────────────── */
.tabs-wrap {
  position: relative;
}
.tabs-wrap::before, .tabs-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 2rem;
  pointer-events: none; z-index: 1; opacity: 0; transition: opacity 0.3s;
}
.tabs-wrap::before { left: 0; background: linear-gradient(90deg, var(--color-surface, #fff), transparent); }
.tabs-wrap::after { right: 0; background: linear-gradient(-90deg, var(--color-surface, #fff), transparent); }
.tabs-wrap--scroll-left::before { opacity: 1; }
.tabs-wrap--scroll-right::after { opacity: 1; }

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
  align-items: flex-end;
}
.tabs::-webkit-scrollbar { display: none; }

/* Vertical separator between tab groups */
.tabs__sep {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  margin: .35rem .65rem;
  background: var(--color-border);
  opacity: .6;
}

/* Plan-locked tab — 🔒 premium gated feature */
.tabs__tab--plan-locked {
  position: relative;
  color: var(--color-text-light) !important;
  cursor: not-allowed !important;
  opacity: .65;
}
.tabs__tab--plan-locked::after {
  content: '🔒';
  position: absolute;
  top: .15rem;
  right: .25rem;
  font-size: .7rem;
  filter: grayscale(.2);
  pointer-events: none;
}
.tabs__tab--plan-locked:hover {
  color: var(--color-text-light) !important;
  background: rgba(255,160,0,.06);
}
.tabs__tab--plan-locked:hover::after {
  filter: grayscale(0);
  transform: scale(1.15);
  transition: transform .2s ease, filter .2s ease;
}
/* Give the locked tab a tooltip via title attribute set in JS, but also a
   native CSS fallback hint — subtle gold underline on hover */
.tabs__tab--plan-locked:hover {
  border-bottom-color: var(--color-accent-light);
}

.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-sans);
  transition: color var(--transition), border-color var(--transition);
}
.tabs__tab:hover { color: var(--color-primary); background: rgba(26,35,126,.04); }
.tabs__tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
  background: rgba(255,160,0,.06);
}
.tabs__tab--disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.tabs__tab--disabled:hover { color: inherit; border-bottom-color: transparent; }
.tabs__tab-icon { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.tabs__badge {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font-size: .72rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  padding: 0 .45rem;
  min-width: 18px;
  text-align: center;
}

.tabs__panel { display: none; padding: 1.5rem 0; }
.tabs__panel--active { display: block; }

/* ── 12. BADGES ───────────────────────────────────────────── */
.badge,
.status-badge,
.rank-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.badge--live,
.status-badge[data-status="active"] {
  background: rgba(56,142,60,.15);
  color: var(--color-success);
  animation: pulse-live 2s infinite;
}

.badge--locked { background: rgba(107,114,128,.15); color: var(--color-text-muted); }

.rank-badge--1 { background: #ffd700; color: #5a3a00; }
.rank-badge--2 { background: #c0c0c0; color: #2a2a2a; }
.rank-badge--3 { background: #cd7f32; color: #fff; }

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ── 13. FOOTER ───────────────────────────────────────────── */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.75);
  padding: 2.5rem 1rem 1.5rem;
  margin-top: auto;
  position: relative;
}

/* 頂部裝飾漸層線 */
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-accent), var(--color-primary-light));
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer__brand { display: flex; flex-direction: column; gap: .2rem; }
.footer__brand-name {
  color: #fff;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .02em;
}
.footer__tagline { font-size: .82rem; color: rgba(255,255,255,.5); }
.footer__nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer__link {
  color: rgba(255,255,255,.65);
  font-size: .85rem;
  transition: color var(--transition);
  position: relative;
}
.footer__link:hover { color: var(--color-accent); text-decoration: none; }
.footer__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.footer__link:hover::after { transform: scaleX(1); }
.footer__copy {
  font-size: .8rem;
  width: 100%;
  text-align: center;
  color: rgba(255,255,255,.35);
  padding-top: 1.25rem;
  margin-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer__contact {
  width: 100%;
  text-align: center;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  margin-top: .5rem;
}
.footer__contact a {
  color: var(--color-accent-light);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,215,64,.4);
  transition: color .15s, border-color .15s;
}
.footer__contact a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* ── 14. AUTH CARDS ───────────────────────────────────────── */
#auth-section { max-width: 480px; margin: 3rem auto; padding: 0 1rem; }

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
/* Bowling-lane pinstripe hint on card body */
.auth-card::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) 25%, var(--color-accent) 25%, var(--color-accent) 50%, var(--color-primary) 50%, var(--color-primary) 75%, var(--color-accent) 75%, var(--color-accent) 100%);
  opacity: .85;
}

.auth-card--wide { max-width: 640px; margin-inline: auto; }
.auth-card__header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* 登入區背景紋理 — 對角光 + 散點紋理 */
.auth-card__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 2px at 10% 20%, rgba(255,255,255,.15), transparent 3px),
    radial-gradient(circle 2px at 80% 35%, rgba(255,255,255,.12), transparent 3px),
    radial-gradient(circle 2px at 30% 70%, rgba(255,255,255,.18), transparent 3px),
    radial-gradient(circle 2px at 65% 85%, rgba(255,255,255,.1), transparent 3px),
    radial-gradient(circle 2px at 90% 60%, rgba(255,255,255,.14), transparent 3px),
    radial-gradient(ellipse 50% 60% at 20% 80%, rgba(255,160,0,.14) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(255,215,64,.12) 0%, transparent 70%);
  pointer-events: none;
}
/* Diagonal golden accent stripe — sports feeling */
.auth-card__header::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -15%;
  width: 40%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,215,64,.18), transparent);
  transform: rotate(22deg);
  pointer-events: none;
}
.auth-card__header > * { position: relative; z-index: 1; }
.auth-card__icon { width: 2.5rem; height: 2.5rem; margin-bottom: .5rem; }
.auth-card__title {
  font-family: 'Chakra Petch', var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .03em;
}
.auth-card__subtitle { font-size: .9rem; color: rgba(255,255,255,.75); margin-top: .25rem; }
.auth-card__brand {
  font-family: 'Chakra Petch', var(--font-sans);
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.auth-form {
  padding: 1.5rem;
}

.auth-form--inline { display: flex; gap: .75rem; align-items: flex-end; }
.auth-form--inline .form-field { flex: 1; margin-bottom: 0; }

.form--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1rem;
}

.auth-divider {
  text-align: center;
  position: relative;
  color: var(--color-text-muted);
  font-size: .82rem;
  margin: .5rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--color-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-key-login { background: var(--color-bg); border-radius: var(--radius-md); padding: 1rem; margin: .5rem 0; }
.auth-key-login__desc { font-size: .88rem; margin-bottom: .5rem; }
.auth-key-login__hint { font-size: .78rem; color: var(--color-text-muted); margin-top: .4rem; }

/* ── 15. SEARCH BAR ───────────────────────────────────────── */
.search-bar { position: relative; display: flex; align-items: center; }
.search-bar__input-wrap { position: relative; flex: 1; }
.search-bar__icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--color-text-muted);
  pointer-events: none;
}
.search-bar__input {
  width: 100%;
  padding: .6rem .85rem .6rem 2.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .92rem;
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar__input:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(57,73,171,.18);
}

/* ── 16. TOOLBAR ──────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.toolbar--filter { justify-content: space-between; }
.toolbar--player-actions { justify-content: flex-end; }

/* sort select */
.sort-select, select.sort-select {
  padding: .5rem .8rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: .88rem;
  color: var(--color-text);
  cursor: pointer;
}

.sort-label { font-size: .88rem; color: var(--color-text-muted); }
.sort-icon { font-size: .85rem; }

/* ── 17. TRACKER PAGE ─────────────────────────────────────── */
.tracker-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  border-bottom: 2px solid var(--color-accent);
}

.tracker-header__inner { display: flex; align-items: center; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.tracker-header__meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.tracker-title { font-size: 1.2rem; font-weight: 700; }
.tracker-back-btn { color: rgba(255,255,255,.80); font-size: .9rem; text-decoration: none; }
.tracker-back-btn:hover { color: #fff; text-decoration: underline; }

/* LIVE 膠囊 badge */
.tracker-live-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .55rem;
  border-radius: var(--radius-full);
  background: rgba(255,160,0,.2);
  border: 1px solid rgba(255,160,0,.4);
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-accent-light);
  letter-spacing: .06em;
  animation: live-glow 2s ease-in-out infinite;
}
.tracker-live-badge__dot {
  width: 7px; height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
}
@keyframes live-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,160,0,.2); }
  50%      { box-shadow: 0 0 8px 2px rgba(255,160,0,.15); }
}

/* 保留舊 class 相容 JS 顯示/隱藏 */
.tracker-live-dot { display: none; }
.tracker-live-label { display: none; }

.tracker-info-bar {
  background: var(--color-primary-dark);
  padding: .5rem 1rem;
}

.tracker-info-bar .container { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.tracker-info-bar__item { display: flex; align-items: center; gap: .4rem; }
.tracker-info-bar__icon { color: var(--color-accent); font-size: .9rem; }
.tracker-info-bar__label { font-size: .78rem; color: var(--color-text-muted); }
.tracker-info-bar__value { font-size: .88rem; color: var(--color-bg); font-weight: 600; }

.tracker-status-wrap { display: inline-flex; align-items: center; }
.tracker-body { padding: 1.5rem 1rem 3rem; }

.tracker-scores { }
.tracker-scores__title { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); margin-bottom: .75rem; }
.tracker-scores__controls, .tracker-scores__toolbar { margin-bottom: 1rem; }

.tracker-ranking { margin-top: 2rem; }
.tracker-ranking__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.tracker-ranking__title { font-size: 1.05rem; font-weight: 700; color: var(--color-primary); }
.tracker-ranking__count { font-size: .85rem; color: var(--color-text-muted); }

.tracker-last-updated { font-size: .78rem; color: var(--color-text-muted); margin-top: .5rem; }

.ranking-list { display: flex; flex-direction: column; gap: .5rem; }
.ranking-list__placeholder { color: var(--color-text-muted); font-size: .9rem; text-align: center; padding: 1.5rem; }

/* ── 18. SCORER PAGE ──────────────────────────────────────── */
.scorer-header {
  background: var(--color-primary);
  color: #fff;
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.20);
}

.scorer-header__inner { display: flex; align-items: center; gap: 1rem; }
.scorer-header__title { font-size: 1.15rem; font-weight: 700; }
.scorer-header__meta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-left: auto; }

.scorer-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-full);
  padding: .2rem .65rem;
  font-size: .78rem;
  color: rgba(255,255,255,.90);
}
.scorer-meta-chip--lock { background: rgba(255,160,0,.20); color: var(--color-accent-light); }

.scorer-body { padding: 1rem; max-width: 900px; margin: 0 auto; }

/* large touch-friendly score inputs */
.score-input {
  width: 100%;
  min-width: 50px;
  padding: .6rem .4rem;
  font-family: 'Chakra Petch', var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  touch-action: manipulation;
}

.score-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255,160,0,.25);
}

.score-input--locked {
  background: #f0f0f0;
  color: var(--color-text-muted);
  cursor: not-allowed;
  opacity: .6;
}

.score-input-cell__spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary-light);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}

.score-table__placeholder { padding: 2rem; text-align: center; color: var(--color-text-muted); }

.scorer-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  gap: 1rem;
}
.scorer-state__icon { font-size: 3rem; }
.scorer-state__title { font-size: 1.2rem; font-weight: 700; color: var(--color-primary); }
.scorer-state__desc { color: var(--color-text-muted); font-size: .95rem; max-width: 360px; }

.scorer-key-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; max-width: 480px; margin: 1.5rem auto; }

.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1rem; }
.qr-wrap__canvas { border: 3px solid var(--color-border); border-radius: var(--radius-md); }
.qr-wrap__icon { width: 3rem; height: 3rem; color: var(--color-text-muted); }
.qr-wrap__placeholder { font-size: .85rem; color: var(--color-text-muted); }

/* lane group */
.lane-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* ── 19. DASHBOARD (TV / FULL-SCREEN) ─────────────────────── */
body.db-page,
.db-layout {
  background: var(--db-bg);
  color: var(--db-text);
  font-family: var(--font-sans);
}

body.db-page { overflow: hidden; }

.db-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* top bar */
.db-topbar {
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  height: 56px;
  background: var(--db-surface);
  border-bottom: 1px solid var(--db-border);
  flex-shrink: 0;
  gap: 1rem;
}

.db-topbar__left  { display: flex; align-items: center; gap: .75rem; }
.db-topbar__center { flex: 1; text-align: center; }
.db-topbar__right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }

.db-topbar__game-name { font-size: 1.1rem; font-weight: 700; color: var(--db-text); }

.db-topbar__status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse-live 1.5s infinite;
}
.db-topbar__status-dot--offline { background: var(--color-danger); animation: none; }

.db-clock {
  font-size: 1rem;
  font-weight: 600;
  color: var(--db-text-muted);
  font-variant-numeric: tabular-nums;
}

/* slides */
.db-slides {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.db-slide-area {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--db-border) transparent;
  padding: 1rem 1.5rem;
}

.db-scoreboard {
  width: 100%;
}

.db-scoreboard__heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
}

.db-scoreboard__lane-label { font-size: 1rem; font-weight: 700; color: var(--color-accent); }
.db-scoreboard__lane-badge {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-radius: var(--radius-sm);
  padding: .15rem .5rem;
  font-size: .82rem;
  font-weight: 800;
}

.db-score-table-wrap { overflow-x: auto; }

.db-score-table {
  background: var(--db-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.db-score-table thead th {
  background: var(--color-primary);
  color: #fff;
  padding: .5rem .75rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.db-score-table tbody tr { border-bottom: 1px solid var(--db-border); }
.db-score-table tbody td { padding: .55rem .75rem; color: var(--db-text); font-size: .9rem; }
.db-score-table tbody tr:nth-child(even) td { background: rgba(255,255,255,.03); }
/* first-child highlight disabled for full scoreboard */

/* slide indicator */
.db-slide-indicator {
  display: flex;
  justify-content: center;
  gap: .4rem;
  padding: .4rem 0;
  flex-shrink: 0;
}

.db-slide-label {
  text-align: center;
  font-size: .8rem;
  color: var(--db-text-muted);
  padding: .2rem 0;
  flex-shrink: 0;
}

/* marquee bar */
.db-marquee-bar {
  flex-shrink: 0;
  background: var(--color-primary);
  border-top: 2px solid var(--color-accent);
  height: 38px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.db-marquee-bar__track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  gap: 0;
}

.db-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0 2.5rem;
  font-size: .88rem;
  color: rgba(255,255,255,.90);
  border-right: 1px solid rgba(255,255,255,.15);
}

.db-marquee-item strong { color: var(--color-accent-light); }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* pairing overlay */
.db-pairing {
  position: absolute;
  inset: 0;
  background: rgba(10,12,26,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.db-pairing__card {
  background: var(--db-surface-2);
  border: 1px solid var(--db-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
}

.db-pairing__logo { font-size: 3rem; margin-bottom: 1rem; }
.db-pairing__headline { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: .4rem; }
.db-pairing__subline { color: var(--db-text-muted); margin-bottom: 1.5rem; font-size: .95rem; }

.db-pairing__codes { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.db-code-block {
  background: var(--db-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--radius-md);
  padding: .75rem 1.25rem;
  min-width: 140px;
}
.db-code-block__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--db-text-muted); margin-bottom: .3rem; }
.db-code-block__value { font-size: 1.6rem; font-weight: 800; color: var(--color-accent); font-variant-numeric: tabular-nums; }
.db-code-block__value--pin { color: #fff; }
.db-code-divider { color: var(--db-text-muted); align-self: center; }

.db-pairing__progress { width: 100%; height: 4px; background: var(--db-border); border-radius: 2px; overflow: hidden; margin-top: .75rem; }
.db-pairing__progress::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--color-accent);
  animation: progress-bar 20s linear infinite;
}
@keyframes progress-bar { from { width: 0; } to { width: 100%; } }

.db-pairing__hint { font-size: .8rem; color: var(--db-text-muted); margin-top: .75rem; }

.db-pairing__spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--db-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: .75rem auto 0;
}

/* reconnect overlay */
.db-reconnect-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #fff;
}
.db-reconnect-overlay__spinner {
  width: 40px; height: 40px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.db-reconnect-overlay__text { font-size: 1.1rem; color: rgba(255,255,255,.80); }

/* dashboard admin panel tabs */
.dashboard-panel__title { font-size: 1rem; font-weight: 700; color: var(--color-primary); margin-bottom: .75rem; }
.dashboard-panel__toolbar { display: flex; gap: .75rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }

/* 操作分區卡片 — 用於獎項管理等密集操作區 */
.panel-section {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  overflow: hidden;
}
.panel-section__title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--color-border);
}

/* ── 20. WS STATUS BAR ────────────────────────────────────── */
.ws-status-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .75rem;
  background: rgba(0,0,0,.06);
  border-radius: var(--radius-full);
  font-size: .78rem;
  color: var(--color-text-muted);
}

.ws-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; }
.ws-status__dot, .ws-status-bar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); }
.ws-status__dot--connecting, .ws-status-bar__dot--connecting { background: var(--color-warning); animation: pulse-live 1s infinite; }
.ws-status__text { color: var(--color-text-muted); }

/* ── 21. QR MODAL ─────────────────────────────────────────── */
.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.qr-modal.is-open { display: flex; }

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.60);
  cursor: pointer;
}

.qr-modal > div:not(.qr-modal-backdrop) {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  max-width: 360px;
  width: 90%;
  text-align: center;
  z-index: 1;
}

.qr-modal__title { font-size: 1.15rem; font-weight: 700; color: var(--color-primary); margin-bottom: .25rem; }
.qr-modal__subtitle { font-size: .85rem; color: var(--color-text-muted); margin-bottom: 1.25rem; }
.qr-modal__canvas-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
.qr-modal__url { font-size: .78rem; color: var(--color-text-muted); word-break: break-all; margin-bottom: 1rem; }
.qr-modal__close {
  position: absolute;
  top: .75rem; right: .75rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: .25rem;
  line-height: 1;
  border-radius: var(--radius-sm);
}
.qr-modal__close:hover { background: var(--color-border); color: var(--color-text); }

/* QR FAB */
.qr-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
}

#qr-fab-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-accent), var(--shadow-md);
  transition: transform var(--transition), background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
#qr-fab-btn:hover { transform: scale(1.08); background: var(--color-accent-dark); }

/* ── 22. TOAST / NOTIFICATIONS ────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  background: var(--color-primary-dark);
  color: #fff;
  padding: .7rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: .6rem;
  animation: toast-in .25s ease;
  min-width: 220px;
  max-width: 420px;
}

.toast--success { border-left: 4px solid var(--color-success); }
.toast--error   { border-left: 4px solid var(--color-danger); }
.toast--warning { border-left: 4px solid var(--color-warning); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 23. LOADING SPINNER ──────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 32px; height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary-light);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.spinner--sm { width: 18px; height: 18px; border-width: 2px; }
.spinner--lg { width: 52px; height: 52px; border-width: 4px; }

#state-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
  color: var(--color-text-muted);
}

#state-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: .75rem;
  color: var(--color-danger);
  text-align: center;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 24. FEATURES GRID (index.html) ───────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-item {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
  overflow: hidden;
}
/* Subtle top accent ribbon per item */
.feature-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.feature-item:hover::before { opacity: 1; }

.feature-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-primary-light);
}

/* Filled icon tile — each feature gets a distinct accent */
.feature-item__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto .9rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: 0 6px 18px rgba(26,35,126,.22);
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}
.feature-item:hover .feature-item__icon {
  background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
  box-shadow: 0 8px 24px rgba(255,160,0,.35);
  transform: rotate(-5deg) scale(1.05);
}
/* Different color tints per item — nth-child gives each a character */
.feature-item:nth-child(1) .feature-item__icon { background: linear-gradient(135deg, #0288d1, #4fc3f7); box-shadow: 0 6px 18px rgba(2,136,209,.28); }
.feature-item:nth-child(2) .feature-item__icon { background: linear-gradient(135deg, #7b1fa2, #ba68c8); box-shadow: 0 6px 18px rgba(123,31,162,.28); }
.feature-item:nth-child(3) .feature-item__icon { background: linear-gradient(135deg, #388e3c, #81c784); box-shadow: 0 6px 18px rgba(56,142,60,.28); }
.feature-item:nth-child(4) .feature-item__icon { background: linear-gradient(135deg, #e53935, #ff7043); box-shadow: 0 6px 18px rgba(229,57,53,.28); }

.feature-item__icon svg { color: #fff; transition: transform .3s ease; }
.feature-item:hover .feature-item__icon svg { transform: scale(1.1); }
/* ── Index page nav cards ──────────────────────────────────── */
.nav-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--color-border);
  padding: 1.75rem 1.5rem;
  cursor: pointer;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.nav-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: var(--color-accent);
}
.nav-card:hover .nav-card__icon-wrap {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  box-shadow: 0 4px 16px rgba(255,160,0,.25);
}
.nav-card:hover .nav-card__cta { color: var(--color-accent-dark); }
.nav-card__icon-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 96px; height: 96px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius-xl);
  color: #fff;
  transition: background .3s ease, box-shadow .3s ease;
}
.nav-card__icon { width: 52px; height: 52px; }
.nav-card__body { flex: 1; }
.nav-card__title { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; color: var(--color-text); }
.nav-card__desc { font-size: .88rem; color: var(--color-text-muted); line-height: 1.5; margin-bottom: .75rem; }
.nav-card__features { list-style: none; padding: 0; margin: 0; font-size: .82rem; color: var(--color-text-muted); }
.nav-card__features li::before { content: '✓ '; color: var(--color-success); font-weight: 700; }
.nav-card__features li { margin-bottom: .25rem; }
.nav-card__footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.nav-card__cta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: .02em;
  transition: color .25s ease, gap .25s ease;
}
.nav-card:hover .nav-card__cta {
  color: var(--color-accent-dark);
  gap: .55rem;
}

/* Gold shimmer that sweeps across the card on hover — sports-reel vibe */
.nav-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255,215,64,.18) 50%, transparent 70%);
  transform: translateX(-100%);
  pointer-events: none;
  transition: transform .65s ease;
}
.nav-card:hover::after { transform: translateX(100%); }
.nav-card { overflow: hidden; }

.feature-item__icon svg { width: 32px; height: 32px; }

@media (max-width: 640px) {
  .nav-card__icon-wrap { width: 80px; height: 80px; }
  .nav-card__icon { width: 44px; height: 44px; }
  .feature-item__icon { width: 56px; height: 56px; }
  .feature-item__icon svg { width: 28px; height: 28px; }
  .tabs__tab { padding: .55rem .8rem; font-size: .85rem; }
}
.feature-item__title { font-size: 1rem; font-weight: 700; color: var(--color-primary); margin-bottom: .4rem; letter-spacing: .01em; }
.feature-item__desc { font-size: .88rem; color: var(--color-text-muted); line-height: 1.55; }

/* ── Index page entrance animations ──────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero__badge   { animation: fadeIn .6s ease both; }
.hero__logo { animation: fadeInUp .7s ease .15s both; }
.hero__subtitle { animation: fadeInUp .7s ease .3s both; }
.hero__stats   { animation: fadeInUp .7s ease .45s both; }

.section--cards .section__title,
.section--cards .section__subtitle { animation: fadeInUp .6s ease .5s both; }

.nav-card:nth-child(1) { animation: fadeInUp .5s ease .6s both; }
.nav-card:nth-child(2) { animation: fadeInUp .5s ease .75s both; }
.nav-card:nth-child(3) { animation: fadeInUp .5s ease .9s both; }

.feature-item:nth-child(1) { animation: fadeInUp .5s ease .7s both; }
.feature-item:nth-child(2) { animation: fadeInUp .5s ease .82s both; }
.feature-item:nth-child(3) { animation: fadeInUp .5s ease .94s both; }
.feature-item:nth-child(4) { animation: fadeInUp .5s ease 1.06s both; }

/* 用戶偏好 reduced motion 時停用動畫 */
@media (prefers-reduced-motion: reduce) {
  .hero__badge, .hero__logo, .hero__subtitle, .hero__stats,
  .section--cards .section__title, .section--cards .section__subtitle,
  .nav-card, .feature-item {
    animation: none !important;
  }
}

/* hero scoreboard */
#hero-board-table { margin-top: 1.5rem; }
#hero-board-title { color: rgba(255,255,255,.85); font-size: 1rem; margin-bottom: .5rem; }

/* stats chips */
#stat-games, #stat-players, #stat-lanes {
  display: inline-block;
  padding: .2rem .65rem;
  background: rgba(255,255,255,.10);
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ── 25. MEMBER GRID ──────────────────────────────────────── */
#member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.member-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--color-primary-light);
  text-decoration: none;
}
.member-card__avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.member-card__initial {
  width: 48px; height: 48px; border-radius: 50%; background: var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 1.2rem; flex-shrink: 0;
}
.member-card__body { flex: 1; min-width: 0; }
.member-card__name { font-weight: 600; }
.member-card__bio { font-size: .8rem; color: var(--color-text-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card__badges {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-top: .35rem;
  flex-wrap: wrap;
}
.member-card__badge {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
  transition: transform .15s;
}
.member-card:hover .member-card__badge { transform: scale(1.1); }
.member-card__badges-more {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-left: .15rem;
}

/* ── 26. PROFILE ──────────────────────────────────────────── */
.profile-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  text-align: center;
}

.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--color-primary-light);
  object-fit: cover;
}

/* ── MEMBER PROFILE CARD ─────────────────────────────────── */
.member-profile {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.member-profile__header {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(26,35,126,.03) 0%, rgba(57,73,171,.06) 100%);
}
.member-profile__avatar-wrap { position: relative; flex-shrink: 0; }
.member-profile__info { flex: 1; min-width: 0; }
.member-profile__name { font-size: 1.25rem; font-weight: 700; margin: 0 0 .25rem; }
.member-profile__bio { color: var(--color-text-muted); font-size: .9rem; margin: 0 0 .5rem; }
.member-profile__social { display: flex; gap: .5rem; flex-wrap: wrap; }
.member-profile__social a {
  color: var(--color-text-muted); font-size: .8rem; text-decoration: none;
  padding: .15rem .5rem; border: 1px solid var(--color-border); border-radius: .25rem;
  transition: color var(--transition), border-color var(--transition);
}
.member-profile__social a:hover { color: var(--color-primary); border-color: var(--color-primary); }
.member-profile__stats {
  display: flex;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.member-profile__stat {
  flex: 1;
  text-align: center;
  padding: .75rem .5rem;
}
.member-profile__stat + .member-profile__stat { border-left: 1px solid var(--color-border); }
.member-profile__stat-value { display: block; font-family: 'Chakra Petch', var(--font-sans); font-size: 1.1rem; font-weight: 700; color: var(--color-primary); }
.member-profile__stat-label { display: block; font-size: .75rem; color: var(--color-text-light); margin-top: .15rem; }
.member-profile .tabs { padding: 0 1.5rem; }
.member-profile .tabs__panel { padding: 1rem 1.5rem; }

/* ── Per-plan breakdown (Event / Team / Friend) ── */
.mp-plan-breakdown {
  padding: .75rem 1.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.mp-plan-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1.4fr) repeat(3, 1fr);
  align-items: center;
  gap: .5rem;
  padding: .45rem .6rem;
  border-radius: .5rem;
  font-size: .85rem;
  background: rgba(0,0,0,.015);
  border-left: 3px solid transparent;
}
.mp-plan-row--event    { border-left-color: #dc2626; background: linear-gradient(90deg, rgba(220,38,38,.08), transparent 60%); }
.mp-plan-row--team     { border-left-color: #2563eb; background: linear-gradient(90deg, rgba(37,99,235,.08), transparent 60%); }
.mp-plan-row--friend   { border-left-color: #059669; background: linear-gradient(90deg, rgba(5,150,105,.08), transparent 60%); }
.mp-plan-row--empty { opacity: .45; }
.mp-plan-row__label {
  font-weight: 600;
  color: var(--color-text, #1f2937);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.mp-plan-row__icon { font-size: 1rem; }
.mp-plan-row__metric {
  color: var(--color-text-muted);
  font-size: .82rem;
  text-align: center;
}
.mp-plan-row__num {
  font-family: 'Chakra Petch', var(--font-sans);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  margin: 0 .1rem;
}

@media (max-width: 480px) {
  .member-profile__header { flex-direction: column; text-align: center; }
  .member-profile__social { justify-content: center; }
  .member-profile__stat-value { font-size: .95rem; }
  .mp-plan-breakdown { padding: .6rem 1rem .8rem; }
  .mp-plan-row { grid-template-columns: minmax(6rem, 1.2fr) repeat(3, 1fr); padding: .4rem .5rem; font-size: .78rem; gap: .3rem; }
  .mp-plan-row__num { font-size: .88rem; }
  .mp-plan-row__metric { font-size: .72rem; }
}

/* ── 27. PAGINATION ───────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ── 28. PODIUM ───────────────────────────────────────────── */
#podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.5rem 0 0;
}

/* ── 29. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  html { font-size: 18px; }
  :root { --nav-h: 56px; }

  .container { padding-inline: 0.15rem; }

  .navbar nav { display: none; }
  .navbar__toggle { display: flex; margin-left: auto; }
  .navbar .container { flex-wrap: wrap; }

  .hero { padding: 2.5rem 1rem 2rem; }

  .card-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }

  .form--grid { grid-template-columns: 1fr; }
  .auth-form--inline { flex-direction: column; }

  .toolbar--filter { flex-direction: column; align-items: stretch; }

  .db-topbar { padding: 0 .75rem; }
  .db-slide-area { padding: .5rem .75rem; }
  .db-pairing__card { padding: 1.5rem 1rem; }
  .db-pairing__codes { gap: .75rem; }

  .score-input { font-size: 1rem; padding: .5rem .3rem; }

  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; }

  /* 40+ 用戶友善：過小文字拉到可讀最低值 */
  .btn--sm { font-size: .88rem; }
  .form-field__hint,
  .form-field__toggle-desc,
  .copy-field__feedback { font-size: .85rem; }
  .auth-key-login__hint { font-size: .85rem; }

  /* 按鈕/輸入框最小觸控區域 44px */
  .btn, .form-field__input, .form-field__select { min-height: 2.75rem; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .tabs__tab { padding: .6rem .85rem; font-size: .85rem; }
  .btn--lg { padding: .7rem 1.25rem; font-size: 1rem; }
}

@media (min-width: 1200px) {
  .scorer-body { padding: 1.5rem 2rem; }
  .db-slide-area { padding: 1.25rem 2rem; }
}

/* ── Active game banner ───────────────────────────────────── */
.game-banner {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: linear-gradient(135deg, rgba(255,160,0,0.08), rgba(255,160,0,0.18));
  border: 1px solid rgba(255,160,0,0.3);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.game-banner__title {
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.game-banner__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-accent); flex-shrink: 0;
}
.game-banner__dot--live {
  background: #16a34a;
  animation: banner-pulse 1.5s ease-in-out infinite;
}
@keyframes banner-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22,163,74,0.5); }
  50% { opacity: .7; box-shadow: 0 0 0 4px rgba(22,163,74,0); }
}
.game-banner__label {
  font-size: 0.8rem; font-weight: 700; color: #92400e;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.game-banner__label--reconnecting {
  color: #b45309;
  animation: banner-label-blink 1.4s ease-in-out infinite;
}
@keyframes banner-label-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.game-banner__name {
  font-size: 1.05rem; font-weight: 700; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-banner__details {
  font-size: 0.85rem; color: var(--color-text-muted);
}
.game-banner__actions {
  display: flex; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap;
}
.game-banner__stats {
  display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem;
}
.game-banner__chip {
  display: inline-flex; align-items: center; gap: .2rem;
  font-size: .72rem; font-weight: 600; padding: .12rem .4rem;
  border-radius: var(--radius-full); background: rgba(26,35,126,.08); color: var(--color-primary);
}
.game-banner__chip--bonus { background: #fef3c7; color: #92400e; }
.game-banner__chip--jp0 { background: rgba(56,189,248,.15); color: #0ea5e9; }
.game-banner__chip--jp1 { background: rgba(52,211,153,.15); color: #10b981; }
.game-banner__chip--jp2 { background: rgba(251,146,60,.15); color: #ea580c; }
.game-banner__chip--jp3 { background: rgba(167,139,250,.15); color: #7c3aed; }
.game-banner__chip--jp4 { background: rgba(251,113,133,.15); color: #e11d48; }
.game-banner__chip--jp5 { background: rgba(250,204,21,.15); color: #ca8a04; }
.game-banner__chip--jp6 { background: rgba(45,212,191,.15); color: #0d9488; }
.game-banner__chip--jp7 { background: rgba(244,114,182,.15); color: #db2777; }
.game-banner__chip--jp8 { background: rgba(129,140,248,.15); color: #4f46e5; }
.game-banner__chip--jp9 { background: rgba(163,230,53,.15); color: #65a30d; }

/* ── Award mode buttons ──────────────────────────────────── */
.award-mode-btn--active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Dashboard gradient title ─────────────────────────────── */
.dashboard-title-gradient {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Game filter tabs ──────────────────────────────────────── */
.game-filter-tabs { display: flex; gap: 0; margin-bottom: 1rem; border-bottom: 2px solid #e2e8f0; }
.game-filter-tab {
  padding: 0.5rem 1.2rem; border: none; background: none; cursor: pointer;
  font-size: 0.9rem; color: #64748b; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.game-filter-tab:hover { color: #1a237e; }
.game-filter-tab--active { color: #1a237e; border-bottom-color: #ffa000; font-weight: 600; }

/* ── Game list: active row highlight ───────────────────────── */
.game-row--active {
  background: linear-gradient(90deg, rgba(255,160,0,0.15) 0%, rgba(255,160,0,0.04) 100%);
  border-left: 5px solid #ffa000;
  box-shadow: 0 2px 8px rgba(255,160,0,0.12);
  border-radius: 0 0.5rem 0.5rem 0;
  position: relative;
}
.game-row--active td:first-child { padding-left: 0.75rem; }
.game-active-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255,160,0,0.18);
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.2rem;
  animation: pulse-indicator 1.5s ease-in-out infinite;
}
.game-active-indicator::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #f59e0b;
  border-radius: 50%;
  animation: blink-dot 1s ease-in-out infinite;
}
@keyframes pulse-indicator {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes blink-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.6); }
}

/* ── Game list: responsive cells ───────────────────────────── */
.game-cell-main { font-weight: 600; }
.game-cell-sub { font-size: 0.8em; color: #64748b; margin-top: 2px; }
.game-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

@media (max-width: 640px) {
  .td-hide-mobile { display: none; }
  .game-actions { flex-direction: column; }
  .game-actions .btn { width: 100%; text-align: center; }
}

/* ── Lane Manager ─────────────────────────────────────────── */
.lm-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.lm-total { color: #64748b; font-size: 0.9rem; margin-left: auto; }
.lm-empty { color: #94a3b8; text-align: center; padding: 2rem; }

/* Lock bar */
.lm-lock-bar {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  padding: 0.6rem 0.8rem; margin-bottom: 1rem;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 0.5rem;
}
.lm-lock-bar__label { font-size: 0.85rem; font-weight: 600; color: #92400e; margin-right: 0.3rem; }
.lm-lock-btn {
  padding: 0.3rem 0.6rem; font-size: 0.8rem; border: 1px solid #cbd5e1;
  border-radius: 0.3rem; background: #fff; cursor: pointer;
  transition: all 0.15s;
}
.lm-lock-btn:hover { background: #f1f5f9; }
.lm-lock-btn--locked {
  background: #fef3c7; border-color: #f59e0b; color: #92400e; font-weight: 600;
}

.lm-lane {
  border: 1px solid #e2e8f0; border-radius: 0.5rem; margin-bottom: 1rem;
  overflow: hidden; background: #fff;
}
.lm-lane-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.75rem; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
  font-weight: 600; cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.lm-lane-header:hover { background: #e2e8f0; }
.lm-lane-arrow {
  font-size: 0.7rem; color: #64748b; width: 1rem; text-align: center; flex-shrink: 0;
  transition: transform 0.2s;
}
.lm-lane-title { font-size: 0.95rem; color: #1a237e; }
.lm-lane-count { font-size: 0.8rem; color: #64748b; margin-left: auto; }
.lm-del-lane-btn { font-size: 0.7rem; padding: 0.15rem 0.35rem; line-height: 1; min-height: 0; }

.lm-players { padding: 0.5rem; }

.lm-player {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.5rem; border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.lm-player:last-child { border-bottom: none; }
.lm-player:hover { background: #f8fafc; }
.lm-player--withdrawn { opacity: 0.45; }

.lm-player-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.lm-player-info {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; flex: 1; min-width: 0;
}
.lm-player-idx {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: #e2e8f0; font-size: 0.75rem; font-weight: 700; color: #475569;
  flex-shrink: 0;
}
.lm-player-name { font-weight: 600; font-size: 0.95rem; }
.lm-player-tag {
  font-size: 0.7rem; padding: 0.1rem 0.35rem; border-radius: 0.2rem;
  background: #e2e8f0; color: #475569;
}
.lm-player-tag--bonus { background: #fef3c7; color: #92400e; }
.lm-player-tag--note { background: #e5e7eb; color: #374151; }
.lm-player-tag--jp0 { background: rgba(56,189,248,.2); color: #0ea5e9; }
.lm-player-tag--jp1 { background: rgba(52,211,153,.2); color: #10b981; }
.lm-player-tag--jp2 { background: rgba(251,146,60,.2); color: #f97316; }
.lm-player-tag--jp3 { background: rgba(167,139,250,.2); color: #8b5cf6; }
.lm-player-tag--jp4 { background: rgba(251,113,133,.2); color: #f43f5e; }
.lm-player-tag--jp5 { background: rgba(250,204,21,.2); color: #ca8a04; }
.lm-player-tag--jp6 { background: rgba(45,212,191,.2); color: #14b8a6; }
.lm-player-tag--jp7 { background: rgba(244,114,182,.2); color: #ec4899; }
.lm-player-tag--jp8 { background: rgba(129,140,248,.2); color: #6366f1; }
.lm-player-tag--jp9 { background: rgba(163,230,53,.2); color: #65a30d; }
.lm-player-tag--withdrawn { background: #fee2e2; color: #991b1b; }

/* Edit icon (pen) before player name */
.lm-edit-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; flex-shrink: 0;
  border: none; background: none; cursor: pointer;
  color: #64748b; font-size: 0.85rem;
  border-radius: 0.25rem; transition: background 0.15s, color 0.15s;
  padding: 0;
}
.lm-edit-icon:hover { background: #e2e8f0; color: #1a237e; }

.lm-player-actions {
  display: flex; gap: 0.25rem; flex-wrap: nowrap; flex-shrink: 0;
}
.lm-btn {
  border: 1px solid #cbd5e1; background: #fff; color: #475569;
  padding: 0.15rem 0.4rem; border-radius: 0.25rem; font-size: 0.75rem;
  cursor: pointer; transition: background 0.15s;
}
.lm-btn:hover { background: #f1f5f9; }
.lm-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.lm-btn-remove, .lm-btn-withdraw { color: #dc2626; border-color: #fca5a5; }
.lm-btn-remove:hover, .lm-btn-withdraw:hover { background: #fef2f2; }

/* Move-to-lane picker */
.lm-move-picker {
  display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
  padding: 0.4rem 0; margin-top: 0.2rem;
}
.lm-move-picker__label {
  font-size: 0.8rem; color: #64748b; font-weight: 600; margin-right: 0.1rem;
}
.lm-move-picker__btn {
  padding: 0.3rem 0.6rem; font-size: 0.8rem; border: 1px solid #3b82f6;
  border-radius: 0.25rem; background: #eff6ff; color: #1d4ed8;
  cursor: pointer; transition: background 0.15s;
}
.lm-move-picker__btn:hover { background: #dbeafe; }
.lm-move-picker__cancel {
  padding: 0.3rem 0.6rem; font-size: 0.8rem; border: 1px solid #cbd5e1;
  border-radius: 0.25rem; background: #fff; color: #64748b;
  cursor: pointer;
}
.lm-move-picker__cancel:hover { background: #f1f5f9; }

/* Lane toolbar (expand/collapse all) */
.lm-lane-toolbar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.lm-lane-toolbar .lm-zoom-btn { margin-right: auto; }
.lm-lane-toolbar__btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s;
}
.lm-lane-toolbar__btn:hover { background: #f1f5f9; }

.lm-add-player-btn { margin: 0.5rem; }

/* Add/Edit forms */
.lm-add-form, .lm-edit-form {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.4rem;
  padding: 0.75rem; margin: 0.5rem;
}
.lm-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem; margin-bottom: 0.5rem;
}
.lm-form-field label {
  display: block; font-size: 0.7rem; color: #64748b; margin-bottom: 0.15rem;
}
.lm-input {
  width: 100%; padding: 0.35rem 0.5rem; font-size: 0.85rem;
  border: 1px solid #cbd5e1; border-radius: 0.25rem;
}
.lm-input:focus { border-color: #1a237e; outline: none; box-shadow: 0 0 0 2px rgba(26,35,126,0.15); }
.lm-form-actions { display: flex; gap: 0.4rem; }

/* Score row */
.lm-score-row {
  display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
  margin-top: 0.2rem; padding-left: 1.9rem;
}
.lm-score-cell { display: flex; flex-direction: column; align-items: center; }
.lm-score-label { font-family: 'Chakra Petch', var(--font-sans); font-size: 0.6rem; color: #94a3b8; }
.lm-score-input {
  width: 3.5rem; padding: 0.4rem; text-align: center; font-family: 'Chakra Petch', var(--font-sans); font-size: 1rem; font-weight: 600;
  border: 1px solid #cbd5e1; border-radius: 0.25rem;
  transition: border-color 0.2s, background 0.3s;
  -moz-appearance: textfield;
  appearance: textfield;
}
/* Hide native spinner arrows on score inputs — they steal visual space */
.lm-score-input::-webkit-inner-spin-button,
.lm-score-input::-webkit-outer-spin-button,
.lm-quick-input::-webkit-inner-spin-button,
.lm-quick-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.lm-quick-input { -moz-appearance: textfield; appearance: textfield; }
.lm-score-input:focus { border-color: #1a237e; outline: none; box-shadow: 0 0 0 2px rgba(26,35,126,0.15); }
.lm-score-input--locked { background: #f1f5f9; color: #94a3b8; }
.lm-score-val {
  display: inline-block; width: 3rem; text-align: center;
  font-family: 'Chakra Petch', var(--font-sans); font-size: 0.85rem; color: #334155; font-weight: 500;
}
.lm-score-total {
  display: flex; flex-direction: column; align-items: center;
  margin-left: 0.5rem; padding-left: 0.5rem; border-left: 2px solid #e2e8f0;
}
.lm-score-total-label { font-size: 0.6rem; color: #94a3b8; }
.lm-score-total-val { font-family: 'Chakra Petch', var(--font-sans); font-size: 1rem; font-weight: 700; color: #1a237e; }
.lm-score-total-bonus { font-family: 'Chakra Petch', var(--font-sans); font-size: 0.7rem; color: #92400e; }

/* Zoom mode (toggled by JS) — ~190% size, wraps to 2 rows */
.lm--zoom .lm-score-row { flex-wrap: wrap; gap: 0.4rem; }
.lm--zoom .lm-score-input { width: 5.5rem; padding: 0.7rem; font-size: 1.6rem; }
.lm--zoom .lm-score-label { font-size: 0.9rem; }
.lm--zoom .lm-player-name { font-size: 1.3rem; }
.lm--zoom .lm-player-idx { width: 2rem; height: 2rem; font-size: 1rem; }
.lm--zoom .lm-player-tag { font-size: 0.85rem; }
.lm--zoom .lm-score-cell { flex: 0 0 auto; }

/* Zoom toggle button */
.lm-zoom-btn {
  font-size: 0.8rem; padding: 0.3rem 0.7rem; border: 1px solid #cbd5e1;
  border-radius: 0.3rem; background: #fff; cursor: pointer;
}
.lm-zoom-btn--active { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; }

/* ── Quick scoring mode ──────────────────────────────────────────── */

/* Quick mode toggle button */
.lm-quick-btn {
  font-size: 0.8rem; padding: 0.3rem 0.7rem; border: 1px solid #cbd5e1;
  border-radius: 0.3rem; background: #fff; cursor: pointer; margin-left: 0.3rem;
}
.lm-quick-btn--active { background: #fef3c7; border-color: #f59e0b; color: #92400e; font-weight: 600; }

/* Lane selector */
.lm-quick-lanes {
  display: flex; gap: 0.4rem; padding: 0.5rem 0; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lm-quick-lanes::-webkit-scrollbar { display: none; }
.lm-quick-lane-pill {
  flex: 0 0 auto; padding: 0.45rem 0.9rem; border-radius: 1rem;
  border: 1.5px solid #cbd5e1; background: #fff; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; white-space: nowrap; color: #475569;
}
.lm-quick-lane-pill--active {
  background: #1a237e; color: #fff; border-color: #1a237e;
}

/* Frame selector */
.lm-quick-frames {
  display: flex; align-items: center; gap: 0.25rem; padding: 0.4rem 0;
  overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap;
}
.lm-quick-frames::-webkit-scrollbar { display: none; }
.lm-quick-frame-pill {
  flex: 0 0 auto; padding: 0.35rem 0.6rem; border-radius: 0.5rem;
  border: 1.5px solid #e2e8f0; background: #f8fafc; font-family: 'Chakra Petch', var(--font-sans); font-size: 0.82rem;
  font-weight: 600; cursor: pointer; white-space: nowrap; color: #475569;
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  min-width: 2.5rem; text-align: center;
}
.lm-quick-frame-pill--active {
  background: #1a237e; color: #fff; border-color: #1a237e;
}
.lm-quick-frame-pill--locked {
  opacity: 0.5; background: #f1f5f9;
}
.lm-quick-frame-pill--active.lm-quick-frame-pill--locked {
  opacity: 0.8; background: #64748b; border-color: #64748b;
}
.lm-quick-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #e2e8f0;
}
.lm-quick-dot--partial { background: #fbbf24; }
.lm-quick-dot--done { background: #22c55e; }
.lm-quick-arrow {
  flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid #cbd5e1; background: #fff; font-size: 0.8rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #475569;
}
.lm-quick-arrow:active { background: #e2e8f0; }

/* Locked banner */
.lm-quick-locked-banner {
  background: #fef3c7; border: 1px solid #fde68a; border-radius: 0.5rem;
  padding: 0.5rem 0.75rem; font-size: 0.85rem; color: #92400e;
  text-align: center; margin: 0.4rem 0;
}

/* Player cards */
.lm-quick-players { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.3rem 0; }
.lm-quick-player {
  padding: 0.6rem 0; border-bottom: 1px solid #f1f5f9;
  scroll-margin-bottom: 4rem;
}
.lm-quick-player:last-child { border-bottom: none; }
.lm-quick-player-info {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.4rem;
}
.lm-quick-player-left { display: flex; align-items: center; gap: 0.4rem; flex: 1; min-width: 0; }
.lm-quick-player-idx {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #475569; flex-shrink: 0;
}
.lm-quick-player-name {
  font-size: 1.15rem; font-weight: 600; color: #1e293b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lm-quick-player-total {
  font-family: 'Chakra Petch', var(--font-sans); font-size: 0.85rem; color: #64748b; white-space: nowrap; margin-left: 0.5rem;
}
.lm-quick-input {
  display: block; width: 100%; height: 3rem; padding: 0.5rem;
  text-align: center; font-family: 'Chakra Petch', var(--font-sans); font-size: 2rem; font-weight: 700;
  border: 2px solid #cbd5e1; border-radius: 0.5rem;
  background: #fff; color: #1e293b;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.lm-quick-input:focus {
  border-color: #1a237e; outline: none;
  box-shadow: 0 0 0 3px rgba(26,35,126,0.15);
}
.lm-quick-input--locked {
  background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0;
}
.lm-quick-input::placeholder { color: #cbd5e1; font-weight: 400; font-size: 1rem; }
/* Hide number spinner on quick input */
.lm-quick-input::-webkit-inner-spin-button,
.lm-quick-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lm-quick-input[type=number] { -moz-appearance: textfield; }

/* Floating next button */
.lm-quick-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9000;
  padding: 0.4rem 1rem;
  background: #1e293b;
  border-top: 1px solid #334155;
}
.lm-quick-nav__btn {
  display: block;
  width: 100%;
  height: 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: #3b82f6;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lm-quick-nav__btn:active { background: #2563eb; }

/* Desktop: quick mode 佔滿父容器 */

/* Mobile */
@media (max-width: 640px) {
  .lm-score-row { padding-left: 0; }
  .lm-score-input { width: 3rem; font-size: 0.95rem; }
  .lm--zoom .lm-score-input { width: 5rem; padding: 0.6rem; font-size: 1.4rem; }
  .lm-player-actions { gap: 0.15rem; }
  .lm-btn { padding: 0.3rem 0.5rem; font-size: 0.78rem; min-height: 2rem; }
  .lm-score-label,
  .lm-score-total-label { font-size: 0.7rem; }
  .lm-player-idx { font-size: 0.78rem; }
  .lm-del-lane-btn { font-size: 0.78rem; padding: 0.2rem 0.5rem; }
}

/* ── Share Modal ──────────────────────────────────────────── */
.share-modal {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: share-modal-in .25s ease;
}
@keyframes share-modal-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.share-modal__card {
  background: #fff; border-radius: 1rem; max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.05);
  animation: share-card-in .3s ease;
}
@keyframes share-card-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.share-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.25rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border-radius: 1rem 1rem 0 0;
}
.share-modal__header h3 { color: #fff; font-size: 1.05rem; }
.share-modal__close {
  background: rgba(255,255,255,.15); border: none; font-size: 1.2rem;
  cursor: pointer; color: #fff; line-height: 1;
  width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.share-modal__close:hover { background: rgba(255,255,255,.25); }
.share-modal__body { padding: 1.25rem; }
.share-tpl-btn { flex-shrink: 0; transition: all .2s; }
.share-tpl-btn--active { background: var(--color-primary) !important; color: #fff !important; border-color: var(--color-primary) !important; }
/* Canvas 預覽區 */
.share-modal #share-canvas { border: 1px solid var(--color-border); border-radius: var(--radius-md); }
/* 底部按鈕區 */
.share-modal__actions {
  display: flex; gap: .5rem; margin-top: 1rem;
}
.share-modal__actions .btn { flex: 1; }

/* ── 30. ACCOUNTING TAB ─────────────────────────────────── */
.acct-section { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; }
.acct-section__title { font-size: .95rem; font-weight: 700; color: var(--color-primary); margin: 0 0 .75rem; }
.acct-section--balance { background: var(--color-bg); }
.acct-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; }
.acct-row__main { display: flex; align-items: center; gap: .5rem; }
.acct-row__amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-row__detail { padding: 0 0 .5rem 2.2rem; font-size: .85rem; line-height: 1.6; }
.acct-toggle { background: none; border: 1px solid var(--color-border); border-radius: 4px; width: 1.4rem; height: 1.4rem; cursor: pointer; font-size: .65rem; color: var(--color-text-muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acct-total { display: flex; justify-content: space-between; align-items: center; border-top: 2px solid var(--color-border); margin-top: .75rem; padding-top: .75rem; font-weight: 700; font-size: .95rem; }
.acct-total span { font-variant-numeric: tabular-nums; }
.acct-total--expense span { color: var(--color-danger); }

/* ── 31. HERO BOARD MEDALS (members.html) ─────────────────── */
.hero-medal {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: 1.3rem;
  line-height: 1;
  padding: .15rem .5rem .15rem .35rem;
  border-radius: var(--radius-full);
  position: relative;
  font-weight: 700;
}
.hero-medal__num {
  font-family: 'Chakra Petch', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: rgba(0,0,0,.7);
}
.hero-medal--1 { background: linear-gradient(135deg, #fff4c1, #ffd54f); box-shadow: 0 2px 10px rgba(255,193,7,.35); }
.hero-medal--2 { background: linear-gradient(135deg, #f5f5f5, #c0c0c0); box-shadow: 0 2px 10px rgba(140,140,140,.35); }
.hero-medal--3 { background: linear-gradient(135deg, #ffdcb6, #cd8547); box-shadow: 0 2px 10px rgba(205,133,71,.35); }
.hero-medal--1::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.6) 50%, transparent 60%); animation: hero-medal-shine 3s ease-in-out infinite; pointer-events: none; }
@keyframes hero-medal-shine { 0%, 100% { transform: translateX(-100%); } 50% { transform: translateX(100%); } }

.hero-rank-plain {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* Subtle tint on top-3 rows */
.hero-row--1 { background: linear-gradient(90deg, rgba(255,193,7,.08), transparent 60%); }
.hero-row--2 { background: linear-gradient(90deg, rgba(158,158,158,.08), transparent 60%); }
.hero-row--3 { background: linear-gradient(90deg, rgba(205,133,71,.08), transparent 60%); }

/* ── 32. PAGE TABS — members.html (icon + gold active bar) ── */
#page-tabs.tabs {
  gap: .2rem;
  border-bottom: 2px solid var(--color-border);
}
#page-tabs .tabs__tab {
  position: relative;
  padding: .75rem 1.2rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: color .2s ease;
}
#page-tabs .tabs__tab::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 15%;
  right: 15%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .25s ease;
}
#page-tabs .tabs__tab--active {
  color: var(--color-primary);
}
#page-tabs .tabs__tab--active::before { transform: scaleX(1); }
#page-tabs .tabs__tab:hover:not(.tabs__tab--active) {
  color: var(--color-accent-dark);
}

/* ── 33. PRINT ────────────────────────────────────────────── */
@media print {
  .navbar, .footer, .qr-fab, .toast-container, .ws-status-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ── Features Section CTA (index.html) ── */
.section__subtitle-link {
  color: var(--color-accent-dark);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px dashed var(--color-accent);
  transition: color .15s, border-color .15s;
}
.section__subtitle-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent-dark);
  text-decoration: none;
}
.features-cta {
  margin-top: 2.5rem;
  text-align: center;
}
.features-cta__btn {
  font-size: 1rem;
  padding: .85rem 1.75rem;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  color: #1a1a1a;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255,160,0,.35);
}
.features-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255,160,0,.5);
  color: #1a1a1a;
  text-decoration: none;
}
.features-cta__hint {
  margin-top: .85rem;
  font-size: .85rem;
  color: var(--color-text-muted);
}

/* ============================================================
   34. WELCOME PAGE (welcome.html)
   一頁式滾動介紹，兼任新手導覽 + 行銷頁
   ============================================================ */

.wc-body { background: #fff; }

/* ── Skip bar (only first-visit) ── */
.wc-skipbar {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  color: #1a1a1a;
  font-weight: 600;
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  box-shadow: 0 2px 12px rgba(255,160,0,.25);
}
.wc-skipbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 1rem;
}
.wc-skipbar__hint { font-size: .9rem; }
.wc-skipbar__btn {
  background: rgba(0,0,0,.85);
  color: #ffd740;
  border: none;
  padding: .35rem 1rem;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.wc-skipbar__btn:hover { background: #000; transform: translateX(2px); }
/* 用戶滾到 §2 後主動收掉 — 透明度 + 高度雙 transition，避免 reflow 突兀 */
.wc-skipbar {
  overflow: hidden;
  max-height: 80px;
  transition: max-height .35s ease, opacity .3s ease, padding .35s ease;
}
.wc-skipbar--dismiss {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

/* ── Section base ── */
.wc-section {
  padding: 4.5rem 1rem;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
  scroll-margin-top: var(--nav-h); /* 貼齊 navbar 下緣，無 buffer */
}
.wc-section.wc-in-view { opacity: 1; transform: none; }
.wc-section--alt { background: #f5f6fa; }
.wc-cta { scroll-margin-top: var(--nav-h); }
/* 第一次訪問顯示 skipbar 時，補償其高度以免錨點跳轉內容被遮 */
/* :not([data-dismissed]) — 用戶滾到 §2 觸發收起後，scroll-margin 立即回到 navH */
body:has(.wc-skipbar:not([hidden]):not([data-dismissed])) .wc-section,
body:has(.wc-skipbar:not([hidden]):not([data-dismissed])) .wc-cta {
  scroll-margin-top: calc(var(--nav-h) + 40px);
}

@media (prefers-reduced-motion: reduce) {
  .wc-section { opacity: 1; transform: none; transition: none; }
}

.wc-section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.wc-section__kicker {
  display: inline-block;
  font-family: 'Chakra Petch', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .25em;
  color: var(--color-accent-dark);
  background: rgba(255,160,0,.1);
  padding: .35rem .9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}
.wc-section__kicker--light {
  color: var(--color-accent-light);
  background: rgba(255,215,64,.15);
}
.wc-section__title {
  font-family: 'Chakra Petch', var(--font-sans);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: .75rem;
  line-height: 1.25;
}
.wc-section__subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ── Image placeholder（補圖框）── */
.wc-imgbox {
  width: 100%;
  background: linear-gradient(135deg, #f0f2fa 0%, #e4e8f6 100%);
  border: 2px dashed #b8c0db;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.wc-imgbox:hover {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, #fff8e8 0%, #ffeec4 100%);
}
.wc-imgbox--16x9 { aspect-ratio: 16 / 9; }
.wc-imgbox--4x3  { aspect-ratio: 4 / 3; }
.wc-imgbox--banner { aspect-ratio: 4 / 1; margin-top: 2.5rem; }

.wc-imgbox__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  gap: .4rem;
}
/* 真圖：載入成功時蓋住下面的 placeholder；onerror 會把 <img> 從 DOM 移除，自動退回 placeholder */
.wc-imgbox__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
/* 有圖時 imgbox 可點擊放大 — placeholder 模式不需要 cursor */
.wc-imgbox:has(.wc-imgbox__img) {
  cursor: zoom-in;
}
.wc-imgbox__icon { font-size: 2.6rem; opacity: .55; line-height: 1; }
.wc-imgbox__label {
  font-family: 'Chakra Petch', var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: .02em;
}
.wc-imgbox__hint {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 420px;
}

/* ── Section 1: HERO ── */
.wc-hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 5rem 1rem 6rem;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
}
.wc-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(255,160,0,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(57,73,171,.30) 0%, transparent 70%);
  pointer-events: none;
}
.wc-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.wc-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  padding: .35rem 1rem;
  font-size: .8rem;
  letter-spacing: .15em;
  color: var(--color-accent-light);
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.wc-hero__title {
  font-family: 'Chakra Petch', var(--font-sans);
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.wc-hero__title span {
  display: block;
  background: linear-gradient(90deg, var(--color-accent-light), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: .35rem;
}
.wc-hero__lede {
  font-size: 1.05rem;
  color: rgba(255,255,255,.88);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 540px;
}
.wc-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.wc-hero .btn--secondary {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}
.wc-hero .btn--secondary:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.5);
}

/* Scroll cue */
.wc-scrollcue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,215,64,.6);
  border-radius: 14px;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.wc-scrollcue span {
  width: 4px;
  height: 8px;
  background: var(--color-accent-light);
  border-radius: 2px;
  animation: wc-scroll-bounce 1.6s ease-in-out infinite;
}
@keyframes wc-scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(12px); opacity: .3; }
}

/* ── Section 2: SCENARIOS ── */
.wc-scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.wc-scenario {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.wc-scenario:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.wc-scenario__plan {
  align-self: flex-start;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-family: 'Chakra Petch', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: .35rem .85rem;
  border-radius: var(--radius-full);
}
.wc-scenario__plan--free {
  background: linear-gradient(90deg, var(--color-success), #66bb6a);
}
.wc-scenario__title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}
.wc-scenario__desc {
  font-size: .92rem;
  color: var(--color-text);
  line-height: 1.7;
}
.wc-scenario__feats {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}
.wc-scenario__feats li {
  padding: .3rem 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.wc-scenario__feats li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
}

/* ── Sections 3 / 5 / 6: feature side-by-side ── */
.wc-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}
.wc-feature--reverse .wc-feature__media { order: 2; }
.wc-feature__title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.wc-feature__desc {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.wc-feature__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wc-feature__bullets li {
  padding: .55rem 0 .55rem 1.6rem;
  position: relative;
  border-bottom: 1px solid var(--color-border);
  font-size: .92rem;
  line-height: 1.6;
  color: var(--color-text);
}
.wc-feature__bullets li:last-child { border-bottom: none; }
.wc-feature__bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: .55rem;
  color: var(--color-accent);
  font-weight: 700;
}
.wc-feature__bullets strong { color: var(--color-primary); }

/* ── Section 4: STEPS (4-step comic) ── */
.wc-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
}
.wc-step {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.wc-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.wc-step__num {
  position: absolute;
  top: -.7rem;
  left: 1rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: #1a1a1a;
  font-family: 'Chakra Petch', sans-serif;
  font-size: .9rem;
  font-weight: 800;
  padding: .25rem .7rem;
  border-radius: var(--radius-full);
  letter-spacing: .08em;
  box-shadow: 0 2px 8px rgba(255,160,0,.4);
}
.wc-step__title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
}
.wc-step__desc {
  font-size: .85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Section 7: PLAN TABLE ── */
.wc-plans {
  max-width: 920px;
  margin: 0 auto;
}
.wc-plans__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.wc-plans__table thead th {
  padding: 2rem .75rem 1.25rem; /* top 加大為 ★ 完整功能 標記預留空間 */
  text-align: center;
  background: #f5f6fa;
  border-bottom: 2px solid var(--color-border);
  vertical-align: top;
}
.wc-plans__feat {
  text-align: left !important;
  background: #fff !important;
  font-family: 'Chakra Petch', sans-serif;
  color: var(--color-primary);
  font-size: .85rem;
  letter-spacing: .1em;
}
.wc-plans__col--free { background: linear-gradient(180deg, #e8f5e9, #f5f6fa) !important; }
.wc-plans__col--top {
  background: linear-gradient(180deg, var(--color-accent-light), #f5f6fa) !important;
  position: relative; /* 給 ::before 的 ★ 完整功能 定位用 */
}
.wc-plans__col--top::before {
  content: '★ 完整功能';
  position: absolute;
  top: .5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  letter-spacing: .15em;
  color: var(--color-accent-dark);
  font-weight: 700;
  white-space: nowrap;
}
.wc-plans__plan {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .15em;
  color: var(--color-primary);
  margin-bottom: .25rem;
}
.wc-plans__price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: .25rem;
}
.wc-plans__sub {
  font-size: .75rem;
  color: var(--color-text-muted);
  letter-spacing: .05em;
}
.wc-plans__table tbody td {
  padding: .85rem .75rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  font-size: .92rem;
  color: var(--color-text);
}
.wc-plans__table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--color-primary);
  background: #fafbfd;
}
.wc-plans__table tbody tr:last-child td { border-bottom: none; }
.wc-plans__table tbody tr:hover td { background: #fffaf0; }
.wc-plans__table tbody tr:hover td:first-child { background: #fff5e0; }
.wc-plans__note {
  text-align: center;
  font-size: .82rem;
  color: var(--color-text-muted);
  margin-top: 1.25rem;
}

/* ── Section 8: CTA ── */
.wc-cta {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #2c3e9c 100%);
  color: #fff;
  padding: 5rem 1rem 4rem;
  text-align: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.wc-cta.wc-in-view { opacity: 1; transform: none; }
.wc-cta__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,160,0,.2) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(255,215,64,.15) 0%, transparent 60%);
  pointer-events: none;
}
.wc-cta__inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.wc-cta__title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.7rem, 3.8vw, 2.5rem);
  font-weight: 800;
  line-height: 1.35;
  margin: 1rem 0 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.wc-cta__lede {
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  line-height: 1.75;
  margin-bottom: 2rem;
}
.wc-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}
.wc-cta__primary {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light)) !important;
  color: #1a1a1a !important;
  border: none !important;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(255,160,0,.4);
}
.wc-cta__primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,160,0,.55);
}
.wc-cta .btn--secondary {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}
.wc-cta .btn--secondary:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.5);
}
.wc-cta .btn--ghost {
  background: transparent;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.15);
}
.wc-cta .btn--ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.05);
  text-decoration: none;
}
.wc-cta__contact {
  margin-top: 1.5rem;
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}
.wc-cta__contact a {
  color: var(--color-accent-light);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(255,215,64,.5);
  transition: color .15s, border-color .15s;
}
.wc-cta__contact a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* ── Lightbox（圖片預覽 overlay） ── */
.wc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-out;
  animation: wc-lightbox-in .2s ease;
}
@keyframes wc-lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.wc-lightbox.is-grabbing { cursor: grabbing; }
.wc-lightbox__img {
  max-width: 95vw;
  max-height: 95vh;
  user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
  transform-origin: center center;
  transition: transform .15s ease;
  will-change: transform;
}
.wc-lightbox.is-grabbing .wc-lightbox__img {
  cursor: grabbing;
  transition: none;
}
.wc-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 300;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .15s, color .15s, transform .15s;
}
.wc-lightbox__close:hover {
  background: var(--color-accent);
  color: #1a1a1a;
  transform: scale(1.08);
}
.wc-lightbox__hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .65);
  font-size: .78rem;
  letter-spacing: .05em;
  pointer-events: none;
  background: rgba(0, 0, 0, .45);
  padding: .4rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, .08);
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .wc-lightbox__close { width: 38px; height: 38px; font-size: 1.4rem; top: .75rem; right: .75rem; }
  .wc-lightbox__hint { font-size: .7rem; padding: .3rem .75rem; bottom: .75rem; }
}

/* ── Floating Pager ──
   桌機：右下角浮動橫條，含 ← 1/8 → + 進度條 + 8 點導覽
   手機：底部中央，縮小 + 隱藏進度條 + 隱藏點，只留 ← 1/8 → */
.wc-pager {
  position: fixed;
  z-index: 95;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  background: rgba(10, 12, 26, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 215, 64, .25);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0,0,0,.2);
  color: #fff;
  user-select: none;
  transition: opacity .25s, transform .25s;
}
.wc-pager.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.wc-pager__arrow {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
  flex-shrink: 0;
}
.wc-pager__arrow:hover:not(:disabled) {
  background: var(--color-accent);
  color: #1a1a1a;
  transform: scale(1.08);
}
.wc-pager__arrow:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.wc-pager__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  min-width: 130px;
  padding: 0 .35rem;
}
.wc-pager__counter {
  font-family: 'Chakra Petch', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .08em;
  display: flex;
  align-items: baseline;
  gap: .15rem;
  line-height: 1;
}
.wc-pager__cur {
  color: var(--color-accent-light);
  font-size: 1.15rem;
  text-shadow: 0 0 12px rgba(255, 215, 64, .6);
  min-width: .9em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wc-pager__sep {
  color: rgba(255, 255, 255, .35);
  margin: 0 .15rem;
}
.wc-pager__total {
  color: rgba(255, 255, 255, .65);
}
.wc-pager__bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
  overflow: hidden;
}
.wc-pager__bar-fill {
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  border-radius: 2px;
  transition: width .35s ease;
  box-shadow: 0 0 8px rgba(255, 215, 64, .5);
}
.wc-pager__dots {
  display: flex;
  gap: .35rem;
  margin-top: .1rem;
}
.wc-pager__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
  transition: background .2s, transform .2s, width .2s;
}
.wc-pager__dot:hover {
  background: rgba(255, 215, 64, .6);
  transform: scale(1.3);
}
.wc-pager__dot.is-active {
  background: var(--color-accent-light);
  width: 18px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(255, 215, 64, .6);
}

/* 平板 / 手機：移到底部中央，更緊湊 */
@media (max-width: 768px) {
  .wc-pager {
    right: 50%;
    bottom: 1rem;
    transform: translateX(50%);
    padding: .4rem .55rem;
    gap: .35rem;
    max-width: calc(100vw - 2rem);
  }
  .wc-pager.is-hidden { transform: translateX(50%) translateY(20px); }
  .wc-pager__arrow {
    width: 32px;
    height: 32px;
  }
  .wc-pager__center {
    min-width: 100px;
    padding: 0 .25rem;
    gap: .3rem;
  }
  .wc-pager__counter { font-size: .85rem; }
  .wc-pager__cur { font-size: 1rem; }
  /* 手機隱藏 8 點導覽（畫面不夠），只留進度條 + 數字 */
  .wc-pager__dots { display: none; }
}

/* 極窄螢幕（< 360px）：再簡化 */
@media (max-width: 360px) {
  .wc-pager__bar { display: none; }
  .wc-pager__center { min-width: 70px; gap: 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .wc-hero__inner { grid-template-columns: 1fr; gap: 2rem; }
  .wc-hero__media { order: -1; }
  .wc-feature, .wc-feature--reverse { grid-template-columns: 1fr; gap: 1.5rem; }
  .wc-feature--reverse .wc-feature__media { order: -1; }
  .wc-scenarios { grid-template-columns: 1fr; }
  .wc-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .wc-section { padding: 3rem 1rem; }
  .wc-hero { padding: 3rem 1rem 4rem; }
  .wc-cta { padding: 3.5rem 1rem 3rem; }
  .wc-steps { grid-template-columns: 1fr; }
  .wc-plans__table { font-size: .82rem; }
  .wc-plans__table thead th { padding: .85rem .35rem; }
  .wc-plans__plan { font-size: .8rem; letter-spacing: .08em; }
  .wc-plans__price { font-size: 1rem; }
  .wc-plans__table tbody td { padding: .65rem .35rem; font-size: .82rem; }
  .wc-imgbox__icon { font-size: 2rem; }
  .wc-imgbox__hint { font-size: .72rem; }
  .wc-skipbar__inner { flex-direction: column; gap: .5rem; padding: .6rem .8rem; }
  .wc-skipbar__hint { font-size: .82rem; text-align: center; }
}

/* ============================================================
   35. USER GUIDE TOUR (in-app onboarding)
   半透明背景 + spotlight 鏤空 + popover 跟隨 target
   prototype：先在 customers.html 試用 6 步驟
   ============================================================ */

.ug-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 26, .55);
  z-index: 9000;
  pointer-events: auto;
  animation: ug-fade-in .25s ease;
}
@keyframes ug-fade-in { from { opacity: 0; } to { opacity: 1; } }

.ug-spotlight {
  position: fixed;
  border-radius: 10px;
  pointer-events: none;
  z-index: 9001;
  border: 2px solid var(--color-accent-light);
  box-shadow:
    0 0 0 9999px rgba(10, 12, 26, .68),
    0 0 0 4px rgba(255, 215, 64, .25),
    0 0 24px rgba(255, 160, 0, .5);
  transition: top .35s cubic-bezier(.4,0,.2,1),
              left .35s cubic-bezier(.4,0,.2,1),
              width .35s cubic-bezier(.4,0,.2,1),
              height .35s cubic-bezier(.4,0,.2,1);
  animation: ug-pulse 2.4s ease-in-out infinite;
}
@keyframes ug-pulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(10,12,26,.68), 0 0 0 4px rgba(255,215,64,.25), 0 0 18px rgba(255,160,0,.4); }
  50%      { box-shadow: 0 0 0 9999px rgba(10,12,26,.68), 0 0 0 8px rgba(255,215,64,.18), 0 0 28px rgba(255,160,0,.6); }
}
.ug-spotlight--center {
  /* 中央 popover（無 target）時隱藏 spotlight */
  display: none;
}

.ug-popover {
  position: fixed;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem 1rem;
  max-width: 360px;
  min-width: 260px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,160,0,.2);
  z-index: 9002;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--color-text);
  transition: top .35s cubic-bezier(.4,0,.2,1), left .35s cubic-bezier(.4,0,.2,1);
}

.ug-popover__step {
  display: inline-block;
  font-family: 'Chakra Petch', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--color-accent-dark);
  background: rgba(255,160,0,.12);
  padding: .2rem .55rem;
  border-radius: var(--radius-full);
  margin-bottom: .55rem;
}
.ug-popover__title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: .35rem;
}
.ug-popover__body {
  color: var(--color-text);
  margin-bottom: 1rem;
}
.ug-popover__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.ug-popover__skip {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: .82rem;
  cursor: pointer;
  padding: .35rem 0;
  text-decoration: underline;
}
.ug-popover__skip:hover { color: var(--color-text); }
.ug-popover__nav {
  display: flex;
  gap: .5rem;
}
.ug-popover__btn {
  border: none;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  padding: .45rem 1rem;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.ug-popover__btn:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-1px); }
.ug-popover__btn--prev {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.ug-popover__btn--prev:hover { background: var(--color-bg); color: var(--color-text); transform: none; }

/* 小箭頭（指向 target） */
.ug-popover::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  transform: rotate(45deg);
  z-index: -1;
}
.ug-popover[data-placement="bottom"]::before { top: -8px; left: 24px; border-right: none; border-bottom: none; }
.ug-popover[data-placement="top"]::before    { bottom: -8px; left: 24px; border-left: none; border-top: none; }
.ug-popover[data-placement="left"]::before   { right: -8px; top: 24px; border-left: none; border-bottom: none; }
.ug-popover[data-placement="right"]::before  { left: -8px; top: 24px; border-right: none; border-top: none; }
.ug-popover[data-placement="center"]::before { display: none; }

@media (max-width: 640px) {
  .ug-popover { max-width: calc(100vw - 2rem); padding: .9rem 1rem .85rem; }
  .ug-popover__title { font-size: .98rem; }
  .ug-popover__body { font-size: .85rem; }
}

/* 重看教學 浮動按鈕（角落小圖示） */
.ug-replay-btn {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 290;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: .4rem .85rem;
  font-size: .8rem;
  color: var(--color-text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: background .15s, color .15s;
}
.ug-replay-btn:hover { background: #fff; color: var(--color-primary); border-color: var(--color-accent); }

/* ============================================================
   36. QR SHARE FAB（通用「QR 分享」浮動按鈕 + modal）
   用於 customers.html / 未來其他需要「快速分享觀看連結」的頁面
   staff.html 已有自己的 .staff-fab（不動，避免影響）
   ============================================================ */

.qr-share-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.30), 0 0 0 4px rgba(255,160,0,.12);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.qr-share-fab:hover { background: var(--color-accent); color: #1a1a1a; transform: scale(1.06); }
.qr-share-fab:active { transform: scale(.94); }
.qr-share-fab svg { width: 1.5rem; height: 1.5rem; }

.qr-share-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.qr-share-modal__card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,.32);
  position: relative;
}
.qr-share-modal__title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: .25rem;
}
.qr-share-modal__sub {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-bottom: .75rem;
}
.qr-share-modal__img {
  display: block;
  margin: .75rem auto;
  border: 4px solid var(--color-bg);
  border-radius: .5rem;
}
.qr-share-modal__url {
  font-size: .72rem;
  color: var(--color-text-light);
  word-break: break-all;
  margin: .5rem 0 .85rem;
  font-family: var(--font-mono);
}
.qr-share-modal__actions {
  display: flex;
  gap: .5rem;
  justify-content: center;
}

/* 沒選賽事時自動隱藏 */
.qr-share-fab[hidden] { display: none; }

/* ============================================================
   37. MEMBER BADGES（成就徽章 v1，8 枚）
   用於 members.html 個人檔案「成就徽章」tab
   namespace: .mbadge-* 避免與既有 .badge 衝突
   ============================================================ */

.mbadge-tab-count {
  font-size: .78rem;
  opacity: .7;
  margin-left: .2rem;
}

.mbadge-summary {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .75rem 0 1rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  margin-bottom: 1rem;
}
.mbadge-summary__main {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--color-primary);
}
.mbadge-summary__sub {
  font-size: .85rem;
  color: var(--color-text-muted);
}

.mbadge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 1.2rem .6rem;
  padding: .75rem 0 1.25rem;
}

.mbadge-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .3rem;
  padding: .75rem .3rem .6rem;
  border-radius: .8rem;
  transition: transform .18s ease-out, background .18s;
  cursor: pointer;
  position: relative;
}

.mbadge-cell__img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  padding: 3px;
  transition: transform .25s ease-out, filter .18s, box-shadow .25s;
  will-change: transform;
}
.mbadge-cell__name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--color-text, #1f2937);
  line-height: 1.2;
}
.mbadge-cell__points {
  font-size: .72rem;
  color: var(--color-text-muted);
  letter-spacing: .02em;
}

/* ── Hover: lift + scale + slight rotate (only unlocked) ── */
.mbadge-cell:not(.mbadge-cell--locked):hover { transform: translateY(-3px); }
.mbadge-cell:not(.mbadge-cell--locked):hover .mbadge-cell__img {
  transform: scale(1.10) rotate(-4deg);
}

/* ── Unlocked: bold halo background by rarity ── */
.mbadge-cell--common:not(.mbadge-cell--locked) {
  background: radial-gradient(circle at 50% 45%, rgba(156,163,175,.25), transparent 70%);
}
.mbadge-cell--rare:not(.mbadge-cell--locked) {
  background: radial-gradient(circle at 50% 45%, rgba(59,130,246,.28), transparent 70%);
}
.mbadge-cell--epic:not(.mbadge-cell--locked) {
  background: radial-gradient(circle at 50% 45%, rgba(139,92,246,.32), transparent 70%);
}
.mbadge-cell--legendary:not(.mbadge-cell--locked) {
  background: radial-gradient(circle at 50% 45%, rgba(251,191,36,.38), transparent 70%);
}

/* ── Rarity rings (base, unlocked) ── */
.mbadge-cell--common:not(.mbadge-cell--locked)    .mbadge-cell__img { box-shadow: 0 0 0 3px #9ca3af, 0 0 10px rgba(156,163,175,.5); }
.mbadge-cell--rare:not(.mbadge-cell--locked)      .mbadge-cell__img { box-shadow: 0 0 0 3px #3b82f6, 0 0 14px rgba(59,130,246,.7); }
.mbadge-cell--epic:not(.mbadge-cell--locked)      .mbadge-cell__img { box-shadow: 0 0 0 3px #8b5cf6, 0 0 16px rgba(139,92,246,.75); }
.mbadge-cell--legendary:not(.mbadge-cell--locked) .mbadge-cell__img { box-shadow: 0 0 0 3px #f59e0b, 0 0 20px #fbbf24, 0 0 40px rgba(245,158,11,.6); }

/* ── Legendary: breathing gold pulse ── */
@keyframes mbadge-legendary-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #f59e0b, 0 0 20px #fbbf24, 0 0 40px rgba(245,158,11,.55); }
  50%      { box-shadow: 0 0 0 4px #fbbf24, 0 0 32px #fcd34d, 0 0 60px rgba(251,191,36,.85); }
}
.mbadge-cell--legendary:not(.mbadge-cell--locked) .mbadge-cell__img {
  animation: mbadge-legendary-pulse 2.4s ease-in-out infinite;
}

/* ── Epic: slow purple pulse ── */
@keyframes mbadge-epic-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #8b5cf6, 0 0 16px rgba(139,92,246,.7); }
  50%      { box-shadow: 0 0 0 3px #a78bfa, 0 0 26px rgba(167,139,250,.95); }
}
.mbadge-cell--epic:not(.mbadge-cell--locked) .mbadge-cell__img {
  animation: mbadge-epic-pulse 3.2s ease-in-out infinite;
}

/* ── Locked — fully desaturated + no halo ── */
.mbadge-cell--locked { cursor: default; opacity: .7; }
.mbadge-cell--locked .mbadge-cell__img {
  filter: grayscale(1) opacity(.28);
  box-shadow: 0 0 0 1px rgba(156,163,175,.35);
}
.mbadge-cell--locked .mbadge-cell__name { color: var(--color-text-muted); }

/* ── Tap modal (click a badge to enlarge) ── */
.mbadge-modal {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  animation: mbadge-fade-in .2s ease-out;
}
@keyframes mbadge-fade-in { from { opacity: 0; } to { opacity: 1; } }
.mbadge-modal__card {
  background: var(--color-surface, #fff);
  border-radius: 1.2rem;
  padding: 2rem 1.5rem 1.5rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
  animation: mbadge-pop-in .28s cubic-bezier(.18,1.2,.4,1);
}
@keyframes mbadge-pop-in {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.mbadge-modal__img {
  width: 160px; height: 160px; object-fit: contain;
  border-radius: 50%;
  margin: 0 auto 1rem;
}
.mbadge-modal__img--common    { box-shadow: 0 0 0 4px #9ca3af, 0 0 30px rgba(156,163,175,.5); }
.mbadge-modal__img--rare      { box-shadow: 0 0 0 4px #3b82f6, 0 0 36px rgba(59,130,246,.75); }
.mbadge-modal__img--epic      { box-shadow: 0 0 0 4px #8b5cf6, 0 0 40px rgba(139,92,246,.8);  animation: mbadge-epic-pulse 3.2s ease-in-out infinite; }
.mbadge-modal__img--legendary { box-shadow: 0 0 0 4px #f59e0b, 0 0 50px #fbbf24, 0 0 100px rgba(245,158,11,.7); animation: mbadge-legendary-pulse 2.4s ease-in-out infinite; }
.mbadge-modal__img--locked { filter: grayscale(1) opacity(.45); box-shadow: 0 0 0 2px rgba(156,163,175,.4); animation: none; }
.mbadge-modal__name {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-primary);
  margin: 0 0 .25rem;
}
.mbadge-modal__rarity {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .15rem .6rem;
  border-radius: 999px;
  margin-bottom: .75rem;
  text-transform: uppercase;
}
.mbadge-modal__rarity--common    { background: rgba(156,163,175,.2); color: #6b7280; }
.mbadge-modal__rarity--rare      { background: rgba(59,130,246,.18);  color: #2563eb; }
.mbadge-modal__rarity--epic      { background: rgba(139,92,246,.22);  color: #7c3aed; }
.mbadge-modal__rarity--legendary { background: rgba(245,158,11,.22);  color: #b45309; }
.mbadge-modal__desc {
  font-size: .95rem;
  color: var(--color-text, #374151);
  line-height: 1.5;
  margin-bottom: .5rem;
}
.mbadge-modal__earned {
  font-size: .82rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.mbadge-modal__locked {
  font-size: .85rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}
.mbadge-modal__close {
  width: 100%;
  padding: .6rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: .5rem;
  font-weight: 600;
  cursor: pointer;
  font-size: .95rem;
}
.mbadge-modal__close:hover { filter: brightness(1.08); }

/* Mobile tighter */
@media (max-width: 480px) {
  .mbadge-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 1rem .4rem; }
  .mbadge-cell__img { width: 64px; height: 64px; }
  .mbadge-cell__name { font-size: .8rem; }
  .mbadge-modal__img { width: 128px; height: 128px; }
  .mbadge-modal__name { font-size: 1.25rem; }
}
