:root {
  color-scheme: dark;
  --bg: #07100d;
  --bg-soft: #0b1713;
  --panel: #10271d;
  --panel-strong: #153323;
  --panel-muted: #0d2018;
  --border: rgba(218, 181, 92, 0.24);
  --border-soft: rgba(255, 255, 255, 0.1);
  --text: #f6f8f5;
  --muted: #bdc8be;
  --gold: #d9b45b;
  --gold-soft: #f0d894;
  --green: #47a66b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --content: 1080px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(71, 166, 107, 0.18), transparent 34rem),
    linear-gradient(180deg, #07100d 0%, #0a1511 44%, #07100d 100%);
}

body.home-page {
  color-scheme: light;
  color: #241f5f;
  background:
    radial-gradient(circle at 16% 0%, rgba(0, 204, 51, 0.18), transparent 30rem),
    radial-gradient(circle at 84% 8%, rgba(48, 35, 131, 0.12), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f5f8ff 48%, #ffffff 100%);
}

a {
  color: var(--gold-soft);
  text-underline-offset: 0.22em;
}

body.home-page a {
  color: #302383;
}

a:hover,
a:focus {
  color: #ffffff;
}

body.home-page a:hover,
body.home-page a:focus {
  color: #008f2d;
}

a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

body.home-page a:focus-visible {
  outline-color: #00cc33;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-150%);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  background: var(--gold);
  color: #10150f;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

body.home-page .skip-link {
  background: #00cc33;
  color: #ffffff;
}

.site {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.wrap {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(7, 16, 13, 0.82);
}

body.home-page .site-header {
  border-bottom: 1px solid rgba(48, 35, 131, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

body.home-page .brand {
  color: #302383;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--panel-strong), var(--panel-muted));
  color: var(--gold);
  font-size: 0.9rem;
}

body.home-page .brand-mark {
  border-color: rgba(0, 204, 51, 0.28);
  background: #00cc33;
  color: #ffffff;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem 1.1rem;
  font-size: 0.95rem;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

body.home-page .nav-links a,
body.home-page .footer-links a {
  color: #302383;
}

.nav-links a:hover,
.nav-links a:focus,
.footer-links a:hover,
.footer-links a:focus {
  color: var(--gold-soft);
  text-decoration: underline;
}

body.home-page .nav-links a:hover,
body.home-page .nav-links a:focus,
body.home-page .footer-links a:hover,
body.home-page .footer-links a:focus {
  color: #008f2d;
}

main {
  flex: 1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--gold-soft);
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--text);
  text-decoration: underline;
}

.hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 2.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.home-page .eyebrow {
  color: #00a936;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 7vw, 5rem);
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

.subtitle {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
}

body.home-page .subtitle {
  color: #413a83;
}

.lede {
  max-width: 760px;
  margin: 1.2rem 0 0;
  color: #e0e7df;
  font-size: 1.08rem;
}

body.home-page .lede {
  color: #514c79;
}

.home-hero {
  padding-top: clamp(3rem, 7vw, 5.5rem);
}

.compact-hero {
  display: flex;
  align-items: center;
  min-height: 58vh;
}

.home-logo {
  display: block;
  width: min(100%, 34rem);
  height: auto;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.section {
  padding: 2.25rem 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.2rem;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.section:last-child {
  padding-bottom: 4.5rem;
}

.compact-details {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.08);
}

.compact-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  color: #302383;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.compact-details summary::-webkit-details-marker {
  display: none;
}

.compact-details summary::after {
  content: "+";
  display: inline-grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 204, 51, 0.12);
  color: #008f2d;
  font-size: 1.1rem;
  line-height: 1;
}

.compact-details[open] summary {
  border-bottom: 1px solid rgba(48, 35, 131, 0.12);
}

.compact-details[open] summary::after {
  content: "-";
}

.compact-details > :not(summary) {
  margin: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.app-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.app-list {
  margin-top: 1rem;
}

.approach-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 1rem;
}

.approach-item {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 36px rgba(48, 35, 131, 0.08);
}

.approach-item p {
  color: #514c79;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid rgba(48, 35, 131, 0.16);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    linear-gradient(135deg, rgba(0, 204, 51, 0.09), rgba(48, 35, 131, 0.06)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.1);
}

.contact-band p:not(.eyebrow) {
  max-width: 640px;
  color: #514c79;
}

body.home-page .studio-section {
  padding-top: 1rem;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.55fr);
  gap: 2rem;
  align-items: start;
}

.studio-grid p {
  max-width: 680px;
  color: #514c79;
  font-size: 1.06rem;
}

.studio-points {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.studio-points li {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-left: 4px solid #00cc33;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: #302383;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(48, 35, 131, 0.08);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: 1.15rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92)),
    #ffffff;
  box-shadow: 0 16px 38px rgba(48, 35, 131, 0.1);
}

.service-card span {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: #00a936;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-card h3 {
  color: #302383;
}

.service-card p {
  color: #514c79;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(48, 35, 131, 0.08);
}

.faq-item h3 {
  color: #302383;
  font-size: 1.08rem;
}

.faq-item p {
  margin-bottom: 0;
  color: #514c79;
}

.sweepstake-hero {
  padding-bottom: 1.25rem;
}

.sweepstake-hero-grid,
.sweepstake-layout {
  display: grid;
  gap: 1rem;
}

.sweepstake-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.42fr);
  align-items: center;
}

.sweepstake-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(19rem, 1.1fr);
  align-items: start;
}

.sweepstake-status,
.hero-live-card,
.sweepstake-panel,
.draw-panel,
.team-card,
.entry-row,
.draw-card {
  border: 1px solid rgba(48, 35, 131, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96)),
    #ffffff;
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.1);
}

