/* Title screen, illustrated welcome, and tactile close-ups. */
.cabinet[data-scene="title"] {
  padding: 3px;
  border-color: #695b93;
  background: #100d1c;
  box-shadow: 0 0 0 2px #100b1a, 0 0 0 3px #393151, 0 14px 48px #030206b5;
}
.cabinet[data-scene="title"] .cabinet-rail,
.cabinet[data-scene="title"] .cabinet-foot { display: none; }
.main-menu {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(500px, 75dvh, 650px);
  padding-inline: 16px;
  background:
    radial-gradient(ellipse at 16% 16%, #312447, transparent 62%),
    radial-gradient(ellipse at 85% 80%, #182e4c, transparent 63%),
    #161222;
}
.menu-pattern, .menu-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.menu-pattern {
  background: url("assets/menu-pattern.svg") 0 0 / 144px 144px repeat;
  opacity: .68;
  animation: menu-drift 34s linear infinite;
}
.menu-shade {
  background:
    radial-gradient(ellipse at 50% 47%, #131222df 8%, #181429b5 31%, #19182d40 72%),
    repeating-linear-gradient(0deg, #110b1626 0 1px, transparent 1px 4px);
}
@keyframes menu-drift { to { background-position: -144px 144px; } }
.menu-content {
  display: grid;
  justify-items: center;
  width: min(100%, 460px);
  padding: clamp(26px, 5.5dvh, 52px) 0 42px;
  text-align: center;
}
.game-logo {
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0 0 24px;
}
.logo-plaque {
  display: block;
  width: min(100%, 410px);
  height: auto;
  filter: drop-shadow(2px 5px 4px #080506cc);
}
.logo-game {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: #ebe2ff;
  font: italic 700 clamp(30px, 4.5vw, 47px)/1.14 var(--book);
  text-shadow: 2px 2px #1c1114, 0 1px 10px #170e13;
  white-space: nowrap;
}
.logo-game::before, .logo-game::after {
  content: "";
  width: clamp(13px, 3vw, 34px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #bb9470);
}
.logo-game::after { transform: rotate(180deg); }
.menu-options {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  width: min(234px, 100%);
}
.menu-options button {
  position: relative;
  min-height: 42px;
  padding: 4px 25px 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #f6dfbf;
  text-align: center;
  font: 700 23px/1.15 var(--book);
}
.menu-options button::before, .menu-options button::after {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  width: 6px;
  height: 6px;
  background: #d7ab7e;
  transform: rotate(45deg);
  opacity: 0;
}
.menu-options button::before { left: 12px; }
.menu-options button::after { right: 12px; }
.menu-options:not(:hover):not(:focus-within) button:first-child,
.menu-options button:hover:not(:disabled), .menu-options button:focus-visible {
  border-color: #a5795e;
  background: #4b2a34bc;
}
.menu-options button:hover:not(:disabled)::before, .menu-options button:hover:not(:disabled)::after,
.menu-options button:focus-visible::before, .menu-options button:focus-visible::after { opacity: 1; }
.menu-build { position: absolute; right: 13px; bottom: 11px; color: #ccb4aa; font: 9px var(--mono); }
.console { grid-template-columns: minmax(0, 1fr); }
.pockets { grid-template-columns: 86px minmax(0, 1fr); }
.pocket-slot canvas { image-rendering: auto; }
.object-view {
  isolation: isolate;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg,#baa56b12 0 1px,transparent 1px 19px),
    repeating-linear-gradient(90deg,#baa56b10 0 1px,transparent 1px 19px),
    radial-gradient(ellipse at 48% 40%, #495148, #202722 58%, #121513);
}
.object-view::before {
  position: absolute;
  content: "";
  z-index: -1;
  width: 44%;
  height: 12%;
  left: 28%;
  bottom: 10%;
  background: radial-gradient(ellipse,#0305039e, transparent 70%);
}
.object-view canvas { image-rendering: auto; }
.nat-cheer {
  position: absolute;
  z-index: 4;
  left: 3%;
  top: 4%;
  display: flex;
  align-items: center;
  min-height: 55px;
  max-width: 94%;
  background: linear-gradient(115deg, #2f2322, #65313a);
  border: 2px ridge #d39168;
  color: #ffe5b9;
  box-shadow: 4px 4px #0d080ab3;
  padding: 3px 11px 3px 3px;
  pointer-events: none;
  animation: cheer-in .39s ease-out both;
}
.nat-cheer img { width: 56px; height: 56px; object-fit: cover; object-position: 50% 15%; }
.nat-cheer b { display: block; font: italic 700 clamp(20px, 3vw, 30px)/1.07 var(--book); }
.nat-cheer small { font: 9px var(--mono); color: #ffd0a1; }
@keyframes cheer-in {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  62% { opacity: 1; transform: translateY(2px) scale(1.03); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.world-feedback.player-speech {
  inset: auto auto clamp(37px, 5vw, 55px) 50%;
  translate: -50% 0;
  z-index: 4;
  width: max-content;
  max-width: calc(100% - 30px);
  padding: 8px 17px 9px;
  color: #fff3cb;
  background: #38261ff5;
  border: 2px ridge #c39a6a;
  box-shadow: 3px 4px 0 #100a0cb3;
  text-align: center;
  font: italic bold clamp(16px, 2vw, 23px)/1.25 var(--book);
}
.command-strip #commandText { flex: 1; }
.command-strip #cancelItem {
  flex: none;
  border: 1px solid #aa8556;
  background: #37261b;
  color: #ffe4b1;
  padding: 3px 7px;
  font: inherit;
}
.pocket-slot.selected { border-color: #f0bf75; box-shadow: inset 0 0 10px #d3994a6b, 0 0 6px #c8855377; }
.chapter-name { margin: 10px 0 0; color: #e2ba8c; font: bold 16px/1.16 var(--book); }
.prop-window .object-stamp {
  width: fit-content;
  margin: 7px 0;
  padding: 5px 9px;
  background: #261a15;
  border-left: 2px solid #c49b65;
  color: #ffe5b4;
  font: 12px/1.45 var(--mono);
}
.nat-welcome {
  display: grid;
  grid-template-columns: clamp(99px, 22vw, 159px) 1fr;
  gap: 13px;
  align-items: center;
  background: linear-gradient(102deg, #7b482d54, #2b1a1b 52%), #302521;
  border: 1px solid #9a6649;
  box-shadow: 3px 3px #1a1111;
  padding: 10px 10px 0 0;
}
.nat-welcome-portrait {
  align-self: end;
  display: block;
  background: radial-gradient(circle at 53% 39%,#d58a565b,transparent 67%);
  width: 100%;
  max-height: 170px;
  object-fit: contain;
}
.nat-welcome h2 { font-size: clamp(22px, 4.5vw, 35px); margin-bottom: 6px; }
.nat-welcome p { margin: 4px 0 8px; }
.station-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 9px 0; }
.station-tabs button { min-height: 33px; padding: 4px 8px; }
.station-tabs button[aria-pressed="true"] { color: #ccf4c9; border-style: inset; background: #38493a; }
.stacked-monitors { display: grid; gap: 8px; }
.station-camera, .station-composer {
  border: 4px ridge #777461;
  background: #172623;
  box-shadow: 2px 3px #16110e;
  color: #c5e8b8;
  font: 11px var(--mono);
}
.station-camera img {
  display: block;
  width: 100%;
  max-height: 205px;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(.9) sepia(.16) hue-rotate(83deg) contrast(1.16);
}
.station-camera figcaption, .station-composer header { display: flex; gap: 8px; justify-content: space-between; padding: 6px; }
.station-camera figcaption { background: #20372e; }
.station-composer { padding: 3px 7px 6px; }
.station-composer header { border-bottom: 1px dashed #6d8c66; padding-inline: 0; }
.station-composer form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 5px; margin-top: 7px; }
.station-composer label { grid-column: 1 / -1; }
.station-composer input { min-width: 0; height: 36px; background: #12201a; color: #e3f7d1; border: 1px inset #6c8768; padding: 3px 7px; }
.station-composer .secondary-button { min-height: 36px; font-size: 12px; }
.station-composer p {
  margin: 7px 0 0;
  padding: 5px;
  background: #192f22;
  border: 1px solid #546f4d;
  color: #d7edba;
  font: 12px/1.35 var(--mono);
  overflow-wrap: anywhere;
}

.receiver-face { display: grid; grid-template-columns: minmax(0,1fr) 91px; gap: 9px; align-items: center; }
.receiver-screen { overflow: hidden; min-height: 83px; }
.receiver-screen .sweep { position: absolute; width: 6%; inset: 0 auto 0 -6%; background: linear-gradient(90deg,transparent,#a9ed9d39); animation: receiver-sweep 2.65s linear infinite; pointer-events: none; }
@keyframes receiver-sweep { to { left: 100%; } }
.tuning-assembly { display: grid; justify-items: center; gap: 5px; }
.tuning-assembly>span { font: 8px var(--mono); color: #f1d2a6; }
.receiver-dial {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px ridge #858b74;
  background: repeating-conic-gradient(#222d26 0 8deg,#4a5950 8deg 12deg);
  box-shadow: 2px 4px #1a201a;
  touch-action: none;
  cursor: grab;
}
.receiver-dial i {
  display: block;
  width: 79%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #a6a48a;
  background: linear-gradient(128deg,#6f7866,#374238 65%);
  box-shadow: 1px 3px 5px #111c17;
  transform: rotate(var(--tune));
  transition: transform .17s ease-out;
}
.receiver-dial i::before { content: ""; position: absolute; top: 2px; left: calc(50% - 2px); width: 4px; height: 15px; background: #eadb9f; box-shadow: 0 0 4px #fbe3a2a0; }
.hatch-gauges { display: flex; justify-content: space-between; gap: 7px; font: 9px var(--mono); color: #d8dfb9; }
.hatch-gauges i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #bae29a; box-shadow: 0 0 5px #c5e9a3; }
.hatch-wheels { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin: 12px 0; padding: 6px; background: #202d25; border: 3px inset #64735e; }
.hatch-wheel { display: grid; align-items: end; justify-items: stretch; text-align: center; gap: 3px; min-width: 0; }
.hatch-wheel>span { font: 10px/1.1 var(--mono); min-height: 22px; color: #e7d5a8; align-content: end; }
.hatch-wheel button { min-height: 26px; border: 1px outset #8c8d71; background: linear-gradient(#5d6b5d,#39483d); }
.hatch-drum {
  display: grid;
  justify-items: center;
  padding: 4px 0;
  border: 2px inset #655c44;
  background: repeating-linear-gradient(0deg,#211c14 0 5px,#4b3c29 6px 8px);
  box-shadow: inset 0 0 6px #0c0807;
  color: #baa780;
  font: 12px var(--mono);
  touch-action: none;
  cursor: ns-resize;
}
.hatch-drum i, .hatch-drum b { font-style: normal; font-weight: normal; opacity: .78; }
.hatch-drum input { width: 100%; min-width: 0; padding: 0; border: 0; background: #423627; color: #f8dfac; text-align: center; font: 31px var(--mono); }
.hatch-lever { display: flex; align-items: center; gap: 8px; }
.hatch-lever i { width: 9px; height: 22px; background: linear-gradient(#e58961 0 34%,#9f977b 35%); border: 1px solid #353425; border-radius: 3px; transform: rotate(-25deg); transition: transform .25s ease-in; }
.hatch-lever.released i { transform: rotate(36deg); }

.film-machine {
  padding: 9px;
  border: 4px ridge #82634b;
  background: linear-gradient(117deg,#453029,#241c1d 67%,#4c3033);
  box-shadow: 3px 4px #130b0b;
}
.splicer-window {
  position: relative;
  overflow: hidden;
  padding: 6px 6px 7px;
  background: #171b17;
  border: 3px inset #71634a;
  box-shadow: inset 0 0 10px #080a08;
}
.splice-guides {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  font: 9px var(--mono);
  color: #e3bb78;
}
.splice-guides [data-seam-status] { color: #c2e1a8; }
.splice-lamps { display: flex; align-items: center; justify-content: space-between; margin: 7px 1px 3px; }
.splice-lamps i { width: 6px; height: 6px; border: 1px solid #947a56; border-radius: 50%; background: #544c33; }
.splice-lamps i.matched { border-color: #c9e49b; background: #b5df8a; box-shadow: 0 0 6px #badc8f; }
.splice-gate, .splice-cans { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; }
.splice-cans { margin: 9px 0; padding: 4px 0; border-block: 1px dashed #987150; }
.splice-slot { min-width: 0; min-height: 89px; background: #22231a; border: 1px solid #584e38; }
.splice-empty, .strip-parked {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 86px;
  place-items: center;
  border: 0;
  background: repeating-linear-gradient(-35deg,#221f19 0 5px,#29261d 6px 10px);
  color: #bb9c6a;
  font: 19px var(--mono);
}
.strip-parked { min-height: 69px; }
.strip-piece {
  min-width: 0;
  padding: 2px;
  border: 1px solid #4c4033;
  background: #171412;
  display: grid;
  gap: 2px;
}
.strip-grip {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  padding: 3px 0;
  border: 0;
  background: linear-gradient(#372822,#1c1b18);
  color: var(--gel);
  cursor: grab;
}
.strip-grip svg { width: min(77%,47px); fill: var(--gel); filter: drop-shadow(0 0 3px #ffe4a239); }
.strip-grip b { font: 10px/1 var(--book); }
.strip-piece.reversed svg { transform: rotate(180deg); }
.strip-cuts {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 0 1px;
  color: #e6d29e;
  font: bold 13px/1 var(--mono);
}
.strip-cuts i { font-style: normal; }
.strip-cuts [data-cut="diamond"] { color: #efb278; }
.strip-cuts [data-cut="fork"] { color: #e5b9dd; }
.strip-cuts [data-cut="moon"] { color: #c7cee9; }
.strip-cuts [data-cut="bolt"] { color: #b7e8b3; }
.strip-flip {
  min-height: 23px;
  min-width: 0;
  padding: 0;
  color: #eac793;
  background: #513c2e;
  border: 1px outset #9d7b5b;
  font: 16px/1 var(--book);
}
.strip-flip:hover, .strip-grip:hover, .splice-empty:hover { background: #583b28; }
.splicer-crank i { display: inline-block; color: #e9b67e; font-size: 18px; font-style: normal; }
.splicer-beam { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: linear-gradient(110deg,transparent,#fff4c0a6,transparent); }
.splicer-window.playing .splicer-beam { animation: projection .72s ease-in-out; }
@keyframes projection { 10%,70% { opacity: 1; } 100% { opacity: 0; } }

.digital-award { margin: 13px 0; padding: 13px; border: 1px solid var(--ticket-edge); background: linear-gradient(110deg,var(--ticket-dark),var(--ticket)); box-shadow: 3px 3px #180e0b; }
.digital-award>small { color: var(--ticket-light); font: 10px var(--mono); }
.digital-award h3 { margin: 4px 0 6px; color: var(--ticket-light); font: italic bold 25px var(--book); }
.digital-award p { margin: 3px 0 6px; }
@media (min-width: 651px) {
  .cabinet:not([data-scene="title"]) { width: min(1140px,calc(100% - 32px),max(730px,calc(150dvh - 130px))); margin-block: clamp(8px, 2dvh, 22px); }
}
@media (max-width: 650px) {
  .main-menu { min-height: max(455px, calc(100dvh - 24px)); }
  .menu-content { padding-top: clamp(26px, 7dvh, 50px); }
  .menu-options button { min-height: 41px; font-size: 22px; }
  .pockets { grid-template-columns: 65px minmax(0,1fr); }
  .nat-welcome { grid-template-columns: minmax(75px,28%) 1fr; gap: 8px; padding-top: 5px; }
  .nat-welcome p { font-size: 13px; }
  .nat-welcome h2 { font-size: 24px; }
  .station-composer form { grid-template-columns: minmax(0,1fr); }
  .receiver-face { grid-template-columns: minmax(0,1fr) 66px; gap: 5px; }
  .receiver-dial { width: 60px; }
  .film-machine { padding: 5px; }
  .splicer-window { padding: 4px 3px 5px; }
  .strip-grip b { font-size: 8px; }
  .strip-grip svg { width: min(74%,34px); }
  .strip-flip { min-height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-pattern, .nat-cheer, .receiver-screen .sweep, .splicer-window.playing .splicer-beam { animation: none; }
  .receiver-dial i, .hatch-lever i { transition: none; }
}
