body {
  background: radial-gradient(ellipse at 75% 15%, #394842, transparent 62%), #162a31;
}
.office-hero {
  margin: 20px 0 16px;
  min-height: clamp(316px, 34vw, 455px);
  display: flex;
  align-items: flex-end;
  border: 1px solid #9e905d;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(16, 30, 35, 0.95), rgba(18, 36, 38, 0.85) 33%, transparent 64%),
    url(assets/firefly-ticket-office.webp) center 27% / cover;
}
.office-hero > div {
  width: min(50%, 545px);
  padding: clamp(17px, 3vw, 42px);
}
.office-hero h1 {
  font: 700 clamp(42px, 5.5vw, 80px)/0.96 var(--pixel);
  color: #fff0bc;
  margin: 9px 0;
}
.office-hero p {
  margin: 14px 0 20px;
}
.office-doors,
.route-reports {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.office-doors a,
.route-report,
.conductor,
.peek {
  background: #243c40;
  border: 1px solid #697f74;
  border-radius: 10px;
  padding: 14px;
}
.office-doors a {
  color: #fff0c6;
  text-decoration: none;
  border-top: 4px solid #bd9959;
}
.office-doors h2,
.conductor h2,
.office-desk h2,
.office-desk h3 {
  font: 700 24px/1.05 var(--pixel);
  margin: 5px 0;
}
.office-doors p {
  margin: 6px 0 12px;
  color: #d7e4d7;
}
.office-doors strong {
  font-size: 0.88rem;
  color: #ffdc8c;
}
.office-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 15px;
  align-items: start;
}
.office-desk {
  padding: clamp(11px, 2.2vw, 23px);
  background: #efe8d6;
  border: 3px solid #a48859;
  border-radius: 14px;
  color: #283b39;
  box-shadow: 0 5px #685d4f;
}
.office-desk button {
  background: #fdf8e8;
  color: #283b39;
  border-color: #aa9b7e;
}
.office-desk button[aria-pressed='true'] {
  background: #346552;
  color: white;
  border-color: #234b3e;
}
.office-desk p {
  margin: 6px 0;
}
.paper-order {
  border-left: 4px solid #ae7847;
  padding: 6px 12px;
  background: #fff9e9;
  margin: 10px 0;
}
.ink-label {
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 950;
}
.machine,
.tallies {
  background: #254548;
  color: #f3f2d8;
  border: 3px solid #6f7763;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
}
.machine-top,
.punch-actions,
.shifts,
.desk-buttons,
.drawers,
.signal-lamps,
.tallies {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.machine-top {
  justify-content: space-between;
}
.fares,
.pair-rack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.pair-rack {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.office-desk .fare,
.office-desk .pair {
  border-radius: 3px;
  border-left: 4px dotted #9d7848;
}
.office-desk .lever,
.office-desk .primary {
  background: #f7cc75;
  color: #303932;
}
.strip {
  padding: 6px 8px;
  background: #d4dbb7;
  color: #284335;
  font:
    700 0.9rem/1.5 Nunito,
    sans-serif;
}
.office-desk fieldset {
  margin: 10px 0;
  padding: 8px;
  border: 1px solid #b5aa94;
  border-radius: 8px;
}
.office-desk legend {
  font-weight: 900;
}
.office-desk fieldset button {
  margin: 3px;
}
.signal-lamps {
  margin: 8px 0;
}
.signal-lamps span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 4px 7px;
  border-radius: 5px;
  color: #fff;
  font-size: 0.86rem;
  background: #473d3a;
}
.signal-lamps .lit {
  background: #24503f;
}
.signal-lamps i {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  background: #ffc2a9;
  border-radius: 50%;
}
.signal-lamps .lit i {
  background: #9ae39b;
  box-shadow: 0 0 5px #93daa6;
}
.peek,
.route-report {
  color: #fffae5;
}
.route-report small {
  display: block;
  margin-top: 6px;
}
.trace summary,
.conductor summary {
  cursor: pointer;
  font-weight: 850;
}
.trace {
  margin-top: 8px;
}
.trace ol {
  padding-left: 22px;
}
.conductor ul {
  padding-left: 20px;
}
.conductor li + li {
  margin-top: 6px;
}
.conductor details {
  margin-top: 12px;
}
.dispatch {
  border-top: 1px dashed #9e927f;
  padding-top: 10px;
}
.earned {
  margin-top: 12px;
  background: #d7e9cc;
  padding: 9px;
  border-radius: 6px;
}
.earned a {
  color: #284b3f;
}
.tallies {
  justify-content: space-around;
}
.tallies b {
  display: block;
  font: 700 28px var(--pixel);
}
.route-report button {
  width: 100%;
}
.drawers > * {
  flex: 1;
  min-width: 82px;
}
.office-desk button:focus-visible {
  outline-color: #903f13;
}
@media (max-width: 780px) {
  .office-grid {
    grid-template-columns: 1fr;
  }
  .office-hero {
    align-items: flex-end;
    background:
      linear-gradient(0deg, #132d32 3%, #162c32e6 35%, transparent 73%),
      url(assets/firefly-ticket-office.webp) 67% 23% / cover;
    min-height: 390px;
  }
  .office-hero > div {
    width: 100%;
  }
  .office-hero p {
    max-width: 34em;
  }
  .office-doors {
    grid-template-columns: 1fr;
  }
  .office-doors p {
    margin: 3px 0;
  }
  .route-reports {
    grid-template-columns: 1fr;
  }
  .route-report {
    padding: 9px;
  }
  .pair-rack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fares {
    grid-template-columns: 1fr;
  }
  .office-grid {
    margin-bottom: 12px;
  }
  .office-desk button {
    min-height: 40px;
  }
}

.paper-order {
  display: flow-root;
}
.paper-order::after {
  content: '';
  display: block;
  clear: both;
}
.paper-order .passenger,
.conductor h2::before {
  display: inline-block;
  width: 54px;
  height: 54px;
  background: url(assets/michi-idle.webp) 0 0/400% 100% no-repeat;
  image-rendering: pixelated;
}
.paper-order .passenger {
  float: right;
  margin-left: 8px;
  background-color: #e3e8ce;
  border: 1px solid #b6c1a1;
  border-radius: 50%;
}
.paper-order .passenger.koko,
.conductor h2::before {
  background-image: url(assets/koko-idle.webp);
}
.conductor h2 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.conductor h2::before {
  content: '';
  width: 33px;
  height: 33px;
}
.pair[data-holes]::after {
  content: attr(data-holes);
  display: block;
  line-height: 0.7rem;
  letter-spacing: 2px;
  color: #556c4b;
}
.pair[data-holes][aria-pressed='true']::after {
  color: #f5db9e;
}
@media (prefers-reduced-motion: no-preference) {
  .office-hero > div {
    animation: office-arrival 0.45s ease-out;
  }
  @keyframes office-arrival {
    from {
      transform: translateY(7px);
      opacity: 0.5;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }
  .office-desk.punched .strip,
  .office-desk.punched .pair[aria-pressed='true'] {
    animation: print-ticket 0.34s ease-out;
  }
  @keyframes print-ticket {
    0% {
      transform: translateY(-5px) scaleY(0.86);
      filter: brightness(1.4);
    }
    100% {
      transform: none;
      filter: none;
    }
  }
  .conductor h2::before {
    animation: clerk-wave 1s steps(3, end) 1;
  }
  @keyframes clerk-wave {
    from {
      background-position: 0 0;
    }
    to {
      background-position: 100% 0;
    }
  }
}
