:root {
  color-scheme: dark;
  --bg: #101116;
  --bg-deep: #0b0c11;
  --ink: #f6f4ef;
  --muted: #aaa7af;
  --panel: #1a1b22;
  --panel-soft: #15161d;
  --line: #323541;
  --good: #69d38d;
  --warning: #f2bb5a;
  --danger: #ff8d80;
  --violet: #a89bdb;
  --cream: #f6f1e8;
  --content: 1100px;
  --readable: 760px;
  --radius-control: 13px;
  --radius-panel: 22px;
  --shadow: 0 16px 38px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% 5%, #332545 0, transparent 30rem),
    var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: rgba(168, 155, 219, .18);
}

body::after {
  position: fixed;
  z-index: 999;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.52'/%3E%3C/svg%3E");
  content: "";
  mix-blend-mode: soft-light;
  opacity: .028;
  pointer-events: none;
}

[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; }

button,
.button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 11px 17px;
  background: #e9e4f3;
  color: #211a2c;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled { cursor: not-allowed; opacity: .58; }
button:active:not(:disabled), .button:active { transform: translateY(1px); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: calc(8px + env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--cream);
  color: #19161d;
  font-weight: 800;
  white-space: normal;
}

.app-main {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding-top: calc(22px + env(safe-area-inset-top));
  padding-right: max(clamp(18px, 4vw, 28px), env(safe-area-inset-right));
  padding-bottom: calc(44px + env(safe-area-inset-bottom));
  padding-left: max(clamp(18px, 4vw, 28px), env(safe-area-inset-left));
}

.app-main.narrow { max-width: 960px; }

