﻿@font-face {
  font-family: 'Japan Ramen';
  src: url('assets/fonts/JapanRamen.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'The Last Shuriken';
  src: url('assets/fonts/TheLastShuriken.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --text: #0b1020;
  --muted: #6b7280;
  --brand: #e53935;
  --brand-strong: #c62828;
  --border: #e5e7eb;
  --font-headline: 'Japan Ramen', 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-body: 'The Last Shuriken', 'Noto Sans JP', 'Yu Gothic', Meiryo, 'MS PGothic', sans-serif;
}

[data-theme="light"] {
  --bg: #ffffff; /* white */
  --bg-elevated: #ffffff;
  --text: #0b1020; /* near-black for readability */
  --muted: #6b7280; /* neutral gray */
  --brand: #e53935; /* red */
  --brand-strong: #c62828; /* darker red */
  --card: #ffffff;
  --border: #e5e7eb; /* light gray border */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.35));
  backdrop-filter: blur(6px);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.site-header.is-solid { background: #ffffff; box-shadow: 0 4px 18px rgba(0,0,0,0.06); }
.header-content { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; justify-content: space-between; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.6px; font-size: 1.05rem; font-family: var(--font-headline); }
.brand-jp {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.2rem 0.3rem;
  border-left: 3px solid var(--brand);
}
.brand-jp .latin {
  font-family: var(--font-headline);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
}
.brand-jp .kana {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--brand-strong);
  line-height: 1;
  opacity: 0.9;
}
.brand:hover { color: var(--brand); }
.site-nav ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  white-space: nowrap;
}
.trail-char {
  display: inline-block;
  white-space: pre;
  color: inherit;
  transition: color 1s ease;
}
.trail-word { display: inline-block; }
.trail-char.is-hot { color: var(--brand); }
.site-nav li { display: flex; align-items: center; gap: 0.5rem; }
.site-nav li + li::before { content: ''; display: inline-block; width: 2px; height: 16px; background: var(--brand); }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); padding: 0.35rem 0.5rem; border-radius: 8px; }
.social-bubble { display: flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.85); border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.8rem; font-family: var(--font-body); font-size: 0.95rem; margin-left: auto; }
.social-bubble span { white-space: nowrap; }
.social-icon { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.social-icon img { width: 24px; height: 24px; object-fit: contain; display: block; }

/* Katana hunt */

  to { transform: translate(-50%, -120%) scale(1.3); opacity: 0; }
}
.social-icon:hover { filter: brightness(1.1); }

/* Hero */
.hero { padding: 8rem 0 5rem; background: transparent; }
.hero-panel { border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem; background: #ffffff; width: 100%; }
.display {
  font-size: clamp(2.4rem, 3.5vw + 1rem, 4rem);
  line-height: 1.1;
  margin: 0.2rem 0 0.6rem;
  font-family: var(--font-headline);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.94);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.4rem;
}
.section-title, .work-card h3, .hotline-card h2, h1, h2, h3, h4 { font-family: var(--font-headline); }
.eyebrow, .lead, .panel, p, li, a, button { font-family: var(--font-body); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand-strong); font-weight: 700; margin: 0; }
.lead { color: var(--muted); margin: 0 0 1rem; max-width: 70ch; }
.hero h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); line-height: 1.2; margin: 0 0 0.5rem; }
.hero p { color: var(--muted); margin: 0 0 1rem; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn { appearance: none; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); padding: 0.6rem 0.9rem; border-radius: 10px; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn.primary { border-color: transparent; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; }
.btn.small { padding: 0.35rem 0.6rem; font-size: 0.85rem; }

.glow-shell {
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease;
  border: 2px solid transparent;
}
.glow-shell::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  box-shadow: 0 0 0 rgba(229,57,53,0);
  opacity: 0;
  transition: opacity 180ms ease, box-shadow 180ms ease;
  z-index: -1;
}
.glow-shell:hover {
  transform: scale(1.03);
  box-shadow: 0 18px 40px rgba(229,57,53,0.3);
}
.glow-shell:hover::after {
  opacity: 1;
  box-shadow: 0 0 40px rgba(229,57,53,0.45), 0 0 80px rgba(229,57,53,0.2);
}

