:root {
  --ruby: #7A0D2A;
  --ruby-dark: #4f071c;
  --ruby-soft: #f7edf0;
  --gold: #c79a32;
  --ink: #241b20;
  --muted: #70666b;
  --line: #eadde2;
  --bg: #fbf9fa;
  --white: #fff;
  --green: #1d8b5f;
  --red: #b33131;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.app-shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 88px; padding: 12px 28px;
  background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 72%, #95183a);
  color: white; box-shadow: 0 8px 24px rgba(95, 7, 31, .18);
  border-bottom: 4px solid var(--gold);
}
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-logo {
  height: 72px; width: auto; max-width: 180px; object-fit: contain; flex: 0 0 auto;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.24));
}
.brand h1 { margin: 0; font-size: 22px; letter-spacing: 0; font-weight: 900; }
.brand p { margin: 3px 0 0; color: #f7dfe7; }
.brand-subtitle { font-size: 15px; font-weight: 700; }
.school-title {
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.12; font-weight: 900; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.promo-pill {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  padding: 8px 10px; border-radius: 8px; font-weight: 800;
}
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 88px); }
.sidebar {
  padding: 20px 14px; background: #fff; border-right: 1px solid var(--line);
  position: sticky; top: 88px; height: calc(100vh - 88px); overflow: auto;
}
.nav-btn {
  width: 100%; text-align: left; background: transparent; color: var(--ink);
  padding: 11px 12px; border-radius: 8px; margin-bottom: 4px;
}
.nav-btn.active, .nav-btn:hover { background: var(--ruby-soft); color: var(--ruby); font-weight: 700; }
.content { padding: 26px; min-width: 0; }
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  display: grid; place-items: center; padding: 34px 18px;
  background:
    linear-gradient(145deg, rgba(79,7,28,.98), rgba(122,13,42,.98) 54%, rgba(55,42,48,.96)),
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.12), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(199,154,50,.16), transparent 30%);
  color: white;
}
.hero::before, .hero::after {
  content: ""; position: absolute; pointer-events: none; opacity: .18;
  border: 1px solid rgba(255,255,255,.24); transform: rotate(-18deg);
}
.hero::before { width: 440px; height: 440px; border-radius: 42px; left: -170px; top: -130px; }
.hero::after { width: 560px; height: 560px; border-radius: 58px; right: -230px; bottom: -220px; }
.hero-panel {
  position: relative; z-index: 1; width: min(100%, 980px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - 68px); text-align: center;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 76px); line-height: .96; margin: 0 0 12px;
  letter-spacing: 0; font-weight: 950; color: #fff;
  text-shadow: 0 14px 42px rgba(0,0,0,.22);
}
.hero p { color: #f8e6ec; font-size: 18px; max-width: 640px; }
.auth-brand {
  margin-bottom: 26px; animation: fadeUp .55s ease both;
  display: flex; flex-direction: column; align-items: center;
}
.auth-logo {
  display: block; height: clamp(112px, 15vw, 170px); width: auto; max-width: min(420px, 82vw);
  object-fit: contain; margin: 0 0 20px;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,.28));
}
.auth-brand h1 { margin-bottom: 8px; }
.auth-brand p { margin: 0; font-size: clamp(16px, 2.1vw, 22px); font-weight: 800; color: #fff; }
.auth-card {
  width: min(460px, 100%); background: rgba(255,255,255,.98); color: var(--ink);
  border-radius: 20px; padding: 28px; text-align: left;
  box-shadow: 0 28px 90px rgba(20,5,12,.34);
  border: 1px solid rgba(255,255,255,.72);
  animation: fadeUp .65s ease .08s both;
}
.auth-card-wide { width: min(900px, 100%); max-height: min(760px, 58vh); overflow: auto; }
.auth-card-title { margin-bottom: 18px; text-align: center; }
.auth-card-title h2 { margin: 0 0 7px; color: var(--ruby-dark); font-size: 25px; line-height: 1.12; }
.auth-card-title p { margin: 0; color: var(--muted); font-size: 14px; max-width: none; }
.remember-row {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 18px;
  color: #5a4d53; font-weight: 800;
}
.remember-row input { width: 17px; height: 17px; accent-color: var(--ruby); }
.auth-submit { width: 100%; min-height: 48px; font-size: 16px; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(122,13,42,.24); }
.auth-links {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; align-items: center;
}
.auth-links button {
  background: transparent; color: var(--ruby); font-weight: 850; padding: 4px 0;
}
.auth-links button:hover { color: var(--ruby-dark); text-decoration: underline; }
.auth-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.public-footer {
  display: grid; gap: 5px; margin-top: 24px; color: rgba(255,255,255,.78);
  font-size: 13px; line-height: 1.4; animation: fadeUp .75s ease .16s both;
}
.public-footer b { color: #fff; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 10px 12px; border-radius: 8px; background: #f4eef1; color: var(--ruby); font-weight: 700; }
.tab.active { background: var(--ruby); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; } .col-12 { grid-column: span 12; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px; box-shadow: 0 8px 24px rgba(95,7,31,.06);
}
.card h2, .card h3 { margin: 0 0 12px; }
.kpi { border-left: 4px solid var(--gold); }
.kpi b { display: block; font-size: 28px; color: var(--ruby); margin-top: 8px; }
.match-list { display: grid; gap: 18px; }
.match-card { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 20px; padding: 0; overflow: hidden; }
.match-poster {
  width: 100%; aspect-ratio: 4 / 5; height: 100%; max-height: 560px;
  object-fit: cover; background: var(--ruby-soft);
}
.match-poster.placeholder {
  display: grid; place-items: center; min-height: 380px;
  background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 60%, var(--gold));
  color: #fff; font-size: 28px; font-weight: 900; text-align: center; padding: 24px;
}
.match-poster.placeholder span { display: block; font-size: 14px; color: #f8e8be; margin-top: 8px; }
.match-info { padding: 22px 22px 22px 0; }
.match-info h3 {
  margin: 0 0 8px; font-size: clamp(30px, 4vw, 48px);
  line-height: 1; font-weight: 950; color: var(--ruby-dark);
}
.match-date {
  display: inline-block; margin: 4px 0 12px; padding: 7px 10px;
  border-radius: 8px; background: var(--gold); color: var(--ruby-dark);
  font-size: clamp(28px, 4vw, 46px); line-height: 1; font-weight: 950;
}
.match-price { font-size: 18px; }
.mailing-box { margin: 16px 0; padding: 14px; border-radius: 8px; background: #fff8e8; border: 1px solid #edd8a6; }
.mailing-box h4 { margin: 0 0 8px; color: var(--ruby); }
.mailing-text { white-space: pre-wrap; color: var(--ink); margin-bottom: 12px; }
.match-admin-list { display: grid; gap: 14px; margin-top: 14px; }
.admin-poster-preview { width: 120px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); vertical-align: middle; margin-right: 10px; }
.large-text { min-height: 150px; }
.stand-section { display: grid; gap: 18px; }
.stand-landing { padding: 0; overflow: hidden; }
.stand-image {
  display: block; width: 100%; max-height: 720px; object-fit: contain;
  background: linear-gradient(135deg, #fff, #f5eef1);
}
.stand-image.placeholder {
  display: grid; place-items: center; min-height: 420px; padding: 28px;
  background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 62%, var(--gold));
  color: #fff; font-size: 34px; font-weight: 950; text-align: center;
}
.stand-image.placeholder span { display: block; font-size: 15px; color: #f8e8be; margin-top: 10px; }
.stand-image.small-preview { min-height: 260px; font-size: 24px; border-radius: 8px; }
.stand-copy { padding: 28px 28px 8px; max-width: 920px; }
.stand-copy h2 {
  margin: 0 0 12px; color: var(--ruby-dark);
  font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; font-weight: 950;
}
.stand-size {
  display: inline-block; margin: 0 0 16px; padding: 8px 12px;
  border-radius: 8px; background: var(--gold); color: var(--ruby-dark);
  font-weight: 950; font-size: 20px;
}
.stand-copy p { font-size: 18px; line-height: 1.5; margin: 0 0 10px; }
.nowrap { white-space: nowrap; }
.stand-benefits { padding: 14px 28px 8px; }
.stand-benefits h3, .stand-pocket h3 { margin: 0 0 12px; color: var(--ruby); }
.benefit-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.benefit-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-weight: 700;
}
.benefit-item span { color: var(--green); font-weight: 950; }
.stand-pocket {
  margin: 10px 28px 0; padding: 16px; border-radius: 8px;
  background: #fff8e8; border: 1px solid #edd8a6;
}
.stand-pocket p { margin: 0; line-height: 1.55; }
.stand-free {
  margin: 18px 28px 28px; padding: 18px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #f3d680);
  color: var(--ruby-dark); font-size: 22px; font-weight: 950; text-align: center;
  box-shadow: 0 12px 28px rgba(199,154,50,.22);
}
.stand-admin-preview {
  width: 100%; max-height: 430px; object-fit: contain;
  border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
.event-section { display: grid; gap: 18px; }
.event-slider {
  position: relative; height: clamp(350px, 42vw, 450px);
  padding: 0; overflow: hidden; background: var(--ruby-dark);
}
.event-slides, .event-slide { position: absolute; inset: 0; }
.event-slide {
  opacity: 0; transform: scale(1.03);
  transition: opacity .75s ease, transform 1.8s ease;
}
.event-slide.active { opacity: 1; transform: scale(1); }
.event-slide img { width: 100%; height: 100%; object-fit: cover; }
.event-slide.placeholder {
  display: grid; place-items: center; text-align: center; padding: 28px;
  background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 62%, var(--gold));
  color: #fff; font-size: 36px; font-weight: 950;
}
.event-slide.placeholder span { display: block; margin-top: 10px; color: #f8e8be; font-size: 15px; }
.event-slider::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(50,4,18,.82), rgba(122,13,42,.36) 55%, rgba(0,0,0,.12));
}
.event-slider-overlay {
  position: absolute; left: 34px; right: 120px; bottom: 72px; z-index: 2; color: #fff;
}
.event-slider-overlay h2 {
  margin: 0 0 10px; font-size: clamp(34px, 5vw, 64px);
  line-height: 1; font-weight: 950; text-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.event-slider-overlay p {
  margin: 0; max-width: 760px; font-size: clamp(17px, 2vw, 24px);
  font-weight: 800; color: #ffe7ef;
}
.event-arrow {
  position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px;
  border-radius: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.92); color: var(--ruby); font-size: 24px; font-weight: 950;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
}
.event-arrow.prev { left: 18px; }
.event-arrow.next { right: 18px; }
.event-dots {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 3;
  display: flex; justify-content: center; gap: 8px;
}
.event-dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.85);
}
.event-dot.active { width: 28px; background: var(--gold); border-color: var(--gold); }
.event-intro { padding: 24px 28px; border-left: 5px solid var(--gold); }
.event-intro p { margin: 0 0 10px; max-width: 980px; font-size: 18px; line-height: 1.55; }
.event-intro p:last-child { margin-bottom: 0; color: var(--ruby); }
.contest-page { display: grid; gap: 20px; }
.contest-card {
  padding: 0; overflow: hidden; border-color: #e8d7dd;
  background: linear-gradient(180deg, #fff, #fff 72%, #fff8e8);
}
.contest-head {
  display: grid; grid-template-columns: 74px 1fr; gap: 16px; align-items: start;
  padding: 22px; background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 68%, #9c183c);
  color: #fff;
}
.contest-icon {
  display: grid; place-items: center; width: 64px; height: 64px;
  border-radius: 8px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22); font-size: 34px;
}
.contest-badge {
  display: inline-block; margin-bottom: 8px; padding: 5px 9px;
  border-radius: 999px; background: var(--gold); color: var(--ruby-dark);
  font-size: 12px; font-weight: 950; text-transform: uppercase;
}
.contest-head h3 {
  margin: 0 0 8px; font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05; font-weight: 950;
}
.contest-head p { margin: 0; max-width: 980px; color: #ffe8ef; font-size: 17px; line-height: 1.45; }
.contest-strip {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px;
  background: #fbf4f6; border-bottom: 1px solid var(--line);
}
.contest-strip span {
  padding: 8px 10px; border-radius: 8px; background: #fff;
  border: 1px solid var(--line); color: var(--ruby-dark); font-weight: 850;
}
.contest-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px;
}
.contest-grid section {
  padding: 16px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255,255,255,.84);
}
.contest-grid h4 { margin: 0 0 12px; color: var(--ruby); font-size: 20px; }
.contest-wide { grid-column: span 2; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric-card {
  min-height: 112px; padding: 14px; border-radius: 8px;
  background: #fff8e8; border: 1px solid #edd8a6;
}
.metric-card b {
  display: block; color: var(--ruby); font-size: 34px; line-height: 1;
  font-weight: 950; margin-bottom: 8px;
}
.metric-card span { color: var(--ink); font-weight: 750; line-height: 1.28; }
.mini-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mini-list li {
  position: relative; padding-left: 20px; line-height: 1.45; color: var(--ink);
}
.mini-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 950;
}
.bonus-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bonus-grid span {
  padding: 9px; border-radius: 8px; background: var(--ruby-soft);
  color: var(--ruby-dark); font-weight: 850; text-align: center;
}
.publications-page { display: grid; gap: 18px; }
.publication-rules {
  border-left: 5px solid var(--gold);
  background: linear-gradient(135deg, #fff, #fff 70%, #fff8e8);
}
.publication-rules h3 { color: var(--ruby-dark); font-size: 28px; }
.publication-rules p { margin: 12px 0 0; max-width: 980px; line-height: 1.55; }
.rule-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.rule-grid div {
  min-height: 118px; padding: 16px; border-radius: 8px;
  background: #fff8e8; border: 1px solid #edd8a6;
}
.rule-grid b {
  display: block; margin-bottom: 8px; color: var(--ruby);
  font-size: 38px; line-height: 1; font-weight: 950;
}
.rule-grid span { display: block; color: var(--ink); font-weight: 800; line-height: 1.3; }
.publication-stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
}
.publication-stat { min-height: 120px; border-left: 4px solid var(--gold); }
.publication-stat span { color: var(--muted); font-weight: 800; }
.publication-stat b {
  display: block; margin-top: 10px; color: var(--ruby);
  font-size: 34px; line-height: 1; font-weight: 950;
}
.admin-filter-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end;
}
.points-history { display: grid; gap: 18px; }
.points-summary {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
}
.point-card {
  min-height: 112px; padding: 16px; border-radius: 8px;
  background: linear-gradient(135deg, #fff8e8, #fff);
  border: 1px solid #edd8a6;
}
.point-card span { display: block; color: var(--muted); font-weight: 850; line-height: 1.25; }
.point-card b {
  display: block; margin-top: 10px; color: var(--ruby);
  font-size: 34px; line-height: 1; font-weight: 950;
}
.point-filter-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end;
}
.event-benefits h3 { margin: 0 0 14px; color: var(--ruby-dark); font-size: 28px; }
.event-benefit-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.event-benefit-card {
  min-height: 118px; display: grid; align-content: center; gap: 10px;
  padding: 18px; border-radius: 8px; background: #fff8e8; border: 1px solid #edd8a6;
}
.event-benefit-card span { font-size: 32px; line-height: 1; }
.event-benefit-card b { color: var(--ruby-dark); line-height: 1.25; }
.event-formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.event-format-card h3 { margin: 0 0 10px; color: var(--ruby-dark); font-size: 24px; }
.event-format-card p { margin: 0 0 10px; color: var(--muted); font-weight: 800; }
.event-format-card ul { margin: 0; padding-left: 20px; line-height: 1.65; }
.event-free {
  background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 66%, #9c183c);
  color: #fff; border-color: rgba(199,154,50,.5); box-shadow: 0 14px 36px rgba(122,13,42,.2);
}
.event-free h3 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 38px); }
.event-free p { margin: 0; color: #ffe7ef; font-size: 18px; font-weight: 700; }
.event-admin-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
.event-photo-admin {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff;
}
.event-photo-admin img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line);
}
.fanid-section { display: grid; gap: 18px; }
.fanid-hero {
  display: grid; grid-template-columns: minmax(240px, 38%) 1fr;
  gap: 24px; align-items: center; overflow: hidden;
  background: linear-gradient(135deg, #fff, #fff 58%, var(--ruby-soft));
}
.fanid-phone-wrap {
  display: grid; place-items: center; min-height: 380px;
  background: radial-gradient(circle at 50% 45%, #fff 0, #fff 38%, #f2e5ea 39%, #f8f1f4 70%);
}
.fanid-phone {
  width: min(88%, 360px); max-height: 520px; object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(36,27,32,.22));
}
.fanid-copy h2 {
  margin: 0 0 14px; color: var(--ruby-dark);
  font-size: clamp(30px, 4vw, 50px); line-height: 1.05; font-weight: 950;
}
.fanid-text { font-size: 17px; line-height: 1.58; }
.fanid-self h3, .fanid-school h3, .fanid-conditions h3 {
  margin: 0 0 10px; color: var(--ruby-dark); font-size: 28px;
}
.fanid-self > p { margin: 0 0 16px; font-size: 17px; color: var(--muted); }
.fanid-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fanid-method {
  padding: 16px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; box-shadow: 0 8px 20px rgba(95,7,31,.05);
}
.fanid-method h4 { margin: 0 0 8px; color: var(--ruby); font-size: 21px; }
.fanid-method p { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }
.fanid-method img {
  display: block; width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--line); background: var(--ruby);
}
.fanid-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fanid-step { position: relative; min-height: 150px; display: grid; align-content: start; gap: 12px; }
.fanid-step span {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; background: var(--ruby); color: #fff; font-weight: 950;
}
.fanid-step p { margin: 0; line-height: 1.45; font-weight: 700; }
.condition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.condition-item {
  padding: 12px; border-radius: 8px; background: var(--ruby-soft);
  color: var(--ruby-dark); font-weight: 800;
}
.fanid-free {
  padding: 20px; border-radius: 8px; text-align: center;
  background: linear-gradient(135deg, var(--gold), #f2d37a);
  color: var(--ruby-dark); font-size: clamp(22px, 3vw, 34px); font-weight: 950;
  box-shadow: 0 14px 36px rgba(199,154,50,.22);
}
.fanid-admin-preview {
  width: 100%; max-height: 260px; object-fit: contain;
  border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
.bus-section { display: grid; gap: 18px; }
.bus-hero {
  display: grid; grid-template-columns: minmax(320px, 52%) 1fr; gap: 0; align-items: stretch;
  padding: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 68%, #9c183c);
  color: #fff; border-color: rgba(199,154,50,.45);
}
.bus-photo {
  width: 100%; height: 100%; min-height: 360px; object-fit: cover;
  background: var(--ruby-dark);
}
.bus-hero > div {
  display: flex; flex-direction: column; justify-content: center;
  padding: 30px;
}
.bus-hero h2 {
  margin: 0 0 8px; font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02; font-weight: 950;
}
.bus-subtitle { margin: 0 0 14px; color: #ffe7ef; font-size: 20px; font-weight: 850; }
.bus-description { max-width: 940px; font-size: 18px; line-height: 1.5; }
.bus-conditions h3 { margin: 0 0 14px; color: var(--ruby-dark); font-size: 28px; }
.bus-condition-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.bus-condition {
  padding: 13px; border-radius: 8px; background: #fff8e8;
  border: 1px solid #edd8a6; color: var(--ruby-dark); font-weight: 800;
  line-height: 1.4;
}
label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 10px 0 5px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: white;
  padding: 11px 12px; color: var(--ink); outline: none;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,154,50,.15); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 10px 14px; border-radius: 8px;
  background: var(--ruby); color: white; font-weight: 800; text-decoration: none;
}
.btn:hover { background: var(--ruby-dark); }
.btn.secondary { background: #fff; color: var(--ruby); border: 1px solid var(--line); }
.btn.gold { background: var(--gold); color: var(--ruby-dark); }
.btn.danger { background: var(--red); }
.btn.small { min-height: 32px; padding: 7px 10px; font-size: 13px; }
.link-button {
  padding: 0; background: transparent; color: var(--ruby);
  font-weight: 900; text-align: left; text-decoration: underline;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--ruby-soft); color: var(--ruby); margin: 12px 0; }
.success { background: #e9f7ef; color: var(--green); }
.error { background: #fff0f0; color: var(--red); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #fbf4f6; color: var(--ruby); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--ruby-soft); color: var(--ruby); font-size: 12px; font-weight: 800; }
.access-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 900;
  border: 1px solid transparent; white-space: nowrap;
}
.access-active { background: #e9f7ef; color: #17643a; border-color: #b8e2ca; }
.access-active::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #21a45b; }
.access-blocked { background: #fff0f0; color: #9f1d1d; border-color: #f0b8b8; }
.access-blocked::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d33232; }
.access-no_user { background: #f2f3f5; color: #5c6470; border-color: #d7dbe1; }
.access-no_user::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #aab0b8; }
.access-pending { background: #fff8df; color: #87610c; border-color: #ead38a; }
.access-pending::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d9a51a; }
.section-title { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.school-search-panel {
  display: grid; grid-template-columns: 220px 220px minmax(260px, 1fr) auto;
  gap: 12px; align-items: end; margin: 16px 0;
}
.school-detail { display: grid; gap: 18px; }
.school-detail-hero {
  display: grid; grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 14px; align-items: center;
  background: linear-gradient(135deg, var(--ruby-dark), var(--ruby) 72%, #95183a);
  color: #fff; border-color: rgba(199,154,50,.55);
}
.school-detail-hero h3 {
  margin: 0 0 8px; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08;
}
.school-detail-hero p { margin: 0; color: #ffe5ed; font-weight: 800; }
.hero-stat {
  min-height: 92px; padding: 14px; border-radius: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
}
.hero-stat span { display: block; color: #ffe5ed; font-weight: 800; }
.hero-stat b { display: block; margin-top: 8px; font-size: 28px; color: #fff; }
.curator-name-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.curator-access-panel { display: grid; gap: 14px; }
.access-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.access-head h3 { margin: 0 0 8px; }
.access-head p { margin: 0; }
.access-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.access-grid div, .latest-email-row {
  padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fffafa;
}
.access-grid span, .latest-email-row span { display: block; color: var(--muted); font-size: 12px; font-weight: 850; }
.access-grid b, .latest-email-row b { display: block; margin-top: 5px; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
.latest-email-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.latest-email-row small { display: flex; gap: 8px; align-items: center; margin-top: 6px; color: var(--muted); flex-wrap: wrap; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
  padding: 20px; background: rgba(38, 30, 34, .48);
}
.modal-card {
  width: min(920px, 100%); max-height: min(760px, 88vh); overflow: auto;
  padding: 18px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(38, 30, 34, .24);
}
.email-history-modal .table-wrap { margin-top: 12px; }
.school-stat-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.school-stat-card {
  min-height: 106px; padding: 14px; border-radius: 8px;
  background: #fff8e8; border: 1px solid #edd8a6;
}
.school-stat-card span { display: block; color: var(--muted); font-weight: 850; line-height: 1.25; }
.school-stat-card b {
  display: block; margin-top: 10px; color: var(--ruby);
  font-size: 30px; line-height: 1; font-weight: 950;
}
.best-class-page { display: grid; gap: 18px; }
.stage-switch {
  display: grid; grid-template-columns: minmax(180px, 260px); gap: 6px;
}
.class-summary {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  margin-bottom: 14px;
}
.school-stage-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin: 0 0 14px;
}
.school-stage-summary small { color: #7a6f73; font-weight: 800; }
.analytics-filters {
  display: grid; grid-template-columns: 220px 220px minmax(240px, 1fr) auto;
  gap: 12px; align-items: end; margin-bottom: 16px;
}
.bar-chart { display: grid; gap: 10px; }
.bar-chart div { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 56px; gap: 8px; align-items: center; }
.bar-chart b { display: block; height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--ruby), var(--gold)); min-width: 2%; }
.bar-chart span { font-weight: 800; color: #3a3034; }
.bar-chart em { font-style: normal; font-weight: 900; color: var(--ruby); text-align: right; }
.pie-list { display: grid; gap: 10px; }
.pie-list div { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px solid #f0e4e7; padding-bottom: 8px; }
.pie-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--ruby); }
.pie-1 { background: var(--gold); } .pie-2 { background: #3a3034; } .pie-3 { background: #b33b5a; } .pie-4 { background: #6f7d8c; } .pie-5 { background: #d6a638; } .pie-6 { background: #a9b2bd; }
.line-chart { width: 100%; height: 220px; background: #fffafa; border: 1px solid #f0e4e7; border-radius: 8px; }
.class-filter-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px;
  align-items: end;
}
.own-class-row td {
  background: #fff8e8;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  color: var(--ruby-dark);
  font-weight: 850;
}
.own-class-badge {
  display: inline-block; margin-left: 8px; padding: 3px 7px;
  border-radius: 999px; background: var(--ruby); color: #fff;
  font-size: 11px; font-weight: 900;
}
.class-entry-detail { border-left: 5px solid var(--gold); }
.classhour-toolbar {
  display: grid; grid-template-columns: 1fr 260px auto auto; gap: 12px;
  align-items: end; margin-bottom: 16px;
}
.material-card-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.material-card {
  background: #fff; border: 1px solid #eadfe3; border-radius: 8px;
  padding: 18px; box-shadow: 0 12px 30px rgba(33, 24, 27, .07);
}
.material-card-top { display: flex; gap: 14px; align-items: flex-start; }
.material-icon {
  width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center;
  background: var(--ruby); color: #fff; font-size: 24px; font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.16);
}
.material-meta {
  color: #7f7478; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
}
.material-card h3 { margin: 4px 0 8px; color: var(--ruby-dark); font-size: 20px; }
.material-card p { color: #3a3034; line-height: 1.5; }
.material-files { display: grid; gap: 8px; margin-top: 14px; }
.material-file-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px; border: 1px solid #eee2e6; border-radius: 8px; background: #fffafa;
}
.material-file-row small { color: #8d7a41; font-weight: 900; margin-left: 6px; }
.new-badge {
  display: inline-block; margin-left: 8px; padding: 4px 8px; border-radius: 999px;
  background: var(--gold); color: #2b220b; font-size: 11px; font-weight: 900;
  vertical-align: middle;
}
.classhour-editor { border-left: 5px solid var(--ruby); margin-bottom: 16px; }
.classhour-attachments { margin-top: 18px; }
.material-file-admin, .material-link-admin, #classhourAddFilesForm, #classhourAddLinkForm {
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto auto;
  gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px solid #f0e5e8;
}
.material-link-admin { grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) 140px auto auto; }
#classhourAddFilesForm, #classhourAddLinkForm { border: 0; margin-top: 10px; }
.mobile-menu { display: none; }
@media (max-width: 920px) {
  .hero { padding: 24px 16px; }
  .hero-panel { min-height: calc(100vh - 48px); }
  .auth-card-wide { max-height: none; }
  .layout { grid-template-columns: 1fr; }
  .layout { min-height: calc(100vh - 76px); }
  .sidebar { position: static; height: auto; display: none; }
  .sidebar.open { display: block; }
  .mobile-menu { display: inline-flex; }
  .content { padding: 18px; }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
  .match-card { grid-template-columns: 1fr; }
  .stand-copy { padding: 18px; }
  .stand-benefits { padding: 0 18px 8px; }
  .stand-pocket { margin: 10px 18px 0; }
  .stand-free { margin: 18px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .event-slider { height: 360px; }
  .event-slider-overlay { left: 18px; right: 18px; bottom: 64px; }
  .event-arrow { width: 38px; height: 38px; font-size: 20px; }
  .event-arrow.prev { left: 10px; }
  .event-arrow.next { right: 10px; }
  .event-benefit-grid, .event-formats { grid-template-columns: 1fr; }
  .event-intro { padding: 18px; }
  .contest-head { grid-template-columns: 1fr; padding: 18px; }
  .contest-grid, .metric-grid, .bonus-grid, .rule-grid, .publication-stats, .admin-filter-grid, .points-summary, .point-filter-grid { grid-template-columns: 1fr; }
  .contest-wide { grid-column: span 1; }
  .contest-strip { padding: 12px; }
  .fanid-hero, .fanid-methods, .fanid-steps, .condition-grid { grid-template-columns: 1fr; }
  .fanid-phone-wrap { min-height: 300px; }
  .fanid-phone { max-height: 360px; }
  .bus-hero, .bus-condition-grid { grid-template-columns: 1fr; }
  .school-search-panel, .school-detail-hero, .curator-name-grid, .access-grid, .school-stat-grid, .school-stage-summary, .analytics-filters, .class-summary, .class-filter-grid, .classhour-toolbar, .material-card-grid, .material-file-admin, .material-link-admin, #classhourAddFilesForm, #classhourAddLinkForm { grid-template-columns: 1fr; }
  .bar-chart div { grid-template-columns: 1fr; }
  .material-file-row { align-items: stretch; flex-direction: column; }
  .bus-photo { min-height: 240px; aspect-ratio: 16 / 9; }
  .bus-hero > div { padding: 20px; }
  .stand-image { max-height: 520px; }
  .stand-image.placeholder { min-height: 300px; }
  .match-info { padding: 18px; }
  .match-poster { max-height: none; }
  .topbar { min-height: 76px; padding: 10px 16px; align-items: flex-start; }
  .brand { gap: 12px; }
  .brand-logo { height: 54px; max-width: 140px; }
  .brand h1 { font-size: 18px; }
  .school-title { font-size: clamp(18px, 5vw, 22px); }
  .promo-pill { width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
  .hero { padding: 18px 14px; align-items: start; }
  .hero-panel { min-height: calc(100vh - 36px); justify-content: center; }
  .auth-card { padding: 20px; border-radius: 16px; }
  .auth-logo { height: 104px; }
  .auth-brand p { font-size: 18px; }
  .auth-links { flex-direction: column; align-items: center; }
  .auth-form-actions .btn { width: 100%; }
  .topbar { flex-direction: column; }
  .top-actions { width: 100%; justify-content: stretch; }
  .top-actions .btn { flex: 1; }
  table { min-width: 640px; }
}
