:root {
  color-scheme: dark;
  --case: #c8bea0;
  --case-light: #ddd4b7;
  --case-shadow: #837b62;
  --case-deep: #5b5748;
  --phosphor: #f3b65b;
  --phosphor-bright: #ffd588;
  --screen: #140f08;
  --terminal-font: "Lucida Console", "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(91, 80, 57, 0.22), transparent 34rem),
    linear-gradient(115deg, transparent 0 49.7%, rgba(255, 255, 255, 0.018) 50%, transparent 50.3%) 0 0 / 18px 18px,
    #11100e;
  color: #e9dfc2;
  font-family: var(--terminal-font);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.19;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

.scene {
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0.6rem;
  perspective: 1200px;
}

.computer {
  position: relative;
  width: min(96vw, 100svh, 1400px);
  min-width: 310px;
  filter: drop-shadow(0 2.8rem 1.9rem rgba(0, 0, 0, 0.52));
  transform: rotateX(0.65deg) rotateY(-0.8deg);
  transform-style: preserve-3d;
}

.computer::after {
  position: absolute;
  right: 8%;
  bottom: -3.2%;
  left: 2%;
  height: 8%;
  z-index: -2;
  content: "";
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  filter: blur(16px);
  transform: translateZ(-50px);
}

.front-panel {
  position: relative;
  z-index: 2;
  min-height: 535px;
  padding: clamp(2rem, 6vw, 4rem) clamp(2rem, 6vw, 4.2rem) 2rem;
  overflow: hidden;
  border: 1px solid #d8d0b4;
  border-radius: 1rem 1rem 0.55rem 0.55rem;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(180deg, var(--case-light), var(--case) 55%, #aaa184);
  box-shadow:
    inset 1.2rem 0 1.7rem rgba(255, 255, 255, 0.1),
    inset -1rem 0 1.4rem rgba(71, 64, 48, 0.13),
    inset 0 -1rem 1.1rem rgba(77, 72, 56, 0.13),
    0 0.2rem 0 #706a55;
}

.front-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.17;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

.screen-bezel {
  position: relative;
  padding: clamp(0.72rem, 2.1vw, 1.35rem);
  border-radius: 1.15rem 1.05rem 1.45rem 1.2rem;
  background: linear-gradient(145deg, #7e765f 0%, #b8ae91 14%, #9b9277 83%, #e0d7b9 100%);
  box-shadow:
    inset 0.5rem 0.5rem 0.8rem rgba(65, 58, 44, 0.58),
    inset -0.4rem -0.45rem 0.5rem rgba(255, 255, 255, 0.42),
    0 0.3rem 0.3rem rgba(85, 78, 59, 0.28);
}

.screen-shell {
  padding: clamp(0.7rem, 2vw, 1.15rem);
  border-radius: 1rem 0.9rem 1.25rem 1rem;
  background: #28231b;
  box-shadow:
    inset 0 0 1.2rem #050403,
    0 0 0 2px #5f5847;
}

.screen {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: clip;
  contain: layout paint;
  clip-path: inset(0 round 8% 7% 9% 8% / 8% 8% 10% 9%);
  isolation: isolate;
  border-radius: 8% 7% 9% 8% / 8% 8% 10% 9%;
  background:
    radial-gradient(ellipse at center, rgba(78, 42, 8, 0.26), transparent 72%),
    var(--screen);
  box-shadow:
    inset 0 0 1.5rem 0.25rem #000,
    inset 0 0 5rem rgba(227, 138, 33, 0.09),
    0 0 0 1px rgba(255, 202, 116, 0.12);
}

.screen::before {
  position: absolute;
  inset: 0;
  z-index: 8;
  content: "";
  pointer-events: none;
  background: rgba(255, 169, 64, 0.012);
  animation: flicker 0.14s infinite;
}

.screen-glass {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 34% 12%, rgba(255, 241, 211, 0.075), transparent 35%),
    radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow: inset 0 0 2rem rgba(0, 0, 0, 0.78);
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.25;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    rgba(0, 0, 0, 0.27) 2px,
    rgba(0, 0, 0, 0.27) 4px
  );
}

.sweep {
  position: absolute;
  right: 0;
  left: 0;
  top: -28%;
  z-index: 6;
  height: 24%;
  pointer-events: none;
  opacity: 0.5;
  background: linear-gradient(to bottom, transparent, rgba(255, 193, 99, 0.07), transparent);
  animation: sweep 6.5s linear infinite;
}

.phosphor-noise {
  position: absolute;
  inset: -20%;
  z-index: 4;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise 0.3s steps(2) infinite;
}

.terminal {
  position: absolute;
  inset: 8% 8.5%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--phosphor);
  font-family: var(--terminal-font);
  font-size: clamp(0.65rem, 1.75vw, 0.92rem);
  font-kerning: none;
  font-variant-ligatures: none;
  line-height: 1.55;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 3px rgba(255, 184, 80, 0.75),
    0 0 10px rgba(226, 125, 21, 0.27);
  transform: perspective(280px) rotateX(0.5deg);
}