/* Features */
.section { padding: 3rem 0; }
.section > .container { position: relative; }
.section-title {
  margin: 0 0 1rem;
  position: relative;
  display: inline-block;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
.section-title::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: -8px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), transparent 70%);
  opacity: 0.9;
}
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.work-card { background: #ffffff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,0.07); }
.work-card h3 { margin-top: 0.5rem; }
.work-card p { margin-bottom: 0; color: var(--muted); }
.work-thumb { height: 160px; border-radius: 8px; border: 2px dashed rgba(229,57,53,0.35); background: repeating-linear-gradient(45deg, rgba(229,57,53,0.06) 0, rgba(229,57,53,0.06) 8px, rgba(229,57,53,0.12) 8px, rgba(229,57,53,0.12) 16px); }
.team-feature { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.team-feature .team-card { max-width: 320px; width: 100%; }
.team-feature .team-desc { font-size: 0.9rem; line-height: 1.4; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.team-card { cursor: pointer; }
.team-card h3 { margin: 0.75rem 0 0.35rem; text-transform: uppercase; letter-spacing: 0.1em; }
.team-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 0;
  background: none; /* image comes from inline style per card */
}
.team-card p { margin: 0; color: var(--muted); }
.team-info { margin-top: 0.5rem; }
.team-role { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-strong); margin-bottom: 0.2rem; }
/* Overlay description full-card on hover */
.team-card { position: relative; overflow: hidden; }
.team-card .team-desc {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.96);
  color: var(--text);
  opacity: 0;
  z-index: 2;
  pointer-events: none; /* keep card clicks working */
  transition: opacity 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .team-card:hover .team-desc { opacity: 1; }
}