.sweepstake-status {
  display: grid;
  gap: 0.85rem;
  padding: 1.2rem;
}

.sweepstake-hero-side {
  display: grid;
  gap: 0.85rem;
}

.hero-actions {
  flex-wrap: wrap;
}

.hero-live-card {
  padding: 1rem;
}

.hero-live-card span,
.hero-live-card strong,
.hero-live-card p,
.hero-live-card em {
  display: block;
}

.hero-live-card span {
  color: #00a936;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-live-card strong {
  margin-top: 0.35rem;
  color: #302383;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.15;
}

.hero-live-card p {
  margin: 0.45rem 0 0;
  color: #514c79;
  font-weight: 750;
}

.hero-live-card em {
  margin-top: 0.65rem;
  color: #6a6490;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 750;
}

.sweepstake-status div {
  border-top: 1px solid rgba(48, 35, 131, 0.13);
  padding-top: 0.85rem;
}

.sweepstake-status div:first-child {
  border-top: 0;
  padding-top: 0;
}

.public-mode-actions {
  margin-top: 1.1rem;
}

.public-mode-panel[hidden] {
  display: none;
}

.admin-login-panel[hidden] {
  display: none;
}

.admin-login-card {
  max-width: 34rem;
}

.sweepstake-rules-section {
  padding-top: 0.75rem;
}

.rules-panel {
  display: grid;
  grid-template-columns: minmax(14rem, 0.45fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.4rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.95)),
    #ffffff;
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.1);
}

.rules-panel h2 {
  margin: 0;
  color: #302383;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.rules-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-list li {
  border: 1px solid rgba(0, 204, 51, 0.18);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: rgba(0, 204, 51, 0.06);
}

.rules-list strong,
.rules-list span {
  display: block;
}

.rules-list strong {
  color: #302383;
  font-size: 0.96rem;
}

.rules-list span {
  margin-top: 0.2rem;
  color: #514c79;
  font-size: 0.9rem;
  font-weight: 750;
}

.screen-summary-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 1.4fr) repeat(3, minmax(10rem, 1fr));
  gap: 0.85rem;
}

.screen-summary-card {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.35rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94)),
    #ffffff;
  box-shadow: 0 20px 48px rgba(48, 35, 131, 0.12);
}

.screen-summary-card span {
  display: block;
  color: #00a936;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-summary-card strong {
  display: block;
  margin-top: 0.35rem;
  color: #302383;
  font-size: clamp(1.65rem, 3.5vw, 2.75rem);
  line-height: 1.03;
}

.screen-summary-card p {
  margin: 0.45rem 0 0;
  color: #514c79;
  font-weight: 800;
}

body.is-public-mode .admin-only {
  display: none !important;
}

body.is-admin-locked .admin-only {
  display: none !important;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

body.is-public-mode .sweepstake-hero .lede {
  max-width: 44rem;
}

body.is-public-mode .section {
  padding-block: clamp(1.7rem, 4vw, 3rem);
}

body.is-public-mode .section-heading {
  margin-bottom: 1rem;
}

body.is-public-mode .section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

body.is-public-mode .table-wrap,
body.is-public-mode .sweepstake-panel,
body.is-public-mode .results-source-card,
body.is-public-mode .team-card {
  box-shadow: 0 24px 58px rgba(48, 35, 131, 0.13);
}

body.is-public-mode .sweepstake-table {
  min-width: 980px;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

body.is-public-mode .sweepstake-table th,
body.is-public-mode .sweepstake-table td {
  padding: 1rem 1.05rem;
}

body.is-public-mode .table-team-list span {
  font-size: 0.95rem;
  padding: 0.28rem 0.52rem;
}

body.is-public-mode .allocation-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.is-public-mode .allocation-card {
  padding: 1.15rem;
}

body.is-public-mode .allocation-team {
  font-size: 1rem;
}

body.is-public-mode .prize-grid {
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 1fr);
}

body.is-public-mode .prize-list dt,
body.is-public-mode .worst-team-card strong {
  font-size: 1.05rem;
}

body.is-public-mode .prize-list dd {
  color: #302383;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

body.is-public-mode .match-result-row strong {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
}

body.is-public-mode .team-grid {
  grid-template-columns: repeat(6, 1fr);
}

.stat-number,
.stat-label {
  display: block;
}

.stat-number {
  color: #302383;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  margin-top: 0.25rem;
  color: #514c79;
  font-weight: 700;
}

.sweepstake-panel,
.draw-panel {
  padding: clamp(1.15rem, 3vw, 1.5rem);
}

.sweepstake-form {
  display: grid;
  gap: 0.9rem;
}

.sweepstake-form label {
  display: grid;
  gap: 0.35rem;
  color: #302383;
  font-weight: 800;
}

.sweepstake-form input {
  width: 100%;
  border: 1px solid rgba(48, 35, 131, 0.22);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  color: #241f5f;
  font: inherit;
}

.sweepstake-form input:focus {
  outline: 3px solid #00cc33;
  outline-offset: 2px;
}

.bulk-entry {
  display: grid;
  gap: 0.7rem;
  border-top: 1px solid rgba(48, 35, 131, 0.13);
  margin-top: 1rem;
  padding-top: 1rem;
}

.bulk-entry label {
  color: #302383;
  font-weight: 900;
}

.bulk-entry textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  border: 1px solid rgba(48, 35, 131, 0.22);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  color: #241f5f;
  font: inherit;
}

.bulk-entry textarea:focus {
  outline: 3px solid #00cc33;
  outline-offset: 2px;
}

.sweepstake-form select,
.match-form select,
.match-form input {
  width: 100%;
  border: 1px solid rgba(48, 35, 131, 0.22);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  color: #241f5f;
  font: inherit;
}

.sweepstake-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #302383;
  font-weight: 800;
}