.app-nav {
  position: relative;
  z-index: 50;
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 0 auto clamp(34px, 6vw, 62px);
  padding: 5px;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(20, 20, 28, .82);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  padding: 9px 15px;
  color: #bab5c5;
  font-size: .84rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav a[aria-current] {
  background: #302a3c;
  color: #fff;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.nav-icon { font-size: 1rem; line-height: 1; }
.context-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 8px; color: #d7ceec; font-weight: 750; text-underline-offset: 3px; }

.hero {
  max-width: var(--readable);
  margin: 0 auto clamp(32px, 6vw, 52px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--violet);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: .92;
  letter-spacing: -.065em;
}

h2 { letter-spacing: -.03em; }

.sub {
  max-width: 42rem;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.pulse {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 22px;
  border: 1px solid #345d4c;
  border-radius: 999px;
  padding: 8px 13px;
  color: #b5dbc5;
  font-size: .82rem;
  white-space: nowrap;
}

.pulse span,
.service span {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  margin-right: 7px;
  background: var(--good);
}

.pulse:not(.attention):not(.offline) span { animation: system-lamp 2.4s ease-in-out infinite; }
.pulse.attention { border-color: #72541f; color: #f3ce85; }
.pulse.attention span, .service:not(.ok) span { background: var(--warning); }
.pulse.offline { border-color: #69423e; color: #ffc1b8; }
.pulse.offline span { background: var(--danger); }

.apps { display: grid; grid-template-columns: 1fr; gap: 14px; }

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 172px;
  flex-direction: column;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .025);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  touch-action: manipulation;
}

.card::after {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: rgba(246, 241, 232, .52);
  font: 700 .6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}

.card:nth-child(1)::after { content: "MODULE 01"; }
.card:nth-child(2)::after { content: "MODULE 02"; }
.card:nth-child(3)::after { content: "MODULE 03"; }
.card:nth-child(4)::after { content: "MODULE 04"; }
.card:nth-child(5)::after { content: "MODULE 05"; }
.card:hover { transform: translateY(-3px); box-shadow: 0 19px 40px rgba(0, 0, 0, .3); }
.card small { font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.card h2 { margin: 14px 0 0; font-size: clamp(1.55rem, 4vw, 1.85rem); }
.card p { margin: 8px 0 20px; color: #e4e0e4; }
.card > b { margin-top: auto; padding-right: 90px; }
.disco { background: linear-gradient(145deg, #5b2644, #291927); }
.mood { background: linear-gradient(145deg, #1f5360, #162534); }
.video { background: linear-gradient(145deg, #9c552d, #40251e); }
.prerolls { background: linear-gradient(145deg, #554526, #262015); }
.cinema { background: linear-gradient(145deg, #5d4278, #21182e); }

.app-state {
  display: inline-block;
  margin-left: 7px;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(17, 47, 34, .48);
  color: #d7f0df;
  font-size: .62rem;
  letter-spacing: .03em;
}

.app-state.offline { background: #5b302d; color: #ffe0d7; }

.panel,
.monitor,
.alerts,
.library {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .025);
}

.monitor { margin-top: 18px; padding: clamp(20px, 4vw, 27px); }
.monitor-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.monitor h2, .panel h2 { margin: 0; font-size: 1.35rem; }
.monitor-summary { margin: 20px 0; font-size: 1.1rem; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.metric {
  display: flex;
  min-width: 0;
  min-height: 108px;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  background: var(--panel-soft);
}

.metric small { color: #b7b2be; font-size: .63rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.metric strong { font-size: 1.08rem; overflow-wrap: anywhere; }
.metric span { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.metric.alert { border-color: #755926; }
.metric.alert strong { color: #f3ce85; }
.service-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); }
summary { min-height: 44px; padding: 10px 0; color: #dcd8e4; font-weight: 750; cursor: pointer; }
.service { display: flex; align-items: center; gap: 6px; margin: 9px 0; color: var(--ink); font-size: .9rem; }
.service b { margin-left: auto; color: var(--muted); font-size: .8rem; }
.updated { margin: 18px 0 0; color: #85828e; font-size: .75rem; }

.alerts { margin-top: 18px; padding: 18px 22px; border-color: #795a29; background: linear-gradient(135deg, #372918, #201b19); }
.alerts .eyebrow { color: #f1c775; }
.alert { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 8px 0; }
.alert + .alert { border-top: 1px solid rgba(255, 255, 255, .08); }
.alert strong { color: #ffe0a1; }
.alert span { color: #d4c4ad; font-size: .9rem; }
.page-header h1 { font-size: clamp(3rem, 8vw, 5.2rem); }

.session {
  position: relative;
  overflow: hidden;
  border: 1px solid #595168;
  border-radius: 25px;
  padding: clamp(19px, 4vw, 34px);
  background: linear-gradient(145deg, #282130, #15151d);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .27);
}

.count { margin: 0; color: #c9bfd9; }
.timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 22px 0; }

.timeline div {
  min-width: 0;
  border: 1px solid rgba(184, 164, 118, .27);
  border-radius: 7px;
  padding: 11px 10px;
  background: linear-gradient(135deg, #302b2d, #211f27);
  box-shadow: inset 0 1px rgba(255, 243, 199, .04);
  color: #d6cfdf;
  font-size: .78rem;
  text-align: center;
}

.timeline b { display: block; margin-bottom: 5px; color: #f8edb7; font: 750 .68rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.film-choice { padding: 18px; border: 1px solid #383543; border-radius: 18px; background: #171820; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span, .field > label { color: #dad5df; font-size: .8rem; font-weight: 750; }
.film-choice > label { display: block; font-size: 1.08rem; font-weight: 800; }

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #4a4b56;
  border-radius: var(--radius-control);
  padding: 12px 14px;
  background: #101118;
  color: var(--ink);
}

input::placeholder { color: #777581; opacity: 1; }
.film-choice input, .film-choice select { margin-top: 9px; }
.note { margin-bottom: 0; color: #aaa3b5; line-height: 1.45; }
.launch { width: 100%; min-height: 60px; margin-top: 16px; background: linear-gradient(135deg, #f1d27c, #c7834a); box-shadow: 0 8px 22px #0008; color: #24160f; font-size: 1.04rem; transition: transform .18s ease, box-shadow .18s ease; }
.launch:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(199, 131, 74, .32); }
.status { min-height: 25px; margin: 16px 0 0; color: #e5d8ad; text-align: center; white-space: pre-line; }
.status.success, .success { color: #8ee0b2; }
.status.error, .error { color: #ffb4a8; }

.on-air {
  display: grid;
  grid-template-columns: minmax(130px, 260px) 1fr;
  gap: clamp(20px, 4vw, 32px);
  align-items: center;
  border: 1px solid #ff36c7;
  border-radius: 25px;
  padding: clamp(20px, 4vw, 30px);
  background: radial-gradient(circle at top, #4b174a, #15151d 64%);
  box-shadow: 0 0 18px #ff36c788, 0 0 55px #7c34ff55;
}

.on-air img { width: 100%; max-height: 390px; border-radius: 14px; box-shadow: 0 12px 30px #0009; object-fit: cover; }
.on-air h2 { margin: 10px 0; font-size: clamp(2rem, 7vw, 4rem); }
.on-air-badge { display: inline-block; border-radius: 999px; padding: 7px 13px; background: #ff2ccf; color: #fff; font-weight: 900; letter-spacing: .16em; animation: on-air 1s steps(2, end) infinite; }
#end-session { margin-top: 16px; border: 1px solid #ff80df; background: #302439; color: #fff; }

.library-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.library { position: relative; overflow: hidden; min-width: 0; padding: 20px 20px 20px 25px; border-color: rgba(255, 255, 255, .13); background: linear-gradient(145deg, rgba(35, 36, 44, .96), rgba(20, 21, 27, .96)); }
.library::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: #c9b56b; box-shadow: 2px 0 12px rgba(201, 181, 107, .35); content: ""; }
.library::after { position: absolute; top: 14px; right: 16px; color: rgba(246, 241, 232, .25); content: "◉"; font: 900 1.5rem/1 Georgia, serif; }
.library:nth-child(1)::before { background: #d49056; }
.library:nth-child(2)::before { background: #e3c04d; }
.library:nth-child(3)::before { background: #82b8d2; }
.library:nth-child(4)::before { background: #b994d6; }
.library h2 { margin: 0; padding-right: 28px; font-size: 1.25rem; }
.library .library-path { min-height: 42px; overflow-wrap: anywhere; color: var(--muted); font-size: .78rem; }
.library ul { max-height: 190px; margin-bottom: 0; overflow: auto; padding-left: 18px; color: #c9c6ce; font-size: .84rem; scrollbar-color: rgba(246, 241, 232, .25) transparent; }
.panel { margin-top: 18px; padding: clamp(20px, 4vw, 26px); }
.form { display: grid; grid-template-columns: 1fr; gap: 13px; }
.form-actions { display: flex; align-items: end; }
.form-actions button { width: 100%; background: #d9d2e6; }
.jobs { margin: 12px 0 0; padding: 0; list-style: none; }
.jobs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; border-top: 1px solid var(--line); padding: 13px 0; }
.jobs b, .jobs small { overflow-wrap: anywhere; }
.jobs small { grid-column: 1 / -1; color: var(--muted); }
.job-state { align-self: start; color: #b9e6c6; font-size: .8rem; }
.job-state.error { color: #ffb4a8; }
.empty-state { color: var(--muted); }

dialog {
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto;
  overflow: auto;
  border: 1px solid #7f7352;
  border-radius: 16px;
  padding: 26px;
  background: #20201d;
  color: #f4f0e0;
  box-shadow: 0 22px 70px #000c;
}

dialog::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); }
.dialog-actions { display: grid; gap: 10px; margin-top: 20px; }
.dialog-actions button { width: 100%; background: #3a3320; color: #fff3c7; }
.dialog-actions .danger { background: #8c2d1a; }
.delorean-panel { position: relative; overflow: hidden; border: 3px solid #87794d !important; outline: 1px solid #181711; outline-offset: -7px; border-radius: 10px; padding: 24px 28px 28px !important; background: linear-gradient(135deg, #302f26, #161914 45%, #30332b) !important; }
.delorean-panel::before { display: block; margin-bottom: 14px; border-bottom: 1px solid #807449; padding-bottom: 9px; color: #89e5d6; content: "TIME CIRCUIT / ACCESS"; font: 10px monospace; letter-spacing: .16em; }
.delorean-panel h2 { margin: 4px 0 18px; color: #ffe7a0; font: 750 16px monospace; letter-spacing: .15em; text-transform: uppercase; }
.wire { position: absolute; z-index: -1; width: 38px; height: 9px; border-radius: 8px; box-shadow: 0 2px 5px #000; }
.wire.one { top: 48px; left: -12px; background: #dc3d2c; transform: rotate(-21deg); }
.wire.two { top: 78px; right: -12px; background: #e3bc31; transform: rotate(20deg); }
.wire.three { right: -12px; bottom: 45px; background: #39a6a1; transform: rotate(-14deg); }
.diodes { display: flex; justify-content: center; gap: 10px; margin: 0 0 17px; }
.diodes i { width: 9px; height: 9px; border-radius: 50%; background: #4f160d; box-shadow: 0 0 4px #000; }
.diodes i:nth-child(1), .diodes i:nth-child(4) { background: #ff4d2f; box-shadow: 0 0 10px #ff3b24; }
.diodes i:nth-child(2) { background: #ffd33d; box-shadow: 0 0 9px #ffd33d; }
.diodes i:nth-child(3) { background: #59ddd1; box-shadow: 0 0 9px #59ddd1; }
.code-dots { text-align: center; color: #ffdf65; font: 22px monospace; letter-spacing: 10px; text-shadow: 0 0 8px #ff4c2f; }
.retro-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; border: 1px solid #756a46; padding: 12px; background: #0d100d; box-shadow: inset 0 0 17px #000; }
.retro-keys button { min-width: 0; height: 54px; border: 1px solid #a69b6b; border-radius: 4px; padding: 0; background: linear-gradient(#52594c, #252b25); box-shadow: inset 0 1px #c4c69b, 0 2px 2px #000; color: #fff6cf; font: 700 20px monospace; }
.retro-keys button:active { background: #7b2e1d; transform: translateY(2px); }
.code-cancel { width: 100%; margin-top: 12px; background: transparent; color: #ddd4ba; }
.code-error { min-height: 24px; color: #ffb4a8; text-align: center; }

.connection-banner {
  position: fixed;
  z-index: 1000;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  max-width: calc(100vw - 24px);
  transform: translateX(-50%);
  border: 1px solid #80504a;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(67, 36, 33, .96);
  box-shadow: 0 10px 28px #0008;
  color: #ffd1c9;
  font-size: .8rem;
  font-weight: 750;
  text-align: center;
}

.update-toast {
  position: fixed;
  z-index: 1001;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  max-width: min(420px, calc(100vw - 32px));
  align-items: center;
  gap: 12px;
  border: 1px solid #615873;
  border-radius: 17px;
  padding: 12px 14px;
  background: #26222f;
  box-shadow: 0 18px 44px #000a;
}

.update-toast p { margin: 0; color: #ddd7e5; font-size: .88rem; }
.update-toast button { flex: 0 0 auto; }
.offline-page { display: grid; min-height: 62svh; place-items: center; text-align: center; }
.offline-card { max-width: 560px; border: 1px solid var(--line); border-radius: 24px; padding: clamp(26px, 7vw, 48px); background: var(--panel); box-shadow: var(--shadow); }
.offline-card h1 { font-size: clamp(2.7rem, 10vw, 4.6rem); }
.offline-card p { color: var(--muted); }
footer { margin: 34px 0 0; color: #7f7c87; font-size: .78rem; letter-spacing: .055em; text-align: center; }

@keyframes system-lamp {
  0%, 100% { opacity: .72; box-shadow: 0 0 0 3px #69d38d12, 0 0 7px #69d38d3d; }
  50% { opacity: 1; box-shadow: 0 0 0 5px #69d38d24, 0 0 15px #69d38d88; }
}

@keyframes on-air {
  50% { opacity: .35; box-shadow: 0 0 3px #fff; }
  100% { box-shadow: 0 0 18px #fff; }
}

@media (min-width: 620px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-url, .form-actions { grid-column: 1 / -1; }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .apps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
  .apps .card { grid-column: span 2; min-height: 255px; padding: 25px; }
  .apps .card:nth-child(4) { grid-column: 2 / span 2; }
  .metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .form { grid-template-columns: 1fr .72fr 1.35fr 1.35fr; align-items: end; }
  .field-url { grid-column: 1 / 4; }
  .form-actions { grid-column: 4; }
}

@media (min-width: 1080px) { .library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (max-width: 619px), (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
  .app-main { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(102px + env(safe-area-inset-bottom)); }
  .app-nav { position: fixed; right: max(10px, env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); left: max(10px, env(safe-area-inset-left)); width: auto; margin: 0; border-radius: 20px; padding: 5px; }
  .app-nav a { min-width: 0; flex: 1 1 0; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: .69rem; }
  .nav-icon { font-size: 1.05rem; }
  .hero { margin-bottom: 30px; }
  .hero h1 { font-size: clamp(2.85rem, 15vw, 4.2rem); }
  .sub { font-size: .98rem; }
  .monitor-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .monitor-head button { padding-inline: 14px; }
  .alert { display: grid; gap: 3px; }
  .card > b { padding-right: 80px; }
  .on-air { grid-template-columns: 1fr; text-align: center; }
  .on-air img { width: auto; max-width: 100%; max-height: 300px; justify-self: center; }
  .jobs li { grid-template-columns: 1fr; }
  .job-state { grid-row: 2; }
  .update-toast { right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); left: 12px; max-width: none; }
}

@media (max-width: 370px) {
  .app-main { padding-right: max(14px, env(safe-area-inset-right)); padding-left: max(14px, env(safe-area-inset-left)); }
  .app-nav a { font-size: .62rem; letter-spacing: -.01em; }
  .nav-icon { font-size: 1rem; }
  .timeline { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .monitor-head { grid-template-columns: 1fr; }
  .monitor-head button { width: 100%; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
  .app-main { padding-top: calc(14px + env(safe-area-inset-top)); }
  .hero { margin-bottom: 24px; }
  .hero h1 { font-size: clamp(2.6rem, 10vw, 4rem); }
  .pulse { margin-top: 14px; }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 148px; }
}

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