/* Make team card fully image: remove panel chrome and hide name/role */
.team-card.panel { padding: 0; background: transparent; border: 0; box-shadow: none; }
.team-info { height: 0; margin: 0; padding: 0; }
.team-info h3, .team-info .team-role { display: none; }
.hotline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.hotline-card h3 { margin: 0.75rem 0 0.35rem; text-transform: uppercase; letter-spacing: 0.12em; }
.hotline-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  background: repeating-linear-gradient(135deg, rgba(229, 57, 53, 0.08) 0, rgba(229, 57, 53, 0.08) 10px, rgba(229, 57, 53, 0.16) 10px, rgba(229, 57, 53, 0.16) 20px);
}
.hotline-card p { margin: 0 0 0.35rem; color: var(--muted); }
.hotline-phone { font-weight: 700; color: var(--text); letter-spacing: 0.2em; text-transform: uppercase; }
.hotline-subhead {
  color: #000;
  font-weight: 600;
  display: block;
  margin-bottom: 1rem;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.hotline-copy { margin-top: 0.35rem; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.sponsor-card {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  aspect-ratio: 1 / 1;
  min-height: 0;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.sponsor-logo { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.sponsor-logo img { max-width: 80%; max-height: 80%; object-fit: contain; }
.sponsor-name { margin: 0; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.gallery-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}
.gallery-slider 
.gallery-card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 600ms ease; }
.gallery-card.is-active { opacity: 1; }
.gallery-frame { position: relative; width: min(900px, 90vw); height: clamp(300px, 40vw, 520px); overflow: hidden; border-radius: 24px; }

.gallery-control {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}
.gallery-control:hover { background: #fff; }
.gallery-control:disabled { opacity: 0.4; cursor: not-allowed; }
.film-panel { text-align: center; }
.film-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 2px dashed rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1rem;
  background: repeating-linear-gradient(45deg, rgba(229, 57, 53, 0.04) 0, rgba(229, 57, 53, 0.04) 12px, rgba(229, 57, 53, 0.1) 12px, rgba(229, 57, 53, 0.1) 24px);
}

.film-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
  margin-top: 1rem;
}
.film-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Single Photo frame */
.photo-panel { text-align: center; }
.photo-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 2px dashed rgba(0, 0, 0, 0.3);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
  margin-top: 1rem;
  background: repeating-linear-gradient(45deg, rgba(229, 57, 53, 0.04) 0, rgba(229, 57, 53, 0.04) 12px, rgba(229, 57, 53, 0.1) 12px, rgba(229, 57, 53, 0.1) 24px);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; }
.site-footer .container { padding: 1rem 0; color: var(--muted); }

/* Responsive */
@media (max-width: 800px) {
  .work-grid { grid-template-columns: 1fr; }
  .team-feature { margin-bottom: 1rem; }
  .team-feature .team-card { max-width: none; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hotline-grid { grid-template-columns: 1fr; }
  /* Mobile: two-up layout for Petit Dejeuner cards */
  #petit-dejeuner .hotline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-toggle { display: inline-block; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.5rem; padding: 0.75rem 0; }
}

/* Panels */
.panel { border: 1px solid var(--border); border-radius: 14px; padding: 1rem; background: #ffffff; color: #0b1020; box-shadow: 0 12px 34px rgba(0,0,0,0.09); }

/* Skip link */
.skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; padding: 0.5rem 0.75rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
.bg-logo {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('assets/images/logo4.png'), url('assets/logo.jpg');
  background-repeat: no-repeat, no-repeat;
  background-position: center, left 0.8rem top 0.8rem;
  background-size: min(95vw, 1800px), 360px;
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0) scale(var(--scale, 1));
  transition: transform 300ms ease;
  will-change: transform;
  pointer-events: none;
  /* Soft edge fade to blend with background (does not alter logo colors) */
  -webkit-mask-image: radial-gradient(ellipse closest-side at center, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 94%);
  mask-image: radial-gradient(ellipse closest-side at center, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 94%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: min(95vw, 1800px) auto;
  mask-size: min(95vw, 1800px) auto;
}

main, .site-footer { position: relative; z-index: 1; }

.petal-canvas {
  position: fixed;
  inset: 0;
  z-index: 0; /* above page background, below main content (z=1) */
  pointer-events: none;
}

.bg-cherry {
  position: fixed;
  left: 0.25rem;
  bottom: 0;
  width: clamp(220px, 24vw, 420px);
  height: clamp(200px, 28vh, 420px);
  background: left bottom / contain no-repeat url('assets/images/blossom.jpeg');
  z-index: 0;
  pointer-events: none;
  filter: saturate(1.05) contrast(1.02) brightness(1.01) hue-rotate(-4deg);
  transform-origin: 10% 90%;
  will-change: transform;
  /* soften top/right edges */
  -webkit-mask-image: radial-gradient(120% 120% at 20% 90%, rgba(0,0,0,1) 58%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(120% 120% at 20% 90%, rgba(0,0,0,1) 58%, rgba(0,0,0,0) 100%);
}

.bg-cherry.is-shaking { animation: tree-shake 600ms ease; }
@keyframes tree-shake {
  0% { transform: rotate(0deg) translateX(0); }
  15% { transform: rotate(-2deg) translateX(-2px); }
  30% { transform: rotate(2deg) translateX(2px); }
  45% { transform: rotate(-1.5deg) translateX(-2px); }
  60% { transform: rotate(1.5deg) translateX(2px); }
  75% { transform: rotate(-1deg) translateX(-1px); }
  100% { transform: rotate(0deg) translateX(0); }
}

.bg-blossom {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: clamp(220px, 26vw, 520px);
  z-index: 0;
  background-color: #ffffff;
  background-image: url('assets/cherry-blossom.webp');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  filter: saturate(1.05) contrast(1.03) brightness(1.02) hue-rotate(-5deg);
  /* fade the right edge so it blends into the white background */
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.bg-blossom-right {
  left: auto;
  right: 0;
  background-color: #ffffff;
  background-image: url('assets/test.jpg');
  background-position: right center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: saturate(1.05) contrast(1.02) brightness(1.01) hue-rotate(-8deg);
  -webkit-mask-image: radial-gradient(ellipse 130% 160% at 100% 50%, rgba(0,0,0,1) 68%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse 130% 160% at 100% 50%, rgba(0,0,0,1) 68%, rgba(0,0,0,0) 100%);
}


.countdown-panel {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
  z-index: 4;
}
.countdown-title {
  margin: 0 0 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-strong);
  font-size: 1.1rem;
}
.countdown-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.countdown-unit {
  text-align: center;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(255,255,255,0.9);
}
.countdown-value {
  display: inline-flex;
  gap: 0.2rem;
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-headline);
}
.countdown-unit small {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 1024px) {
  .countdown-panel {
    position: static;
    transform: none;
    width: auto;
    margin: 0.5rem auto;
  }
}

/* Leaderboard */
.leaderboard-panel {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
  z-index: 4;
}
.leaderboard-title {
  margin: 0 0 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-strong);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.katana-badge {
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  color: var(--brand-strong);
  background: rgba(229,57,53,0.1);
}
.leaderboard-list {
  list-style: decimal;
  margin: 0; padding-left: 1.4rem;
  display: grid; gap: 0.35rem;
}
.leaderboard-list li { display: flex; justify-content: space-between; gap: 0.5rem; }
.leaderboard-name { color: var(--text); }
.leaderboard-score { color: var(--muted); font-variant-numeric: tabular-nums; }
.leaderboard-empty { color: var(--muted); list-style: none; padding-left: 0; }

@media (max-width: 1024px) {
  .leaderboard-panel { position: static; transform: none; width: auto; margin: 0.5rem auto; }
}
.runner-panel { text-align: center; }
.game-warning {
  color: var(--brand);
  font-weight: 900;
  font-size: clamp(1rem, 1.2vw + 0.9rem, 1.4rem);
  margin: 0 0 0.75rem;
  text-align: center;
}

/* Planning */
.planning-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.planning-day { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 0.9rem; box-shadow: 0 10px 26px rgba(0,0,0,0.07); }
.planning-day-title { margin: 0 0 0.5rem; font-family: var(--font-headline); }
.planning-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.planning-item { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem; align-items: start; }
.planning-item-body { display: grid; gap: 0.15rem; }
.planning-time {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand-strong);
  background: rgba(229,57,53,0.08);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.planning-title { margin: 0.2rem 0 0.25rem; font-family: var(--font-headline); }
.planning-desc { margin: 0; color: var(--muted); }
.planning-link { color: inherit; text-decoration: underline; }
.planning-link:hover { text-decoration: underline; filter: brightness(0.9); }

@media (max-width: 1024px) {
  .planning-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .planning-days { grid-template-columns: 1fr; }
}

/* Agenda (right-side bubble above leaderboard) */
.runner-hud { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.runner-hud .btn { align-self: flex-end; }
.runner-embed-wrap { width: 100%; max-width: 1100px; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 20px 45px rgba(0,0,0,0.12); position: relative; }
.runner-embed { width: 100%; height: clamp(420px, 60vw, 720px); border: 0; display: block; background: #050608; }
.runner-embed-wrap:fullscreen { width: 100vw; height: 100vh; max-width: none; border-radius: 0; box-shadow: none; }
.runner-embed-wrap:-webkit-full-screen { width: 100vw; height: 100vh; max-width: none; border-radius: 0; box-shadow: none; }
.runner-embed-wrap:fullscreen .runner-embed, .runner-embed-wrap:-webkit-full-screen .runner-embed { height: 100%; }
.runner-fallback { margin-top: 0.5rem; font-size: 0.9rem; }
.runner-fallback a { color: var(--brand); }






.team-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 20, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.team-modal-backdrop[hidden] { display: none; }
.team-modal-backdrop#gateModal {
  background: rgba(4, 8, 20, 0.93); /* darker fallback for browsers without backdrop-filter */
  backdrop-filter: blur(60px) brightness(0.7) contrast(0.85) saturate(0.9);
  -webkit-backdrop-filter: blur(60px) brightness(0.7) contrast(0.85) saturate(0.9);
}
.team-modal {
  width: min(560px, 94vw);
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
  position: relative;
  text-align: center;
}
#gateModal .team-modal { width: min(700px, 96vw); }
.team-modal-thumb {
  width: 220px;
  height: 140px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  border: 3px solid rgba(229,57,53,0.4);
  background: repeating-linear-gradient(45deg, rgba(229,57,53,0.08) 0, rgba(229,57,53,0.08) 12px, rgba(229,57,53,0.16) 12px, rgba(229,57,53,0.16) 24px);
  /* Ensure images shown in the modal render nicely */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.team-modal-content h3 { margin: 0 0 0.5rem; font-size: 1.5rem; letter-spacing: 0.12em; }
.team-modal-content p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
#gateModal #gateTitle { white-space: nowrap; }
.team-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
body.modal-open { overflow: hidden; }



.gallery-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; box-shadow: 0 25px 55px rgba(0,0,0,0.18); }



/* Score (name input) modal tweaks */
.score-form { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.score-form input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 1rem;
}
.score-form input[type="text"]:focus { outline: 2px solid rgba(229,57,53,0.45); outline-offset: 1px; }
.score-form input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 1rem;
}
.score-form input[type="password"]:focus { outline: 2px solid rgba(229,57,53,0.45); outline-offset: 1px; }
.gate-error { color: var(--brand-strong); font-weight: 700; }

