/* ==========================================================
   PeteOS 98 — layered on top of 98.css
   ========================================================== */

:root {
  --teal: #008080;
  --navy: #000080;
  --silver: #c0c0c0;
  --dark: #808080;
  --taskbar-h: 30px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--teal);
  -webkit-font-smoothing: none;
}

body { font-size: 12px; }

[hidden] { display: none !important; }

.screen { position: fixed; inset: 0; }

/* ---------- UI scaling (Display Properties) ----------
   On desktop, these layers render at a virtual "screen area"
   and are scaled up to fill the real window. */
html.ui-scaled #login,
html.ui-scaled #desktop,
html.ui-scaled #modal-layer {
  inset: auto;
  top: 0;
  left: 0;
  width: var(--ui-w);
  height: var(--ui-h);
  transform: scale(var(--ui-scale));
  transform-origin: 0 0;
}

/* ---------- Boot ---------- */
#boot {
  background: #000;
  color: #c0c0c0;
  font-family: "Courier New", monospace;
  padding: 24px;
  cursor: none;
}
#boot pre {
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}
.boot-skip {
  position: absolute;
  bottom: 16px;
  left: 24px;
  font-family: "Courier New", monospace;
  color: #555;
  margin: 0;
}

/* ---------- Start-up splash ---------- */
#splash {
  background: #3d7be0;
  overflow: hidden;
  cursor: wait;
}
/* Splash art is pre-dithered at 800px wide, like a low-colour 90s video card.
   Scale it up with hard pixel edges rather than smoothing. */
.splash-sky {
  position: absolute;
  inset: 0;
  background: #bcd6ec url("assets/splash-sky.png") center / cover;
  image-rendering: pixelated;
}
/* The splash artwork fills the screen. On portrait screens it's shown larger than
   the screen width (so the logo reads at a decent size) and fades into the drawn
   cloud sky above and below. */
.splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
@media (max-aspect-ratio: 1/1) {
  .splash-img {
    inset: auto;
    top: 50%;
    left: 50%;
    width: 220vw;
    height: auto;
    max-width: none;
    /* the logo sits slightly left of the image's centre, so nudge it back */
    transform: translate(calc(-50% + 5vw), -50%);
    -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  }
}
.splash-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: max(10px, 2.2vmin);
  background: linear-gradient(90deg, #000080, #1084d0, #a8e0ff, #fff, #ffd700, #ff6a00, #c43e1c, #000080) 0 0 / 50% 100% repeat-x;
  animation: bar 1.4s linear infinite;
}
@keyframes bar { to { background-position: 100% 0; } }

/* ---------- Login ---------- */
#login {
  display: grid;
  place-items: center;
  padding: 16px;
}
.login-window { width: min(420px, 100%); }
.login-grid {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  padding: 6px 4px 4px;
}
.login-grid p { margin: 0 0 10px; }
.login-grid .field-row { margin-bottom: 8px; }
.login-grid .field-row label { width: 72px; flex: none; }
.login-grid .field-row input { flex: 1; min-width: 0; }
.login-buttons { display: flex; flex-direction: column; gap: 6px; }
.shake { animation: shake .35s; }
@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}
@media (max-width: 480px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-icon { display: none; }
  .login-buttons { flex-direction: row; justify-content: flex-end; }
}

/* ---------- Desktop ---------- */
#desktop {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.06), transparent 60%),
    var(--teal);
}

.icons {
  list-style: none;
  margin: 0;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
}
.icon {
  all: unset;
  width: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-align: center;
}
.icon-img {
  width: 34px; height: 34px;
  display: grid; place-items: center;
}
.icon-img svg { width: 34px; height: 34px; }
.icon-img.ppt, .ppt-mini {
  background: #c43e1c;
  color: #fff;
  font: bold 20px/1 "Times New Roman", serif;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #7a1f08;
}
.icon-label {
  color: #fff;
  padding: 1px 3px;
  font-size: 11px;
  line-height: 1.25;
  word-break: break-word;
  text-shadow: 1px 1px 0 #000;
}
.icon:focus-visible .icon-label,
.icon.selected .icon-label {
  background: var(--navy);
  outline: 1px dotted #ff0;
  text-shadow: none;
}
.icon:focus-visible .icon-img,
.icon.selected .icon-img { filter: sepia(1) hue-rotate(190deg) saturate(4) brightness(.7); }

