:root {
  --bg: #3c3935;
  --bg-soft: #47433f;
  --bg-deep: #2f2d2a;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f5ef;
  --text-soft: rgba(247, 245, 239, 0.72);
  --accent: #c8d92c;
  --accent-strong: #d9ea35;
  --ink: #2b2a28;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --font-display: "DIN Alternate", "Arial Narrow", "PingFang SC", sans-serif;
  --font-body: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(200, 217, 44, 0.1), transparent 26%),
    linear-gradient(180deg, #3c3935 0%, #353330 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.screen-shell {
  min-height: 100svh;
}

.ticket-screen {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.ticket-card {
  width: min(100%, 430px);
  padding: 18px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04)),
    rgba(60, 57, 53, 0.96);
  box-shadow: var(--shadow);
}

.ticket-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-logo {
  width: 104px;
  height: auto;
}

.head-tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.head-tag {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.eyebrow {
  background: rgba(200, 217, 44, 0.12);
  color: var(--accent);
}

.ticket-view {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.ticket-title,
.result-title {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

.ticket-title {
  font-size: clamp(38px, 11vw, 56px);
}

.result-title {
  font-size: clamp(30px, 9vw, 42px);
}

.ticket-title--compact {
  max-width: none;
}

.ticket-subtitle,
.result-link-hint,
.text-link {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
}

.ticket-subtitle--lead {
  max-width: none;
  white-space: nowrap;
  font-size: 14px;
  color: rgba(247, 245, 239, 0.76);
}

.offer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(200, 217, 44, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(200, 217, 44, 0.16);
}

.offer-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.offer-caption {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 245, 239, 0.52);
}

.offer-row strong {
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.04;
  color: var(--accent);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.offer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(247, 245, 239, 0.82);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.qr-box {
  width: 100%;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box--share {
  max-width: 248px;
}

#share-qr-canvas {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
}

.contact-strip,
.success-panel {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-strip {
  display: grid;
  gap: 4px;
}

.contact-strip__label {
  font-size: 12px;
  color: var(--text-soft);
}

.contact-strip__link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.contact-strip--qr {
  justify-items: center;
  text-align: center;
}

.contact-strip--qr .contact-strip__label {
  justify-self: start;
  text-align: left;
  width: 100%;
}

.service-qr {
  display: block;
  width: min(200px, 70vw);
  height: auto;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
}

.lead-form {
  display: grid;
  gap: 10px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field span {
  font-size: 13px;
  color: rgba(247, 245, 239, 0.84);
}

.form-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.form-field input::placeholder {
  color: rgba(247, 245, 239, 0.38);
}

.form-field input:focus {
  border-color: rgba(200, 217, 44, 0.72);
  box-shadow: 0 0 0 3px rgba(200, 217, 44, 0.12);
}

.form-feedback {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
}

.form-feedback.is-error {
  color: #ffd4d4;
}

.form-feedback.is-success {
  color: var(--accent-strong);
}

.success-panel strong {
  display: block;
  color: var(--text);
  line-height: 1.5;
}

.success-panel p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.action-row {
  display: flex;
  gap: 10px;
}

.action-row--stack .button {
  flex: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 160ms ease;
}

.button:active {
  transform: scale(0.985);
}

.button--accent {
  background: var(--accent);
  color: var(--ink);
}

.button--ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.button--full {
  width: 100%;
}

.text-link {
  display: inline-flex;
  justify-content: center;
  color: var(--accent);
  text-decoration: underline;
  font-size: 13px;
}

.result-link-hint {
  max-width: none;
  white-space: nowrap;
  font-size: 14px;
  color: rgba(247, 245, 239, 0.68);
}

.hidden-canvas {
  position: fixed;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
}

.is-copied {
  background: var(--accent-strong);
  color: var(--ink);
}

@media (max-height: 760px) {
  .ticket-screen {
    align-items: start;
  }

  .ticket-card {
    margin: 10px 0;
  }

  .qr-box--share {
    max-width: 198px;
  }
}

@media (max-width: 420px) {
  .offer-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .offer-badge {
    justify-self: start;
  }
}
