:root {
  --gold: #ffcf88;
  --cream: #fff2d9;
  --copper: #c59b65;
  --line: #52716a;
}
body {
  background:
    radial-gradient(ellipse at 6% 9%, #36564c, transparent 41%),
    linear-gradient(140deg, #193f3c, #162e32 78%);
  color: var(--cream);
}
header {
  background: #173531;
  border-bottom: 1px solid #6a7660;
}
.top,
main,
footer {
  max-width: 1280px;
}
.top nav a {
  color: #eddcc0;
}
.factory-poster {
  display: grid;
  grid-template-columns: 0.87fr 1.23fr;
  border: 1px solid #af9368;
  border-radius: 24px;
  overflow: hidden;
  margin: 28px 0 25px;
  background: radial-gradient(at 1% 100%, #633b40, transparent 72%), #263f3a;
  box-shadow: 0 12px 25px #0b242858;
}
.factory-poster > div {
  padding: clamp(24px, 3.4vw, 49px);
  align-self: center;
}
.factory-poster img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  max-height: 490px;
  object-fit: cover;
  border-left: 2px solid #bb925a;
}
.eyeline,
.station-card small,
.order-slip small,
.finished > small,
.mold label {
  display: block;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #efc494;
}
.factory-poster h1,
.work-head h1,
.floor h2,
.notepad h2,
.finished h2 {
  font-family: Georgia, serif;
  color: #ffefd0;
  letter-spacing: -0.045em;
  line-height: 1.03;
}
.factory-poster h1 {
  font-size: clamp(56px, 6vw, 89px);
  margin: 0.17em 0 0.23em;
}
.factory-poster p:not(.eyeline) {
  max-width: 35ch;
  font-size: 1.08rem;
  color: #f0e1d0;
}
.goldlink,
button.primary {
  background: #f5c889;
  color: #392c25;
  border: 1px solid #ffde9a;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 900;
  padding: 10px 16px;
  display: inline-block;
}
.goldlink span {
  padding-left: 12px;
}
.floor h2,
.notepad h2 {
  font-size: clamp(24px, 2.5vw, 36px);
  margin: 0 0 16px;
}
.station-cards,
.shop-layout {
  display: grid;
  gap: 14px;
}
.station-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.station-card {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  border: 1px solid #688275;
  border-radius: 13px;
  background: #274a43;
  padding: 16px 13px;
  text-decoration: none;
}
.station-card:hover,
.station-tabs a:hover {
  background: #35564c;
}
.station-card strong,
.station-card span {
  display: block;
}
.station-card strong {
  font:
    700 clamp(18px, 1.7vw, 23px)/1.2 Georgia,
    serif;
  margin: 4px 0;
}
.station-card span {
  color: #d8e3d3;
  font-size: 0.88rem;
}
.station-card b {
  margin-left: auto;
  color: var(--copper);
}
.emblem {
  flex: none;
  width: 45px;
  height: 45px;
  border: 1px solid #c99c6a;
  background: #643d42;
  color: #ffcd84;
  fill: currentColor;
  border-radius: 50%;
}
.sources {
  margin: 21px 0;
  background: #193831;
  border-top: 1px solid #738575;
  padding: 12px 15px;
  border-radius: 7px;
}
.sources summary {
  cursor: pointer;
  color: var(--gold);
}
.sources li {
  margin: 6px 0;
}
.work-head {
  margin: 21px 0 10px;
}
.work-head p {
  margin: 0;
}
.work-head h1 {
  font-size: clamp(34px, 4vw, 55px);
  margin: 6px 0 12px;
}
.station-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.station-tabs a {
  border: 1px solid #78907e;
  color: #e8e9d6;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.92rem;
}
.station-tabs a.here {
  background: #ffd097;
  color: #422d29;
  border-color: transparent;
}
.shop-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr);
  align-items: start;
}
.machine,
.notepad {
  border: 1px solid #82937b;
  padding: clamp(13px, 1.7vw, 24px);
  border-radius: 17px;
  background: linear-gradient(132deg, #294f46, #21443d);
}
.notepad {
  background: #203a39;
}
.notepad .classroom {
  font-size: 0.93rem;
  color: #c7dbce;
}
.notepad .worked-flow {
  margin: 0;
}
.notepad h2 {
  font-size: 26px;
}
.order-slip {
  background: #f7e8c8;
  border-left: 7px solid #c36560;
  border-radius: 9px;
  padding: 10px 14px;
  color: #38322c;
}
.order-slip small {
  color: #785542;
}
.order-slip strong {
  display: block;
  font:
    700 21px/1.17 Georgia,
    serif;
  margin: 4px 0;
}
.order-slip p,
.hint {
  font-size: 0.95rem;
  margin: 5px 0;
}
.mold,
.lockboard,
.dials {
  margin: 12px 0;
}
.mold {
  background: #163a36;
  border: 1px solid #729381;
  border-radius: 10px;
  padding: 10px 13px;
  overflow-wrap: anywhere;
}
.mold-head,
.desk-stock,
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mold-head {
  justify-content: space-between;
}
.mold-head span,
.empty,
.mold small {
  font-size: 0.82rem;
  color: #becfc5;
}
.mold label {
  margin: 6px 0 2px;
  font-size: 0.66rem;
}
.belt {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0;
  border-block: 2px dashed #aa9671;
  background: repeating-linear-gradient(105deg, #364a40 0 8px, #30483d 8px 16px);
  min-height: 36px;
  padding: 4px 8px;
}
.empty {
  color: #f9ecd4;
}
.chip {
  background: #f2b6a7;
  color: #4d3038;
  border: 1px solid #ecceb3;
  border-radius: 5px;
  padding: 1px 7px;
  font: 800 0.88rem monospace;
}
.surface {
  display: block;
  color: #ffdaa0;
  font: 700 0.99rem/1.5 monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.machine h3 {
  font:
    700 1.15rem Georgia,
    serif;
  margin: 14px 0 6px;
}
.pieces {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0;
}
.piece {
  min-width: 0;
  border-radius: 7px;
  background: #2e554c;
  border-color: #7d9c84;
  color: #fff1d7;
  padding: 5px 4px;
}
.piece small,
.piece code {
  display: block;
}
.piece small {
  font-size: 0.68rem;
  color: #eac997;
  letter-spacing: 0.07em;
}
.piece code {
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.piece[aria-pressed='true'],
.dials button[aria-pressed='true'] {
  background: #ffd194;
  color: #422d2c;
}
.piece[aria-pressed='true'] small {
  color: #6c453a;
}
.tools {
  margin-top: 9px;
}
.tools button,
.finished button,
.dials button {
  background: #375b50;
  border-color: #7b9882;
}
.tools button.primary {
  background: #f5c889;
}
.tools button {
  font-size: 0.89rem;
}
.feedback {
  margin: 10px 0 0;
  background: #4a3836;
  border-left: 3px solid #ffbf86;
  border-radius: 5px;
  padding: 8px 12px;
  color: #fff1d8;
  font-size: 0.92rem;
}
.feedback:empty {
  display: none;
}
.lockboard {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 10px;
  align-items: center;
}
.ring-view {
  width: 100%;
  display: block;
}
.light {
  background: #1a3733;
  border: 1px solid #738778;
  border-radius: 7px;
  padding: 5px 8px;
  margin: 4px 0;
}
.light span,
.light b {
  display: block;
  font-size: 0.87rem;
}
.light.ready,
.light.accepted,
.lamps .passed {
  border-color: #bcdb92;
}
.light.reject,
.lamps .blocked {
  border-color: #ff9c91;
  color: #ffd0b7;
}
.desk-stock {
  margin: 11px 0;
}
.desk-stock span {
  padding: 4px 10px;
  background: #163a35;
  border-radius: 12px;
  font-size: 0.87rem;
}
.lamps {
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.lamps li {
  display: grid;
  justify-items: center;
  text-align: center;
  border: 1px solid #7c9080;
  background: #233e37;
  border-radius: 8px;
  padding: 6px 3px;
  font-size: 0.78rem;
}
.lamps i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4b6557;
}
.lamps .current i {
  background: #f9cc7e;
  box-shadow: 0 0 6px #ffcd87;
}
.lamps .passed i {
  background: #a8d8a1;
}
.lamps .blocked i {
  background: #ff9b81;
}
.dials {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.dials fieldset {
  border: 1px solid #7a927d;
  border-radius: 6px;
  margin: 0;
  padding: 5px;
}
.dials button {
  margin: 2px;
  padding: 5px 9px;
}
.order-log {
  font-size: 0.88rem;
  color: #e4e4ca;
}
.finished {
  text-align: center;
  padding: 24px 5px;
}
.finished .emblem {
  width: 72px;
  height: 72px;
  margin: 6px;
}
.finished h2 {
  font-size: 32px;
  margin: 12px;
}
.finished a,
.finished button {
  margin: 4px;
}
.key-cast {
  float: right;
  width: 98px;
  height: 65px;
  color: #ef8685;
  transition: color 0.2s;
}
.key-cast.empty-key {
  color: #798a75;
}
.key-cast.blue-key {
  color: #b4d88b;
}
.key-cast.glow-key {
  filter: drop-shadow(0 0 4px #ffd387);
}
@media (max-width: 850px) {
  .station-cards {
    grid-template-columns: 1fr;
  }
  .factory-poster h1 {
    font-size: 55px;
  }
  .shop-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(255px, 1fr);
  }
}
@media (max-width: 680px) {
  .factory-poster {
    display: flex;
    flex-direction: column-reverse;
    margin-top: 15px;
  }
  .factory-poster img {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 1.8;
    border: 0;
    border-bottom: 1px solid var(--copper);
  }
  .factory-poster > div {
    padding: 19px;
    width: 100%;
  }
  .factory-poster h1 {
    font-size: 43px;
  }
  .factory-poster h1 br {
    display: none;
  }
  .factory-poster h1 br:after {
    content: ' ';
  }
  .factory-poster .eyeline {
    margin: 0;
  }
  .factory-poster p:not(.eyeline) {
    margin: 6px 0 12px;
  }
  .shop-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .pieces {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lockboard {
    grid-template-columns: 88px 1fr;
  }
  .top nav {
    justify-content: start;
    gap: 13px;
  }
  .station-cards {
    gap: 7px;
  }
  .station-card {
    padding: 11px;
  }
  .station-tabs a {
    padding: 6px 10px;
  }
  .key-cast {
    width: 68px;
  }
}
