/* ==========================================================================
   HopeLands 陣型平台 v0.1 — 樣式表
   主題色（取自聯盟盾徽）：
   - 金色 Gold:      #D6A83A
   - 藍色 Blue:      #1C4A96
   - 綠色 Green:     #2EA05A
   - 深藍底 Navy:    #122040
   ========================================================================== */

:root {
  --bg-deep: #0b152b;
  --bg-navy: #122040;
  --bg-card: #16284f;
  --bg-card-elevated: #1c3363;
  --bg-input: #0e1b36;

  --gold: #d6a83a;
  --gold-light: #f2cf76;
  --gold-dark: #a87f1e;
  --blue: #1c4a96;
  --blue-light: #5c93ed;
  --green: #2ea05a;
  --green-light: #6be098;

  --text-main: #f3f6fc;
  --text-muted: #b2c3e0;
  --text-dim: #849bc2;

  --border-subtle: rgba(138, 174, 232, 0.22);
  --border-gold: rgba(214, 168, 58, 0.55);
  --danger: #f87171;
  --danger-bg: rgba(127, 29, 29, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 10px 28px rgba(4, 10, 24, 0.45);

  /* Modern Web Guidance: form-factor-adaptation target size */
  --target-size: 24px;
}

@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  /* Prevent sticky top header & bottom mobile bar from obscuring focused/anchored elements */
  scroll-padding-top: calc(7.5rem + env(safe-area-inset-top, 0px));
  scroll-padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none;
  }
}

body {
  margin: 0;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  background-color: var(--bg-navy);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(28, 74, 150, 0.42), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(46, 160, 90, 0.16), transparent 40%),
    linear-gradient(180deg, #0d1933 0%, #122040 50%, #0b152b 100%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-wrap: break-word;
  padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
}

/* Modern Web Guidance: form-factor-adaptation */
img,
video,
svg {
  max-inline-size: 100%;
  block-size: auto;
}

