@media screen {
  .station-art {
    --station-height: clamp(64px, 12vh, 109px);
    display: grid; place-items: center; min-width: 0; height: var(--station-height);
  }
  .station-artwork {
    position: relative; display: block; aspect-ratio: 8 / 5;
    width: min(100%, calc(var(--station-height) * 1.6));
    transition: transform 135ms ease;
  }
  .station-artwork img { display: block; width: 100%; height: auto; }
  [data-machine-state="offline"] img { opacity: .64; }
  .station-mechanism {
    position: absolute; inset: 0; width: 100%; height: 100%;
    color: #a2f3cf; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round;
  }
  .station-mechanism > * { opacity: 0; }
  .station-mechanism [style*="--pivot"] { transform-origin: var(--pivot); }
  .system:not(:disabled):is(:hover, :focus-visible) { border-color: var(--system-accent, var(--mint)); }
  .system:not(:disabled):is(:hover, :focus-visible) .station-artwork { transform: translateY(-1px) scale(1.03); }
  .system:not(:disabled):active .station-artwork { transform: translateY(2px); }
  .power-switch input:checked + .switch-face { transform: translateY(2px); }
  .switch-face { transition: transform 145ms ease, background-color 145ms ease; }

  [data-machine-state="active"] .machine-detail { opacity: .72; color: #ffd58d; }
  [data-machine-state="active"] :is(.machine-needle, .machine-latch, .machine-sweep) { animation: machine-diagnostic 2.7s ease-in-out infinite alternate; }
  [data-machine-state="active"] .machine-lamps { opacity: .55; fill: #ffd58d; animation: machine-lamp 3.3s ease-in-out infinite alternate; }
  [data-machine-state="active"] :is(.machine-liquid, .machine-display, .machine-flow) { animation: machine-diagnostic-level 2.8s ease-in-out infinite alternate; }
  [data-machine-state="active"] .machine-reel { animation: machine-diagnostic 3.8s ease-in-out infinite alternate; }
  @keyframes machine-diagnostic-level { from { opacity: .36; } to { opacity: .72; } }
  [data-machine-state="restored"] :is(.machine-detail, .machine-live, .machine-lamps) { opacity: 1; }
  .machine-dial { fill: #192b2a; stroke-width: 2; }
  .machine-lamps { fill: #a2f3cf; stroke: #193c36; stroke-width: 1.5; }
  .station-art[data-machine-state="restored"][data-machine-startup="true"] .station-artwork {
    animation: machine-startup .9s ease-out both;
  }
  @keyframes machine-startup { from { opacity: .55; transform: translateY(3px) scale(.96); } 62% { opacity: 1; transform: scale(1.035); } to { opacity: 1; transform: none; } }
  @keyframes machine-diagnostic { from { transform: rotate(-9deg); } to { transform: rotate(11deg); } }

  [data-machine-state="restored"] .machine-needle { animation: machine-gauge 2.7s ease-in-out infinite alternate; }
  [data-machine-state="restored"] .machine-flow { stroke-dasharray: 9 11; animation: machine-flow 2.5s linear infinite; }
  [data-machine-startup="true"] .machine-latch { animation: machine-latch .92s ease-out both; }
  [data-machine-state="restored"] .machine-lamps { animation: machine-lamp 2.8s ease-in-out infinite alternate; }
  @keyframes machine-gauge { from { transform: rotate(-23deg); } to { transform: rotate(17deg); } }
  @keyframes machine-flow { to { stroke-dashoffset: -40; } }
  @keyframes machine-latch { from { transform: rotate(-70deg); } to { transform: rotate(0); } }
  @keyframes machine-lamp { from { opacity: .75; } to { opacity: 1; } }

  .machine-display { fill: #11292a; stroke-width: 1.5; }
  [data-machine-state="restored"] .machine-wave { animation: machine-wave 2.1s linear infinite; }
  [data-machine-state="restored"] .machine-radio { animation: machine-radio 3s ease-in-out infinite alternate; }
  @keyframes machine-wave { to { transform: translateX(-78px); } }
  @keyframes machine-radio { from { opacity: .32; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }

  .machine-liquid { fill: #3fcbb580; stroke: #7eefdb; stroke-width: 1.6; }
  [data-machine-state="restored"] .machine-liquid { animation: machine-liquid 3.3s ease-in-out infinite alternate; }
  [data-machine-state="restored"] .machine-bubbles { animation: machine-bubbles 2.4s ease-out infinite; }
  @keyframes machine-liquid { from { transform: scaleY(.66); } to { transform: scaleY(1.03); } }
  @keyframes machine-bubbles { from { opacity: .25; transform: translateY(4px); } 55% { opacity: 1; } to { opacity: 0; transform: translateY(-22px); } }

  .machine-radar-face { fill: #173a32; stroke-width: 1.5; }
  .machine-sweep { fill: #77f9a861; stroke-width: 2; }
  [data-machine-state="restored"] .machine-sweep { animation: machine-spin 4.2s linear infinite; }
  .machine-fan-disc { fill: #13242a; stroke: #759497; stroke-width: 4; }
  .machine-fan { fill: #457272; stroke: #add1c5; stroke-width: 2; }
  [data-machine-state="restored"] .machine-fan { animation: machine-spin 1.45s linear infinite; }
  [data-machine-startup="true"] .machine-fan { animation: machine-fan-start .9s ease-in both, machine-spin 1.45s linear .9s infinite; }
  @keyframes machine-fan-start { from { transform: rotate(-135deg); } to { transform: rotate(0); } }
  @keyframes machine-spin { to { transform: rotate(360deg); } }
  .machine-reel { fill: #375556; stroke-width: 3; }
  [data-machine-state="restored"] .machine-reel { animation: machine-spin 2.8s linear infinite; }

  .station-receipt { display: flex; align-items: center; gap: .7rem; }
  .station-receipt .station-art { --station-height: 61px; flex: 0 0 98px; }
  #screen[data-machine-paused="true"] .station-art *,
  [data-machine-hidden="true"] .station-art *,
  .station-art[data-visible="false"] * { animation-play-state: paused !important; }
}
