:root {
  color-scheme: dark;
  --bg: #08090c;
  --bg-soft: #111318;
  --panel: #171a21;
  --panel-strong: #20242d;
  --text: #f6f7fb;
  --muted: #a5adbb;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --white-group: #f5f2e8;
  --red-group: #e3262f;
  --black-group: #1d2027;
  --blue-group: #1d7cff;
  --green-group: #1fc36b;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 50% -12%, rgba(227, 38, 47, 0.34), transparent 31rem),
    linear-gradient(160deg, #08090c 0%, #101117 48%, #08090c 100%);
  color: var(--text);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button {
  color: inherit;
  font: inherit;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.hero {
  padding: 14px 2px 18px;
}

.venue,
.card-kicker,
.status-note,
.section-title p,
.day-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 15vw, 5.9rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.venue {
  margin-top: 10px;
  color: #f8f7f2;
  font-size: clamp(1.2rem, 5.8vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: none;
}

.tabs,
.selector {
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  backdrop-filter: blur(20px);
}

.tab,
.selector-button,
.back-button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.03em;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.tab:active,
.selector-button:active,
.back-button:active,
.group-card:active {
  transform: scale(0.98);
}

.tab.is-active,
.selector-button.is-active {
  background: #f8f7f2;
  color: #090a0e;
}

.panel {
  display: none;
  padding-top: 18px;
}

.panel.is-active {
  display: block;
}

.selector {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.selector-live {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.selector-button {
  min-height: 44px;
  font-size: 0.82rem;
}

.day-line {
  margin: 4px 2px 12px;
}

.now-card,
.deck-card,
.schedule-card,
.group-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.now-card {
  min-height: 230px;
  padding: 24px;
  background: linear-gradient(145deg, #f8f7f2, #d9d5c8);
  color: #08090c;
}

.now-card::after,
.deck-card::after,
.schedule-card::after,
.group-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 68px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
}

.card-kicker {
  color: currentColor;
  font-size: clamp(1.35rem, 6vw, 2.25rem);
  font-weight: 950;
  line-height: 1;
  opacity: 0.62;
}

.now-card h2 {
  margin: 18px 0 12px;
  font-size: clamp(3rem, 18vw, 6.6rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.time-range {
  margin: 0;
  font-size: clamp(1.35rem, 6vw, 2.25rem);
  font-weight: 900;
}

.deck-card {
  margin-top: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.deck-card h3 {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 10vw, 3.8rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.status-note {
  margin-top: 14px;
  text-align: center;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 2px 12px;
}

.section-title strong {
  font-size: 1.25rem;
}

.schedule-list,
.group-grid {
  display: grid;
  gap: 12px;
}

.schedule-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px;
  background: var(--panel);
}

.schedule-card strong {
  font-size: clamp(1.42rem, 7vw, 2.2rem);
  line-height: 0.96;
}

.schedule-card span {
  color: #f8f7f2;
  font-size: clamp(1.18rem, 5.4vw, 1.75rem);
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

.schedule-card.group-white span,
.schedule-card.group-green span {
  color: #090a0e;
}

.schedule-card.is-current {
  outline: 3px solid #f8f7f2;
  outline-offset: 2px;
}

.schedule-card.is-next {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22), var(--shadow);
}

.schedule-card .badge {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-card {
  width: 100%;
  min-height: 118px;
  padding: 20px;
  border: 0;
  text-align: left;
  background: var(--panel);
}

.group-card strong {
  display: block;
  font-size: clamp(2rem, 10vw, 3.8rem);
  line-height: 0.9;
}

.group-card span {
  display: block;
  margin-top: 8px;
  color: currentColor;
  opacity: 0.68;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.group-detail.is-hidden,
.is-hidden {
  display: none;
}

.back-button {
  width: 100%;
  margin-bottom: 16px;
  background: #f8f7f2;
  color: #090a0e;
}

.detail-header {
  margin: 0 0 18px;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-header h2 {
  margin: 0;
  font-size: clamp(3rem, 17vw, 5.8rem);
  line-height: 0.86;
}

.day-block {
  margin-bottom: 20px;
}

.day-block h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.session-pill {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.075);
  font-size: clamp(1.18rem, 5.45vw, 1.9rem);
  font-weight: 900;
  line-height: 1;
}

.group-white {
  background: linear-gradient(145deg, var(--white-group), #cfcbbf);
  color: #090a0e;
}

.group-red {
  background: linear-gradient(145deg, #ff3942, var(--red-group));
  color: #fff;
}

.group-black {
  background: linear-gradient(145deg, #2d323d, var(--black-group));
  color: #fff;
}

.group-blue {
  background: linear-gradient(145deg, #3fa0ff, var(--blue-group));
  color: #fff;
}

.group-green {
  background: linear-gradient(145deg, #27d97a, var(--green-group));
  color: #051209;
}

.group-mixed {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(145deg, #272c36, #101218);
  color: #fff;
}

.break-card {
  background: linear-gradient(145deg, #282c35, #15171d);
  color: #f8f7f2;
}

.event-card {
  background: linear-gradient(145deg, #252932, #171a21);
  color: #f8f7f2;
}

.classroom-card {
  background: linear-gradient(145deg, #223044, #151a24);
  color: #f8f7f2;
}

.classroom-card.group-white {
  background: linear-gradient(145deg, #d7d9df, #aeb4bf);
  color: #090a0e;
}

.classroom-card.group-blue {
  background: linear-gradient(145deg, #9fd0ff, #5daeff);
  color: #061423;
}

.classroom-card.group-green {
  background: linear-gradient(145deg, #9cf0bd, #59dc8b);
  color: #041509;
}

.classroom-card.group-red {
  background: linear-gradient(145deg, #ff8c91, #f05a61);
  color: #210406;
}

.classroom-card.group-black {
  background: linear-gradient(145deg, #5d6470, #3b414b);
  color: #fff;
}

@media (min-width: 720px) {
  .app-shell {
    padding-inline: 24px;
  }

  .panel {
    padding-top: 24px;
  }

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

.brand-row { display:flex; align-items:center; gap:9px; margin:0 0 18px 2px; color:#a5adbb; font-size:.72rem; font-weight:900; letter-spacing:.12em; }
.live-dot { width:9px; height:9px; border-radius:50%; background:#1fc36b; box-shadow:0 0 14px rgba(31,195,107,.7); }
.hero-subtitle { margin:10px 0 18px; color:var(--muted); font-size:1rem; font-weight:700; }
.event-picker-label { display:block; margin:0 0 6px 3px; color:var(--muted); font-size:.7rem; font-weight:900; letter-spacing:.13em; }
#event-picker { width:100%; min-height:48px; padding:0 14px; border:1px solid var(--line); border-radius:14px; background:#171a21; color:var(--text); font:inherit; font-weight:800; }
.section-title p { font-size:.67rem; letter-spacing:.08em; }
.groups-intro { margin:0 2px 14px; color:var(--muted); line-height:1.5; }
.site-footer { margin-top:26px; padding:18px 4px 8px; border-top:1px solid var(--line); color:var(--muted); text-align:center; font-size:.74rem; line-height:1.45; }
.site-footer p { margin:4px; }
.empty-note { color:var(--muted); font-size:.95rem; }
@media (min-width:720px) { .hero { padding-top:24px; } }