.terminal button,
.terminal input,
.terminal pre {
  font-family: var(--terminal-font);
  font-kerning: none;
  font-variant-ligatures: none;
}

.terminal-bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.35em;
  padding-bottom: 0.45em;
  border-bottom: 1px solid rgba(243, 182, 91, 0.42);
  font-size: 0.82em;
  letter-spacing: 0.14em;
}

.terminal-bar span,
.terminal-title {
  white-space: nowrap;
}

.terminal-title {
  margin: 0;
  font: inherit;
  font-weight: 400;
}

.terminal-bar span:last-child {
  margin-left: 1em;
}

.terminal-output {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 0.35rem;
  overflow-y: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  white-space: pre-wrap;
}

.terminal-output::-webkit-scrollbar {
  display: none;
}

.terminal-line {
  min-height: 1.45em;
}

.terminal-line + .terminal-line {
  margin-top: 0.08em;
}

.terminal-line.command-echo {
  color: var(--phosphor-bright);
}

.terminal-line.section-title {
  margin-top: 0.5em;
  color: var(--phosphor-bright);
  letter-spacing: 0.12em;
}

.terminal-line.success {
  color: var(--phosphor-bright);
}

.terminal-line.help-callout {
  animation: help-prompt-blink 1.25s step-end infinite;
}

.terminal-line.error {
  color: #ff9d61;
}

.terminal-line.ascii-art {
  min-height: 0;
  color: var(--phosphor-bright);
  font-size: clamp(0.5rem, 1.15vw, 0.74rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0;
  white-space: pre;
  text-shadow:
    0 0 0.2em rgba(255, 221, 155, 0.92),
    0 0 0.52em rgba(255, 181, 67, 0.65),
    0 0 1em rgba(255, 135, 34, 0.25);
}

.terminal-line.ascii-art + .terminal-line.ascii-art {
  margin-top: 0;
}

.terminal-line.identity-role {
  color: var(--phosphor-bright);
  font-size: 0.94em;
  letter-spacing: 0.055em;
}

.terminal-output .dim {
  opacity: 0.62;
}

.prompt-line {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  min-height: 1.5em;
  margin-top: 0.45em;
}

.prompt {
  margin-right: 0.65em;
  color: var(--phosphor-bright);
}

.terminal-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  color: var(--phosphor-bright);
  caret-color: var(--phosphor-bright);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: uppercase;
  text-shadow: inherit;
}

.terminal-input:disabled {
  opacity: 0.42;
  cursor: wait;
}

.hardware-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 6.9rem;
  padding: 1.8rem 0.4rem 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  padding-bottom: 0.12rem;
}

.brand-icon {
  display: block;
  width: 1.88rem;
  height: 2.14rem;
  overflow: visible;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.42))
    drop-shadow(0 2px 0 #746c56)
    drop-shadow(0 4px 3px rgba(54, 48, 37, 0.38));
  transform: translateY(-1px);
}

