/* ==========================================================================
   笑冠大鑑 (OWARAI GP ARCHIVE) — Design System & Editorial Stage Stylesheet
   ========================================================================== */

:root {
  --bg: #f8f5ee;
  --bg-subtle: #f0ebe0;
  --surface: #ffffff;
  --surface-raised: #fffdf9;
  --surface-tint: #f4efe4;
  --ink: #181614;
  --ink-secondary: #4e473f;
  --ink-muted: #766d62;
  --border: rgba(24, 22, 20, 0.11);
  --border-strong: rgba(24, 22, 20, 0.2);

  --crimson: #b8292f;
  --crimson-hover: #961e24;
  --crimson-soft: rgba(184, 41, 47, 0.09);
  --gold: #9a7024;
  --gold-soft: rgba(154, 112, 36, 0.12);
  --gold-border: rgba(154, 112, 36, 0.34);

  --shadow-sm: 0 1px 2px rgba(24, 22, 20, 0.05), 0 4px 12px rgba(24, 22, 20, 0.04);
  --shadow-md: 0 4px 14px rgba(24, 22, 20, 0.07), 0 12px 30px rgba(24, 22, 20, 0.06);
  --shadow-lg: 0 16px 48px rgba(18, 14, 10, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --font-display: "Shippori Mincho", "Yu Mincho", Georgia, serif;
  --font-sans: "Noto Sans JP", "Hiragino Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --header-h: 66px;
  --max-w: 1180px;
}

[data-theme="dark"] {
  --bg: #131110;
  --bg-subtle: #191614;
  --surface: #1e1b18;
  --surface-raised: #26221e;
  --surface-tint: #231f1b;
  --ink: #f4efe6;
  --ink-secondary: #cbc2b5;
  --ink-muted: #988e80;
  --border: rgba(244, 239, 230, 0.11);
  --border-strong: rgba(244, 239, 230, 0.22);

  --crimson: #e04a4f;
  --crimson-hover: #f06065;
  --crimson-soft: rgba(224, 74, 79, 0.15);
  --gold: #d9b362;
  --gold-soft: rgba(217, 179, 98, 0.14);
  --gold-border: rgba(217, 179, 98, 0.34);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.62);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.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;
}

.container {
  width: min(100% - 32px, var(--max-w));
  margin-inline: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  background: var(--surface-tint);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.header-counter:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.header-counter-num {
  font-weight: 600;
  color: var(--ink);
}

.header-pr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.header-pr-pill:hover {
  border-color: var(--crimson);
  transform: translateY(-1px);
}

.header-pr-pill picture {
  display: block;
  flex-shrink: 0;
}

.header-pr-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.pr-mini-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-tint);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.icon-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface-tint);
}

.mobile-menu-btn {
  display: none;
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 55;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 14px 20px 20px;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-list a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--ink);
}

.mobile-nav-list a:hover {
  background: var(--surface-tint);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.16s ease, color 0.18s ease;
}

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

.btn-primary {
  background: var(--crimson);
  color: #fff;
}

.btn-primary:hover {
  background: var(--crimson-hover);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--surface-tint);
  border-color: var(--ink-muted);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink-secondary);
}

.btn-ghost:hover {
  background: var(--surface-tint);
  color: var(--ink);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.8rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 52px;
  background: #171210;
  color: #f8f4ec;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.42;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    98deg,
    rgba(18, 13, 11, 0.94) 0%,
    rgba(20, 14, 12, 0.78) 54%,
    rgba(18, 13, 11, 0.68) 100%
  );
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.82fr);
  gap: 34px;
  align-items: center;
}

.hero-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: #e4c174;
  margin-bottom: 12px;
}

.hero-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3.6vw, 2.95rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: 0.03em;
  color: #fffdf8;
}

.hero-lead {
  margin: 0 0 24px;
  max-width: 56ch;
  font-size: 0.98rem;
  line-height: 1.78;
  color: rgba(248, 244, 236, 0.86);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero .btn-secondary {
  background: rgba(255, 253, 248, 0.1);
  border-color: rgba(255, 253, 248, 0.28);
  color: #fffdf8;
}

.hero .btn-secondary:hover {
  background: rgba(255, 253, 248, 0.18);
  border-color: rgba(255, 253, 248, 0.45);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 253, 248, 0.14);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-val {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fffdf8;
  line-height: 1.2;
}

.hero-stat-val small {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  margin-left: 3px;
  color: #e4c174;
}

.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(248, 244, 236, 0.72);
}