.sweepstake-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #00cc33;
}

.form-message,
.empty-state {
  color: #514c79;
  font-weight: 700;
}

.entry-list,
.draw-results {
  display: grid;
  gap: 0.7rem;
}

.final-draw-checklist {
  border-top: 1px solid rgba(48, 35, 131, 0.13);
  margin-top: 1rem;
  padding-top: 1rem;
}

.final-draw-checklist h3 {
  margin: 0 0 0.8rem;
  color: #302383;
  font-size: 1rem;
}

.final-draw-checklist ol {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.final-draw-checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  border: 1px solid rgba(48, 35, 131, 0.12);
  border-radius: var(--radius);
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
}

.final-draw-checklist li.is-complete {
  border-color: rgba(0, 204, 51, 0.28);
  background: rgba(0, 204, 51, 0.08);
}

.check-number {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(48, 35, 131, 0.1);
  color: #302383;
  font-size: 0.85rem;
  font-weight: 900;
}

.is-complete .check-number {
  background: #00cc33;
  color: #ffffff;
}

.final-draw-checklist strong,
.final-draw-checklist em {
  display: block;
}

.final-draw-checklist strong {
  color: #302383;
}

.final-draw-checklist em {
  margin-top: 0.15rem;
  color: #514c79;
  font-style: normal;
  font-weight: 700;
}

.checklist-actions {
  margin-top: 0.85rem;
}

.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
}

.entry-row strong,
.entry-row span {
  display: block;
}

.entry-row strong,
.draw-card h3,
.team-name {
  color: #302383;
}

.entry-row span,
.draw-card p,
.team-group,
.team-owner {
  color: #514c79;
}

.remove-entry {
  border: 1px solid rgba(48, 35, 131, 0.18);
  border-radius: var(--radius);
  padding: 0.45rem 0.6rem;
  background: rgba(255, 255, 255, 0.7);
  color: #302383;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.remove-entry:hover,
.remove-entry:focus {
  border-color: rgba(202, 53, 53, 0.45);
  color: #a83232;
}

.draw-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.draw-panel p:not(.eyebrow) {
  color: #514c79;
}

.draw-animation-section {
  padding-top: 1rem;
}

.draw-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.draw-step {
  position: relative;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.72);
  color: #514c79;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
}

.draw-step.is-active {
  border-color: rgba(0, 204, 51, 0.46);
  background: rgba(0, 204, 51, 0.12);
  color: #008f2d;
  box-shadow: 0 0 0 4px rgba(0, 204, 51, 0.08);
}

.draw-step.is-done {
  border-color: rgba(48, 35, 131, 0.1);
  background: rgba(48, 35, 131, 0.08);
  color: #302383;
}

.animation-stage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.shuffle-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(48, 35, 131, 0.16);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.35rem);
  background:
    linear-gradient(135deg, rgba(0, 204, 51, 0.08), rgba(48, 35, 131, 0.06)),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.1);
}

.shuffle-box::after {
  position: absolute;
  inset: auto -20% -45% -20%;
  height: 60%;
  background: radial-gradient(circle, rgba(0, 204, 51, 0.16), transparent 62%);
  content: "";
  pointer-events: none;
}

.shuffle-label {
  display: block;
  margin-bottom: 0.55rem;
  color: #00a936;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shuffle-box strong {
  display: block;
  min-height: 2.4rem;
  color: #302383;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  line-height: 1.15;
  transition: transform 160ms ease, color 160ms ease;
}

.shuffle-box strong.is-shuffling {
  color: #00a936;
  transform: scale(1.04);
}

.draw-complete-banner {
  display: grid;
  gap: 0.2rem;
  border: 1px solid rgba(0, 204, 51, 0.28);
  border-radius: var(--radius);
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  background:
    linear-gradient(135deg, rgba(0, 204, 51, 0.16), rgba(48, 35, 131, 0.07)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.1);
}

.draw-complete-banner[hidden] {
  display: none;
}

.draw-complete-banner span {
  color: #00a936;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draw-complete-banner strong {
  color: #302383;
  font-size: 1.2rem;
}

.draw-summary-section[hidden] {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.summary-card,
.share-copy-card {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92)),
    #ffffff;
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.1);
}

