:root {
  --ink:#193c35;
  --green:#13664f;
  --paper:#f7f5ea;
  --gold:#e7b364;
  --mono:"IBM Plex Mono",Consolas,monospace;
  font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:weight;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  min-height:100vh;
}

button {
  font:inherit;
  cursor:pointer;
  color:inherit;
}

button:disabled {
  cursor:wait;
}

button:focus-visible {
  outline:3px solid #117dd8;
  outline-offset:4px;
}

button:active:not(:disabled) {
  transform:translateY(1px);
}

[hidden] {
  display:none!important;
}

.wrap {
  width:min(1040px,calc(100% - 80px));
  margin:auto;
}

.mast {
  background:#173e35;
  color:#fbf7e9;
  border-bottom:4px solid #d9aa61;
}

.mast-inner {
  height:62px;
  display:flex;
  align-items:center;
  gap:18px;
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  font-weight:900;
  font-size:20px;
  letter-spacing:.14em;
}

.brandmark {
  display:inline-flex;
  gap:3px;
  align-items:center;
  transform:skewX(-19deg);
  height:25px;
  overflow:hidden;
}

.brandmark i {
  width:6px;
  height:19px;
  background:#f8f4df;
}

.brandmark i:nth-child(2) {
  height:27px;
}

.company,.mono,.foot-en,.station-id,.eyebrow,.map figcaption span {
  font-family:var(--mono);
}

.company,.foot-en {
  font-size:11px;
  letter-spacing:.14em;
}

.company {
  border-left:1px solid #779287;
  padding-left:18px;
}

.station-id {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:bold;
}

.station-id b {
  font-size:11px;
  background:#f3efd8;
  color:var(--ink);
  padding:3px;
}

.station-id span {
  font:600 13px sans-serif;
  letter-spacing:.12em;
  margin-left:6px;
}

.hero {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  padding:clamp(34px,4.4vw,66px) 0 36px;
}

.eyebrow {
  display:flex;
  align-items:center;
  gap:9px;
  margin:0;
  font-size:11px;
  letter-spacing:.12em;
  font-weight:bold;
  color:#536e60;
}

.eyebrow span:not(.line-icon) {
  color:#a0a396;
}

.line-icon {
  width:25px;
  height:9px;
  border-block:3px solid var(--green);
}

h1,h2,h3,p,figure {
  margin:0;
}

h1 {
  font-size:clamp(42px,5.5vw,77px);
  line-height:1.2;
  font-weight:950;
  letter-spacing:-.065em;
  margin:11px 0 15px;
}

h1 em {
  font-style:normal;
  color:var(--green);
}

.intro {
  font-size:15px;
  line-height:1.85;
  letter-spacing:.025em;
  color:#45584e;
}

.intro strong {
  color:var(--ink);
}