/* Side Board: 2026 Latest Kings & Live Visitor Ledger */
.hero-board {
  background: rgba(26, 21, 18, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(228, 193, 116, 0.24);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-lg);
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.board-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: #fffdf8;
}

.board-edition {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #e4c174;
}

.board-counter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.board-metric {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.board-metric-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(248, 244, 236, 0.68);
  margin-bottom: 2px;
}

.board-metric-val {
  font-size: 1.32rem;
  font-weight: 700;
  color: #fffdf8;
}

.board-latest-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #e4c174;
  margin: 0 0 8px;
}

.board-latest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.board-latest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  transition: background-color 0.18s ease, border-color 0.18s ease;
  text-align: left;
  width: 100%;
}

.board-latest-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(228, 193, 116, 0.35);
}

.board-latest-contest {
  font-size: 0.72rem;
  color: rgba(248, 244, 236, 0.7);
}

.board-latest-winner {
  font-weight: 700;
  color: #fffdf8;
}

/* ==========================================================================
   Common Section Styling
   ========================================================================== */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--crimson);
  margin-bottom: 6px;
}

.section-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.05rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.02em;
}

.section-desc {
  margin: 0;
  max-width: 64ch;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Contest Overview Strip
   ========================================================================== */
.contest-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.contest-pill-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.contest-pill-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.contest-pill-card.is-active {
  border-color: var(--crimson);
  background: var(--surface-raised);
}

.contest-pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contest-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.contest-meta-years {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.contest-pill-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  margin: 2px 0 0;
}

.contest-pill-desc {
  margin: 0;
  font-size: 0.81rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Filter Bar & View Controls
   ========================================================================== */
.controls-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  max-width: 380px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 0.88rem;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.search-input:focus {
  background: var(--surface);
  border-color: var(--crimson);
  outline: none;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}

.toggle-label input {
  accent-color: var(--crimson);
  width: 15px;
  height: 15px;
  margin: 0;
}

.view-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.view-btn {
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.81rem;
  font-weight: 600;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.view-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

/* ==========================================================================
   Year-by-Year Timeline Groups & Contest Cards
   ========================================================================== */
.year-timeline {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.year-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.year-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.year-heading .year-num {
  font-family: var(--font-mono);
  font-size: 1.82rem;
  letter-spacing: -0.02em;
}

.year-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  gap: 18px;
}

.gp-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.gp-card.is-upcoming {
  border-style: dashed;
  background: var(--surface-raised);
}

.gp-card-body {
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.gp-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gp-edition-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.gp-winner-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.gp-winner-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 2px 8px;
  border-radius: 5px;
  margin-bottom: 4px;
}

.gp-winner-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.gp-agency {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.gp-podium {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  font-size: 0.82rem;
}

.gp-podium-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.gp-rank-label {
  flex-shrink: 0;
  min-width: 44px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.gp-rank-val {
  color: var(--ink-secondary);
  font-weight: 500;
}

.gp-score-note {
  font-size: 0.77rem;
  color: var(--crimson);
  font-weight: 600;
}

.gp-highlight {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-secondary);
  line-height: 1.62;
}

/* Inline Lite YouTube Video Area inside Card */
.gp-video-box {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 12px 18px 16px;
  background: var(--surface-raised);
}

.yt-lite {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #141110;
  border: 1px solid var(--border);
  cursor: pointer;
}

.yt-lite-stage {
  height: 100%;
  border: 0;
  border-radius: 0;
}

.yt-lite img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.yt-lite:hover img {
  transform: scale(1.03);
  opacity: 1;
}

.yt-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: rgba(184, 41, 47, 0.94);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.yt-lite:hover .yt-play-btn {
  transform: scale(1.08);
  background: #d6282e;
}

.yt-tag-pill {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(18, 15, 13, 0.84);
  color: #fffdf8;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.yt-tag-pill.is-winning {
  background: rgba(184, 41, 47, 0.92);
}

.yt-lite iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-caption {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yt-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-channel {
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.gp-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.yt-direct-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--crimson);
}

.yt-direct-link:hover {
  text-decoration: underline;
}

.gp-no-video {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gp-no-video-note {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Ledger Table View
   ========================================================================== */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

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

.gp-table th,
.gp-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.gp-table th {
  background: var(--surface-tint);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.gp-table tbody tr {
  transition: background-color 0.14s ease;
}

.gp-table tbody tr:hover {
  background: var(--surface-raised);
}

.table-winner {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   Section 2: Official YouTube Comedy Theater
   ========================================================================== */
.theater-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.theater-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.theater-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #100e0d;
}

.theater-player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.theater-info {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theater-info-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theater-video-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.theater-video-meta {
  font-size: 0.83rem;
  color: var(--ink-secondary);
}

.theater-playlist-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.theater-playlist-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-tint);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.theater-list {
  max-height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.theater-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  transition: background-color 0.16s ease;
}

.theater-item:hover {
  background: var(--surface-tint);
}

.theater-item.is-active {
  background: var(--crimson-soft);
}

.theater-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  background: #141110;
}

.theater-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theater-item-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

/* ==========================================================================
   Mid-Page Editorial Sponsor Banner (HisatorNotebook PR)
   ========================================================================== */
.sponsor-banner {
  margin: 44px 0 0;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.sponsor-icon {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}

.sponsor-pr-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  background: var(--surface-tint);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.sponsor-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
}

.sponsor-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-secondary);
  line-height: 1.62;
}

.sponsor-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.sponsor-feat-tag {
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--ink-secondary);
}

/* ==========================================================================
   Section 3: Records Grid
   ========================================================================== */
.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.record-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.record-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--crimson);
}

.record-value {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.record-holder {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.record-desc {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Section 4: Quiz
   ========================================================================== */
.quiz-box {
  max-width: 740px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-md);
}

.quiz-progress {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.quiz-question {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.48;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.quiz-opt-btn {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  text-align: left;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.quiz-opt-btn:hover:not(:disabled) {
  background: var(--surface-tint);
  border-color: var(--crimson);
  transform: translateY(-1px);
}

.quiz-opt-btn.is-correct {
  background: rgba(31, 122, 74, 0.14);
  border-color: #1f7a4a;
  color: var(--ink);
}

.quiz-opt-btn.is-wrong {
  background: rgba(184, 41, 47, 0.14);
  border-color: var(--crimson);
  color: var(--ink);
}

.quiz-feedback {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  font-size: 0.86rem;
  color: var(--ink-secondary);
  margin-bottom: 14px;
}

.quiz-result {
  text-align: center;
  padding: 12px 0;
}

.quiz-rank {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold);
  margin: 8px 0 10px;
}

/* ==========================================================================
   Visitor Counter & Footer
   ========================================================================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 52px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 22px;
  margin-bottom: 28px;
}

.counter-panel,
.footer-pr-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}

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

.counter-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.vc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.vc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #248a54;
}

.vc-status-dot.is-fallback {
  background: #b98324;
}

.counter-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.counter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.counter-card-label {
  display: block;
  font-size: 0.73rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.counter-card-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}

.counter-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.footer-pr-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.footer-pr-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-pr-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.footer-pr-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.footer-pr-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.rights-note {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.79rem;
  color: var(--ink-muted);
  line-height: 1.68;
  margin-bottom: 22px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ==========================================================================
   Detail Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(14, 11, 9, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: min(100%, 760px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.finalist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.finalist-chip {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--surface-tint);
  border: 1px solid var(--border);
  font-size: 0.81rem;
  font-weight: 500;
}

.finalist-chip.is-winner {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  font-weight: 700;
  color: var(--ink);
}

.modal-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .hero-grid,
  .theater-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .contest-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sponsor-banner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    gap: 8px;
  }

  .header-actions {
    gap: 6px;
  }

  .brand-sub,
  .header-counter,
  .header-pr-name {
    display: none;
  }

  .header-pr-pill {
    padding: 5px 8px 5px 6px;
  }

  .hero {
    padding: 36px 0 38px;
  }

  .contest-overview-grid,
  .cards-grid,
  .quiz-options,
  .counter-metrics {
    grid-template-columns: 1fr;
  }

  .quiz-box {
    padding: 20px 18px;
  }

  .section {
    padding: 46px 0;
  }
}

.gp-table td:nth-child(2),
.gp-table td:nth-last-child(-n+2) {
  white-space: nowrap;
}

@media (min-width: 981px) {
  .mobile-drawer.is-open {
    display: none;
  }
}