.pear-silhouette {
  fill: url(#pear-rainbow);
  stroke: rgba(61, 55, 42, 0.55);
  stroke-width: 1.35;
  paint-order: stroke;
}

.pear-highlight {
  fill: none;
  stroke: rgba(255, 244, 211, 0.46);
  stroke-linecap: round;
  stroke-width: 1.4;
}

.pear-leaf {
  fill: #68774c;
  stroke: rgba(59, 54, 41, 0.52);
  stroke-width: 1.2;
}

.pear-stem {
  fill: none;
  stroke: #5c5543;
  stroke-linecap: round;
  stroke-width: 3;
}

.disk-drive {
  position: relative;
  width: clamp(150px, 38%, 430px);
  height: clamp(2.5rem, 4.6vw, 3.5rem);
  border-radius: 0.12rem;
  background: linear-gradient(180deg, #968d72, #d2c7a6 18%, #b3a889 78%, #7c755f);
  box-shadow:
    inset 0.2rem 0.2rem 0.3rem rgba(75, 69, 53, 0.45),
    0 1px rgba(255, 255, 255, 0.55);
}

.drive-slot {
  position: absolute;
  top: 0.82rem;
  right: 3.35rem;
  left: 0.9rem;
  height: 0.56rem;
  border-radius: 1px;
  background: #1a1711;
  box-shadow:
    inset 0 2px 3px #000,
    0 1px 0 rgba(255, 255, 255, 0.25);
}

.drive-slot::after {
  position: absolute;
  top: -0.06rem;
  right: 12%;
  width: 30%;
  height: 0.18rem;
  content: "";
  background: #373128;
}

.eject-button {
  position: absolute;
  top: 0.66rem;
  right: 0.88rem;
  width: 1.75rem;
  height: 1rem;
  padding: 0;
  cursor: pointer;
  border: 1px solid #6e6754;
  border-radius: 0.12rem;
  background: linear-gradient(180deg, #c9bea0, #8f866d);
  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.38),
    inset -1px -1px rgba(61, 57, 47, 0.3),
    0 1px 1px rgba(72, 66, 52, 0.35);
}

.eject-button span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.48rem;
  height: 0.16rem;
  border-bottom: 1px solid #5e5849;
  transform: translate(-50%, -60%);
}

.eject-button:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 2px;
}