/* ---------- Windows ---------- */
.app-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  max-width: calc(100% - 16px);
  max-height: calc(100% - var(--taskbar-h) - 16px);
}
.app-window .window-body { overflow: auto; flex: 1; min-height: 0; }
.app-window .title-bar { cursor: default; user-select: none; touch-action: none; flex: none; }
.app-window:not(.active) .title-bar { background: linear-gradient(90deg, #808080, #b5b5b5); }
.app-window.maximized {
  inset: 0 0 var(--taskbar-h) 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none;
  max-height: none;
}
.title-bar-text { display: flex; align-items: center; gap: 4px; }
.tb-icon {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px;
  font-size: 10px; line-height: 1;
}
.tb-icon.ppt-mini { font-size: 11px; box-shadow: none; }

#win-ppt  { width: 760px; height: 560px; top: 24px;  left: 120px; }
#win-rsvp { width: 560px; top: 56px;  left: 300px; }
#win-faq  { width: 470px; height: 440px; top: 90px;  right: 30px; }
#win-bin  { width: 460px; top: 120px; left: 180px; }

.menubar {
  display: flex;
  gap: 2px;
  padding: 2px 4px;
  flex: none;
}
.menubar span { padding: 1px 6px; }
.menubar span:hover { box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }

/* ---------- PowerPoint ---------- */
.ppt-body { display: flex; flex-direction: column; gap: 6px; }
.ppt-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 6px;
}
.ppt-thumbs {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow: auto;
  background: #fff;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  counter-reset: t;
}
.ppt-thumbs li { margin-bottom: 8px; counter-increment: t; display: flex; gap: 4px; }
.ppt-thumbs li::before { content: counter(t); width: 12px; text-align: right; }
.ppt-thumbs button {
  all: unset;
  flex: 1;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #00007a, #1a1aa6);
  border: 1px solid #000;
  color: #ffd700;
  font-size: 7px;
  padding: 3px;
  overflow: hidden;
  cursor: pointer;
  line-height: 1.2;
}
.ppt-thumbs button[aria-current="true"] { outline: 2px solid var(--navy); outline-offset: 1px; }

.ppt-stage {
  background: var(--dark);
  display: grid;
  place-items: center;
  padding: 10px;
  min-height: 0;
  overflow: hidden;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  container-type: size;
}
.slides {
  width: min(100cqw, calc(100cqh * 4 / 3));
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow: 4px 4px 0 #000;
  container-type: inline-size;
}

/* Corporate 1997 template */
.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 7% 8%;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(90deg, transparent 0 4%, #ffd700 4% 4.6%, transparent 4.6%),
    linear-gradient(180deg, #00007a 0%, #1414a0 70%, #2a2ac0 100%);
  overflow: hidden;
}
.slide.current { display: flex; animation: wipe .5s steps(8); }
@keyframes wipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.slide h2 {
  font-family: "Times New Roman", serif;
  font-size: 7.5cqw;
  color: #ffd700;
  margin: 0 0 4%;
  padding-bottom: 2%;
  border-bottom: .5cqw solid #ffd700;
  text-shadow: .4cqw .4cqw 0 #000;
}
.bullets { margin: 0; padding-left: 6%; font-size: 3.9cqw; line-height: 1.45; list-style: none; }
.bullets li { position: relative; margin-bottom: 2.2%; }
.bullets li::before {
  content: "■";
  position: absolute;
  left: -5%;
  color: #ffd700;
  font-size: .7em;
  top: .25em;
}
.slide-title { justify-content: center; align-items: center; text-align: center; }
.slide-sub { font-size: 3.6cqw; margin: 3% 0 1%; font-style: italic; }
.slide-sub.big { font-size: 4.6cqw; font-style: normal; }
.slide-meta { font-size: 3.3cqw; color: #ffd700; font-weight: bold; margin: 2% 0 0; }
.slide-note { font-size: 2.4cqw; color: #aab; margin-top: auto; font-style: italic; }
.clipart {
  /* Sits in the flow below the content, pushed to the bottom-right, so it never covers text */
  margin-top: auto;
  align-self: flex-end;
  line-height: 1;
  font-size: 10cqw;
  filter: drop-shadow(.5cqw .5cqw 0 #000);
}
/* Small clip art tucked into the top-right, beside the slide heading */
.clipart-corner {
  position: absolute;
  top: 7%;
  right: 6%;
  margin: 0;
  font-size: 8cqw;
  transform: rotate(-12deg);
}
.clip-cake { align-self: center; margin-top: 4%; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4%) rotate(-4deg); } }

/* WordArt */
.wordart {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 11cqw;
  line-height: .95;
  letter-spacing: .02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff200 0%, #ff8a00 45%, #e4002b 55%, #7a00ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(.6cqw .6cqw 0 #000) drop-shadow(-.2cqw -.2cqw 0 #fff);
  transform: perspective(40cqw) rotateX(18deg) skewX(-6deg);
  padding: 0 2%;
}

.chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6%;
  padding: 0 6%;
  border-left: .4cqw solid #fff;
  border-bottom: .4cqw solid #fff;
  margin: 4% 4% 9%;
}
.bar {
  flex: 1;
  height: var(--h);
  background: repeating-linear-gradient(45deg, #ffd700 0 1cqw, #e0b800 1cqw 2cqw);
  border: .3cqw solid #000;
  box-shadow: 1cqw 0 0 #806c00;
  position: relative;
  transform-origin: bottom;
  animation: grow .8s steps(10) both;
}
.bar:nth-child(2) { background: repeating-linear-gradient(45deg, #ff4d4d 0 1cqw, #cc2a2a 1cqw 2cqw); box-shadow: 1cqw 0 0 #661515; }
.bar:nth-child(3) { background: repeating-linear-gradient(45deg, #3cdc3c 0 1cqw, #1fa41f 1cqw 2cqw); box-shadow: 1cqw 0 0 #0f520f; }
.bar:nth-child(4) { background: repeating-linear-gradient(45deg, #66ccff 0 1cqw, #3399cc 1cqw 2cqw); box-shadow: 1cqw 0 0 #1a4d66; }
.bar span {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.8cqw;
  padding-top: 1.5cqw;
  white-space: nowrap;
}
@keyframes grow { from { transform: scaleY(0); } }

.cta {
  margin-top: 4%;
  font-size: 3.2cqw !important;
  padding: 1.5cqw 4cqw !important;
  min-height: 0 !important;
  color: #000;
}

.slide table.agenda {
  border-collapse: collapse;
  white-space: normal;
  background: none;
  color: #fff;
  width: 100%;
  font-size: 2.9cqw;
  line-height: 1.2;
}
.slide .agenda tr > * { background: none; height: auto; }
.slide .agenda th {
  color: #ffd700;
  font-family: "Courier New", monospace;
  font-size: 3.2cqw;
  text-align: left;
  vertical-align: top;
  padding: 1.1cqw 3cqw 1.1cqw 0;
  white-space: nowrap;
}
.slide .agenda td { padding: 1.1cqw 0; color: #fff; font-family: Arial, Helvetica, sans-serif; }
.agenda tr + tr > * { border-top: .2cqw dotted rgba(255, 215, 0, .45); }
.agenda td b { display: block; }
.agenda td span { display: block; color: #c8c8ff; font-size: 2.4cqw; font-style: italic; }

.cta-left { align-self: flex-start; margin-left: 6%; }
.cta-row { display: flex; gap: 2cqw; flex-wrap: wrap; justify-content: center; }
.notepad a { color: #0000ee; }

.ppt-controls { display: flex; justify-content: center; gap: 6px; flex: none; }

/* Fullscreen slideshow */
#slideshow {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  display: grid;
  place-items: center;
  outline: none;
  container-type: size;
}
#slideshow .slideshow-stage {
  width: min(100cqw, calc(100cqh * 4 / 3));
  aspect-ratio: 4 / 3;
  position: relative;
  container-type: inline-size;
}
.slideshow-hint {
  position: absolute;
  bottom: 8px; right: 12px;
  color: #444;
  margin: 0;
  font-family: Arial, sans-serif;
}

/* ---------- RSVP wizard ---------- */
.rsvp-wizard {
  display: grid;
  grid-template-columns: 130px 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px 14px;
}
.wizard-art {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 46px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080;
}
.wizard-art-inner { line-height: 1.2; }
.wizard-art small { display: block; margin-top: 10px; font-size: 13px; font-weight: bold; letter-spacing: .05em; line-height: 1.4; }
.wizard-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wizard-intro { margin: 0; line-height: 1.4; }
.wizard-main fieldset { margin: 0; }
.wizard-main fieldset .field-row { margin-top: 4px; }
.wizard-main input[type="text"],
.wizard-main input[type="email"],
.wizard-main textarea,
.wizard-main select { width: 100%; }
.wizard-main textarea { resize: vertical; }
.attending-only { display: flex; flex-direction: column; gap: 10px; }
.wizard-buttons {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #808080;
  box-shadow: 0 -1px 0 #fff inset;
}
.form-error { color: #c00000; margin: 0; font-weight: bold; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.invalid { outline: 1px dashed #c00000; outline-offset: 1px; }

/* ---------- Notepad ---------- */
.notepad {
  background: #fff;
  margin: 0 2px 2px;
  padding: 0 !important;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.notepad pre {
  margin: 0;
  padding: 6px 8px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
}

/* ---------- Recycle bin ---------- */
.bin-list { max-height: 220px; }
.bin-list table { width: 100%; }
.bin-note { margin: 8px 0 0; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--taskbar-h);
  background: var(--silver);
  box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 2px 0;
  z-index: 8000;
}
.start-btn {
  display: flex !important;
  align-items: center;
  gap: 4px;
  min-width: 0 !important;
  height: 23px;
  padding: 0 6px !important;
  font-size: 12px;
}
.start-btn[aria-expanded="true"] {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}
.win-logo {
  display: grid;
  grid-template-columns: 7px 7px;
  gap: 1px;
  transform: perspective(30px) rotateY(-18deg) skewY(-4deg);
}
.win-logo i { width: 7px; height: 7px; display: block; }
.win-logo i:nth-child(1) { background: #f03a17; }
.win-logo i:nth-child(2) { background: #3cb900; }
.win-logo i:nth-child(3) { background: #0078d7; }
.win-logo i:nth-child(4) { background: #ffb900; }

.task-list { flex: 1; display: flex; gap: 3px; min-width: 0; overflow: hidden; }
.task-btn {
  min-width: 0 !important;
  width: 160px;
  flex: 0 1 160px;
  height: 23px;
  text-align: left !important;
  padding: 0 6px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-btn.active {
  font-weight: bold;
  background: repeating-conic-gradient(#fff 0 25%, #c0c0c0 0 50%) 0 0 / 2px 2px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}
.tray {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 8px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080;
  font-size: 11px;
  white-space: nowrap;
}

/* ---------- Start menu ---------- */
.start-menu {
  position: absolute;
  left: 2px;
  bottom: var(--taskbar-h);
  z-index: 8500;
  display: flex;
  background: var(--silver);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff;
  padding: 3px;
  min-width: 210px;
}
.start-side {
  width: 24px;
  background: linear-gradient(0deg, #000080, #1084d0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
}
.start-side span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #c0c0c0;
  font-size: 18px;
  letter-spacing: .02em;
  font-family: "Arial Black", Arial, sans-serif;
}
.start-side b { color: #fff; }
.start-menu ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.start-menu li button {
  all: unset;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 18px 6px 6px;
  cursor: pointer;
  font-size: 12px;
}
.start-menu li button:hover,
.start-menu li button:focus-visible { background: var(--navy); color: #fff; }
.start-menu .mi {
  width: 24px; height: 24px;
  display: inline-grid; place-items: center;
  font-size: 18px;
}
.start-menu .mi.ppt-mini { font-size: 16px; box-shadow: 1px 1px 0 #7a1f08; }
.start-menu .sep { height: 0; margin: 3px 2px; border-top: 1px solid #808080; border-bottom: 1px solid #fff; }

/* ---------- Office Assistant ---------- */
#assistant {
  position: absolute;
  right: 18px;
  bottom: calc(var(--taskbar-h) + 14px);
  z-index: 7000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: 260px;
}
.bubble {
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
  box-shadow: 3px 3px 0 rgba(0,0,0,.35);
}
.bubble::after {
  content: "";
  position: absolute;
  right: 30px;
  bottom: -10px;
  border: 10px solid transparent;
  border-top-color: #ffffe1;
  border-bottom: 0;
  filter: drop-shadow(0 1px 0 #000);
}
.bubble p { margin: 0 0 8px; line-height: 1.4; }
.bubble-buttons { display: flex; gap: 6px; justify-content: flex-end; }
.bubble-buttons button { min-width: 0; padding: 0 8px; }
.paperclip {
  all: unset;
  cursor: pointer;
  margin-right: 10px;
  animation: bob 2.2s ease-in-out infinite;
}
.bubble.hidden { display: none; }
#assistant.bounce-in { animation: bounce-in .9s cubic-bezier(.3, 0, .3, 1) both; transform-origin: 80% 100%; }
@keyframes bounce-in {
  0%   { transform: translateY(120%) scale(.6); opacity: 0; }
  45%  { transform: translateY(-12%) scale(1.04, .96); opacity: 1; }
  62%  { transform: translateY(0) scale(1.06, .92); }
  76%  { transform: translateY(-5%) scale(.98, 1.03); }
  88%  { transform: translateY(0) scale(1.02, .98); }
  100% { transform: translateY(0) scale(1); }
}

/* ---------- Modal ---------- */
#modal-layer {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal { width: min(380px, 100%); }
.modal-content { display: flex; gap: 14px; align-items: flex-start; padding: 8px 4px 12px; }
.modal-content p { margin: 4px 0 10px; line-height: 1.4; white-space: pre-line; }
.modal-icon { font-size: 30px; line-height: 1; flex: none; }
.modal-buttons { display: flex; justify-content: center; gap: 6px; }
#modal-progress { width: 240px; max-width: 100%; }

/* ---------- Display Properties ---------- */
#win-display { width: 404px; top: 70px; left: 260px; }
#win-display .window-body { overflow: visible; }
.display-tabs { margin-top: 2px; }
.display-tabs li[aria-selected="false"] { color: #000; }
.display-panel .window-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.monitor {
  width: 188px;
  margin: 4px auto 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.monitor-bezel {
  width: 188px;
  padding: 12px 12px 18px;
  background: #c0c0c0;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  position: relative;
}
.monitor-bezel::after {
  content: "";
  position: absolute;
  right: 14px; bottom: 6px;
  width: 6px; height: 4px;
  background: #3cdc3c;
  box-shadow: inset 1px 1px #0a0a0a;
}
.monitor-screen {
  aspect-ratio: 4 / 3;
  background: var(--teal);
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
  position: relative;
  overflow: hidden;
}
.mini-win {
  position: absolute;
  left: 10%; top: 10%;
  width: var(--mini, 60%);
  aspect-ratio: 4 / 3;
  background: #c0c0c0;
  border-top: 4px solid var(--navy);
  box-shadow: 1px 1px 0 #000;
  transition: width .15s steps(4);
}
.mini-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: #c0c0c0;
  border-top: 1px solid #fff;
}
.monitor-neck { width: 50px; height: 10px; background: #a8a8a8; box-shadow: inset -1px 0 #808080, inset 1px 0 #dfdfdf; }
.monitor-base { width: 110px; height: 8px; background: #c0c0c0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff; }
.display-panel fieldset { margin: 0; }
.display-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slider-row { display: flex; align-items: center; gap: 6px; }
.slider-row input { flex: 1; min-width: 0; }
#res-label { text-align: center; margin: 6px 0 0; }
.display-buttons { display: flex; justify-content: flex-end; gap: 6px; padding-top: 8px; }

/* ---------- Shutdown ---------- */
#shutdown {
  background: #000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 30px;
  text-align: center;
}
#shutdown p {
  color: #ff8c00;
  font: bold clamp(22px, 5vw, 40px)/1.3 Arial, sans-serif;
  margin: 0;
}

/* ==========================================================
   Phone layout: no free-floating windows
   ========================================================== */
@media (max-width: 760px) {
  html, body { overflow: hidden; }

  .icons {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 12px 4px 8px;
  }
  .icon { width: auto; }

  .app-window,
  .app-window.maximized {
    position: fixed;
    inset: 8px 8px calc(var(--taskbar-h) + 8px) 8px !important;
    width: auto !important;
    height: auto !important;
    max-width: none;
    max-height: none;
  }
  .title-bar-controls button[aria-label="Maximize"] { display: none; }

  .ppt-layout { grid-template-columns: 1fr; }
  .ppt-thumbs { display: none; }
  .menubar { display: none; }

  .rsvp-wizard { grid-template-columns: 1fr; }
  .wizard-art { display: none; }

  .task-btn { width: 96px; flex-basis: 96px; }
  .desktop-only { display: none; }
  /* Icons sit behind full-screen windows; hide them so labels don't peek out the sides */
  #desktop:has(.app-window:not([hidden])) .icons { visibility: hidden; }

  /* iOS zooms into inputs under 16px; keep them at 16px */
  input[type="text"], input[type="email"], input[type="password"], select, textarea {
    font-size: 16px;
    height: auto;
    min-height: 26px;
    line-height: 1.25;
  }
  .start-menu li button { padding: 9px 18px 9px 8px; }
  .bubble-buttons button { min-height: 28px; }
  #assistant { right: 8px; max-width: calc(100% - 16px); }
  .paperclip svg { width: 48px; height: 72px; }
}

/* Tall phone screens: windows take the top half, leaving the bottom
   for the desktop and the Office Assistant. */
@media (max-width: 760px) and (max-aspect-ratio: 3/4) {
  .app-window,
  .app-window.maximized {
    bottom: auto !important;
    height: calc((100% - var(--taskbar-h)) * 0.55) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