.summary-card {
  padding: 1rem;
}

.summary-card span {
  display: block;
  color: #00a936;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 0.35rem;
  color: #302383;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1;
}

.summary-card p {
  margin: 0.45rem 0 0;
  color: #514c79;
  font-weight: 800;
}

.share-copy-card {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1rem, 3vw, 1.25rem);
}

.share-copy-card h3,
.share-copy-card p {
  margin: 0;
}

.share-copy-card h3 {
  color: #302383;
}

.share-copy-card p {
  color: #514c79;
  font-weight: 700;
}

.share-copy-card textarea {
  width: 100%;
  min-height: 13rem;
  resize: vertical;
  border: 1px solid rgba(48, 35, 131, 0.18);
  border-radius: var(--radius);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  color: #241f5f;
  font: inherit;
  line-height: 1.5;
}

.share-copy-card textarea:focus {
  outline: 3px solid #00cc33;
  outline-offset: 2px;
}

.draw-card {
  display: grid;
  grid-template-columns: minmax(12rem, 0.34fr) 1fr;
  gap: 1rem;
  padding: 1rem;
}

.draw-card h3,
.draw-card p {
  margin: 0;
}

.draw-team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.draw-team-list span {
  border: 1px solid rgba(0, 204, 51, 0.22);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: rgba(0, 204, 51, 0.08);
  color: #302383;
  font-weight: 800;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.team-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem;
  align-items: center;
  padding: 0.85rem;
}

.team-card.is-landing,
.sweepstake-table tr.is-landing td {
  background: rgba(0, 204, 51, 0.12);
  animation: sweepstakeLanding 420ms ease-out;
}

.team-card.is-landing {
  border-color: rgba(0, 204, 51, 0.5);
  box-shadow: 0 0 0 4px rgba(0, 204, 51, 0.08), 0 18px 44px rgba(48, 35, 131, 0.12);
}

.team-card.is-eliminated {
  opacity: 0.74;
}

.team-card.is-eliminated .team-name {
  color: #6b668f;
}

.team-flag {
  grid-row: span 2;
  line-height: 1;
}

.flag-badge {
  display: inline-flex;
  width: 2.65rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(48, 35, 131, 0.15);
  border-radius: 0.35rem;
  padding: 0.12rem;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(48, 35, 131, 0.08);
  line-height: 1;
  overflow: hidden;
  vertical-align: middle;
}

.flag-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0.22rem;
  object-fit: cover;
}

.flag-code {
  display: none;
}

.team-name {
  font-weight: 900;
}

.team-group {
  font-size: 0.9rem;
  font-weight: 700;
}

.team-owner {
  grid-column: 2;
  font-size: 0.82rem;
  font-weight: 800;
}

.allocation-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}

.allocation-card {
  display: grid;
  gap: 0.9rem;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 255, 0.96)),
    #ffffff;
  box-shadow: 0 18px 42px rgba(48, 35, 131, 0.1);
}

.allocation-card-head {
  display: grid;
  gap: 0.3rem;
}

.allocation-number {
  color: #00a936;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.allocation-card strong {
  color: #302383;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.15;
}

.allocation-team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.allocation-team {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid rgba(0, 204, 51, 0.22);
  border-radius: 999px;
  padding: 0.34rem 0.58rem 0.34rem 0.42rem;
  background: rgba(0, 204, 51, 0.08);
  color: #302383;
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.1;
}

.allocation-team em,
.table-team-list em {
  border-radius: 999px;
  padding: 0.12rem 0.34rem;
  background: rgba(0, 204, 51, 0.14);
  color: #008f2d;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.allocation-team.is-eliminated,
.table-team-list span.is-eliminated {
  border-color: rgba(202, 53, 53, 0.34);
  background: rgba(202, 53, 53, 0.08);
  color: #6b668f;
}

.allocation-team.is-eliminated > span:not(.flag-badge):not(.flag-code),
.table-team-list span.is-eliminated .team-pill-name {
  text-decoration-line: line-through;
  text-decoration-color: #ca3535;
  text-decoration-thickness: 0.16em;
  text-decoration-skip-ink: none;
}

.allocation-team.is-eliminated em,
.table-team-list span.is-eliminated em {
  background: rgba(202, 53, 53, 0.12);
  color: #a83232;
}

.allocation-card p {
  margin: 0;
  color: #514c79;
  font-size: 0.9rem;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(48, 35, 131, 0.1);
}

.sweepstake-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: #241f5f;
}

.sweepstake-table th,
.sweepstake-table td {
  border-bottom: 1px solid rgba(48, 35, 131, 0.12);
  padding: 0.8rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.sweepstake-table th:first-child,
.sweepstake-table td:first-child {
  width: 5.5rem;
}

.sweepstake-table th:nth-child(2),
.sweepstake-table td:nth-child(2) {
  width: 14rem;
}

.sweepstake-table th:nth-child(4),
.sweepstake-table td:nth-child(4) {
  width: 18rem;
}

.sweepstake-table th {
  color: #302383;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sweepstake-table tr:last-child td {
  border-bottom: 0;
}

.table-team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.table-team-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid rgba(0, 204, 51, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  background: rgba(0, 204, 51, 0.08);
  color: #302383;
  font-size: 0.86rem;
  font-weight: 800;
}

.prize-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  gap: 1rem;
  align-items: start;
}

