:root {
  color-scheme: light;
  --ink: #152033;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --wash: #f6f8fb;
  --red: #c9282d;
  --blue: #1f66d1;
  --gold: #d5962f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.mobile-header {
  min-height: 132px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background:
    linear-gradient(120deg, rgba(201, 40, 45, 0.92), rgba(31, 102, 209, 0.88)),
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.4), transparent 28%);
  color: #fff;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0;
  opacity: 0.86;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.mobile-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.mobile-main {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 18px 16px 96px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

.hero-ticket {
  display: grid;
  gap: 14px;
}

.ticket-strip {
  min-height: 128px;
  border-radius: 8px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(21, 32, 51, 0.12), rgba(21, 32, 51, 0)),
    linear-gradient(120deg, var(--red), var(--blue));
  position: relative;
  overflow: hidden;
}

.ticket-strip::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 22px;
  height: 10px;
  border-top: 3px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
}

.ticket-strip strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 14px;
}

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

.button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.button.secondary {
  background: #eef2f7;
  color: var(--ink);
}

.button.danger {
  background: var(--red);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: 14px;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.field textarea {
  min-height: 82px;
  padding-top: 11px;
  resize: vertical;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.segmented button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.segmented button.active[data-color="RED"] {
  border-color: var(--red);
  background: #fff0f0;
  color: var(--red);
}

.segmented button.active[data-color="BLUE"] {
  border-color: var(--blue);
  background: #eef5ff;
  color: var(--blue);
}

.share-result {
  word-break: break-all;
  font-size: 14px;
}

.share-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  word-break: normal;
}

.share-card img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.share-card strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.28;
}

.share-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.batch-list {
  display: grid;
  gap: 10px;
}

.batch-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
  text-align: left;
  color: var(--ink);
}

.batch-item strong {
  display: block;
  margin-bottom: 8px;
}

.batch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.ticket-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.ticket-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: block;
}

.status {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.status.success {
  border-color: #12b76a;
  background: #ecfdf3;
}

.status.error {
  border-color: #f04438;
  background: #fff1f0;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-item {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.nav-item.active {
  color: var(--red);
}

@media (min-width: 620px) {
  .ticket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
