:root {
  color-scheme: light;
  font-family: 'DM Sans', Arial, sans-serif;
  color: #17364b;
  background: #0c83bf;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --blue: #1683c4;
  --blue-dark: #075783;
  --lime: #b7dc42;
  --paper: #fff;
  --muted: #587080;
  --line: #c8dce4;
  --error: #a52e28;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  background-color: #0c83bf;
  background-image:
    linear-gradient(180deg, rgb(4 75 119 / 26%), rgb(4 44 31 / 18%)),
    url('/campaign-background.webp');
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

button,
input {
  font: inherit;
}

button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #123f5c;
  outline-offset: 3px;
}

.topbar,
.page-layout,
.page-footer {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
}

.brand {
  color: inherit;
  text-decoration: none;
}

.brand-name {
  display: block;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand-eco {
  color: var(--lime);
}

.brand-name sup {
  margin-left: 2px;
  font-size: 8px;
}

.brand-byline {
  display: block;
  margin-top: 5px;
  color: #e4f4fa;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.campaign-dates {
  margin: 0;
  color: #fff;
  font-size: 11px;
  text-align: right;
}

.page-layout {
  margin-top: 8px;
  margin-bottom: 24px;
}

.campaign-intro {
  color: #fff;
}

.eyebrow {
  margin: 0 0 8px;
  color: #e8f8ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.campaign-intro h1 {
  max-width: 330px;
  margin: 0;
  font-size: clamp(40px, 10.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-visual {
  position: relative;
  width: clamp(100px, 30vw, 130px);
  flex: 0 0 clamp(100px, 30vw, 130px);
  aspect-ratio: 1;
}

.reel-art {
  position: absolute;
  top: -4px;
  right: -8px;
  width: clamp(110px, 32vw, 150px);
  height: auto;
}

.prize-badge {
  position: absolute;
  right: -2px;
  bottom: -4px;
  width: clamp(64px, 23vw, 92px);
  height: auto;
}

.intro-copy {
  max-width: 420px;
  margin: 10px 0 12px;
  color: #fff;
  font-size: 15px;
  line-height: 1.45;
}

.physical-note {
  margin: 0 0 18px;
  padding: 8px 10px;
  border-left: 3px solid #ffd56c;
  color: #fff;
  background: rgb(3 74 111 / 28%);
  font-size: 11px;
  line-height: 1.45;
}

.registration-panel {
  padding: 22px;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: 0 14px 36px rgb(9 48 69 / 22%);
}

.panel-heading {
  margin-bottom: 18px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #69818e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.step-label span {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #18415a;
  background: #e9f4d0;
  font-size: 12px;
}

.panel-heading h2,
.success-panel h2 {
  margin: 11px 0 5px;
  color: #357eaf;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.15;
}

.panel-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.field-group {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field-group label {
  color: #213d4f;
  font-size: 13px;
  font-weight: 600;
}

.field-group label > span:first-child {
  color: #a34837;
}

.field-group input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #91b9cd;
  border-radius: 10px;
  color: #18374a;
  background: #fff;
  font-size: 16px;
  line-height: 1.3;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field-group input::placeholder {
  color: #637985;
  opacity: 1;
}

.field-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(22 131 196 / 16%);
}

.field-group input:user-invalid {
  border-color: var(--error);
}

.consent-row input:user-invalid {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

.reel-input-row {
  display: flex;
  gap: 8px;
}

.secondary-button {
  min-width: 88px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #91b9cd;
  border-radius: 10px;
  color: #145579;
  background: #edf7fb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button:hover {
  background: #dcedf5;
}

.field-hint,
.optional {
  color: #637985;
  font-size: 11px;
  font-weight: 400;
}

.optional {
  margin-left: 3px;
}

.scanner-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f2f8fb;
}

.scanner-panel video {
  width: 100%;
  max-height: 250px;
  border-radius: 7px;
  background: #17364b;
  object-fit: cover;
}

.scanner-panel p {
  margin: 0;
  color: #466272;
  font-size: 12px;
  line-height: 1.5;
}

.text-button {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  color: #125f8a;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.reel-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reel-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f5fafc;
}

.reel-details {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: #213d4f;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.reel-details strong {
  font-weight: 600;
}

.reel-source {
  color: var(--muted);
  font-size: 10px;
}

.reel-remove {
  flex: 0 0 auto;
  padding: 6px 0 6px 8px;
  border: 0;
  color: #8c4039;
  background: transparent;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.reel-count {
  margin: 10px 0 0;
  color: #357eaf;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 5px 0 16px;
  color: #405969;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.consent-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  accent-color: #1779ad;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 8px;
}

.submit-button,
.scan-button {
  min-width: 0;
  min-height: 50px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: filter 120ms ease, opacity 120ms ease;
}

.submit-button {
  background: #e42632;
}

.scan-button {
  background: #398cc5;
}

.scan-button[hidden] + .submit-button {
  grid-column: 1 / -1;
}

.submit-button:hover:not(:disabled),
.scan-button:hover:not(:disabled) {
  filter: brightness(0.92);
}

.submit-button:disabled,
.scan-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-feedback {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--error);
  font-size: 12px;
  line-height: 1.5;
}

.success-panel {
  padding: 10px 0 0;
}

.success-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #387c24;
  background: #d9ef9a;
  font-size: 25px;
  font-weight: 700;
}

.success-panel h2 {
  margin-top: 14px;
}

.success-panel p {
  color: #405969;
  font-size: 14px;
  line-height: 1.55;
}

.success-panel #success-copy {
  color: #347eaf;
  font-size: 18px;
  font-weight: 700;
}

.success-panel .success-highlight {
  margin: 16px 0 8px;
  color: #357eaf;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.success-panel .success-reminder {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.success-reminder a {
  color: #155e86;
  font-weight: 600;
  text-underline-offset: 2px;
}

.page-footer {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 16px;
  color: #fff;
  font-size: 10px;
  line-height: 1.4;
}

.page-footer span:last-child {
  max-width: 58%;
  text-align: right;
}

[hidden] {
  display: none !important;
}

@media (max-width: 380px) {
  .topbar,
  .page-layout,
  .page-footer {
    width: calc(100% - 24px);
  }

  .campaign-dates {
    max-width: 120px;
    font-size: 10px;
    line-height: 1.4;
  }

  .registration-panel {
    padding: 18px 16px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