.prize-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.prize-list div,
.worst-team-card {
  border-top: 1px solid rgba(48, 35, 131, 0.13);
  padding-top: 0.75rem;
}

.prize-list dt {
  color: #302383;
  font-weight: 900;
}

.prize-list dd {
  margin: 0.2rem 0 0;
  color: #514c79;
  font-weight: 800;
}

.worst-team-panel {
  display: grid;
  gap: 0.7rem;
}

.worst-team-card strong,
.worst-team-card span {
  display: block;
}

.worst-team-card strong {
  color: #302383;
}

.worst-team-card span {
  margin-top: 0.2rem;
  color: #514c79;
  font-weight: 700;
}

.worst-team-updated {
  margin: 0.15rem 0 0;
  border-top: 1px solid rgba(48, 35, 131, 0.13);
  padding-top: 0.75rem;
  color: #6b668f;
  font-size: 0.92rem;
  font-weight: 800;
}

.recent-results-panel {
  display: grid;
  gap: 0.65rem;
  border-top: 1px solid rgba(48, 35, 131, 0.13);
  padding-top: 0.85rem;
}

.recent-results-panel h3 {
  color: #302383;
  font-size: 1rem;
}

.recent-results-list {
  display: grid;
  gap: 0.55rem;
}

.recent-result-card {
  display: grid;
  gap: 0.22rem;
  border: 1px solid rgba(48, 35, 131, 0.12);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.65rem 0.7rem;
  background: rgba(255, 255, 255, 0.72);
}

.recent-result-card strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
  color: #302383;
  font-size: 0.92rem;
  line-height: 1.25;
}

.recent-result-card strong span {
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  background: rgba(0, 204, 51, 0.12);
  color: #008f2d;
  font-weight: 900;
}

.recent-result-card em {
  color: #6b668f;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.refund-race-panel {
  display: grid;
  gap: 0.6rem;
  border-top: 1px solid rgba(48, 35, 131, 0.13);
  padding-top: 0.85rem;
}

.refund-race-panel h3 {
  color: #302383;
  font-size: 1rem;
}

.refund-race-panel p {
  margin: 0;
  color: #6b668f;
  font-size: 0.88rem;
  font-weight: 800;
}

.refund-race-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(48, 35, 131, 0.12);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.72);
}

.refund-race-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  color: #302383;
  font-size: 0.86rem;
}

.refund-race-table th,
.refund-race-table td {
  border-bottom: 1px solid rgba(48, 35, 131, 0.1);
  padding: 0.48rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.refund-race-table th {
  background: rgba(0, 204, 51, 0.08);
  color: #514c79;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.refund-race-table tr:last-child td {
  border-bottom: 0;
}

.refund-race-table tr.is-current-worst td {
  background: rgba(0, 204, 51, 0.1);
  font-weight: 900;
}

.refund-race-table td:nth-child(1),
.refund-race-table td:nth-child(4),
.refund-race-table td:nth-child(5),
.refund-race-table td:nth-child(6),
.refund-race-table td:nth-child(7),
.refund-race-table th:nth-child(1),
.refund-race-table th:nth-child(4),
.refund-race-table th:nth-child(5),
.refund-race-table th:nth-child(6),
.refund-race-table th:nth-child(7) {
  text-align: center;
}

.refund-race-table .flag-badge {
  margin-right: 0.25rem;
}

.results-source-card {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(0, 204, 51, 0.24);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background:
    linear-gradient(135deg, rgba(0, 204, 51, 0.12), rgba(48, 35, 131, 0.05)),
    rgba(255, 255, 255, 0.84);
  color: #302383;
  box-shadow: 0 16px 36px rgba(48, 35, 131, 0.08);
}

.results-source-card strong,
.results-source-card span {
  display: block;
}

.results-source-card strong {
  color: #302383;
}

.results-source-card span {
  color: #514c79;
  font-weight: 700;
}

.results-admin-guide {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  color: #302383;
  box-shadow: 0 16px 36px rgba(48, 35, 131, 0.08);
}

.results-admin-guide summary {
  cursor: pointer;
  font-weight: 900;
}

.results-admin-guide p {
  color: #514c79;
  font-weight: 700;
}

.results-admin-guide pre {
  overflow-x: auto;
  border: 1px solid rgba(48, 35, 131, 0.12);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: rgba(36, 31, 95, 0.06);
  color: #241f5f;
}

.team-id-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.team-id-list span {
  display: grid;
  gap: 0.2rem;
  border: 1px solid rgba(48, 35, 131, 0.12);
  border-radius: var(--radius);
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.7);
}

.team-id-list strong {
  color: #302383;
  font-size: 0.9rem;
}

.team-id-list code {
  color: #008f2d;
  font-weight: 900;
}