:where(a, code) {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  line-height: 1.3;
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

:where(
  button,
  select,
  textarea,
  input:not([type="checkbox"], [type="radio"]),
  [role="button"],
  nav a,
  label:has(input[type="checkbox"], input[type="radio"])
) {
  min-block-size: var(--target-size);
  min-inline-size: var(--target-size);
}

:where([role="button"], nav a, label:has(input[type="checkbox"], input[type="radio"])) {
  display: inline-flex;
  align-items: center;
}

:where(nav, nav ul, .toolbar) {
  display: flex;
  flex-wrap: wrap;
}

:where(.toolbar > :not(button, input, select, textarea, a, [role="button"], label)) {
  min-inline-size: 0;
}

/* Visually hidden utility (accessible to screen readers) */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  background: var(--gold);
  color: #0b152b;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 21, 43, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  min-inline-size: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.brand-title {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge-version {
  font-size: 0.72rem;
  background: var(--blue);
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.header-controls {
  gap: 0.5rem;
  align-items: center;
}

.role-preview-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.control-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.select-compact {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.5rem;
  font-size: 0.8rem;
  max-width: 100%;
}

/* Primary Nav */
.primary-nav {
  background: rgba(18, 32, 64, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  gap: 0.35rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  gap: 0.35rem;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-main);
  background: rgba(28, 74, 150, 0.35);
}

.nav-link.nav-link-feature {
  display: inline-flex;
  align-items: center;
  color: var(--gold-light);
  border-color: var(--border-gold);
  background: rgba(214, 168, 58, 0.1);
}

.nav-link.nav-link-feature:hover,
.nav-link.nav-link-feature:focus-visible {
  color: #0b152b;
  background: var(--gold);
}

.nav-badge {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.22rem 0.4rem;
  border-radius: 999px;
  color: #0b152b;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  white-space: nowrap;
}

.nav-link.nav-link-feature:hover .nav-badge,
.nav-link.nav-link-feature:focus-visible .nav-badge {
  color: var(--gold-light);
  background: #0b152b;
}

.bottom-nav-item.bottom-nav-feature {
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px var(--border-gold);
  background: rgba(214, 168, 58, 0.1);
}

.nav-link.is-active {
  color: #0b152b;
  background: var(--gold);
  border-color: var(--gold-light);
  font-weight: 700;
}

.nav-num {
  font-size: 0.72rem;
  opacity: 0.8;
}

/* Mobile quick hides to keep 375px header compact */
@media (max-width: 640px) {
  .primary-nav {
    display: none;
  }
  .control-label {
    display: none;
  }
  .header-inner {
    padding-block: 0.45rem;
    gap: 0.45rem;
  }
  .brand-logo {
    width: 34px;
    height: 34px;
  }
  .brand-title {
    font-size: 1rem;
  }
  .brand-subtitle {
    font-size: 0.72rem;
  }
  .header-controls {
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .role-preview-control {
    flex: 1 1 0;
    min-inline-size: 0;
  }
  .select-compact {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.25rem 0.35rem;
  }
  .header-controls .btn-sm {
    font-size: 0.75rem;
    padding: 0.28rem 0.5rem;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25;
  transition: transform 0.1s, background-color 0.15s, border-color 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.38rem 0.72rem;
}

.btn-gold {
  background: linear-gradient(180deg, #e5ba4c 0%, #c99625 100%);
  color: #0a1428;
  border-color: #f6d889;
  box-shadow: 0 2px 10px rgba(214, 168, 58, 0.25);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: linear-gradient(180deg, #f0c965 0%, #d6a83a 100%);
}

.btn-green {
  background: linear-gradient(180deg, #36b567 0%, #25894b 100%);
  color: #ffffff;
  border-color: #6be098;
}

.btn-green:hover,
.btn-green:focus-visible {
  background: linear-gradient(180deg, #42c775 0%, #2ea05a 100%);
}

.btn-outline {
  background: rgba(14, 27, 54, 0.75);
  color: var(--text-main);
  border-color: rgba(138, 174, 232, 0.4);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(28, 74, 150, 0.35);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(28, 74, 150, 0.45);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.badge-gold {
  background: rgba(214, 168, 58, 0.2);
  color: var(--gold-light);
  border-color: var(--border-gold);
}

.badge-green {
  background: rgba(46, 160, 90, 0.22);
  color: var(--green-light);
  border-color: rgba(46, 160, 90, 0.6);
}

.badge-blue {
  background: rgba(28, 74, 150, 0.55);
  color: #bae6fd;
  border-color: rgba(92, 147, 237, 0.55);
}

/* ==========================================================================
   Page Sections & Indicators
   ========================================================================== */
.page-section {
  padding-block: 2.25rem;
  border-bottom: 1px solid rgba(138, 174, 232, 0.15);
}

.page-section[hidden] {
  display: none !important;
}

.page-indicator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.page-step {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0b152b;
  background: var(--gold);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}

.page-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.section-header {
  margin-bottom: 1.35rem;
}

.section-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: var(--gold-light);
  margin-bottom: 0.45rem;
}

.section-desc {
  color: var(--text-muted);
  margin: 0;
  max-width: 72ch;
}

.section-block {
  margin-top: 2rem;
}

.subsection-title {
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 0.9rem;
}

/* ==========================================================================
   Modern Web Guidance: Card Component (<article class="card">)
   ========================================================================== */
.card {
  container-type: inline-size;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* ==========================================================================
   PAGE 01: Hero & Recruitment
   ========================================================================== */
.hero-card {
  background: linear-gradient(145deg, rgba(28, 74, 150, 0.45) 0%, rgba(18, 32, 64, 0.92) 65%, rgba(11, 21, 43, 0.96) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  box-shadow: var(--shadow-card);
}

@media (min-width: 920px) {
  .hero-card {
    grid-template-columns: 1.55fr 0.85fr;
    align-items: center;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-light);
  background: rgba(46, 160, 90, 0.16);
  border: 1px solid rgba(46, 160, 90, 0.45);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.45rem, 3.6vw, 2.2rem);
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.hero-lead {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  font-size: 0.96rem;
}

.fact-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.fact-badge {
  background: rgba(11, 21, 43, 0.7);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.fact-value {
  font-weight: 800;
  font-size: 1rem;
  color: var(--gold-light);
}

.fact-label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.join-cta-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(11, 21, 43, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem;
}

.join-clan-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.join-clan-row-sub {
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(138, 174, 232, 0.25);
}

.join-badge-gold,
.join-badge-green {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.25rem;
}

.join-badge-gold {
  background: var(--gold);
  color: #0b152b;
}

.join-badge-green {
  background: var(--green);
  color: #ffffff;
}

.join-clan-title {
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

.clan-tag-code {
  color: var(--gold-light);
  background: rgba(214, 168, 58, 0.14);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.join-clan-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.join-clan-actions {
  gap: 0.5rem;
}

.shield-showcase {
  background: rgba(11, 21, 43, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.hero-shield-img {
  width: 148px;
  height: 148px;
  border-radius: 16px;
  border: 2px solid var(--border-gold);
}

.shield-caption strong {
  display: block;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}

.shield-caption p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

/* 4-column responsive grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.feature-card header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.08rem;
  color: #fff;
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #0f2c5c);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Schedule Banner */
.schedule-banner {
  background: linear-gradient(135deg, rgba(22, 40, 79, 0.95), rgba(14, 27, 54, 0.95));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 820px) {
  .schedule-banner {
    grid-template-columns: 0.9fr 1.4fr;
    align-items: center;
  }
}

.schedule-intro h2 {
  font-size: 1.25rem;
  margin-block: 0.4rem;
  color: var(--gold-light);
}

.schedule-intro p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.schedule-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.schedule-item {
  background: rgba(11, 21, 43, 0.78);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}

.schedule-date {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--green-light);
}

.schedule-time {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-block: 0.15rem 0.4rem;
}

.schedule-detail strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.schedule-detail p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Recruit templates drawer */
.recruit-copy-drawer {
  margin-top: 1.35rem;
  background: rgba(14, 27, 54, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.recruit-drawer-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold-light);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.drawer-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.recruit-templates-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
}

.template-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.template-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.84rem;
}

.template-pre {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem;
  border-radius: 6px;
}

/* ==========================================================================
   PAGE 02: Clans & League Tiers
   ========================================================================== */
.league-tier-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.league-tier-pill {
  background: rgba(14, 27, 54, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tier-champ1 { border-left: 4px solid var(--gold); }
.tier-champ2 { border-left: 4px solid #f59e0b; }
.tier-champ3 { border-left: 4px solid var(--blue-light); }
.tier-master { border-left: 4px solid var(--green); }

.tier-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.clans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.clan-card-highlight {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(28, 51, 99, 0.95) 0%, rgba(22, 40, 79, 0.95) 100%);
}

.clan-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.clan-card-header h3 {
  margin-bottom: 0.2rem;
  font-size: 1.18rem;
}

.clan-tag-line {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gold-light);
}

.clan-meta-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.86rem;
}

.clan-meta-list div {
  display: grid;
  grid-template-columns: 4.8rem 1fr;
  gap: 0.4rem;
}

.clan-meta-list dt {
  color: var(--text-dim);
  font-weight: 600;
}

.clan-meta-list dd {
  margin: 0;
  color: var(--text-main);
}

.clan-card-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   PAGE 03: Base Vault (陣型庫)
   ========================================================================== */
.badge-sample-inline {
  font-size: 0.78rem;
  background: var(--gold);
  color: #0b152b;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  vertical-align: middle;
}

.filter-panel {
  background: rgba(11, 21, 43, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.75rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.filter-group select {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 0.88rem;
  width: 100%;
}

.filter-status-bar {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.filter-count {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 700;
}

.bases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 1.15rem;
}

/* Modern Web Guidance: dynamic-sort view-transition-name */
.base-card {
  view-transition-name: match-element;
  padding: 0;
  overflow: clip;
  border-color: rgba(214, 168, 58, 0.35);
}

.base-card[hidden] {
  display: none !important;
}

/* Direct child <img> of <article class="card base-card"> (Modern Web Guidance: card) */
.base-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-subtle);
  background: #0b162c;
}

.base-card-header,
.base-card-content,
.base-card-footer {
  padding-inline: 1.05rem;
}

.base-card-header {
  padding-top: 0.85rem;
}

.base-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.badge-sample {
  background: var(--gold);
  color: #0b152b;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.badge-th {
  background: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.badge-tier {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
}

.tier-s {
  background: rgba(214, 168, 58, 0.25);
  color: #fde68a;
  border: 1px solid var(--gold);
}

.tier-a {
  background: rgba(46, 160, 90, 0.25);
  color: #a7f3d0;
  border: 1px solid var(--green);
}

.tier-b {
  background: rgba(92, 147, 237, 0.25);
  color: #bae6fd;
  border: 1px solid var(--blue-light);
}

.badge-defense {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.base-card-title {
  font-size: 1.12rem;
  margin-bottom: 0.4rem;
  color: #fff;
}

.base-modes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mode-tag,
.patch-tag {
  font-size: 0.74rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

.mode-tag {
  background: rgba(28, 74, 150, 0.45);
  color: #dbeafe;
}

.patch-tag {
  background: rgba(46, 160, 90, 0.18);
  color: var(--green-light);
}

.score-difficulty-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  background: rgba(11, 21, 43, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
}

.score-pill,
.difficulty-pill {
  display: flex;
  flex-direction: column;
}

.score-label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.score-num {
  font-size: 1.12rem;
  color: var(--gold-light);
}

.diff-hardest strong { color: #fca5a5; }
.diff-hard strong { color: #fcd34d; }
.diff-medium strong { color: var(--green-light); }

.base-summary {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-block: 0 0.65rem;
}

.base-details-dl {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.base-details-dl div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.35rem;
}

.base-details-dl dt {
  color: var(--text-dim);
  font-weight: 600;
}

.base-details-dl dd {
  margin: 0;
}

.base-details-dl a {
  color: var(--gold-light);
}

.report-stats-box {
  background: rgba(11, 21, 43, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}

.report-stats-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  margin-bottom: 0.45rem;
}

.avg-stars-badge {
  color: var(--gold-light);
  font-weight: 700;
}

.star-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.star-chip {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 0.2rem 0.35rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.star-chip strong {
  color: #fff;
}

.base-card-footer {
  margin-top: auto;
  padding-block: 0.85rem;
  background: rgba(11, 21, 43, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.base-card-footer .btn {
  flex: 1 1 130px;
}

/* Container query for wide single-card layout */
@container (inline-size > 36rem) {
  .score-difficulty-box {
    grid-template-columns: 9rem 1fr;
  }
}

/* ==========================================================================
   PAGE 04: Featured Recommendations (本期推薦)
   ========================================================================== */
.featured-issue-banner {
  background: linear-gradient(160deg, rgba(28, 51, 99, 0.92), rgba(14, 27, 54, 0.96));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.5vw, 1.65rem);
  box-shadow: var(--shadow-card);
}

.issue-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.issue-main-title {
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  margin-block: 0.35rem 0;
  color: #fff;
}

.issue-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.date-chip {
  background: rgba(11, 21, 43, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.date-chip strong {
  color: var(--gold-light);
}

.issue-summary-text {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.meta-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.meta-box {
  background: rgba(11, 21, 43, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}

.meta-hard {
  border-left: 4px solid var(--green);
}

.meta-easy {
  border-left: 4px solid var(--gold);
}

.meta-box h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.meta-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.featured-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.featured-mini-card {
  background: rgba(11, 21, 43, 0.82);
  padding: 0.95rem;
}

.featured-mini-card h4 {
  font-size: 0.98rem;
  margin-block: 0.35rem 0;
}

.featured-mini-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.featured-mini-card footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.history-item.is-selected {
  border-color: var(--gold);
  background: rgba(28, 51, 99, 0.88);
}

.history-item h4 {
  font-size: 1rem;
  margin-block: 0.35rem 0;
}

.history-item p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   PAGE 05: Membership & Registration Form (validate-input-after-interaction)
   ========================================================================== */
.tier-cards-grid {
  margin-bottom: 1.5rem;
}

.tier-card {
  position: relative;
}

.tier-card-top {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(28, 51, 99, 0.95), rgba(22, 40, 79, 0.95));
}

.tier-level-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.tier-tag-blue {
  background: var(--blue);
  color: #fff;
}

.tier-tag-gold {
  background: var(--gold);
  color: #0b152b;
}

.tier-cond {
  font-size: 0.84rem;
  color: var(--gold-light);
  margin-block: 0 0.5rem;
}

.tier-perks {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.membership-form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 880px) {
  .membership-form-layout {
    grid-template-columns: 1.25fr 0.95fr;
    align-items: start;
  }
}

.form-card,
.passkey-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  box-shadow: var(--shadow-card);
}

.form-card-head h3,
.passkey-info-card h3 {
  margin-block: 0.4rem;
  color: var(--gold-light);
}

.form-card-head p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.field {
  margin-bottom: 1.05rem;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.req-star {
  color: var(--gold);
}

.opt-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Modern Web Guidance: validate-input-after-interaction
   Format hints placed ABOVE the input so mobile keyboards/autocomplete popovers do not cover them */
.hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.field input:not([type="checkbox"], [type="radio"]),
.field select,
.field textarea,
.full-width-select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1.5px solid rgba(138, 174, 232, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.field input[type="file"] {
  padding: 0.45rem;
  font-size: 0.84rem;
}

.error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.84rem;
  margin-top: 0.35rem;
  font-weight: 600;
}

/* Modern Web Guidance: :is(:user-invalid, .user-invalid-fallback) */
:is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger) !important;
  background-color: var(--danger-bg) !important;
}

:is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}

:is(:user-valid, .user-valid-fallback) {
  border-color: var(--green) !important;
}

.screenshot-preview {
  margin-top: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(46, 160, 90, 0.15);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--green-light);
}

.form-actions {
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.reg-result-box {
  margin-top: 1rem;
  padding: 0.9rem;
  background: rgba(46, 160, 90, 0.18);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.passkey-feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.passkey-feature-list li {
  background: rgba(11, 21, 43, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.passkey-feature-list strong {
  color: #fff;
  font-size: 0.9rem;
}

.passkey-feature-list span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.passkey-demo-box {
  background: rgba(28, 74, 150, 0.28);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}

.passkey-demo-box h4 {
  margin-bottom: 0.3rem;
  color: var(--gold-light);
}

.passkey-demo-box p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-block: 0 0.65rem;
}

/* ==========================================================================
   PAGE 06: Sources & Credits (來源與致謝)
   ========================================================================== */
.creator-policy-banner {
  background: linear-gradient(135deg, rgba(214, 168, 58, 0.16), rgba(18, 32, 64, 0.92));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.policy-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.policy-text h3 {
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}

.policy-text p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.table-scroll-region {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(11, 21, 43, 0.75);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 540px;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.data-table th {
  background: rgba(28, 74, 150, 0.38);
  color: var(--gold-light);
  font-weight: 700;
}

.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.95rem;
}

.creator-card h4 {
  font-size: 1.12rem;
  margin-block: 0.35rem 0.15rem;
  color: #fff;
}

.creator-region {
  font-size: 0.8rem;
  color: var(--gold-light);
  margin: 0;
}

.creator-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

.creator-card footer {
  margin-top: auto;
  padding-top: 0.45rem;
}

.creator-card-featured {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(28, 51, 99, 0.92), rgba(22, 40, 79, 0.95));
}

/* ==========================================================================
   Footer & Mobile Bottom Bar
   ========================================================================== */
.site-footer {
  background: #081021;
  border-top: 1px solid var(--border-subtle);
  padding-block: 1.75rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand strong {
  color: var(--gold-light);
  display: block;
}

.footer-brand p {
  margin: 0;
  font-size: 0.8rem;
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
}

.disclaimer-primary,
.disclaimer-en {
  margin-block: 0 0.35rem;
}

.footer-disclaimer a {
  color: var(--gold-light);
}

/* Mobile Fixed Bottom Nav (Modern Web Guidance: safe-area-inset padding) */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(9, 17, 36, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-gold);
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(0.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 900px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding-block: 0.35rem;
  padding-inline: 0.7rem;
  flex: 1 0 auto;
  white-space: nowrap;
  border-radius: 6px;
}
.mobile-bottom-nav::-webkit-scrollbar { display: none; }

.bottom-nav-num {
  font-size: 0.65rem;
  opacity: 0.75;
}

.bottom-nav-item.is-active {
  color: var(--gold-light);
  background: rgba(214, 168, 58, 0.16);
}

/* ==========================================================================
   Dialogs (<dialog closedby="any">) & Choice Cards
   ========================================================================== */
dialog {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0;
  width: min(92vw, 500px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
}

dialog::backdrop {
  background-color: rgba(6, 12, 26, 0.78);
  backdrop-filter: blur(4px);
}

.dialog-inner {
  padding: 1.2rem;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dialog-header h2 {
  font-size: 1.15rem;
  margin: 0;
  color: var(--gold-light);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.dialog-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-block: 0 1rem;
}

.star-choice-fieldset {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin: 0 0 1rem;
}

.star-choice-fieldset legend {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
  padding-inline: 0.35rem;
}

.star-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
}

/* Modern Web Guidance: Choice cards — never change layout-affecting properties on selection */
.choice-card {
  padding: 0.55rem 0.7rem;
  background: rgba(11, 21, 43, 0.75);
  border: 2px solid transparent;
  cursor: pointer;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}

.choice-card:has(> :checked) {
  border-color: var(--gold);
  background: rgba(214, 168, 58, 0.14);
}

.choice-card span {
  display: flex;
  flex-direction: column;
}

.choice-card strong {
  font-size: 0.86rem;
}

.choice-card small {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.dialog-actions {
  gap: 0.55rem;
  margin-top: 1rem;
}

.sim-step {
  background: rgba(11, 21, 43, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  margin-bottom: 0.75rem;
}

.sim-step strong {
  display: block;
  font-size: 0.88rem;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}

.sim-step p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-block: 0 0.5rem;
}

.sim-status-text {
  color: var(--green-light) !important;
  font-weight: 600;
  margin-bottom: 0 !important;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: calc(4.8rem + env(safe-area-inset-bottom, 0px));
  right: 1rem;
  left: 1rem;
  max-width: 380px;
  margin-inline: auto;
  z-index: 90;
  background: #102a1e;
  color: #d1fae5;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   本期推薦（編輯精選）與 陣型庫（密集清單） — 2026-11-19 改版
   ========================================================================== */
.lv-pro { background: rgba(214, 168, 58, 0.9); color: #1a1205; }
.lv-record { background: rgba(46, 160, 90, 0.9); color: #04140a; }
.lv-explain { background: var(--blue); color: var(--text-main); }
.lv-legend { background: rgba(150, 90, 200, 0.9); color: #fff; }
.lv-share { background: #4a6a8a; color: #fff; }
.lv-compilation { background: #34405c; color: var(--text-muted); }

.featured-rows { display: flex; flex-direction: column; gap: 2.25rem; }
/* #5324 兩區：本期推薦（近 30 天高分累積榜）／今日推薦（這一期新陣型） */
.feat-zone { display: flex; flex-direction: column; gap: 1.1rem; }
.feat-zone-head { border-left: 3px solid var(--gold); padding-left: 0.75rem; }
.feat-zone-title { font-size: 1.3rem; color: var(--gold-light); margin: 0 0 0.3rem; }
.feat-zone-head .feat-row-note { margin: 0; }
.feat-rank {
  display: inline-block; margin-right: 0.5rem; padding: 0.05rem 0.45rem;
  background: rgba(4, 10, 24, 0.55); border-radius: 999px; font-size: 0.78rem; font-weight: 800;
  vertical-align: baseline;
}
.feat-rank.r1 { background: linear-gradient(135deg, #f7d979, #c99216); color: #2a1a00; }
.feat-rank.r2 { background: linear-gradient(135deg, #e6ecf5, #9fb0c6); color: #1b2435; }
.feat-rank.r3 { background: linear-gradient(135deg, #e2a978, #a9682f); color: #241202; }
.feat-patch { margin: 0; font-size: 0.8rem; color: var(--text-dim); }
.feat-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; }
.feat-chips li {
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  background: rgba(214, 168, 58, 0.1); border: 1px solid rgba(214, 168, 58, 0.28);
  border-radius: 999px; padding: 0.1rem 0.55rem;
}
.feat-rec { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--text-main); }
.feat-rec strong { color: var(--gold-light); }
.feat-bar {
  flex: 1; min-width: 70px; height: 7px; margin-left: 0.55rem;
  background: rgba(255, 255, 255, 0.09); border-radius: 999px; overflow: hidden;
}
.feat-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.feat-parts { margin: 0; font-size: 0.78rem; line-height: 1.5; color: var(--text-dim); }
.feat-ev { font-size: 0.8rem; color: var(--text-dim); }
.feat-ev summary { cursor: pointer; color: var(--gold-light); font-weight: 700; }
.feat-ev p { margin: 0.4rem 0 0; line-height: 1.55; }
.feat-row .subsection-title { margin-bottom: 0.4rem; }
.feat-row-count { color: var(--text-dim); font-size: 0.8rem; font-weight: 600; }
.feat-row-note { color: var(--text-dim); font-size: 0.85rem; margin: 0 0 0.6rem; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}
.feat-card { padding: 0; overflow: clip; display: flex; flex-direction: column; border-color: rgba(214, 168, 58, 0.35); }
.feat-band { padding: 0.45rem 0.9rem; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em; }
.feat-img { position: relative; display: block; background: #0b162c; }
.feat-img img { width: 100%; height: auto; aspect-ratio: 1000 / 720; object-fit: cover; display: block; }
.feat-img-tag {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(4, 10, 24, 0.72); color: #fff;
  font-size: 0.72rem; padding: 2px 8px; border-radius: 6px;
}
.feat-img-ph {
  aspect-ratio: 1000 / 720; display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 0.85rem; border-bottom: 1px solid var(--border-subtle);
}
.feat-body { padding: 0.8rem 0.95rem 0.95rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.feat-who { font-size: 0.9rem; color: var(--text-muted); display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.feat-who a { color: var(--gold-light); font-weight: 700; }
.feat-th { margin-left: auto; font-size: 0.75rem; color: var(--text-dim); font-weight: 700; }
.feat-why { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--text-main); }
.feat-score { display: flex; align-items: center; }
.feat-why strong { color: var(--gold-light); }
.feat-score strong { font-size: 1.5rem; color: var(--gold); font-weight: 800; }
.feat-score small { color: var(--text-dim); }
.feat-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.feat-seg { font-size: 0.85rem; color: var(--blue-light); }
.featured-more {
  margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--border-subtle);
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
}
.featured-member-note { color: var(--text-muted); font-size: 0.9rem; }

.lib-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.lib-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto auto;
  gap: 0.75rem; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 0.4rem 0.6rem 0.4rem 0.4rem;
}
.lib-thumb { display: block; width: 112px; aspect-ratio: 1000 / 720; border-radius: 6px; overflow: hidden; background: #0b162c; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-thumb-ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 0.7rem; color: var(--text-dim); line-height: 1.3;
}
.lib-main { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.lib-line { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lib-badge { font-size: 0.72rem; font-weight: 800; padding: 0.1rem 0.45rem; border-radius: 4px; }
.lib-meta { font-size: 0.78rem; color: var(--text-dim); }
.lib-who { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-who a { color: var(--text-main); }
.lib-score { text-align: right; white-space: nowrap; }
.lib-score strong { font-size: 1.15rem; color: var(--gold); font-weight: 800; }
.lib-score small { color: var(--text-dim); font-size: 0.72rem; margin-left: 2px; }
.lib-foot { margin-top: 1rem; color: var(--text-dim); font-size: 0.85rem; }

@media (max-width: 640px) {
  .lib-row { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 0.55rem; }
  .lib-thumb { width: 96px; grid-row: span 2; }
  .lib-copy { grid-column: 2 / 4; justify-self: end; }
  .lib-row .lib-score { grid-column: 3; grid-row: 1; }
}


.hero-lead.hero-perk{margin-top:10px;padding:10px 14px;border-left:3px solid #f5b301;background:rgba(245,179,1,.08);border-radius:6px}

/* ==========================================================================
   PAGE: 打法流派 (#5269)
   ========================================================================== */
.style-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.style-card.is-baseline { border-color: var(--border-gold); }
.style-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.style-name { font-size: 1.08rem; color: var(--gold-light); margin: 0; line-height: 1.4; }
.style-nick { color: var(--text-muted); font-size: 0.9rem; font-weight: 400; }
.style-score { flex: none; text-align: center; border: 1px solid var(--border-gold); border-radius: var(--radius-sm); padding: 0.2rem 0.55rem; line-height: 1.1; }
.style-score strong { display: block; font-size: 1.35rem; color: var(--gold); }
.style-score span { font-size: 0.72rem; color: var(--text-muted); }
.style-card .badge-pill { align-self: flex-start; }
.style-idea { margin: 0; }
.style-army, .style-videos { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; display: grid; gap: 0.3rem; }
.style-army li { color: var(--text-muted); overflow-wrap: anywhere; }
.style-videos li a { color: var(--gold-light); }
.style-vid-note { color: var(--text-muted); font-size: 0.82rem; margin-left: 0.4rem; }
/* 打法流派：重點圖＋影片時間點 (#5277) */
.style-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.style-shots a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-gold); background: #000; cursor: zoom-in; }
.style-shots img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.style-shot-cap { display: block; font-size: 0.72rem; line-height: 1.3; color: var(--text-muted); padding: 0.2rem 0.35rem; }
.style-marks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.style-marks a { display: inline-block; font-size: 0.82rem; padding: 0.2rem 0.55rem; border: 1px solid var(--border-gold); border-radius: 999px; color: var(--gold-light); text-decoration: none; }
.style-marks a:hover { background: rgba(255, 215, 0, 0.08); }
@media (max-width: 420px) { .style-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   PAGE: 小隊圖鑑 (#5292)
   ========================================================================== */
.sq-intro { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (min-width: 900px) { .sq-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sq-panel-wide { grid-column: 1 / -1; } }
.sq-panel h3 { margin: 0 0 0.6rem; font-size: 1.02rem; color: var(--gold-light); }
.sq-rules, .sq-abil { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--text-muted); }
.sq-abil li strong { color: var(--text-main); margin-right: 0.45rem; }
.sq-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .sq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .sq-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sq-card { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; background: linear-gradient(180deg, var(--bg-card-elevated), var(--bg-card)); border-color: var(--border-gold); }
.sq-head { display: flex; align-items: center; gap: 0.75rem; }
.sq-emblem { flex: none; width: 56px; height: 63px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45)); }
.sq-em-lbl { font-size: 10px; fill: var(--gold-light); font-weight: 700; }
.sq-em-num { font-size: 24px; fill: #fff; font-weight: 800; }
.sq-title { flex: 1; min-width: 0; }
.sq-name { margin: 0; font-size: 1.12rem; color: var(--gold-light); line-height: 1.35; }
.sq-en { margin: 0; font-size: 0.78rem; color: var(--text-dim); }
.sq-req { margin: 0.15rem 0 0; font-size: 0.84rem; color: var(--text-muted); }
.sq-req strong { color: var(--text-main); }
.sq-hs { flex: none; text-align: center; border: 1px solid var(--border-gold); border-radius: var(--radius-sm); padding: 0.2rem 0.55rem; line-height: 1.1; }
.sq-hs strong { display: block; font-size: 1.35rem; color: var(--gold); }
.sq-hs span { font-size: 0.72rem; color: var(--text-muted); }
.sq-short { margin: 0; font-size: 0.9rem; color: var(--text-muted); font-style: italic; }
.sq-block h4 { margin: 0 0 0.4rem; font-size: 0.86rem; color: var(--gold); letter-spacing: 0.04em; }
.sq-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sq-chips li { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: rgba(28, 74, 150, 0.45); border: 1px solid var(--border-subtle); font-size: 0.88rem; }
.sq-chip-n { color: var(--gold-light); font-weight: 800; }
.sq-note { margin: 0.35rem 0 0; font-size: 0.78rem; color: var(--text-dim); line-height: 1.5; }
.sq-na { color: #f2b56b; font-weight: 700; }
.sq-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
.sq-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.sq-table th, .sq-table td { padding: 0.4rem 0.45rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-subtle); }
.sq-table thead th { background: rgba(214, 168, 58, 0.14); color: var(--gold-light); white-space: nowrap; }
.sq-table tbody th { color: var(--text-main); white-space: nowrap; }
.sq-table td { color: var(--text-muted); }
.sq-table small { display: block; color: var(--text-dim); font-size: 0.72rem; overflow-wrap: anywhere; }
.sq-table tbody tr:last-child th, .sq-table tbody tr:last-child td { border-bottom: 0; }
.sq-lore summary { cursor: pointer; font-size: 0.82rem; color: var(--gold-light); }
.sq-lore p { margin: 0.4rem 0 0; font-size: 0.84rem; color: var(--text-muted); }
.sq-note code { font-size: 0.72rem; color: var(--text-muted); overflow-wrap: anywhere; }
.sq-table td:last-child { min-width: 5.5em; }
.sq-panel .sq-table td:last-child { min-width: 7em; }
.sq-skill { position: relative; padding: 0.6rem 0.75rem 0.6rem 0.85rem; border-radius: var(--radius-sm); background: linear-gradient(90deg, rgba(214, 168, 58, 0.22), rgba(214, 168, 58, 0.04)); border-left: 3px solid var(--gold); }
.sq-skill strong { font-size: 1.02rem; color: var(--gold-light); }
.sq-skill p { margin: 0.25rem 0 0; font-size: 0.86rem; color: var(--text-main); }
.sq-skill-tag { float: right; font-size: 0.7rem; padding: 0.05rem 0.45rem; border-radius: 999px; border: 1px solid var(--border-gold); color: var(--gold-light); }
.sq-abil li em { display: block; font-style: normal; font-size: 0.78rem; color: var(--gold-light); }
.sq-portrait { position: relative; flex: 0 0 auto; width: 76px; height: 76px; }
.sq-thumb { width: 76px; height: 76px; display: block; border-radius: 14px; background: radial-gradient(circle at 50% 35%, rgba(214, 168, 58, 0.28), rgba(20, 16, 36, 0.9)); border: 2px solid var(--border-gold); object-fit: contain; }
.sq-pbadge { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); white-space: nowrap; font-size: 0.66rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px; background: #2a1f4a; border: 1px solid var(--gold); color: var(--gold-light); }
.sq-abil li em { display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; margin-top: 0.25rem; }
.sq-mini { display: inline-flex; align-items: center; gap: 0.3rem; }
.sq-mini-img { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-gold); background: rgba(20, 16, 36, 0.8); }
/* #5293 無課推薦 */
.f2p { margin-bottom: 1.5rem; padding: 1.4rem; border: 2px solid var(--gold); box-shadow: 0 0 0 1px rgba(214, 168, 58, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35); }
.f2p-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.f2p-head h3 { margin: 0; color: var(--gold-light); font-size: 1.25rem; }
.f2p h4 { color: var(--gold); margin: 1.3rem 0 0.6rem; }
.f2p-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.f2p-pick { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem; border-radius: 14px; background: rgba(20, 16, 36, 0.55); border: 1px solid var(--border-gold); }
.f2p-pick.is-now { background: linear-gradient(135deg, rgba(214, 168, 58, 0.22), rgba(20, 16, 36, 0.6)); border-color: var(--gold); }
.f2p-pick-img { width: 64px; height: 64px; flex: 0 0 auto; border-radius: 12px; border: 2px solid var(--border-gold); }
.f2p-pick strong { display: block; font-size: 1.1rem; color: var(--gold-light); }
.f2p-pick p { margin: 0.2rem 0 0; }
.f2p-pick a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.f2p-pick-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--gold); color: #1a1430; }
.f2p-score { display: inline-block; margin-left: 0.4rem; font-size: 0.78rem; opacity: 0.8; }
.f2p-rest { grid-column: 1 / -1; margin: 0; font-size: 0.9rem; opacity: 0.85; }
.f2p-key { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.f2p-key li { padding: 0.6rem 0.8rem 0.6rem 2.2rem; position: relative; border-radius: 10px; background: rgba(214, 168, 58, 0.1); border-left: 4px solid var(--gold); }
.f2p-key li::before { content: "!"; position: absolute; left: 0.7rem; top: 0.55rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--gold); color: #1a1430; font-weight: 800; font-size: 0.8rem; text-align: center; line-height: 1.1rem; }
.f2p-key strong { color: var(--gold-light); }
.f2p-table td small, .f2p-table th small { display: block; opacity: 0.75; font-size: 0.78rem; }
.f2p-why, .f2p-others ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.f2p-others { margin-top: 0.8rem; }
.f2p-others summary { cursor: pointer; color: var(--gold); font-weight: 700; }
.f2p-others li span { display: inline; margin-left: 0.3rem; }
.f2p-steps { padding-left: 1.4rem; display: grid; gap: 0.35rem; }
.f2p-disclaimer { margin: 1rem 0 0; font-size: 0.8rem; opacity: 0.7; }
.style-card[id] { scroll-margin-top: 90px; }
.style-card.is-flash { outline: 3px solid var(--gold); outline-offset: 3px; transition: outline-color 1s; }
@media (max-width: 640px) { .f2p { padding: 1rem; } .f2p-verdict { grid-template-columns: 1fr; } }
.f2p-table { min-width: 780px; } .f2p-table th[scope="row"], .f2p-table td:nth-child(2) { white-space: nowrap; }

/* ==========================================================================
   首頁「中文看得懂的打法」金雄區塊（#kaneo-home）
   由 app.js renderKaneoHome() 填入；抓不到資料時整塊 hidden，不留空殼。
   ========================================================================== */
.kaneo-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.kaneo-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kaneo-thumb {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.kaneo-card-body {
  padding: 0.8rem 0.9rem 1rem;
}

.kaneo-card-body h4 {
  margin: 0.4rem 0 0.35rem;
  font-size: 0.98rem;
  line-height: 1.4;
}

.kaneo-card-body h4 a {
  color: var(--text-main);
  text-decoration: none;
}

.kaneo-card-body h4 a:hover {
  color: var(--gold-light);
}

.kaneo-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.kaneo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
}

.kaneo-home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.kaneo-home-grid {
  display: block;
}

.kaneo-sub + .kaneo-sub {
  margin-top: 1.2rem;
}

.kaneo-sub-title {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

.kaneo-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

@media (min-width: 900px) {
  .kaneo-sub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .kaneo-sub-grid-base {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 陣型截圖不裁切 —— 看陣型的人要看到完整版面，裁掉上下排等於給錯資訊 */
.kaneo-sub-grid-base .kaneo-thumb {
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--bg-deep);
}

/* #5815 入口卡與分部卡的即時人數：抓不到時整格隱藏，不顯示假數字 */
.join-clan-live {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}
.join-clan-live.live-count-full,
.live-count-row .live-count-full {
  color: #ffb4a2;
  border-color: rgba(255, 120, 90, 0.55);
  background: rgba(255, 90, 60, 0.14);
}
.join-note {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.7;
  opacity: 0.85;
}


/* ── 留言給管理員（2026-12-02）───────────────────────────────────────────
   會員寫的靠左、管理員回的靠右帶金色邊；兩邊都標作者與時間，
   免得看到一句話卻不知道是誰在什麼時候說的。 */
.msg-thread {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  max-height: 22rem;
  overflow-y: auto;
}

.msg-bubble {
  background: var(--bg-input);
  border: 1px solid rgba(138, 174, 232, 0.28);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  font-size: 0.92rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg-bubble.msg-admin {
  border-color: rgba(245, 179, 1, 0.55);
  margin-inline-start: 1.5rem;
}

.msg-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted, #9aa0aa);
  margin-bottom: 0.2rem;
}
