:root {
  --club-blue: #2459dd;
  --club-night: #172752;
  --club-sky: #eaf2ff;
  --club-mint: #c8f6e5;
  --club-coral: #ff987e;
  --club-sun: #ffd968;
  --club-edge: #c5d6fa;
  --blob: #ff987e;
  --blob-dark: #a83f3a;
  --ink: #172752;
  --muted: #475679;
  --paper: #edf4ff;
  --card: #fff;
  --line: #c5d6fa;
  --shadow: 0 7px 0 #dce8ff, 0 16px 34px #213f7c12;
  --radius: 22px;
}
body {
  color: var(--club-night);
  font-family: "Nunito", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  background: radial-gradient(circle at 8% 7%, #cbe2ff, transparent 34rem),
    radial-gradient(circle at 97% 23%, #d5f9eb, transparent 32rem), var(--club-sky);
}
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #2459dd;
  outline-offset: 3px;
}
.club-brand {
  display: inline-block;
  margin-inline-start: .7em;
  padding: .38em .65em;
  transform: rotate(-7deg);
  vertical-align: middle;
  border-radius: .52em;
  background: var(--club-sun);
  box-shadow: 0 3px 0 #e9ab37;
  color: #35284e;
  font-size: .33em;
  letter-spacing: .06em;
}
.app-shell .hero {
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid var(--club-edge);
  border-radius: 24px;
  background: #ffffffdb;
  box-shadow: var(--shadow);
}
.app-shell .hero h1 { font-size: clamp(1.8rem, 5vw, 3.55rem); }
.app-shell .hero-actions { justify-content: flex-start; }
.app-shell .panel, .auth-screen .auth-card {
  background: #fff;
  border: 1px solid var(--club-edge);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
body .primary, .club-button {
  background: var(--club-blue);
  border: 1px solid #1841b1;
  border-radius: 13px;
  box-shadow: 0 3px 0 #183b9d;
  color: #fff;
  font-weight: 800;
}
.club-button, .club-link { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: .65rem .95rem; }
body .secondary, .club-link {
  border: 1px solid var(--club-edge);
  border-radius: 13px;
  background: var(--club-sky);
  color: #223c81;
  text-decoration: none;
  font-weight: 800;
}
body .primary:hover, .club-button:hover { background: #1848c2; }
body .secondary:hover, .club-link:hover { background: #dbe9ff; }
.club-button:disabled, .club-link:disabled { opacity: .55; cursor: wait; }
body .coin-pill { background: var(--club-sun); border-color: #e9ab37; color: #46330b; }
body .user-pill { background: var(--club-mint); color: #145744; }
body .auth-tab.active { background: var(--club-blue); color: #fff; }
.club-reward-choice {
  min-width: 0;
  margin: .5rem 0;
  border: 1px solid var(--club-edge);
  border-radius: 14px;
  padding: .55rem .85rem .8rem;
  display: grid;
  gap: .55rem;
}
.club-reward-choice legend { padding: 0 .25rem; font-weight: 800; }
.club-reward-choice label { display: flex; align-items: center; gap: .45rem; }
.club-reward-choice input[type=radio] { accent-color: var(--club-blue); width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.club-reward-choice small { color: var(--muted); }
.club-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .85rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #edcc65;
  border-radius: 13px;
  background: #fff3c7;
}
.club-notice a { color: #233d82; font-weight: 800; }
body[data-rewards="off"] :is(.coin-pill, #closetBtn, #skinsBtn, #finishClosetBtn, .club-session-coins) { display: none !important; }
.club-page { min-height: 100vh; margin: 0; }
.club-container, .club-container * { box-sizing: border-box; }
.club-container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 56px; }
.club-top, .club-intro, .club-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.club-top, .club-intro { justify-content: space-between; }
.club-intro { margin: 1.4rem 0 0; padding: 1rem clamp(1rem, 5vw, 3rem); background: var(--club-blue); color: white; border-radius: 24px; }
.club-intro h1 { font-size: clamp(2rem, 6vw, 3.7rem); line-height: 1; margin: 0; letter-spacing: -.04em; }
.club-intro p { margin: .55rem 0 0; color: #edf4ff; }
.club-intro img { width: clamp(70px, 18vw, 148px); height: auto; }
.club-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
.club-card { background: #fff; padding: clamp(1rem, 3vw, 1.75rem); border-radius: 20px; border: 1px solid var(--club-edge); box-shadow: var(--shadow); min-width: 0; }
.club-card h2, .club-card h3 { margin: 0 0 .6rem; }
.club-card p { color: var(--muted); line-height: 1.5; }
.club-card form:not(.club-actions) { display: grid; gap: .65rem; justify-items: start; }
.club-card input:not([type=radio]) { border: 1px solid #9eb6ee; border-radius: 10px; background: #f9fbff; padding: .65rem; max-width: 100%; }
.club-card fieldset { width: 100%; }
.club-status { min-height: 1.4em; color: #25468b; }
#teacherPanel { margin-top: 1.4rem; }
.club-class-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-top: 1rem; }
.club-class { border-radius: 14px; padding: 1rem; background: #edf8f4; border: 1px solid #bde8d7; }
.club-class code { display: block; overflow-wrap: anywhere; margin-bottom: .75rem; }
#classReport { margin-top: 1.4rem; }
.club-table-wrap { overflow: auto; margin-bottom: 1rem; }
.club-table-wrap table { border-collapse: collapse; min-width: 100%; white-space: nowrap; }
.club-table-wrap th, .club-table-wrap td { text-align: left; padding: .6rem; border-bottom: 1px solid #d8e3fa; }
.club-table-wrap thead { background: var(--club-sky); }
@media (max-width: 630px) { .club-columns { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .club-button, .club-link, body .primary { transition: transform .16s, background-color .16s; }
  .club-button:active, body .primary:active { transform: translateY(2px); }
  .club-page .club-intro img { animation: club-float 3.6s ease-in-out infinite; }
  @keyframes club-float { 50% { transform: translateY(-5px) rotate(3deg); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
body .table-choice {
  border-color: #d3e0fb;
  background: #f5f8ff;
}
body .table-choice:has(input:checked) {
  border-color: #6392f1;
  background: #e2edff;
  box-shadow: 0 3px 0 #bed3fc;
}
body .table-badge { border-radius: 12px; box-shadow: inset 0 -3px 0 #0b205229; }
body .question-card {
  border-color: #bfd2fc;
  background: linear-gradient(180deg, #f5f9ff, #fff 66%);
}
body .closet-preview {
  background: radial-gradient(ellipse at 26% 18%, #fff5bb, transparent 56%), #d7f5eb;
  border: 1px solid #a7dfce;
}
body .cosmetic-card {
  opacity: 1;
  background: #fff;
  box-shadow: 0 4px 0 #e6edff;
}
body .cosmetic-card.is-locked { opacity: 1; }
body .cosmetic-card.is-equipped { background: #e7fff4; border-color: #5ebd98; }
body .cosmetic-preview-mini {
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 42%, white, #e8f0ff 68%);
}
body .cosmetic-card:nth-child(3n+2) .cosmetic-preview-mini { background: radial-gradient(ellipse, white, #d9f6eb); }
body .cosmetic-card:nth-child(3n+3) .cosmetic-preview-mini { background: radial-gradient(ellipse, white, #fff1d4); }
body :is(.preview-cosmetic, .cosmetic-img) { filter: drop-shadow(0 2px 2px #17275235); }
body .cosmetic-card .club-link { padding: .45rem .65rem; }
.auth-form .club-reward-choice input[type=radio] { min-height: 0; padding: 0; margin: 0; }
.auth-form .club-reward-choice input[type=radio]:invalid { border: 0; box-shadow: none; }