.quick-result-panel {
  display: grid;
  grid-template-columns: minmax(12rem, 0.45fr) minmax(16rem, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 36px rgba(48, 35, 131, 0.08);
}

.quick-result-panel label,
.quick-result-label {
  display: grid;
  gap: 0.35rem;
  color: #302383;
  font-weight: 900;
}

.quick-result-panel select {
  width: 100%;
  border: 1px solid rgba(48, 35, 131, 0.22);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  color: #241f5f;
  font: inherit;
}

.quick-result-panel select:focus {
  outline: 3px solid #00cc33;
  outline-offset: 2px;
}

.score-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.score-presets button {
  border: 1px solid rgba(48, 35, 131, 0.18);
  border-radius: 999px;
  padding: 0.48rem 0.7rem;
  background: rgba(255, 255, 255, 0.74);
  color: #302383;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.score-presets button:hover,
.score-presets button:focus,
.score-presets button.is-selected {
  border-color: rgba(0, 204, 51, 0.48);
  background: rgba(0, 204, 51, 0.12);
  color: #008f2d;
}

.match-form {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) 7rem minmax(10rem, 1fr) 7rem minmax(10rem, 0.8fr) auto;
  gap: 0.75rem;
  align-items: end;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(48, 35, 131, 0.08);
}

.match-form label {
  display: grid;
  gap: 0.35rem;
  color: #302383;
  font-weight: 800;
}

.match-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.match-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.82);
}

.match-result-row strong,
.match-result-row span {
  display: block;
}

.match-result-row strong {
  color: #302383;
}

.match-result-row span {
  color: #514c79;
  font-weight: 700;
}

.button.danger {
  border-color: rgba(202, 53, 53, 0.5);
  background: rgba(202, 53, 53, 0.08);
  color: #a83232;
}

.button.danger:hover,
.button.danger:focus {
  color: #822525;
}

@keyframes sweepstakeLanding {
  0% {
    transform: scale(0.98);
  }

  55% {
    transform: scale(1.015);
  }

  100% {
    transform: scale(1);
  }
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.portfolio-card,
.feature-panel,
.project-summary {
  border: 1px solid rgba(48, 35, 131, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96)),
    #ffffff;
  box-shadow: 0 20px 50px rgba(48, 35, 131, 0.12);
}

.portfolio-card {
  padding: clamp(1.25rem, 3vw, 1.8rem);
}

.portfolio-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.portfolio-shot,
.web-screenshot {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(48, 35, 131, 0.12);
}

.portfolio-shot {
  margin-bottom: 1.1rem;
}

.portfolio-shot img,
.web-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.web-screenshot figcaption {
  border-top: 1px solid rgba(48, 35, 131, 0.12);
  padding: 0.8rem 1rem;
  color: #514c79;
  font-size: 0.95rem;
}

.web-gallery,
.home-screenshot-strip {
  display: grid;
  gap: 1rem;
}

.web-gallery {
  grid-template-columns: repeat(2, 1fr);
}

.web-gallery-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(48, 35, 131, 0.12);
}

.web-gallery-card img,
.home-screenshot-strip img {
  display: block;
  width: 100%;
  height: auto;
}

.web-gallery-card figcaption {
  border-top: 1px solid rgba(48, 35, 131, 0.12);
  padding: 0.75rem 0.9rem;
  color: #514c79;
  font-size: 0.92rem;
}

.home-screenshot-strip {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 1rem;
}

.home-screenshot-strip img {
  border: 1px solid rgba(48, 35, 131, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(48, 35, 131, 0.1);
}

.portfolio-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: var(--radius);
  background: #00cc33;
  color: #ffffff;
  font-weight: 900;
}

.apres-mark {
  background: #302383;
}

.portfolio-card h3,
.feature-panel h3,
.project-summary dt,
.web-panel dt {
  color: #302383;
}

.portfolio-card p,
.feature-panel p,
.project-summary dd,
.web-panel dd {
  color: #514c79;
}

.mini-list {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  position: relative;
  padding-left: 1.3rem;
  color: #514c79;
}

.mini-list li::before {
  position: absolute;
  left: 0;
  color: #00a936;
  content: "•";
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.45fr);
  gap: 2rem;
  align-items: center;
}

.project-summary {
  padding: 1.25rem;
}

.project-summary .portfolio-mark {
  margin-bottom: 1rem;
}

.project-summary dl,
.capability-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.project-summary div,
.capability-grid div {
  border-top: 1px solid rgba(48, 35, 131, 0.14);
  padding-top: 0.85rem;
}

.project-summary dt,
.capability-grid dt {
  font-weight: 800;
}

.project-summary dd,
.capability-grid dd {
  margin: 0.3rem 0 0;
}

.feature-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-panel {
  padding: 1.1rem;
}

.web-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
  gap: 1.5rem;
  border-color: rgba(48, 35, 131, 0.16);
  background:
    linear-gradient(135deg, rgba(0, 204, 51, 0.08), rgba(48, 35, 131, 0.06)),
    rgba(255, 255, 255, 0.82);
}

.web-panel p,
.web-panel li {
  color: #514c79;
}

.card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(21, 51, 35, 0.98), rgba(13, 32, 24, 0.94)), var(--panel);
  box-shadow: var(--shadow);
}

body.home-page .card {
  border-color: rgba(48, 35, 131, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96)),
    #ffffff;
  box-shadow: 0 20px 50px rgba(48, 35, 131, 0.12);
}

.card {
  padding: clamp(1.25rem, 3vw, 1.8rem);
}

