:root {
  color-scheme: light;
  --canvas: #f1f5fc;
  --paper: #fff;
  --navy: #172b55;
  --ink: #182540;
  --muted: #536580;
  --line: #cad6e9;
  --blue: #2359b4;
  --gold: #f8cb65;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible, #purchase-title:focus-visible {
  outline: 3px solid #527ed3;
  outline-offset: 3px;
}

.brand, .layout { width: min(68rem, calc(100% - 4rem)); margin-inline: auto; }
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-block: 1.75rem;
  font-size: 1.17rem;
  font-weight: 680;
  letter-spacing: -.035em;
}
.brand b { font-weight: 780; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.15rem, 3vw, 2.6rem);
  padding-block: clamp(.5rem, 4vh, 3.1rem) 2rem;
}
.ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  min-height: 33rem;
  overflow: hidden;
  padding: clamp(1.5rem, 3.5vw, 2.7rem);
  border-radius: 1.85rem 1.85rem 1.85rem .45rem;
  background: var(--navy);
  color: #fff;
}
.ticket-copy h1 {
  margin: 0;
  font-size: clamp(2.05rem, 4.25vw, 3.85rem);
  font-weight: 790;
  line-height: 1.02;
  letter-spacing: -.065em;
}
.ticket-copy p {
  max-width: 31ch;
  margin: 1rem 0 0;
  color: #e0eaf9;
  line-height: 1.55;
}
.star-art {
  align-self: end;
  width: min(96%, 25rem);
  height: auto;
  margin: .15rem -1.2rem -.65rem 0;
  z-index: -1;
}
.ticket-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.2rem;
  margin: .5rem 0 0;
  padding: 1rem 0 0 1.35rem;
  border-top: 1px solid #4b6188;
  color: #e0eaf9;
  font-size: .88rem;
  line-height: 1.4;
}
.ticket-steps li + li { margin-left: .85rem; }
.ticket-steps li::marker { color: var(--gold); font-weight: 750; }
.activation { min-width: 0; align-self: center; }
.panel {
  padding: clamp(1.2rem, 3.4vw, 2.35rem);
  border: 1px solid #d9e3f2;
  border-radius: 1.35rem;
  background: var(--paper);
  box-shadow: 0 10px 28px #1c407410;
}
.panel h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.panel-copy, .support, .hint, .field small { color: var(--muted); line-height: 1.5; }
.panel-copy { margin: .65rem 0 1.2rem; }
.support { margin: .95rem 0 0; font-size: .9rem; }
.hint { margin: -.3rem 0 0; font-size: .83rem; }
form, .field-list { display: grid; gap: .85rem; }
.field { display: grid; gap: .4rem; font-weight: 700; }
.field small { font-weight: 450; }
.field input, .field select {
  min-width: 0;
  width: 100%;
  min-height: 3.15rem;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: #f8faff;
  color: var(--ink);
  font-weight: 550;
}
#activation-code { letter-spacing: .055em; }
#activation-code::placeholder { letter-spacing: 0; }
.primary {
  min-height: 3rem;
  padding: .7rem .95rem;
  border: 1px solid var(--blue);
  border-radius: .65rem;
  color: #fff;
  background: var(--blue);
  font-weight: 720;
}
.primary:hover:not(:disabled) { background: #1a4690; }
.quiet {
  min-height: 2.75rem;
  padding: .25rem 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 650;
  text-align: left;
}
.quiet:hover:not(:disabled) { text-decoration: underline; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .95rem; }
.spread { justify-content: space-between; }
.panel-actions { margin-top: .85rem; }
.badge {
  display: inline-block;
  border-radius: .45rem;
  padding: .25rem .6rem;
  color: #244a8d;
  background: #e9f0fc;
  font-size: .82rem;
  font-weight: 720;
}
.badge[data-state="completed"] { color: #155b4c; background: #ddf4eb; }
.badge[data-state="needs_review"], .badge[data-state="voided"] { color: #7a3d18; background: #fff0dc; }
.readable { white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.notice { margin: .75rem 0 0; color: var(--muted); line-height: 1.4; }
.notice:empty { display: none; }
.notice[data-error] { color: #9a2b38; }
.telegram-avatar { display: flex; align-items: center; gap: .65rem; margin-top: .5rem; }
.telegram-avatar img { border-radius: 50%; }
.delivery pre { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 780px) {
  .brand, .layout { width: min(33rem, calc(100% - 2rem)); }
  .brand { padding-block: 1rem; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 0; }
  .ticket { min-height: 0; padding: 1.35rem; border-radius: 1.25rem 1.25rem 1.25rem .45rem; }
  .ticket-copy { padding-right: 2.4rem; }
  .ticket-copy h1 { font-size: clamp(1.85rem, 6.3vw, 2.6rem); }
  .ticket-copy p { max-width: 26ch; margin-top: .65rem; font-size: .92rem; }
  .star-art { position: absolute; right: -.35rem; top: 2.5rem; width: 42%; margin: 0; }
  .ticket-steps { margin-top: .9rem; padding-top: .7rem; font-size: .8rem; }
}
@media (max-width: 420px) {
  .ticket-copy { padding-right: 2.8rem; }
  .ticket-copy p { max-width: 24ch; }
  .star-art { right: -1.1rem; top: 2.75rem; width: 40%; }
  .ticket-steps { flex-direction: column; gap: .25rem; }
  .ticket-steps li + li { margin-left: 0; }
}