.eject-button:active,
.disk-drive.is-ejecting .eject-button {
  transform: translateY(1px);
  background: linear-gradient(180deg, #928970, #b4a98b);
  box-shadow: inset 1px 1px 2px rgba(58, 53, 43, 0.48);
}

.disk-drive.is-ejecting .drive-led {
  background: #e34c35;
  box-shadow: 0 0 0.55rem rgba(226, 62, 42, 0.75);
}

.drive-led {
  position: absolute;
  right: 0.92rem;
  bottom: 0.48rem;
  width: 0.42rem;
  height: 0.22rem;
  background: #8c251d;
  box-shadow: 0 0 0.3rem rgba(190, 39, 26, 0.42);
}

.drive-label {
  position: absolute;
  bottom: 0.34rem;
  left: 0.92rem;
  color: #6c6653;
  font-family: Arial, sans-serif;
  font-size: 0.38rem;
  letter-spacing: 0.1em;
}

.lower-case {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 5.2rem;
  margin: -0.4rem 2.4% 0 0.5%;
  padding: 1rem 1.9rem 0.7rem;
  border-radius: 0 0 0.55rem 0.6rem;
  background: linear-gradient(180deg, #958d73, #8b836b 52%, #6f6957);
  box-shadow:
    inset 0 0.5rem 0.7rem rgba(62, 58, 47, 0.23),
    inset 0 -0.22rem rgba(42, 39, 33, 0.36);
}

.lower-case::before {
  position: absolute;
  top: 0.46rem;
  right: 2%;
  left: 2%;
  height: 1px;
  content: "";
  opacity: 0.34;
  background: linear-gradient(90deg, transparent, #5f5949 12% 88%, transparent);
  box-shadow: 0 1px rgba(221, 211, 177, 0.33);
}

.base-plinth {
  position: relative;
  z-index: 0;
  height: clamp(1rem, 2vw, 1.45rem);
  margin: -0.08rem 4.8% 0 3.1%;
  border-radius: 0 0 0.35rem 0.38rem;
  background: linear-gradient(180deg, #756f5d, #4f4c42);
  clip-path: polygon(1.8% 0, 98.5% 0, 96.8% 100%, 3.4% 100%);
  box-shadow:
    inset 0 1px rgba(218, 208, 176, 0.18),
    0 0.55rem 0.8rem rgba(0, 0, 0, 0.36);
}

.base-foot {
  position: absolute;
  bottom: -0.24rem;
  width: 8.5%;
  height: 0.34rem;
  border-radius: 0 0 0.2rem 0.2rem;
  background: #282722;
}

.base-foot-left {
  left: 9%;
}

.base-foot-right {
  right: 9%;
}

.vent {
  display: grid;
  gap: 0.24rem;
  width: 5rem;
}

.vent i {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: #514d40;
  box-shadow: 0 1px rgba(211, 202, 171, 0.27);
}

.vent i:nth-child(2),
.vent i:nth-child(5) {
  width: 88%;
}

.serial {
  margin-left: auto;
  color: rgba(65, 61, 50, 0.76);
  font-family: Arial, sans-serif;
  font-size: 0.42rem;
  letter-spacing: 0.12em;
}

.power {
  position: relative;
  width: 2.45rem;
  height: 2.45rem;
  margin-left: 1.25rem;
  padding: 0;
  cursor: pointer;
  color: #403d34;
  border: 1px solid #5d594b;
  border-radius: 0.2rem;
  background: linear-gradient(145deg, #918a72, #686354);
  box-shadow:
    inset 2px 2px 3px rgba(255, 255, 255, 0.16),
    2px 2px 2px rgba(50, 46, 39, 0.36);
}

.power:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
}

.power:active {
  transform: translate(1px, 1px);
  box-shadow: inset 1px 1px 3px rgba(37, 34, 28, 0.4);
}

.power-light {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: #e07831;
  box-shadow: 0 0 0.45rem #f28b3d;
}

.power-symbol {
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.computer.is-off .screen {
  background: #080705;
}

.computer.is-off .screen::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  width: 0;
  height: 0;
  content: "";
  border-radius: 50%;
  background: rgba(255, 201, 112, 0.8);
  box-shadow: 0 0 1rem rgba(255, 186, 80, 0.8);
  animation: shutdown 0.32s ease-out forwards;
}

.computer.is-off .terminal,
.computer.is-off .scanlines,
.computer.is-off .sweep,
.computer.is-off .phosphor-noise,
.computer.is-off .screen::before {
  visibility: hidden;
}

.computer.is-off .power-light {
  background: #473f34;
  box-shadow: none;
}

@keyframes flicker {
  0% { opacity: 0.42; }
  18% { opacity: 0.74; }
  20% { opacity: 0.48; }
  50% { opacity: 0.67; }
  72% { opacity: 0.52; }
  100% { opacity: 0.61; }
}

@keyframes sweep {
  from { transform: translateY(0); }
  to { transform: translateY(535%); }
}

@keyframes noise {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -1%); }
  50% { transform: translate(-1%, 2%); }
  75% { transform: translate(1%, 1%); }
  100% { transform: translate(-2%, -1%); }
}

@keyframes blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@keyframes help-prompt-blink {
  50% {
    opacity: 0.32;
    text-shadow: none;
  }
}

@keyframes shutdown {
  0% { width: 80%; height: 2px; transform: translate(-50%, -50%); }
  70% { width: 3px; height: 2px; transform: translate(-50%, -50%); }
  100% { width: 0; height: 0; transform: translate(-50%, -50%); }
}

@media (max-width: 660px) {
  .scene {
    padding: 0.45rem;
  }

  .computer {
    width: min(94vw, 510px);
  }

  .front-panel {
    min-height: 0;
    padding: 2rem 1.55rem 1.25rem;
  }

  .hardware-row {
    min-height: 5.7rem;
  }

  .lower-case {
    height: 4.3rem;
    padding: 0.9rem 1.15rem 0.55rem;
  }

  .terminal {
    inset: 7% 7.5%;
  }

  .terminal-bar {
    margin-bottom: 0.72em;
    font-size: 0.68em;
    letter-spacing: 0.075em;
  }

}

.computer.effects-paused .screen::before,
.computer.effects-paused .sweep,
.computer.effects-paused .phosphor-noise,
.computer.effects-paused .terminal-line.help-callout {
  animation-play-state: paused;
}

.computer.effects-paused .terminal-line.help-callout {
  opacity: 1;
}

.computer.effects-paused .sweep {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

}

.print-cv {
  display: none;
}

.terminal-link {
  color: inherit;
  text-decoration-color: rgba(255, 197, 101, 0.68);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color 100ms ease, text-shadow 100ms ease;
}

.terminal-link:hover,
.terminal-link:focus-visible {
  color: #ffe3a8;
  outline: none;
  text-shadow: 0 0 0.45em rgba(255, 197, 101, 0.78);
}

.help-grid {
  display: block;
  margin: 0.62em 0 0.75em;
  white-space: normal;
}

.help-group {
  margin: 0 0 0.72em;
  padding: 0;
}

.help-group-title {
  margin: 0 0 0.2em;
  color: var(--phosphor-bright);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.075em;
}

.help-group-title::before {
  content: "[ ";
  opacity: 0.62;
}

.help-group-title::after {
  content: " ]";
  opacity: 0.62;
}

.help-row {
  display: grid;
  grid-template-columns: minmax(10.6em, 0.78fr) minmax(0, 1.22fr);
  gap: 0.35em;
  align-items: start;
  padding: 0.12em 0;
}

.help-command {
  justify-self: start;
  min-width: 0;
  padding: 0.08em 0.32em;
  color: #24150d;
  border: 0;
  background: var(--phosphor-bright);
  font: inherit;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-align: left;
  cursor: text;
  white-space: nowrap;
  box-shadow:
    0 0 0.34em rgba(255, 207, 122, 0.54),
    inset 0 0 0.22em rgba(255, 255, 220, 0.2);
  text-shadow: none;
}

.help-command::before {
  content: "> ";
  opacity: 0.62;
}

.help-description {
  opacity: 0.66;
  font-size: 0.74em;
  line-height: 1.28;
}

.help-description::before {
  content: ".... ";
  letter-spacing: 0.08em;
  opacity: 0.45;
}

.computer.game-running .prompt-line {
  display: none;
}

.computer.game-running .terminal-output {
  padding-right: 0;
  overflow: hidden;
}

.game-shell {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: var(--phosphor);
  text-align: center;
}

.game-heading {
  width: 100%;
  padding-bottom: 0.32em;
  color: var(--phosphor-bright);
  border-bottom: 1px solid rgba(243, 182, 91, 0.42);
  font-size: 0.96em;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.game-help {
  margin-top: 0.48em;
  opacity: 0.62;
  font-size: 0.76em;
  letter-spacing: 0.035em;
}

.game-board {
  flex: 0 1 auto;
  margin: 0.52em auto 0.38em;
  color: var(--phosphor-bright);
  font: inherit;
  font-size: clamp(0.54rem, 1.28vw, 0.82rem);
  font-weight: 700;
  line-height: 1.02;
  text-align: left;
  text-shadow:
    0 0 0.28em rgba(255, 210, 125, 0.8),
    0 0 0.8em rgba(255, 165, 53, 0.32);
  white-space: pre;
}

.game-status {
  min-height: 1.25em;
  color: var(--phosphor-bright);
  font-size: 0.82em;
  letter-spacing: 0.035em;
}

.game-controls {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.32em;
  margin-top: 0.45em;
}

.game-control {
  min-width: 2.15rem;
  min-height: 1.8rem;
  padding: 0.16rem 0.42rem;
  color: var(--phosphor-bright);
  border: 1px solid rgba(243, 182, 91, 0.5);
  border-radius: 0.16rem;
  background: rgba(52, 29, 15, 0.56);
  font: inherit;
  font-size: 0.9em;
  cursor: pointer;
  box-shadow: inset 0 0 0.42em rgba(255, 178, 73, 0.08);
}

.game-control:active {
  color: #fff0c7;
  background: rgba(116, 65, 24, 0.68);
  transform: translateY(1px);
}

@media (pointer: coarse), (max-width: 660px) {
  .help-row {
    grid-template-columns: minmax(10em, 0.86fr) minmax(0, 1.14fr);
  }

  .game-board {
    font-size: clamp(0.45rem, 1.7vw, 0.6rem);
  }

  .game-help {
    font-size: 0.68em;
  }

  .game-controls {
    display: flex;
  }
}

.no-script-fallback {
  display: grid;
  width: min(92vw, 46rem);
  min-height: 100svh;
  margin: 0 auto;
  align-content: center;
  padding: 3rem 1.5rem;
  color: var(--phosphor);
}

body:has(.no-script-fallback) .scene {
  display: none;
}

.no-script-fallback h1 {
  margin: 0.35rem 0 0.8rem;
  color: var(--phosphor-bright);
  font-size: clamp(2.2rem, 8vw, 4.8rem);
  line-height: 0.95;
}

.no-script-kicker,
.legal-kicker {
  margin: 0;
  color: var(--phosphor);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.no-script-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  margin-top: 1.6rem;
}

.no-script-actions a,
.legal-page a,
.error-return {
  color: var(--phosphor-bright);
  text-underline-offset: 0.22em;
}

.legal-body {
  min-height: 100svh;
  padding: clamp(1rem, 4vw, 3rem);
}

.legal-page {
  width: min(100%, 52rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid rgba(243, 182, 91, 0.28);
  background: rgba(20, 15, 8, 0.9);
  box-shadow: 0 1.6rem 5rem rgba(0, 0, 0, 0.35), inset 0 0 3rem rgba(227, 138, 33, 0.035);
}

.legal-back {
  display: inline-block;
  margin-bottom: 2.6rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.legal-page h1 {
  margin: 0.55rem 0 1rem;
  color: var(--phosphor-bright);
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 0.95;
}

.legal-intro {
  max-width: 44rem;
  margin: 0 0 2.5rem;
  color: #f4d8aa;
  font-size: 1.05rem;
  line-height: 1.65;
}

.legal-page section {
  margin-top: 2rem;
}

.legal-page h2 {
  margin: 0 0 0.65rem;
  color: var(--phosphor-bright);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-page p {
  margin: 0.45rem 0;
  line-height: 1.65;
}

.legal-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(243, 182, 91, 0.2);
  color: rgba(243, 182, 91, 0.62);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.error-body {
  display: grid;
  place-items: center;
}

.error-page {
  width: min(90vw, 42rem);
  padding: clamp(2rem, 7vw, 5rem);
  border: 1px solid rgba(243, 182, 91, 0.28);
  background: #140f08;
  box-shadow: inset 0 0 4rem rgba(227, 138, 33, 0.08);
}

.error-page h1 {
  margin: 0.6rem 0;
  color: var(--phosphor-bright);
  font-size: clamp(4rem, 20vw, 9rem);
  line-height: 0.85;
}

.error-page p {
  margin: 1.5rem 0 2.2rem;
  line-height: 1.7;
}

.error-return {
  font-weight: 700;
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    min-height: 0;
    margin: 0;
    background: #fff;
  }

  body {
    color: #1e2723;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    line-height: 1.36;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .scene,
  .no-script-fallback {
    display: none !important;
  }

  body::before {
    display: none !important;
  }

  .print-cv {
    display: block;
    width: 210mm;
    margin: 0;
  }

  .print-page {
    position: relative;
    width: 210mm;
    height: 297mm;
    padding: 12mm 14mm 15mm;
    overflow: hidden;
    break-after: page;
    page-break-after: always;
    background: #fff;
  }

  .print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 9mm;
    padding-bottom: 4mm;
    border-bottom: 2.5pt solid #263d36;
  }

  .print-kicker,
  .print-date,
  .print-tools dt,
  .print-formats {
    margin: 0;
    color: #62746d;
    font-family: "Courier New", monospace;
    font-size: 7.4pt;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }

  .print-header h1 {
    margin: 1.5mm 0 0;
    color: #17211d;
    font-size: 30pt;
    line-height: 0.96;
    letter-spacing: -0.035em;
  }

  .print-role {
    margin: 2mm 0 0;
    color: #b15c36;
    font-size: 12pt;
    font-weight: 700;
  }

  .print-contact {
    display: grid;
    flex: 0 0 72mm;
    gap: 0.75mm;
    margin: 0;
    font-style: normal;
    font-size: 8.4pt;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .print-contact a {
    color: #263d36;
    text-decoration: none;
  }

  .print-summary {
    margin: 4.5mm 0 5mm;
    padding: 3.5mm 4.2mm;
    color: #24312c;
    background: #edf1ee;
    border-left: 3pt solid #b15c36;
    font-size: 9.4pt;
    font-weight: 600;
  }

  .print-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.64fr) minmax(58mm, 0.88fr);
    gap: 8mm;
  }

  .print-secondary {
    min-width: 0;
    padding-left: 6.5mm;
    border-left: 0.7pt solid #c8d0cc;
  }

  .print-section {
    margin: 0 0 4.6mm;
    break-inside: avoid;
  }

  .print-section > h2 {
    margin: 0 0 2.6mm;
    padding-bottom: 1.2mm;
    color: #263d36;
    border-bottom: 1pt solid #9eaaa5;
    font-family: "Courier New", monospace;
    font-size: 11.2pt;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .print-entry,
  .print-project {
    margin: 0 0 3.4mm;
    break-inside: avoid;
  }

  .print-entry.compact {
    margin-bottom: 2.3mm;
  }

  .print-entry h3,
  .print-project h3,
  .print-secondary h3 {
    margin: 0.6mm 0;
    color: #17211d;
    font-size: 9.5pt;
    line-height: 1.18;
  }

  .print-entry p,
  .print-project p,
  .print-secondary p {
    margin: 0.6mm 0 0;
  }

  .print-metrics {
    color: #9d4e30;
    font-weight: 700;
  }

  .print-tools {
    margin: 0;
  }

  .print-tools dt {
    margin-top: 2mm;
  }

  .print-tools dd {
    margin: 0.5mm 0 0;
  }

  .print-secondary a {
    color: #263d36;
    text-decoration: none;
  }

  .print-formats {
    margin-top: 2mm !important;
    color: #9d4e30;
  }

  .print-network {
    margin-bottom: 0;
  }

  .print-continuation {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8mm;
    margin-bottom: 7mm;
    padding-bottom: 4mm;
    border-bottom: 2.5pt solid #263d36;
  }

  .print-continuation h2 {
    margin: 1.5mm 0 0;
    color: #17211d;
    font-size: 23pt;
    line-height: 1;
    letter-spacing: -0.025em;
  }

  .print-continuation > p {
    margin: 0;
    color: #62746d;
    font-family: "Courier New", monospace;
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-align: right;
  }

  .print-page-two .print-project {
    margin-bottom: 5mm;
  }

  .print-page-two .print-project h3 {
    font-size: 10.2pt;
  }

  .print-page-footer {
    position: absolute;
    right: 16mm;
    bottom: 7mm;
    left: 14mm;
    display: flex;
    justify-content: space-between;
    padding-top: 2.2mm;
    color: #62746d;
    border-top: 0.7pt solid #c8d0cc;
    font-family: "Courier New", monospace;
    font-size: 7pt;
    font-weight: 700;
    letter-spacing: 0.055em;
  }
}