.card p,
.panel p {
  color: var(--muted);
}

body.home-page .card p {
  color: #514c79;
}

body.home-page .web-panel {
  border-color: rgba(48, 35, 131, 0.16);
  background:
    linear-gradient(135deg, rgba(0, 204, 51, 0.08), rgba(48, 35, 131, 0.06)),
    rgba(255, 255, 255, 0.82);
}

body.home-page .web-panel p,
body.home-page .web-panel li {
  color: #514c79;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: var(--gold-soft);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

body.home-page .badge {
  border-color: rgba(0, 204, 51, 0.28);
  background: rgba(0, 204, 51, 0.08);
  color: #008f2d;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.hero-proof span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(16, 39, 29, 0.65);
  color: var(--gold-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 180, 91, 0.7);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  background: linear-gradient(180deg, #e0bd62, #b78b35);
  color: #10150f;
  font-weight: 800;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

body.home-page .button {
  border-color: #00b83c;
  background: linear-gradient(180deg, #00d63b, #00a936);
  color: #ffffff;
}

.button.secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.button:hover,
.button:focus {
  color: #10150f;
  text-decoration: none;
}

body.home-page .button:hover,
body.home-page .button:focus {
  color: #ffffff;
}

.button.secondary:hover,
.button.secondary:focus {
  color: var(--gold-soft);
}

.actions .button {
  flex: 0 0 auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(17rem, 0.7fr);
  gap: 1.25rem;
  align-items: start;
}

.panel {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.use-case-grid,
.tracking-grid {
  display: grid;
  gap: 1rem;
}

.use-case-grid {
  grid-template-columns: repeat(3, 1fr);
}

.use-case-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(21, 51, 35, 0.92), rgba(10, 24, 18, 0.88)),
    var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.use-case-card span {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.use-case-card p {
  color: var(--muted);
}

.tracking-grid {
  grid-template-columns: repeat(4, 1fr);
  margin: 1.3rem 0 0;
}

.tracking-grid div {
  border-top: 2px solid var(--gold);
  padding-top: 0.9rem;
}

.tracking-grid dt {
  color: var(--text);
  font-weight: 800;
}

.tracking-grid dd {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.workflow-step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: rgba(16, 39, 29, 0.62);
}

.workflow-step span {
  display: grid;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: #10150f;
  font-weight: 900;
}

.workflow-step p {
  color: var(--muted);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.highlight-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  background: rgba(16, 39, 29, 0.58);
}

.highlight-item p {
  color: var(--muted);
}

.app-store-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.app-store-panel p:not(.eyebrow) {
  max-width: 680px;
}

.screenshot-feature,
.screenshot-card {
  margin: 0;
}

.screenshot-feature {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.screenshot-feature img,
.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshots-section {
  padding-top: 1rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.screenshot-card {
  grid-column: span 2;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 39, 29, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.screenshot-wide {
  grid-column: span 3;
}

.screenshot-card figcaption {
  border-top: 1px solid var(--border-soft);
  padding: 0.8rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-list,
.plain-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li,
.plain-list li {
  position: relative;
  padding-left: 1.5rem;
  color: #e8eee7;
}

.feature-list li::before,
.plain-list li::before {
  position: absolute;
  left: 0;
  color: var(--gold);
  content: "•";
}

.note {
  border-left: 3px solid var(--gold);
  margin-top: 1.5rem;
  padding: 0.15rem 0 0.15rem 1rem;
  color: #e3ebe2;
}

.content {
  max-width: 820px;
}

.page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0 0.5rem;
}

.page-toc a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--gold-soft);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.page-toc a:hover,
.page-toc a:focus {
  color: var(--text);
  text-decoration: underline;
}

.content h2 {
  margin-top: 2.5rem;
  font-size: 1.45rem;
}

.content h2:first-child {
  margin-top: 0;
}

.content p,
.content li {
  color: var(--muted);
}

.contact-link {
  display: inline-block;
  margin: 0.35rem 0 0.85rem;
  color: var(--gold-soft);
  font-size: 1.1rem;
  font-weight: 800;
}

.support-callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.support-callout p {
  margin-top: 0;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.38fr);
  gap: 1.25rem;
  align-items: start;
}

.support-main {
  max-width: none;
}

.support-side {
  position: sticky;
  top: 1rem;
}

.support-side h2,
.support-side h3 {
  margin-top: 0;
}

.support-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.2rem 0 0;
}

.support-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.support-card h3 {
  font-size: 1.05rem;
}

.support-card p {
  color: var(--muted);
}

.support-card a {
  color: var(--gold-soft);
  font-weight: 800;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.2rem 0 0;
}

.support-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.support-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--text);
  font-weight: 800;
}

.form-hint {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.support-form input,
.support-form select,
.support-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  background: rgba(5, 12, 9, 0.72);
  color: var(--text);
  font: inherit;
}

.support-form textarea {
  resize: vertical;
}

.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: #060d0a;
  color: var(--muted);
}

body.home-page .site-footer {
  border-top: 1px solid rgba(48, 35, 131, 0.12);
  background: #ffffff;
  color: #514c79;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  font-size: 0.95rem;
}

.footer-meta {
  display: grid;
  gap: 0.2rem;
}

.footer-meta strong {
  color: var(--text);
}

.footer-meta a {
  color: inherit;
}

body.home-page .footer-meta strong {
  color: #302383;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1rem;
}

@media (max-width: 760px) {
  .nav,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links,
  .footer-links {
    justify-content: flex-start;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .support-layout,
  .support-card-grid,
  .portfolio-grid,
  .project-hero,
  .feature-panel-grid,
  .service-grid,
  .draw-steps,
  .summary-grid,
  .screen-summary-grid,
  .sweepstake-hero-grid,
  .sweepstake-layout,
  .rules-panel,
  .rules-list,
  .draw-card,
  .animation-stage,
  .prize-grid,
  .quick-result-panel,
  .match-form,
  .web-gallery,
  .home-screenshot-strip,
  .web-panel,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .support-side {
    position: static;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-card,
  .screenshot-wide {
    grid-column: auto;
  }

  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .studio-grid {
    grid-template-columns: 1fr;
  }

  .workflow-grid,
  .use-case-grid,
  .tracking-grid,
  .app-store-panel {
    grid-template-columns: 1fr;
  }

  .app-store-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .draw-panel {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .allocation-board,
  body.is-public-mode .allocation-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-public-mode .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body.is-public-mode .sweepstake-table {
    min-width: 880px;
  }

  .sweepstake-page .hero {
    padding-top: 2.5rem;
  }

  .sweepstake-status {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.85rem;
  }

  .sweepstake-status div,
  .sweepstake-status div:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .sweepstake-status div {
    border-left: 1px solid rgba(48, 35, 131, 0.13);
    padding-left: 0.65rem;
  }

  .sweepstake-status div:first-child {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: min(100% - 1.25rem, var(--content));
  }

  .hero {
    padding-top: 3rem;
  }

  .sweepstake-page .site-header {
    position: relative;
    z-index: 2;
  }

  .sweepstake-page .nav {
    gap: 0.7rem;
    padding: 0.75rem 0;
  }

  .sweepstake-page .brand-mark {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1rem;
  }

  .sweepstake-page .nav-links {
    gap: 0.45rem 0.7rem;
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .sweepstake-page .breadcrumbs {
    padding-top: 0.85rem;
    font-size: 0.82rem;
  }

  .sweepstake-page .hero {
    padding: 1.35rem 0 0.75rem;
  }

  .sweepstake-hero {
    padding-bottom: 0.75rem;
  }

  .sweepstake-hero h1 {
    font-size: clamp(2.3rem, 13.5vw, 3.25rem);
    line-height: 0.98;
  }

  .sweepstake-hero .subtitle {
    margin-top: 0.75rem;
    font-size: 1.05rem;
  }

  .sweepstake-hero .lede {
    margin-top: 0.8rem;
    font-size: 0.96rem;
  }

  .sweepstake-hero .actions {
    margin-top: 1rem;
  }

  .hero-proof {
    gap: 0.38rem;
    margin-top: 0.85rem;
  }

  .hero-proof span {
    padding: 0.28rem 0.52rem;
    font-size: 0.76rem;
  }

  .sweepstake-status {
    gap: 0.35rem;
    padding: 0.7rem;
  }

  .sweepstake-status div {
    padding-left: 0.45rem;
  }

  .stat-number {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.68rem;
    line-height: 1.15;
  }

  body.is-public-mode .section {
    padding-block: 1.45rem;
  }

  body.is-public-mode .section-heading {
    margin-bottom: 0.75rem;
  }

  body.is-public-mode .section-heading h2 {
    font-size: clamp(1.65rem, 9vw, 2.15rem);
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .sweepstake-hero .hero-actions {
    flex-direction: row;
    gap: 0.45rem;
  }

  .sweepstake-hero .hero-actions .button {
    width: auto;
    min-height: 2.35rem;
    flex: 1 1 6.9rem;
    padding: 0.55rem 0.45rem;
    font-size: 0.88rem;
  }

  .entry-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .match-result-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .allocation-board,
  body.is-public-mode .allocation-board {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
  }

  body.is-public-mode .team-grid {
    grid-template-columns: 1fr;
  }

  .allocation-card,
  body.is-public-mode .allocation-card {
    gap: 0.7rem;
    padding: 0.85rem;
  }

  .allocation-card strong {
    font-size: 1.05rem;
  }

  .allocation-team-list {
    gap: 0.35rem;
  }

  .allocation-team,
  body.is-public-mode .allocation-team {
    gap: 0.3rem;
    padding: 0.28rem 0.46rem 0.28rem 0.32rem;
    font-size: 0.84rem;
  }

  .flag-badge {
    width: 2.3rem;
    height: 1.55rem;
  }

  .rules-panel {
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .rules-list li {
    padding: 0.75rem;
  }

  .table-wrap {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .team-card.is-landing,
  .sweepstake-table tr.is-landing td {
    animation: none;
  }

  .shuffle-box strong {
    transition: none;
  }
}

@media print {
  html,
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-header,
  .site-footer,
  .actions,
  .skip-link,
  .page-toc {
    display: none;
  }

  .hero,
  .section {
    padding: 1rem 0;
  }

  .wrap {
    width: 100%;
  }

  .panel,
  .card {
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  a {
    color: #000000;
  }
}