.map {
  width:31%;
  min-width:225px;
  transform:rotate(-2deg);
  border:1px solid #a6b1a3;
  outline:1px solid #b9bfb1;
  outline-offset:-5px;
  padding:15px 17px 10px;
  background-color:#efefe1;
  background-image:linear-gradient(#6b826110 1px,transparent 1px),linear-gradient(90deg,#6b826110 1px,transparent 1px);
  background-size:12px 12px;
  box-shadow:2px 3px 0 #21443513;
}

.map figcaption {
  font-size:12px;
  font-weight:bold;
  letter-spacing:.08em;
  display:flex;
  align-items:center;
  gap:8px;
}

.map figcaption span {
  font-size:8px;
  color:#5d7063;
  letter-spacing:.12em;
}

.map svg {
  display:block;
  width:100%;
}

.machine {
  border:2px solid var(--ink);
  border-radius:8px;
  background:#e7e7d9;
  overflow:hidden;
  box-shadow:0 4px 0 #173c362a;
}

.machine-head,.machine-foot,.office-head {
  display:flex;
  align-items:center;
}

.machine-head {
  background:#1f453c;
  color:#faf7ea;
  justify-content:space-between;
  padding:13px 24px;
}

.machine-head h2 {
  display:flex;
  align-items:center;
  gap:11px;
  font-size:19px;
  letter-spacing:.12em;
}

.machine-head svg {
  width:26px;
  height:21px;
  stroke:#e7c58b;
  stroke-width:1.8;
  fill:none;
}

.mono {
  font-size:10px;
  letter-spacing:.13em;
  color:#d8dfcc;
}

.tickets {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  padding:26px;
}

.ticket {
  --edge:#155942;
  --ticket:#dcead2;
  position:relative;
  display:flex;
  text-align:left;
  border:1.5px solid var(--edge);
  color:var(--edge);
  border-radius:5px;
  background:var(--ticket);
  padding:0;
  box-shadow:0 4px 0 color-mix(in srgb,var(--edge) 50%,transparent);
  transition:transform .15s,box-shadow .15s;
  min-width:0;
}

.ticket-b {
  --edge:#714727;
  --ticket:#f4deb5;
}

.ticket:hover:not(:disabled) {
  transform:translateY(-3px);
  box-shadow:0 7px 0 color-mix(in srgb,var(--edge) 38%,transparent);
}

.ticket:active:not(:disabled) {
  transform:translateY(2px);
  box-shadow:0 1px 0 var(--edge);
}

.ticket-body {
  padding:20px 23px;
  flex:1;
  min-width:0;
  display:flex;
  align-items:flex-start;
  flex-direction:column;
}

.ticket-class {
  font-size:12px;
  font-weight:800;
  letter-spacing:.17em;
  border-block:1px solid currentColor;
  padding:2px 0;
}

.destination {
  display:flex;
  align-items:baseline;
  gap:8px;
  font-size:clamp(22px,2.4vw,31px);
  font-weight:900;
  line-height:1.1;
  letter-spacing:-.04em;
  margin:6px 0;
}

.destination b {
  font:900 clamp(68px,6.9vw,95px)/.99 Arial,sans-serif;
  letter-spacing:-.075em;
}

.ticket-action {
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:14px;
  font-weight:750;
}

.ticket-action span {
  font:22px Arial,sans-serif;
}

.stub {
  width:19%;
  border-left:2px dashed color-mix(in srgb,var(--edge) 45%,transparent);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:12px;
  position:relative;
}

.stub:before,.stub:after {
  content:"";
  position:absolute;
  left:-8px;
  width:13px;
  height:7px;
  background:#e7e7d9;
  border:1px solid var(--edge);
}

.stub:before {
  top:-2px;
  border-top:0;
  border-radius:0 0 12px 12px;
}

.stub:after {
  bottom:-2px;
  border-bottom:0;
  border-radius:12px 12px 0 0;
}

.stub span {
  writing-mode:vertical-rl;
  letter-spacing:.22em;
  font-weight:700;
  font-size:13px;
}

.stub i {
  width:22px;
  height:40px;
  background:repeating-linear-gradient(0deg,currentColor 0 1px,transparent 1px 3px,currentColor 3px 6px,transparent 6px 8px,currentColor 8px 10px,transparent 10px 13px);
}

.stub small {
  font:9px var(--mono);
  letter-spacing:.1em;
}

.machine-foot {
  border-top:1px solid #b0b7a7;
  background:#e0e3d4;
  padding:9px 24px;
  gap:8px;
  font-size:12px;
  font-weight:bold;
}

.lamp {
  width:9px;
  height:9px;
  flex:none;
  border-radius:50%;
  background:#237451;
}

.one {
  margin-left:auto;
  white-space:nowrap;
  font-weight:500;
  color:#516257;
}

.summary {
  margin:35px 0 28px;
}

.summary-head {
  display:flex;
  align-items:end;
  justify-content:space-between;
  margin-bottom:13px;
}

.summary-head h2 {
  font-size:24px;
  margin-top:3px;
  letter-spacing:.03em;
}

.refresh,.back {
  background:none;
  border:0;
  text-decoration:underline;
  text-underline-offset:4px;
  font-size:13px;
  padding:8px;
}

.refresh span {
  font-size:18px;
}

.metrics {
  border-block:1.5px solid #859489;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding:15px 0;
}

.metrics>div {
  padding:0 22px;
  border-left:1px solid #bec5b5;
}

.metrics>div:first-child {
  padding-left:1px;
  border:0;
}

.metric-label {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:13px;
  font-weight:bold;
}

.dot {
  width:10px;
  height:10px;
  border-radius:50%;
}

.green {
  background:#1c755c;
}

.amber {
  background:#b57628;
}

.cross {
  font:bold 18px/12px Arial;
  color:#666a58;
}

.metrics p {
  font-size:12px;
  margin-top:4px;
}

.metrics strong {
  font:700 32px var(--mono);
  letter-spacing:-.05em;
}

.summary>p {
  font-size:12px;
  margin-top:9px;
  color:#526459;
}

footer {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color:#627366;
  padding:0 0 26px;
}

.foot-en {
  margin-left:auto;
  font-size:9px;
}

.receipt {
  min-height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:24px;
  padding:25px;
  background:#f1f0e3;
}

.stamp,.seals span {
  border:3px double #a84a38;
  color:#a84a38;
  transform:rotate(-8deg);
  font-weight:900;
  letter-spacing:.12em;
}

.stamp {
  padding:8px;
  font-size:22px;
}

.receipt h3 {
  font-size:24px;
}

.receipt p {
  font-size:13px;
  margin-top:6px;
}

.receipt h3:focus {
  outline:none;
}

dialog {
  width:min(415px,calc(100% - 32px));
  color:var(--ink);
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:7px;
  padding:0;
  box-shadow:0 12px 40px #13291d44;
}

dialog::backdrop {
  background:#112d26a8;
}

.office-head {
  background:var(--ink);
  color:var(--paper);
  justify-content:space-between;
  padding:6px 12px 6px 22px;
  font-weight:bold;
}

.office-head button {
  background:none;
  color:inherit;
  border:0;
  font-size:25px;
  width:40px;
  height:40px;
}

.office-body {
  padding:26px;
}

.office-body h2 {
  margin:6px 0 10px;
  font-size:25px;
}

.office-body>p {
  font-size:15px;
  line-height:1.8;
  min-height:3.6em;
}

.seals {
  display:flex;
  gap:12px;
  justify-content:center;
  padding:25px 0;
}

.seals span {
  border:2px dashed #abb2a3;
  border-radius:50%;
  width:57px;
  height:57px;
  display:grid;
  place-items:center;
  color:#7d887a;
  font-size:14px;
  transform:none;
}

.seals .done {
  border:4px double #a84a38;
  color:#a84a38;
  transform:rotate(-8deg);
}

.office-next {
  width:100%;
  border:0;
  border-radius:4px;
  padding:13px;
  background:var(--ink);
  color:white;
  font-weight:bold;
}

.back {
  display:block;
  margin:6px auto 0;
}

@media(max-width:700px) {
  .wrap {
    width:calc(100% - 36px);
  }
  .mast-inner {
    height:52px;
  }
  .company {
    display:none;
  }
  .hero {
    gap:14px;
    padding:30px 0 24px;
  }
  .map {
    min-width:140px;
    padding:10px;
    width:29%;
  }
  .map figcaption span {
    display:none;
  }
  h1 {
    font-size:clamp(38px,7vw,52px);
  }
  .intro {
    font-size:13px;
  }
  .tickets {
    padding:16px;
    gap:13px;
  }
  .ticket-body {
    padding:14px;
  }
  .ticket-action {
    font-size:12px;
  }
  .machine-head {
    padding:11px 15px;
  }
  .machine-foot {
    padding:9px 15px;
  }
  .metrics>div {
    padding:0 12px;
  }
  .summary {
    margin-top:25px;
  }
}

@media(max-width:520px) {
  .hero {
    display:block;
  }
  .map {
    width:100%;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    transform:none;
    padding:5px 14px;
    margin-top:16px;
  }
  .map figcaption {
    display:block;
  }
  .map figcaption span {
    display:block;
    font-size:8px;
    margin-top:3px;
  }
  .map svg {
    width:58%;
    height:63px;
  }
  .tickets {
    gap:11px;
    padding:13px 11px 16px;
  }
  .ticket-body {
    padding:12px 9px;
  }
  .ticket-class {
    font-size:10px;
  }
  .stub {
    width:18%;
  }
  .stub span {
    font-size:10px;
  }
  .stub i {
    width:13px;
    height:30px;
  }
  .stub small {
    display:none;
  }
  .destination {
    gap:4px;
    font-size:17px;
    margin:8px 0;
  }
  .destination b {
    font-size:60px;
  }
  .ticket-action {
    font-size:11px;
    gap:2px;
    letter-spacing:-.04em;
  }
  .ticket-action span {
    font-size:16px;
  }
  .summary-head h2 {
    font-size:21px;
  }
  .metric-label {
    font-size:11px;
    gap:4px;
  }
  .metrics>div {
    padding:0 8px;
  }
  .metrics strong {
    font-size:26px;
  }
  .machine-foot {
    font-size:11px;
  }
  .receipt {
    gap:13px;
  }
  .receipt h3 {
    font-size:21px;
  }
  .stamp {
    font-size:16px;
  }
  .eyebrow,.mono {
    font-size:9px;
  }
  .refresh {
    font-size:12px;
  }
  .mast-inner {
    gap:8px;
  }
  .station-id {
    font-size:13px;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
  }
}

.seals .current {
  border-color:#9b6f3c;
  color:#81582e;
}

#check-label {
  display:block;
  font-size:13px;
  font-weight:bold;
}

#check-letter {
  display:block;
  width:100%;
  margin:5px 0 12px;
  padding:8px 10px;
  font:18px var(--mono);
  border:1px solid #728877;
  border-radius:3px;
  background:#fffcf2;
}

#office-error {
  min-height:0;
  color:#913622;
  font-size:13px;
}

#office-error:not(:empty) {
  margin:0 0 12px;
}

