:root {
  --foot: 4.6rem;
  --ink: #16324a;
  --paper: #f5faff;
  --sheet: #ffffff;
  --line: #c9e3f5;
  --canopy: #0b7ec8;
  --canopy-deep: #0868a8;
  --lamp: #066aab;
  --lamp-ink: #ffffff;
  --saved: #0d7a45;
  --problem: #a33b38;
  --quiet: #5c7386;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  padding-bottom: var(--foot);
  color: var(--ink);
  font-family: "Segoe UI", Aptos, sans-serif;
  font-size: 1.125rem;
  line-height: 1.45;
}
a { color: var(--canopy); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }

.canopy {
  background: linear-gradient(180deg, var(--canopy) 0%, var(--canopy-deep) 100%);
  color: #ffffff;
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.nozzle { width: 1.7rem; height: 1.7rem; flex: none; }
.session {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: #e7f4fc;
  font-size: 1rem;
}
a.navlink {
  color: #ffffff;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.textbtn {
  background: transparent;
  color: #ffffff;
  border: 0;
  padding: 0;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

main {
  width: min(40rem, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}
main.wide { width: min(52rem, calc(100% - 2rem)); }
main.flush { width: auto; margin: 0; }

.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1.35rem 1.35rem 1.45rem;
}
.ledger, .guide { margin-top: 1rem; }
h1 {
  font-size: 2.15rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 0.55rem;
}
h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.7rem;
}
.lead { margin: 0 0 1rem; max-width: 40rem; }
.note {
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.9rem;
  background: #e8f5fd;
  border-left: 4px solid #0b7ec8;
  max-width: 40rem;
}
ol.steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0.85rem;
}
ol.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.7rem;
  align-items: start;
  max-width: 40rem;
}
ol.steps li::before {
  content: counter(step);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #0b7ec8;
  color: #ffffff;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
ol.steps.compact { gap: 0.55rem; margin-top: 1rem; }
ol.steps.compact li::before { width: 1.7rem; height: 1.7rem; font-size: 0.95rem; }
ol.steps.compact li { grid-template-columns: 1.7rem 1fr; }
.quiet { color: var(--quiet); }
.problem { color: var(--problem); }
.saved { color: var(--saved); }
.brandline {
  margin: 0 0 0.8rem;
  color: var(--canopy);
  font-weight: 700;
  letter-spacing: -0.03em;
}

form.stack { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.35rem; font-weight: 650; }
input[type="text"], input[type="tel"], input:not([type]), input[name="otp"], input[name="picture"], input[name="full_name"], input[name="sales_area"], input[name="mobile"] {
  border: 1px solid var(--line);
  border-left: 4px solid var(--canopy);
  background: #fff;
  color: var(--ink);
  padding: 0.7rem 0.75rem;
  width: 100%;
}
input:focus {
  outline: none;
  border-left-color: var(--lamp);
}
input[type="file"] { max-width: 100%; }
.button, button {
  appearance: none;
  border: 0;
  background: var(--lamp);
  color: var(--lamp-ink);
  font-weight: 700;
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:disabled, .button.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.small { padding: 0.35rem 0.65rem; }
.tools { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.picture {
  display: grid;
  gap: 0.55rem;
}
.picture img {
  width: 228px;
  height: 74px;
  background: var(--sheet);
  border: 1px solid var(--line);
}
.resend {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.gate-split {
  min-height: calc(100vh - var(--foot));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 34rem);
}
.mural { background: #7ec8f0; }
.scene { width: 100%; height: 100%; min-height: calc(100vh - var(--foot)); display: block; }
.gate-panel {
  background: var(--sheet);
  padding: 2.6rem 2.3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.forecourt {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.forecourt svg { width: 100%; height: auto; display: block; }
.forecourt .words { padding: 0.3rem 1.4rem 1.45rem; max-width: 38rem; }
.forecourt h1 { color: #0868a8; font-size: 2.35rem; }
.forecourt p { margin: 0 0 0.7rem; }
.courtesy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #066aab;
  color: #ffffff;
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  line-height: 1.35;
}
.pay { display: grid; justify-items: start; }
.quota {
  margin: 0 0 0.8rem;
  color: #0868a8;
  font-weight: 650;
}
.rate {
  margin: 0 0 0.8rem;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0868a8;
}
.qr {
  width: min(18rem, 100%);
  height: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  margin: 0 0 1rem;
}
.shot {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid var(--line);
}
.payform { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0; }
input.payday {
  width: 11rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--canopy);
  background: #fff;
  color: var(--ink);
  padding: 0.35rem 0.45rem;
}
.light { color: var(--quiet); }
.forecourt a { color: #0b7ec8; }
.serial { color: #0868a8; }
.sheet { overflow-x: auto; }

.serial {
  font-size: 4.5rem;
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin: 0;
}
.who { font-size: 1.7rem; margin: 0.4rem 0 0.2rem; }
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1rem;
  margin: 0.9rem 0 1rem;
  padding: 0;
}
.facts div { margin: 0; }
.facts dt { color: var(--quiet); font-size: 0.95rem; }
.facts dd { margin: 0; font-size: 1.2rem; }
.status {
  margin: 0 0 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.actions form { margin: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.55rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th { color: var(--quiet); font-weight: 600; }
td.actions, th:last-child { white-space: nowrap; }
td.actions form, td.actions { display: flex; gap: 0.45rem; align-items: center; }
tr.saved td:last-child { color: var(--saved); }
tr.failed td:last-child { color: var(--problem); }
tr.current td { font-weight: 700; }

@media (max-width: 860px) {
  .gate-split { grid-template-columns: 1fr; }
  .scene { min-height: 16rem; height: 16rem; }
  .gate-panel { padding: 1.6rem 1.15rem 2rem; }
  .facts { grid-template-columns: 1fr; }
  .serial { font-size: 3.4rem; }
  .actions .button, .actions button { width: 100%; text-align: center; }
  .canopy { align-items: flex-start; }
  .session { flex-direction: column; align-items: flex-end; gap: 0.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lamp-glow { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .lamp-glow { animation: glow 3.8s ease-in-out infinite; }
}
@keyframes glow {
  50% { opacity: 0.45; }
}
