:root {
  --text: #0f172a;
  --soft: #475569;
  --yellow: #ffd54a;
  --orange: #ff9f43;
  --aqua: #72dfe6;
  --lime: #7bdc65;
  --pink: #ff6fb2;
  --blue: #47b7ff;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 213, 74, .40), transparent 20%),
    radial-gradient(circle at 84% 8%, rgba(114, 223, 230, .26), transparent 16%),
    radial-gradient(circle at 76% 92%, rgba(255, 111, 178, .16), transparent 18%),
    linear-gradient(180deg, #ffd892 0%, #eefcff 34%, #fff2a4 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.shell { width: min(1280px, calc(100% - 28px)); margin: 18px auto 30px; }
.shell-narrow { width: min(980px, calc(100% - 24px)); }
.hidden { display: none !important; }

.card {
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 240, 0.80);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 40px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .36);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at top left, rgba(255, 213, 74, .58), transparent 22%),
    radial-gradient(circle at 80% 20%, rgba(114, 223, 230, .30), transparent 18%),
    radial-gradient(circle at 66% 22%, rgba(255, 159, 67, .18), transparent 16%),
    linear-gradient(135deg, rgba(255, 216, 125, .94) 0%, rgba(151, 239, 255, .38) 42%, rgba(255, 188, 212, .20) 68%, rgba(173, 242, 173, .30) 100%);
}
.hero-small { padding: 24px; }
.hero-art { position: absolute; inset: 0; pointer-events: none; }

.shape { position: absolute; opacity: .82; }
.sun {
  width: 150px; height: 150px; left: -28px; top: 30px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 69%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.aqua {
  width: 180px; height: 128px; right: 54px; top: 28px;
  transform: rotate(-14deg); background: var(--aqua);
  clip-path: polygon(12% 8%, 100% 0%, 88% 100%, 0% 84%);
}
.orange {
  width: 96px; height: 96px; right: 22px; top: 26px;
  transform: rotate(14deg); background: var(--orange); border-radius: 24px;
}
.lime {
  width: 176px; height: 66px; left: 42%; top: 0;
  transform: rotate(8deg); background: var(--lime);
  clip-path: polygon(0 20%, 100% 0, 87% 100%, 6% 78%);
}
.pink {
  width: 132px; height: 132px; left: 62%; bottom: 36px;
  transform: rotate(-12deg); background: rgba(255, 111, 178, .44);
  clip-path: polygon(10% 12%, 100% 0, 88% 92%, 0 100%);
}
.palm {
  position: absolute; width: 118px; height: 118px; opacity: .16;
  background: radial-gradient(circle at center, rgba(13, 148, 64, .22), rgba(13, 148, 64, .05));
  clip-path: polygon(50% 0%, 58% 26%, 80% 4%, 66% 34%, 100% 24%, 70% 46%, 96% 60%, 62% 56%, 75% 90%, 50% 64%, 26% 92%, 38% 56%, 4% 60%, 30% 46%, 0% 24%, 34% 34%, 20% 4%, 42% 26%);
}
.palm-left { left: 24px; bottom: 28px; transform: rotate(-18deg); }
.palm-right { right: 108px; top: 112px; transform: rotate(14deg); }

.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(280px, .78fr);
  gap: 24px; align-items: start;
}
.hero-grid.single { grid-template-columns: 1fr; }
.hero-grid-pop { align-items: center; }
.hero-copy-block { max-width: 750px; }

/* ---------- STICKER TITLE ---------- */
.sticker {
  display: inline-flex;
  transform: rotate(-3deg);
  transition: transform 0.25s ease;
  box-shadow: 0 6px 0 rgba(15, 23, 42, 0.18), 0 10px 24px rgba(15, 23, 42, 0.12);
}
.sticker-tilt-left { transform: rotate(-4deg); }
.sticker-tilt-right { transform: rotate(3deg); }
.sticker:hover { transform: rotate(0) translateY(-2px); }

