@font-face {
  font-family: "Nimbus Narrow";
  src: url("assets/NimbusSansNarrow-BoldOblique.otf") format("opentype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #08131d;
  --deep: #0b1925;
  --navy: #0f2130;
  --line: #304251;
  --paper: #fff3e3;
  --muted: #adbdc7;
  --orange: #ff8928;
  --lime: #d8f34d;
  --display: "Nimbus Narrow", "Arial Narrow", Arial, sans-serif;
  --text: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 1rem/1.55 var(--text); }
h1, h2, h3, p, dl, ol { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }

.wrap { width: min(100% - 36px, 1160px); margin-inline: auto; }
.skip { position: absolute; z-index: 10; top: 10px; left: 12px; padding: 10px; background: var(--paper); color: var(--ink); transform: translateY(-160%); }
.skip:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 14px; padding-top: 12px; }
.brand {
  display: inline-grid;
  justify-items: center;
  justify-self: start;
  width: max-content;
  text-decoration: none;
  color: var(--paper);
  padding: 5px 0 7px;
}
.brand span { font: italic 700 25px/.95 Georgia, serif; letter-spacing: -.07em; }
.brand small { font-size: 8px; font-weight: 700; letter-spacing: .55em; margin: 4px 0 0 .55em; }
.masthead nav { grid-row: 2; grid-column: 1/-1; display: flex; gap: clamp(16px, 7vw, 30px); }
.masthead nav a { text-decoration: none; padding: 11px 0 12px; color: var(--muted); font-size: .82rem; font-weight: 660; }
.masthead nav a:hover, .arrow-link:hover { color: var(--orange); }
.masthead-inner > .button { grid-column: 2; grid-row: 1; }
.desktop-label { display: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 3px;
  font: 750 .88rem/1.25 var(--text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s, color .16s, border-color .16s;
}
.button span[aria-hidden] { font-size: 1.15em; }
.button-small { min-height: 40px; padding-inline: 11px; font-size: .78rem; }
.button-primary { border-color: var(--orange); background: var(--orange); color: #11151a; }
.button-primary:not(:disabled):hover { border-color: #ffae68; background: #ffae68; }
.button-outline { background: transparent; border-color: #576778; color: var(--paper); }
.button-outline:hover { border-color: var(--orange); color: var(--orange); }
.button:disabled { cursor: default; background: #293d4c; border-color: #394f60; color: #a9b8c3; }

.hero { display: grid; gap: 28px; padding-block: clamp(35px, 6vw, 70px) clamp(35px, 5.2vw, 62px); }
.hero-copy { min-width: 0; }
.kicker { font-size: .78rem; font-weight: 760; letter-spacing: .115em; text-transform: uppercase; }
.hero-date { display: flex; align-items: center; gap: 11px; color: var(--orange); }
.date-stroke { width: 25px; height: 2px; background: var(--orange); }
.hero h1 {
  margin: 21px 0 24px;
  padding-right: 10px;
  font: italic 700 clamp(3.15rem, 12.1vw, 7rem)/.84 var(--display);
  letter-spacing: -.026em;
  text-transform: uppercase;
  -webkit-text-stroke: .3px currentColor;
}
.hero h1 span { display: block; }
.title-kota { font-size: .84em; }
.title-open { color: var(--orange); font-size: 1.42em; letter-spacing: -.016em; }
.title-tournament { font-size: .48em; letter-spacing: .028em; margin-top: .20em; }
.event-meta { display: flex; gap: 0; padding-block: 15px 16px; border-block: 1px solid var(--line); max-width: 440px; }
.event-meta > div { flex: 1; padding-inline-end: 14px; }
.event-meta > div + div { padding-inline-start: 17px; border-inline-start: 1px solid var(--line); }
.event-meta dt { font-size: .72rem; font-weight: 750; letter-spacing: .07em; color: var(--muted); text-transform: uppercase; }
.event-meta dd { margin: 3px 0 0; font-size: clamp(1rem, 3.8vw, 1.24rem); font-weight: 740; }
.hero-actions { display: flex; align-items: center; gap: 7px 18px; flex-wrap: wrap; margin-top: 20px; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-size: .85rem; font-weight: 710; text-decoration: none; }
.arrow-link span { color: var(--orange); }
.poster { position: relative; align-self: center; margin-inline: auto; max-width: 440px; padding: 6px; border: 1px solid #435462; background: var(--deep); }
.poster::after { content: ""; display: block; position: absolute; inset: -1px -1px auto auto; width: 38px; height: 38px; border: 2px solid var(--orange); border-bottom: 0; border-left: 0; pointer-events: none; }
.poster img { width: 100%; height: auto; }

.band { padding-block: clamp(40px, 6vw, 78px); border-top: 1px solid var(--line); }
.section-heading { margin-bottom: clamp(23px, 3.4vw, 38px); }
h2 { font: italic 700 clamp(2.44rem, 6vw, 4.7rem)/.97 var(--display); letter-spacing: -.014em; text-transform: uppercase; padding-right: .08em; }
.section-heading p { margin-top: 9px; color: var(--muted); }
.two-up { display: grid; gap: 14px; }
.divisions { background: var(--deep); }
.division { position: relative; min-width: 0; padding: 18px 16px 13px; border: 1px solid var(--line); border-top: 2px solid var(--orange); background: linear-gradient(145deg, #132939, var(--navy) 72%); }
.division-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.division h3, .prize-card h3 { font-size: clamp(1.02rem, 3vw, 1.22rem); letter-spacing: -.025em; }
.division-top > span { color: var(--muted); font-size: .78rem; }
.level { margin: 14px 0 3px; color: var(--paper); font: italic 700 clamp(1.95rem, 7vw, 3.1rem)/1 var(--display); text-transform: uppercase; }
.choose { color: var(--orange); }
.choose:hover { color: var(--paper); }
.restriction { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: .86rem; color: var(--paper); }
.rule-mark { display: grid; flex: 0 0 22px; height: 22px; place-items: center; border: 1px solid #c36a27; border-radius: 50%; color: var(--orange); font-size: .74rem; font-weight: 800; }

.prize-band { background: #101d27; }
.prize-card { padding: 17px 16px; border: 1px solid var(--line); background: var(--ink); }
.prize-card dl { margin-top: 8px; }
.prize-card dl > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.prize-card dt { color: var(--muted); font-size: .82rem; font-weight: 630; }
.prize-card dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.prize-card .winner { border-top: 0; padding: 4px 0 10px; }
.prize-card .winner dt { color: var(--paper); }
.winner dd { color: var(--orange); font: italic 700 clamp(1.75rem, 5.4vw, 3.15rem)/1 var(--display); white-space: nowrap; }

.day { display: grid; grid-template-columns: 85px minmax(0, 1fr); border: 1px solid var(--line); background: var(--deep); }
.day-date { display: grid; justify-items: center; align-content: center; min-height: 140px; padding: 8px; color: var(--ink); background: var(--orange); }
.day-date span { font-size: .65rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.day-date strong { font: italic 700 3rem/.94 var(--display); }
.day-matches { padding: 13px 11px 16px; }
.day-matches h3 { font-size: 1.23rem; font-variant-numeric: tabular-nums; }
.day-matches ul { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: .87rem; }
.day-matches li + li { margin-top: 3px; }
.day-matches li::marker { color: var(--orange); }
.rules { display: grid; margin-top: 20px; }
.rules > div { border-top: 1px solid var(--line); padding: 13px 0; }
.rules h3 { font-size: 1rem; }
.rules p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

.registration-band { background: radial-gradient(ellipse at 10% 15%, #153046 0%, var(--deep) 55%); }
.registration-layout { display: grid; gap: 23px; }
.registration-intro p { margin-top: 13px; color: var(--muted); max-width: 36ch; }
.registration-intro .local-note { border-left: 2px solid var(--orange); padding-left: 12px; font-size: .85rem; color: var(--paper); }
.wizard { min-width: 0; background: var(--ink); border: 1px solid #456071; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; list-style: none; }
.steps li { padding: 9px 1px; border-bottom: 2px solid var(--line); font-size: clamp(.59rem, 2.55vw, .83rem); font-weight: 725; text-align: center; color: var(--muted); }
.steps li[aria-current] { color: var(--orange); border-color: var(--orange); background: #161e24; }
.steps .complete { color: var(--paper); border-color: #a55b28; }
.wizard-body { padding: clamp(15px, 3vw, 29px); }
.step-panel h3 { font-size: clamp(1.1rem, 3vw, 1.42rem); line-height: 1.2; letter-spacing: -.022em; }
.step-panel > p { color: var(--muted); font-size: .9rem; margin-top: 9px; }
#division-review, #team-review { color: var(--orange); font-weight: 650; }
.choices { display: grid; gap: 8px; margin-top: 13px; }
.choice {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 47px;
  padding: 10px;
  border: 1px solid #435668;
  border-radius: 3px;
  color: var(--paper);
  font-size: .87rem;
  cursor: pointer;
}
.choice:hover { border-color: #9b7756; }
.choice:has(:checked) { border-color: var(--orange); background: #251d19; }
.choice input { accent-color: var(--orange); width: 17px; height: 17px; flex: 0 0 17px; margin: 0; }
.choice small, .choice strong { display: block; }
.choice small { color: var(--muted); font-size: .79rem; }
.step-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.step-actions .button { padding-inline: clamp(11px, 2.1vw, 16px); }
.feedback { padding: 8px 10px; border-left: 2px solid var(--orange); color: var(--paper) !important; }
.availability { margin-top: 12px; }
.availability > div { display: flex; justify-content: space-between; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.availability dt { color: var(--muted); }
.availability dd { margin: 0; font-weight: 720; text-align: right; }
#availability-remaining { color: var(--orange); }

.field-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.field-grid label, #draft-title { display: block; font-size: .83rem; font-weight: 700; }
.field-grid .phone-field { grid-column: 1 / -1; }
.field-grid input, .draft textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 48px;
  border: 1px solid #536778;
  border-radius: 3px;
  background: var(--navy);
  color: var(--paper);
  font: 400 1rem/1.4 var(--text);
  padding: 10px;
}
.field-grid input::placeholder { color: var(--muted); }
.draft { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 15px; }
.draft textarea { resize: vertical; font-size: .9rem; }
.draft p { margin-block: 9px; font-size: .82rem; color: var(--muted); }
.draft .copy-status:empty { margin: 0; }
.draft .copy-status { color: var(--paper); }

.footer { background: #070f18; border-top: 1px solid var(--line); padding-block: 20px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between; }
.footer p { color: var(--muted); font-size: .8rem; }

@media (min-width: 640px) {
  .wrap { width: min(100% - 64px, 1160px); }
  .masthead-inner { grid-template-columns: 1fr auto 1fr; gap: 20px; min-height: 71px; padding-block: 3px; }
  .masthead nav { grid-row: 1; grid-column: 2; }
  .masthead nav a { font-size: .89rem; }
  .masthead-inner > .button { grid-column: 3; justify-self: end; }
  .desktop-label { display: inline; }
  .mobile-label { display: none; }
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(26px, 5vw, 75px); }
  .hero h1 { font-size: clamp(3.2rem, 8vw, 7rem); }
  .poster { max-width: 460px; margin-inline: 0; justify-self: end; padding: 8px; }
  .hero-actions { margin-top: 24px; }
  .two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .day { grid-template-columns: 92px minmax(0, 1fr); }
  .day-matches { padding: 16px; }
  .rules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
  .division, .prize-card { padding: 23px 20px 17px; }
  .registration-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(21px, 4.8vw, 65px); align-items: start; }
}
@media (min-width: 850px) {
  .hero { grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr); padding-block: 47px 54px; }
  .hero h1 { margin-block: 27px 28px; }
  .masthead-inner { min-height: 76px; }
  .masthead .brand span { font-size: 32px; }
  .hero-actions { gap: 22px; }
  .button-small { padding-inline: 13px; }
  .division, .prize-card { padding: 24px 24px 17px; }
  .day { grid-template-columns: 121px minmax(0, 1fr); }
  .day-date strong { font-size: 3.45rem; }
  .day-matches { padding: 21px; }
  .division-choices, .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.icon {
  position: relative;
  display: inline-block;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
}
.icon::before, .icon::after { position: absolute; content: ""; }
.icon::before { top: 5px; left: 0; width: 11px; border-top: 1.6px solid currentColor; }
.icon::after { top: 2px; right: 1px; width: 7px; height: 7px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg); }
.icon-ne { transform: rotate(-45deg); }
.icon-down { transform: rotate(90deg); }
.icon-up { transform: rotate(-90deg); }

.declaration { align-items: start; }
.declaration input { margin-top: 3px; }
.declaration strong { margin-bottom: 4px; overflow-wrap: anywhere; }

.payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--navy);
}
.payment-label, .test-label { font-size: .76rem; font-weight: 700; }
.payment-label { color: var(--muted); }
.payment-fee { color: var(--orange); font-variant-numeric: tabular-nums; font-size: 1.36rem; font-weight: 750; }
.test-label { color: var(--paper); border: 1px solid #84664f; padding: 2px 7px; border-radius: 3px; }
.proof-box { padding: 12px; margin-top: 15px; border: 1px solid var(--line); }
.proof-box label, .draft label { display: block; font-size: .85rem; font-weight: 700; }
#proof-guide { color: var(--muted); font-size: .83rem; margin-top: 4px; }
#proof-file {
  display: block;
  margin: 8px 0;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: .85rem;
}
#proof-file::file-selector-button {
  min-height: 40px;
  border: 1px solid #576778;
  background: var(--navy);
  color: var(--paper);
  border-radius: 3px;
  font: 700 .79rem var(--text);
  margin-right: 6px;
  padding-inline: 9px;
  cursor: pointer;
}
.proof-preview { display: flex; flex-wrap: wrap; gap: 10px; align-items: start; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.proof-preview > div { min-width: 0; flex: 1 1 120px; }
#proof-image { width: auto; max-width: 118px; max-height: 95px; object-fit: contain; border: 1px solid var(--line); }
#proof-status { overflow-wrap: anywhere; color: var(--paper); font-size: .82rem; }
#remove-proof { margin-top: 6px; }
.draft .test-complete { margin-block: 0 3px; color: var(--lime); font-size: 1.1rem; font-weight: 750; }
.draft textarea { margin-bottom: 9px; }

.qris-preview { margin-top: 12px; border: 1px solid var(--line); }
.qris-preview summary {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--paper);
  font-size: .86rem;
  font-weight: 720;
  cursor: pointer;
}
.qris-preview summary::marker { color: var(--orange); }
.qris-preview-body { padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.qris-preview-body img { width: min(100%, 258px); height: auto; margin-block: 10px; }
.qris-preview-body p { margin-top: 5px; color: var(--muted); font-size: .83rem; }
.qris-preview-body strong { color: var(--paper); }
.qris-preview-body .qris-warning { margin-top: 0; color: var(--orange); font-weight: 730; }
#apply h3:not(:first-child), #my-entries article, #organizer, #queue article, #account {margin-top:1.5rem}
#queue article,#my-entries article {border-top:1px solid var(--line);padding-top:1rem}
#queue button,#my-entries button,#account button {margin:.5rem .4rem .5rem 0}
#my-entries img {display:block;max-width:260px;width:100%;height:auto}
#feedback {margin-top:.75rem;white-space:normal}