.sticker-title-wrap {
  position: relative;
  margin: 28px 0 8px;
  padding: 6px 0;
  max-width: 760px;
}
.sticker-title {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 8px; margin: 0;
  font-weight: 900; line-height: 0.9;
  letter-spacing: -0.06em; text-transform: uppercase;
  font-family: 'Inter', system-ui, sans-serif;
}
.sticker-line {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 14px;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 8px 0 rgba(15, 23, 42, 0.16), 0 14px 30px rgba(15, 23, 42, 0.15);
  transform-origin: left center;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}
.sticker-title .line-1 {
  background: linear-gradient(140deg, #fff6c2, #ffe88a);
  transform: rotate(-3deg);
}
.sticker-title .line-2 {
  background: linear-gradient(140deg, #0f172a, #1e293b);
  color: #ffd54a;
  transform: rotate(2deg);
  font-size: clamp(3rem, 9vw, 6.2rem);
  padding: 8px 22px;
}
.sticker-title .line-3 {
  background: linear-gradient(140deg, #72dfe6, #2fc2ff);
  color: #0f172a;
  transform: rotate(-2deg);
  font-size: clamp(3.2rem, 10vw, 6.8rem);
  padding: 8px 28px;
}
.sticker-stamp {
  position: absolute; top: -8px; right: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px;
  background: #ff6fb2; color: #fff;
  font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase;
  font-size: 0.78rem;
  border-radius: 999px;
  transform: rotate(8deg);
  box-shadow: 0 6px 0 rgba(15, 23, 42, 0.18), 0 12px 24px rgba(255, 111, 178, 0.35);
}

/* ---------- PILLS, BADGES, BUTTONS ---------- */
.badge-row, .meta-row, .button-row {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .15em;
  font-weight: 900; box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}
.pill.yellow { background: var(--yellow); }
.pill.aqua { background: var(--aqua); }
.pill.orange { background: linear-gradient(145deg, #ffb05a, #ffd48f); }

.lead {
  margin: 18px 0 0; max-width: 740px;
  color: rgba(15, 23, 42, .82);
  line-height: 1.75; font-size: 1.03rem;
}
.meta-row { margin-top: 16px; }
.meta-row span {
  min-height: 42px; padding: 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center;
  background: rgba(255, 248, 236, .82);
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.button-row { margin-top: 22px; }
.button-row.left { justify-content: flex-start; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 20px; border-radius: 16px;
  border: 1px solid transparent; cursor: pointer; font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-dark { background: #0f172a; color: #fff; box-shadow: 0 12px 22px rgba(15, 23, 42, .18); }
.button-light { background: rgba(255, 247, 233, .92); color: #0f172a; border-color: rgba(15, 23, 42, .08); }
.button-bright {
  background: linear-gradient(145deg, #ff9f43, #ff6fb2);
  color: #fff;
  box-shadow: 0 12px 22px rgba(255, 111, 178, .24);
}

/* ---------- COUNTDOWN ---------- */
.count-wrap { margin-top: 22px; }
.count-head {
  margin-bottom: 10px; font-size: .88rem;
  text-transform: uppercase; letter-spacing: .16em;
  font-weight: 900; color: var(--soft);
}
.count-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.count-box {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, .26);
  background: linear-gradient(180deg, rgba(255, 249, 239, .86), rgba(255, 243, 216, .76));
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}
.count-box strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1; font-weight: 900;
}
.count-box span {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; color: var(--soft);
  text-transform: uppercase; letter-spacing: .15em; font-size: .76rem;
}
.count-box:nth-child(1) span::before,
.count-box:nth-child(2) span::before,
.count-box:nth-child(3) span::before,
.count-box:nth-child(4) span::before {
  content: ''; width: 10px; height: 10px; border-radius: 999px;
}
.count-box:nth-child(1) span::before { background: var(--yellow); }
.count-box:nth-child(2) span::before { background: var(--aqua); }
.count-box:nth-child(3) span::before { background: var(--orange); }
.count-box:nth-child(4) span::before { background: var(--lime); }

/* ---------- SIDE PANEL + CHIPS ---------- */
.side-panel { padding: 22px; }
.tropical-card {
  background:
    radial-gradient(circle at top right, rgba(255, 213, 74, .34), transparent 24%),
    radial-gradient(circle at bottom left, rgba(71, 183, 255, .20), transparent 26%),
    linear-gradient(145deg, rgba(255, 246, 224, .84), rgba(235, 255, 245, .72));
}
.side-panel h2, .results-card h3, .compact-card h3, .footer strong { margin: 0; }
.side-panel p, .section-copy, .results-card p, .footer p, .compact-card p {
  color: var(--soft); line-height: 1.7;
}
.chip-grid {
  margin-top: 18px; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.chip { border-radius: 16px; padding: 14px; font-weight: 800; font-size: .95rem; }
.chip-yellow { background: #fff6bf; }
.chip-aqua { background: #def8ff; }
.chip-orange { background: #ffecde; }
.chip-lime { background: #edfddb; }
.chip-pink { background: #ffe0ef; }
.chip-soft { background: #fff4e7; }

/* ---------- INFO STRIP ---------- */
.info-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-top: 18px;
}
.info-card {
  display: flex; align-items: center; gap: 14px;
  border-radius: 22px; padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, .35);
}
.icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 16px; background: rgba(255, 255, 255, .78);
  font-size: 1.25rem;
}
.info-card h3 { margin: 0; font-size: 1rem; }
.info-card p { margin: 4px 0 0; font-size: .92rem; color: var(--soft); }
.tint-orange { background: linear-gradient(145deg, #ffd4a8, #ffead9); }
.tint-yellow { background: linear-gradient(145deg, #ffe162, #fff2b0); }
.tint-aqua { background: linear-gradient(145deg, #9deeff, #dcfbff); }
.tint-lime { background: linear-gradient(145deg, #d7f599, #f0ffe0); }

/* ---------- SECTIONS ---------- */
.stack { display: grid; gap: 22px; margin-top: 22px; }
.section {
  padding: 24px; border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: var(--shadow-soft);
}
.tropical-bg-yellow { background: linear-gradient(145deg, rgba(255, 234, 142, .46), rgba(255, 248, 218, .76)); }
.tropical-bg-orange { background: linear-gradient(145deg, rgba(255, 181, 120, .32), rgba(255, 241, 225, .76)); }
.tropical-bg-aqua { background: linear-gradient(145deg, rgba(141, 239, 255, .34), rgba(247, 252, 255, .78)); }
.tropical-bg-pink { background: linear-gradient(145deg, rgba(255, 186, 212, .30), rgba(255, 243, 247, .78)); }

.section-head {
  display: flex; justify-content: space-between;
  gap: 16px; align-items: flex-start; margin-bottom: 18px;
}
.section-pill {
  min-height: 34px; padding: 0 12px; border-radius: 999px;
  display: inline-flex; align-items: center;
  font-size: .77rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 900;
}
.section-pill.yellow { background: var(--yellow); }
.section-pill.orange { background: var(--orange); }
.section-pill.aqua { background: var(--aqua); }
.section-pill.pink { background: var(--pink); color: #fff; }
.section-head h2 { margin: 10px 0 0; font-size: 2rem; }
.status-inline {
  min-height: 42px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .54);
  font-weight: 700; color: #334155;
}

/* ---------- TEAMS ---------- */
.team-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.team-card { padding: 18px; }
.team-card h3 { margin: 0; font-size: 1.1rem; }
.team-meta { margin-top: 10px; color: var(--soft); line-height: 1.65; }
.team-tag-row { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.small-tag { padding: 8px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; }
.tag-green { background: #def6bf; }
.tag-blue { background: #d9f8ff; }
.tag-yellow { background: #fff3b3; }

/* ---------- RESULTS / FORMS ---------- */
.results-grid, .auth-layout, .admin-results-grid { display: grid; gap: 16px; }
.results-grid, .auth-layout { grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); }
.admin-results-grid { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); }
.results-card, .form-card, .compact-card { padding: 20px; }
.list-stack { display: grid; gap: 12px; }

.result-item, .history-item, .admin-team-card {
  border-radius: 18px; padding: 14px;
  background: rgba(255, 255, 255, .42);
}
.result-item:nth-child(4n+1), .history-item:nth-child(4n+1) { background: #fff4a2; }
.result-item:nth-child(4n+2), .history-item:nth-child(4n+2) { background: #d0f5ff; }
.result-item:nth-child(4n+3), .history-item:nth-child(4n+3) { background: #ffd9c2; }
.result-item:nth-child(4n+4), .history-item:nth-child(4n+4) { background: #e7ffd0; }
.result-item strong, .history-item strong { display: block; }
.result-meta, .history-meta, .mini-copy { margin-top: 6px; color: var(--soft); }

.empty-box, .status-box {
  margin-top: 14px; padding: 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .40);
  color: #334155; font-weight: 700;
}
.explain-list { margin: 14px 0 0; padding-left: 18px; color: var(--soft); line-height: 1.72; }

.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
label span { display: block; margin-bottom: 8px; font-weight: 700; color: #334155; }
input, select {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .26);
  background: rgba(255, 251, 244, .94);
  color: var(--text);
}
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.checkbox-row input { width: 20px; min-height: 20px; }
.notice-box {
  margin-top: 16px; padding: 14px; border-radius: 16px;
  background: linear-gradient(145deg, #fff4d0, #fffafb);
  color: #334155; font-weight: 600; line-height: 1.7;
}
.status-panel {
  padding: 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .44);
  min-height: 120px; color: #334155;
  font-weight: 700; line-height: 1.65;
}

/* ---------- ADMIN ---------- */
.admin-card-list { display: grid; gap: 12px; }
.admin-team-card { display: grid; gap: 14px; }
.admin-team-top {
  display: flex; justify-content: space-between;
  gap: 12px; align-items: flex-start;
}
.admin-team-title { margin: 0; font-size: 1.06rem; }
.admin-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toggle-row label { display: inline-flex; align-items: center; gap: 8px; }
.toggle-row input { width: 18px; min-height: 18px; }

/* ---------- BRACKET ---------- */
.bracket-grid {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 20px; overflow-x: auto; padding-bottom: 10px;
}
.bracket-round {
  display: flex; flex-direction: column;
  justify-content: space-around; gap: 14px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 18px; padding: 14px;
}
.bracket-round-head {
  font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.78rem;
  color: #334155; margin-bottom: 6px;
}
.bracket-match {
  background: #ffffff; border-radius: 14px; padding: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.bracket-slot {
  padding: 8px 10px; border-radius: 10px;
  background: #fff7e8; font-weight: 700; color: #0f172a;
}
.bracket-slot + .bracket-slot { margin-top: 6px; background: #e6f8ff; }

/* ---------- FOOTER ---------- */
.footer {
  margin-top: 22px; padding: 22px 24px;
  display: flex; justify-content: flex-start;
  gap: 16px; align-items: center;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .hero-grid, .results-grid, .auth-layout, .admin-results-grid,
  .team-grid, .info-strip { grid-template-columns: 1fr 1fr; }
  .hero-grid > *:first-child { grid-column: span 2; }
  .side-panel { grid-column: span 2; }
}

@media (max-width: 760px) {
  .shell, .shell-narrow { width: min(100% - 16px, 1280px); }
  .hero, .section, .footer { padding: 18px; }
  .hero-grid, .results-grid, .auth-layout, .admin-results-grid,
  .team-grid, .info-strip, .form-grid-2, .form-grid-3,
  .chip-grid, .count-grid { grid-template-columns: 1fr; }
  .side-panel { grid-column: auto; }
  .section-head, .admin-team-top, .footer { flex-direction: column; align-items: flex-start; }
  .sticker-title { align-items: center; }
  .sticker-stamp { right: 50%; transform: translateX(50%) rotate(6deg); top: -14px; }
}

.button-danger {
  background: linear-gradient(145deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 12px 22px rgba(239, 68, 68, 0.24);
}

.admin-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}