/* Shared styles for the 90s homepage: / and /ua/. */
:root { color-scheme: dark; --taskbar-height: 38px; }

/* So nothing scrolled to the bottom of the screen ends up under the taskbar. */
html { scroll-padding-bottom: calc(var(--taskbar-height) + 8px); }

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 12px 12px calc(var(--taskbar-height) + 12px);
  color: #fff;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  font-size: 16px;
  background-color: #000033;
  background-image:
    radial-gradient(1px 1px at 10px 20px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 60px 80px, #ffff99 50%, transparent 51%),
    radial-gradient(2px 2px at 110px 40px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 150px 120px, #99ffff 50%, transparent 51%),
    radial-gradient(1px 1px at 30px 140px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 90px 150px, #ff99ff 50%, transparent 51%);
  background-size: 170px 170px;
  cursor: crosshair;
}

a { color: #00ffff; }
a:visited { color: #ff66ff; }
a:hover { color: #ffff00; background: #ff0000; }

.page { max-width: 820px; margin: 0 auto; }

.marquee {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  border: 3px ridge #c0c0c0;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-weight: bold;
  padding: 4px 0;
}

.title {
  margin: 18px 0 4px;
  text-align: center;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  line-height: 1;
  letter-spacing: 2px;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, magenta, red);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(3px 3px 0 #000) drop-shadow(5px 5px 0 #6600cc);
  animation: rainbow 3s linear infinite;
  transform: skew(-8deg) rotate(-2deg);
}

@keyframes rainbow { to { background-position: 200% 0; } }

/* A <marquee> can't be paused, so this one is CSS: it stops with the other animations. */
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 24s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

.subtitle {
  text-align: center;
  color: #ffff00;
  font-size: 1.25rem;
  text-shadow: 2px 2px #ff00ff;
}

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

hr.rainbow {
  height: 6px;
  border: 0;
  margin: 22px 0;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, magenta);
}

.layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 640px) { .layout { grid-template-columns: minmax(0, 1fr); } }

nav.sidebar {
  background: #c0c0c0;
  border: 3px outset #fff;
  padding: 8px;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 14px;
  color: #000;
}

nav.sidebar b { display: block; text-align: center; margin-bottom: 6px; }

nav.sidebar a {
  display: block;
  margin: 5px 0;
  padding: 4px 6px;
  color: #000;
  text-decoration: none;
  background: #c0c0c0;
  border: 2px outset #fff;
}

nav.sidebar a:active { border-style: inset; }
nav.sidebar a:hover { background: #000080; color: #fff; }

.side { display: grid; gap: 14px; min-width: 0; }

/* The panels under the MeNu: the visitor counter, then the weather.
   The weather pictures are drawn in 90s.js, in the style of the cloud on the social cards. */
.visitors, .icq, .weather, .poll, .jukebox {
  background: #c0c0c0;
  border: 3px outset #fff;
  padding: 8px;
  color: #000;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 14px;
}

.visitors > b, .icq > b, .weather > b, .poll > b, .jukebox > b { display: block; text-align: center; margin-bottom: 6px; }
.visitors { text-align: center; }
.visitors p { margin: 0 0 4px; }

.weather-cities { display: grid; gap: 10px; }
.city > b { font: 19px Impact, "Arial Black", sans-serif; letter-spacing: 0.5px; color: #000080; }
/* A fixed height, because the ♥ would push one city's picture lower than the other's. */
.city small { display: block; height: 14px; font-size: 11px; line-height: 14px; white-space: nowrap; }

.scene {
  position: relative;
  overflow: hidden;
  margin-top: 3px;
  border: 3px inset #808080;
  background: linear-gradient(#7d9cc4, #d3e0ee);
}

.scene[data-sky="sun"] { background: linear-gradient(#0088ff, #9be7ff); }
.scene[data-sky="partly"] { background: linear-gradient(#2a9dff, #c8f0ff); }
.scene[data-sky="fog"] { background: linear-gradient(#8f9bab, #dfe5ec); }
.scene[data-sky="rain"] { background: linear-gradient(#3a5f9e, #8fb5e0); }
.scene[data-sky="snow"] { background: linear-gradient(#2f6fd0, #8fc4f5); }
.scene[data-sky="storm"] { background: linear-gradient(#2a1a5e, #6a4fa3); }
.scene[data-sky="offline"] { background: linear-gradient(#606060, #b0b0b0); }
.scene.night { background: linear-gradient(#000033, #1f1f70); }

.sky { display: block; width: 100%; height: 112px; }

/* Lettering like "C#" on the card: Impact, tilted, with a white sticker edge so it reads on any picture. */
.temp {
  position: absolute;
  left: 50%;
  top: 45%;
  translate: -50% -50%;
  rotate: -8deg;
  color: #555;
  font: 30px Impact, "Arial Black", sans-serif;
  white-space: nowrap;
  text-shadow: -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px 1.5px 0 #fff, 2.5px 2.5px 0 rgba(0, 0, 0, 0.55);
}

.sky-text {
  margin: 4px 0 0;
  text-align: center;
  font: bold 13px "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  color: #000080;
  rotate: -2deg;
}

/* The living part. Everything is stopped by .no-motion and prefers-reduced-motion at the end of this file,
   and every shape sits in a sensible place with no animation at all. */
.temp, .sky .bob { animation: bob 4s ease-in-out infinite; }
.sky .rays { transform-box: fill-box; transform-origin: center; animation: spin 24s linear infinite; }
.sky .star { animation: blink 1.6s steps(1) infinite; }
.sky .drop { animation: fall 0.9s linear infinite; }
.sky .flake { animation: flutter 2.6s linear infinite; }
.sky .fog { animation: drift 7s ease-in-out infinite alternate; }
.sky .bolt { animation: strike 3.2s steps(1) infinite; }
.sky .flash { opacity: 0; animation: lightning 3.2s steps(1) infinite; }
/* The second city runs out of step with the first. */
.city + .city .temp, .city + .city .sky .bob { animation-delay: -1.7s; }
.city + .city .sky .bolt, .city + .city .sky .flash { animation-delay: -1.2s; }

@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fall {
  from { transform: translateY(-8px); opacity: 0; }
  25% { opacity: 1; }
  to { transform: translateY(14px); opacity: 0; }
}
@keyframes flutter {
  from { transform: translate(0, -9px); opacity: 0; }
  25% { transform: translate(3px, -3px); opacity: 1; }
  50% { transform: translate(-3px, 3px); }
  to { transform: translate(3px, 14px); opacity: 0; }
}
@keyframes drift { to { transform: translateX(16px); } }
/* The bolt stays up and only blinks for a moment, right as the sky flashes. */
@keyframes strike { 48%, 56% { visibility: hidden; } 50%, 58% { visibility: visible; } }
@keyframes lightning { 50%, 58% { opacity: 0.55; } 54%, 62% { opacity: 0; } }

.weather-fine { margin: 8px 0 0; font-size: 10px; text-align: center; }
#weather-updated { display: block; }
.weather-fine a { color: #0000ee; }
.weather-fine a:visited { color: #551a8b; }
.weather-fine a:hover { color: #ff0000; background: #ffff00; }

/* On phones the panel spans the screen, so the two cities sit side by side. */
@media (max-width: 640px) { .weather-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Turtle green. All the plain text on it is black, and the names go on fridge-magnet tiles like the counter's digits. */
.poll { background: #57a639; border-color: #a9e08f; }
.poll fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.poll legend { margin-bottom: 4px; padding: 0; font-weight: bold; }
.poll label, .poll-name {
  display: block;
  padding: 2px 5px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  font-weight: bold;
}
.poll label { margin-top: 4px; cursor: pointer; }
.poll-results small { display: block; margin-top: 2px; }
/* color-scheme: the site's dark scheme would turn them into black dots on the grey panel. */
.poll input { margin: 0 4px 0 0; vertical-align: -1px; color-scheme: light; }
.poll-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.poll .win-btn { flex: 1; min-width: 0; padding: 3px 6px; font-size: 12px; }
.poll-results { margin-top: 2px; }
.poll-results:focus { outline: none; }
.poll-results p { margin: 0 0 6px; }
.poll-track { display: block; height: 12px; margin-top: 1px; background: #fff; border: 2px inset #fff; }
.poll-bar { display: block; height: 100%; }
.poll-results .poll-total { margin: 0; text-align: center; font-size: 12px; }
.poll-note { margin: 6px 0 0; text-align: center; font-weight: bold; }
.poll-note:empty { display: none; }

.icq { text-align: center; }
.icq-status { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 2px; font-weight: bold; text-align: left; }
.icq small { font-size: 11px; }
#icq-mood { display: block; font-weight: normal; }
.icq-flower { flex: none; width: 24px; height: 24px; fill: #00a000; stroke: #000; stroke-width: 0.6; }
.icq[data-state="away"] .icq-flower { fill: #ff8800; }
.icq[data-state="sleeping"] .icq-flower { fill: #cc0000; }
.icq-flower .icq-eye { fill: #ffdd00; }

/* A Winamp-style display, in the green of the DOS prompt. */
.jukebox-track { margin: 0; font-weight: bold; }
.jukebox-track small { display: block; font-weight: normal; }
.jukebox-screen {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 6px 0;
  padding: 3px 6px;
  background: #000;
  border: 2px inset #fff;
  color: #00ff00;
  font: bold 13px "Courier New", monospace;
}
.jukebox-note { visibility: hidden; }
.jukebox.playing .jukebox-note { visibility: visible; }
.jukebox .win-btn { width: 100%; min-width: 0; padding: 3px 6px; font-size: 12px; }

.window {
  margin-bottom: 16px;
  background: #c0c0c0;
  border: 3px outset #fff;
  color: #000;
  font-family: "Times New Roman", Times, serif;
}

.window .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 4px 4px 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 16px;
  font-weight: bold;
}

.window .btns { display: flex; gap: 2px; }

.window .btns button {
  padding: 0;
  font-family: inherit;
  /* 24px: the smallest comfortable tap target. */
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: #c0c0c0;
  border: 2px outset #fff;
  color: #000;
  font-size: 14px;
  line-height: 1;
}

.window .btns button { cursor: pointer; font-weight: bold; }
.window .btns button:active { border-style: inset; }

/* Above the page, below the taskbar. Its own body scrolls, so the page behind it stays put. */
.has-maximized, html:has(.shutdown[open], .format-screen[open]) { overflow: hidden; }
.window.maximized {
  position: fixed;
  inset: 0 0 var(--taskbar-height);
  z-index: 90;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.window.maximized .body, .window.maximized .dos-screen { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.window.maximized .dos-screen { height: auto; }

.taskbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 91;
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--taskbar-height);
  padding: 3px;
  background: #c0c0c0;
  border-top: 2px outset #fff;
  color: #000;
  font: 13px "MS Sans Serif", Tahoma, Geneva, sans-serif;
}

.taskbar button {
  height: 28px;
  padding: 0 8px;
  background: #c0c0c0;
  border: 2px outset #fff;
  color: #000;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.taskbar button:active, .start[aria-expanded="true"] { border-style: inset; }

.start { flex: none; display: flex; align-items: center; gap: 5px; font-weight: bold !important; }
.start-logo { width: 18px; height: 13px; background: linear-gradient(#0057b7 50%, #ffd700 50%); border: 1px solid #000; }

/* A row of minimized windows can outgrow a phone, so it scrolls sideways on its own. */
.tasks { flex: 1; min-width: 0; display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.tasks button { flex: 0 1 150px; min-width: 76px; overflow: hidden; text-align: left; text-overflow: ellipsis; }

.tray { flex: none; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 4px; border: 2px inset #fff; }
.taskbar .tray button { display: grid; place-items: center; height: 24px; padding: 0; background: none; border: 0; }
#volume-button, #motion-toggle { width: 24px; }
#clock:hover { text-decoration: underline; }
.taskbar .tray button:focus-visible { outline: 1px dotted #000; }
.tray svg { display: block; width: 20px; height: 16px; }
.volume-x { display: none; }
.muted .volume-x { display: inline; }
.muted .volume-waves { display: none; }
.motion-x { display: none; }
.no-motion .motion-x { display: inline; }

.volume-panel, .time-panel {
  position: fixed;
  right: 3px;
  bottom: var(--taskbar-height);
  z-index: 92;
  width: 120px;
  padding: 8px;
  background: #c0c0c0;
  border: 3px outset #fff;
  box-shadow: 4px 4px 0 #000;
  color: #000;
  color-scheme: light;
  font: 13px "MS Sans Serif", Tahoma, Geneva, sans-serif;
  text-align: center;
}
.volume-panel input[type="range"] {
  display: block;
  width: 28px;
  height: 110px;
  margin: 6px auto;
  accent-color: #000080;
  direction: rtl;
  writing-mode: vertical-lr;
}
.volume-panel label { display: block; cursor: pointer; }

.time-panel { width: 190px; }
.time-panel label { display: block; margin-top: 6px; text-align: left; }
.time-panel select, .time-panel input { display: block; width: 100%; margin-top: 2px; padding: 3px; background: #fff; border: 2px inset #fff; color: #000; font: inherit; }
.time-panel .win-btn { width: 100%; min-width: 0; margin-top: 8px; padding: 3px 6px; font-size: 12px; }

.start-menu {
  position: fixed;
  bottom: var(--taskbar-height);
  left: 3px;
  z-index: 92;
  display: flex;
  max-height: calc(100dvh - var(--taskbar-height));
  overflow-y: auto;
  background: #c0c0c0;
  border: 3px outset #fff;
  box-shadow: 4px 4px 0 #000;
  color: #000;
  font: 15px "MS Sans Serif", Tahoma, Geneva, sans-serif;
}

.start-stripe {
  padding: 8px 3px;
  background: linear-gradient(#1084d0, #000080);
  color: #c0c0c0;
  font: bold 20px Impact, "Arial Black", sans-serif;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  rotate: 180deg;
}

.start-items { display: flex; flex-direction: column; min-width: 190px; padding: 3px; }
.start-items a, .start-items button {
  display: block;
  padding: 7px 22px 7px 10px;
  background: none;
  border: 0;
  color: #000;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.start-items a:hover, .start-items a:focus-visible, .start-items button:hover, .start-items button:focus-visible {
  background: #000080;
  color: #fff;
  outline: none;
}
/* Above the sections, the windows that open over the whole page. Then Shut Down, on its own. */
.start-programs { display: flex; flex-direction: column; }
.start-programs, #shut-down { margin-top: 3px; border-top: 2px groove #fff; }

/* Win95's last two screens. A closed <dialog> must keep its display: none, hence [open]. */
.shutdown {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 24px;
  background: #000080;
  border: 0;
  color: #fff;
  font: 22px "MS Sans Serif", Tahoma, Geneva, sans-serif;
  text-align: center;
}
.shutdown[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.shutdown::backdrop { background: #000; }
.shutdown p { margin: 0; }
.shutdown.safe { background: #000; color: #ff9900; font: clamp(20px, 4vw, 34px) "Courier New", monospace; }

[hidden] { display: none !important; }

.dialog {
  max-width: 420px;
  margin: 40px auto;
  background: #c0c0c0;
  border: 3px outset #fff;
  color: #000;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  box-shadow: 6px 6px 0 #000;
}

.dialog .bar {
  padding: 3px 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}

.dialog .content {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  font-size: 15px;
}

.dialog .icon {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff0000;
  color: #fff;
  font: bold 22px Arial, sans-serif;
  box-shadow: inset -2px -2px 0 #800000;
}

.dialog .actions { padding: 0 16px 14px; text-align: center; }

.dialog button, .win-btn {
  min-width: 110px;
  padding: 5px 14px;
  background: #c0c0c0;
  border: 2px outset #fff;
  outline: 1px solid #000;
  color: #000;
  font: 14px "MS Sans Serif", Tahoma, Geneva, sans-serif;
  cursor: pointer;
}

.dialog button:active, .win-btn:active { border-style: inset; }
/* Keyboard focus the Windows 98 way: a dark line just inside the button. */
.dialog button:focus-visible, .win-btn:focus-visible { outline: 1px solid #000; box-shadow: inset 0 0 0 3px #c0c0c0, inset 0 0 0 4px #000; }

.dialog.warning .icon { background: #ffd000; color: #000; box-shadow: inset -2px -2px 0 #806800; }
.dialog.fatal .bar { background: linear-gradient(90deg, #800000, #d01010); }
.dialog .icon.question { background: #0000cc; box-shadow: inset -2px -2px 0 #000060; }
/* A real modal: the browser's <dialog>, centred over a dimmed page. */
dialog.dialog { width: min(420px, calc(100vw - 32px)); margin: auto; padding: 0; text-align: left; }
dialog.dialog::backdrop { background: rgba(0, 0, 51, 0.65); }
#cookbook, #cheats { font-size: 17px; }

.window .body {
  margin: 4px;
  padding: 10px 14px;
  background: #fff;
  border: 2px inset #fff;
  font-size: 17px;
}

.window .body a { color: #0000ee; }
.window .body a:visited { color: #551a8b; }
.window .body a:hover { color: #ff0000; background: #ffff00; }

.window h3, .dialog h3 { margin: 12px 0 2px; font-size: 19px; overflow-wrap: anywhere; }
.window h3:first-child, .dialog h3:first-child { margin-top: 0; }
.window p { margin: 4px 0 8px; }

.new {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  background: #cc0000;
  color: #ffff00;
  font: bold 12px "Arial Black", sans-serif;
  transform: rotate(-8deg);
  animation: blink 0.8s steps(1) infinite;
}

.hot { color: #d40000; font-weight: bold; }

table.stack { width: 100%; border-collapse: separate; border-spacing: 2px; }
table.stack th, table.stack td { border: 2px inset #c0c0c0; padding: 4px 6px; vertical-align: top; }
table.stack th { background: #000080; color: #fff; text-align: left; white-space: nowrap; }
table.stack td { background: #ffffcc; }

.timeline li { margin-bottom: 4px; }

/* Fridge magnets: white tiles in the same black outline as the weather clip art, each one a bit crooked.
   Seven of them have to fit the 148px inside a panel. */
.digits { display: inline-flex; gap: 2px; vertical-align: middle; }

.digits span {
  width: 19px;
  padding: 1px 0;
  text-align: center;
  background: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  font: bold 17px "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  rotate: -4deg;
}

.digits span:nth-child(even) { rotate: 3deg; }
.digits span:nth-child(1) { color: #cc0000; }
.digits span:nth-child(2) { color: #d14800; }
.digits span:nth-child(3) { color: #007a00; }
.digits span:nth-child(4) { color: #008080; }
.digits span:nth-child(5) { color: #0000cc; }
.digits span:nth-child(6) { color: #6600cc; }
.digits span:nth-child(7) { color: #c000a0; }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 14px 0;
}

.badge {
  width: 88px;
  height: 31px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px outset #ddd;
  font: bold 9px/1.05 Verdana, Geneva, sans-serif;
  text-align: center;
  text-transform: uppercase;
}

.b1 { background: linear-gradient(#003399, #000066); color: #fff; }
.b2 { background: #fff; color: #000080; }
.b3 { background: #000; color: #00ff00; font-family: "Courier New", monospace; }
.b4 { background: linear-gradient(#ff9900, #cc3300); color: #fff; }
.b5 { background: #c0c0c0; color: #800080; }
.b6 { background: linear-gradient(#2e73b8, #1a3f73); color: #fff; }
/* Wider than the rest, because a running countdown needs the room. The digits keep their width, so it doesn't jitter. */
.b7 { width: 118px; background: #000; color: #fcee0a; font-variant-numeric: tabular-nums; }

.webring {
  margin: 10px auto;
  max-width: 480px;
  padding: 6px;
  text-align: center;
  background: #330066;
  border: 3px ridge #ff00ff;
}

.no-socials {
  margin: 12px 0 0;
  font-size: 13px;
  font-style: italic;
  color: #555;
}

.business {
  margin: 0 0 6px;
  text-align: center;
  font-size: 14px;
  color: #ccccff;
}

.sniffer {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #99ff99;
}

.hobbies { margin: 6px 0 10px; padding: 0; list-style: none; }
.hobbies li { display: flex; gap: 0.5em; margin: 5px 0; }
.hobbies .ico {
  flex: none;
  width: 3.6em;
  padding-top: 2px;
  color: #008000;
  font: bold 14px "Courier New", monospace;
}

.hobbies.dislikes .ico { color: #cc0000; }
.hobbies ul { margin: 4px 0 0; padding-left: 1.2em; list-style: square; }
.hobbies ul li { display: list-item; margin: 3px 0; }

.worth { margin: 14px 0 6px; text-align: center; font-size: 19px; }
.worth-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }

.cowabunga {
  color: #c44a00;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 1px;
  animation: blink 0.9s steps(1) infinite;
}

.gallery-title {
  margin-top: 0 !important;
  text-align: center;
  font: bold 18px "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  color: #800080;
}

.gallery-title .hint { display: block; font-size: 12px; font-weight: normal; color: #555; }

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.gallery figure {
  margin: 0;
  padding: 6px 6px 4px;
  background: #c0c0c0;
  border: 2px outset #fff;
  max-width: 100%;
}

.gallery img {
  display: block;
  width: auto;
  height: 200px;
  max-width: 100%;
  object-fit: contain;
  border: 2px inset #fff;
  image-rendering: pixelated;
}

.me {
  float: right;
  margin: 0 0 8px 12px;
  padding: 6px 6px 4px;
  background: #c0c0c0;
  border: 2px outset #fff;
}

.me img {
  display: block;
  width: 150px;
  height: auto;
  border: 2px inset #fff;
  image-rendering: pixelated;
}

.me figcaption, .gallery figcaption {
  margin-top: 3px;
  text-align: center;
  font: 12px "MS Sans Serif", Tahoma, Geneva, sans-serif;
}

/* The caption wraps to the photo's width instead of stretching the frame. */
.gallery figcaption { width: 0; min-width: 100%; }
.gallery figcaption small { display: block; margin-top: 2px; font-size: 11px; font-style: italic; color: #333; }

.cheats-link {
  padding: 0;
  background: none;
  border: 0;
  color: #0000ee;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.dialog .content.notepad { display: block; margin: 0 8px 12px; padding: 10px 12px; background: #fff; border: 2px inset #fff; font-size: 14px; }
.dialog .content.notepad p { margin: 10px 0 0; }
.cheat-list { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
.cheat-list dt { font: bold 13px "Courier New", Courier, monospace; }
.cheat-list dd { margin: 0; }

/* The cookbook, a Windows Help file: its pages scroll, the buttons stay put. A closed <dialog> must keep its display: none, hence [open]. */
dialog.dialog.book { width: min(620px, calc(100vw - 32px)); max-width: none; height: min(680px, calc(100dvh - 32px)); }
dialog.dialog.book[open] { display: flex; flex-direction: column; }
.book-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.dialog .book-nav button { min-width: 0; }
.dialog .book-nav button:disabled { color: #808080; text-shadow: 1px 1px 0 #fff; cursor: default; }
.dialog .book-nav button:disabled:active { border-style: outset; }
#cookbook .content.notepad { flex: 1; min-height: 0; overflow-y: auto; background: #fffff0; font: 16px/1.35 "Times New Roman", Times, serif; }
#terms .content.notepad { flex: 1; min-height: 0; overflow-y: auto; font: 14px/1.4 "Courier New", Courier, monospace; }
#terms h3 { margin-top: 16px; font-size: 15px; }
#terms h3:first-child { margin-top: 0; }
#terms h3 + p { margin-top: 2px; }
#terms a { color: #0000ee; }
#terms .actions button { margin-top: 4px; }

/* Without JavaScript a dialog can't open, so the footer link leads to the terms right on the page. */
@media (scripting: none) {
  #terms { display: block; position: static; height: auto; margin: 16px auto; }
  #terms .actions { display: none; }
}
.book-page h3 { font-family: Arial, Helvetica, sans-serif; outline: none; }
.book-page h4 { margin: 16px 0 2px; font: bold 15px Arial, Helvetica, sans-serif; }
.book-page ul, .book-page ol { margin: 4px 0 0; padding-left: 1.4em; }
.book-page li { margin: 3px 0; }
.book-ico { color: #008000; font: bold 14px "Courier New", monospace; white-space: nowrap; }
.book-page .book-toc { padding: 0; list-style: none; }
.dialog .book-toc button {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 2px;
  background: none;
  border: 0;
  outline: 0;
  color: #0000ee;
  font: inherit;
  text-align: left;
}
.dialog .book-toc button:hover { background: #000080; color: #fff; }
.dialog .book-toc button:hover .book-ico { color: inherit; }
.book-dots { flex: 1 0 12px; border-bottom: 2px dotted currentColor; }
.dialog .content.notepad .book-folio { margin-top: 18px; text-align: center; }
.book-photo { float: right; margin: 0 0 8px 12px; padding: 4px; background: #c0c0c0; border: 2px outset #fff; }
.book-photo img { display: block; width: 150px; height: auto; border: 2px inset #fff; image-rendering: pixelated; }
.book-photo img[width="320"] { width: 200px; }

@media (max-width: 480px) {
  .me img { width: 110px; }
}

#about .body { display: flow-root; }

/* Minesweeper. The window follows the board, and a board too wide for a phone scrolls inside it.
   The cells grow a little where a finger is the pointer. */
dialog.dialog.mines {
  --mine-cell: 26px;
  color-scheme: light;
  width: min(max(420px, calc(var(--mine-columns) * var(--mine-cell) + 56px)), calc(100vw - 16px));
  max-width: none;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
}
@media (pointer: coarse) { dialog.dialog.mines { --mine-cell: 30px; } }
.mines-levels { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 10px 8px 0; font-size: 14px; }
.mines-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: fit-content;
  max-width: calc(100% - 16px);
  margin: 8px auto;
  padding: 8px;
  border: 3px outset #fff;
}
.mines-game .win-btn { min-width: 0; padding: 3px 6px; font-size: 12px; }
.mines-game .win-btn[aria-pressed="true"] { border-style: inset; background: #ffff00; }
.mines-top { display: flex; justify-content: space-between; align-items: center; padding: 4px; border: 2px inset #fff; }
.mines-led { min-width: 3ch; padding: 0 4px; background: #000; color: #ff0000; font: bold 22px/1.2 "Courier New", monospace; text-align: right; }
.dialog .mines-face { min-width: 0; width: 40px; height: 32px; padding: 0; font: bold 15px "Courier New", monospace; }
.mines-board { display: grid; grid-template-columns: repeat(var(--mine-columns), var(--mine-cell)); overflow-x: auto; border: 3px inset #fff; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mines-board [role="row"] { display: contents; }
.dialog .mine-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  width: var(--mine-cell);
  height: var(--mine-cell);
  padding: 0;
  border: 3px outset #fff;
  outline: 0;
  font: bold 16px "Courier New", monospace;
}
.dialog .mine-cell:focus-visible { outline: 2px dotted #000; outline-offset: -3px; box-shadow: none; }
.mine-cell svg { display: block; width: 18px; height: 18px; }
.dialog .mine-cell.open { border: 1px solid #808080; cursor: default; }
.dialog .mine-cell.hit { background: #ff0000; }
.mine-cell.wrong::after { content: "X"; position: absolute; color: #ff0000; font-size: 20px; }
.dialog .mine-cell[data-near="1"] { color: #0000ff; }
.dialog .mine-cell[data-near="2"] { color: #008000; }
.dialog .mine-cell[data-near="3"] { color: #ff0000; }
.dialog .mine-cell[data-near="4"] { color: #000080; }
.dialog .mine-cell[data-near="5"] { color: #800000; }
.dialog .mine-cell[data-near="6"] { color: #008080; }
.dialog .mine-cell[data-near="8"] { color: #808080; }
.mines-status { min-height: 1.3em; margin: 0 12px; font-size: 14px; font-weight: bold; text-align: center; }
.mines-help { margin: 4px 16px; font-size: 13px; text-align: center; }
.mines-best { display: grid; grid-template-columns: max-content 1fr; gap: 0 12px; width: fit-content; margin: 8px auto 12px; font-size: 13px; }
.mines-best dt { font-weight: bold; }
.mines-best dd { margin: 0; }

/* The MS-DOS Prompt: one black screen with the two static boxes, then the real prompt under them.
   It keeps its size and scrolls as a whole, with the line being typed on stuck to the bottom. */
.window.dos:not(.maximized) { margin: 14px auto; max-width: 680px; }
.dos-screen {
  position: relative;
  height: min(680px, 80dvh);
  overflow-y: auto;
  padding: 10px 14px 0;
  background: #000;
  border: 2px inset #fff;
  color: #00ff00;
  font: 14px/1.4 "Courier New", monospace;
}
.dos-screen:focus-within { box-shadow: inset 0 0 0 1px #66ff66; }
.dos-screen:focus-visible { outline: 1px dotted #00ff00; outline-offset: -3px; }
.robots { margin-bottom: 18px; }
.robots p { margin: 6px 0 0; }
.robots .robots-prompt { margin: 0 0 6px; color: #c0c0c0; }
.robots .robots-human { color: #66ff66; font-size: 12px; }
.robots a { color: #66ffff; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0 0; text-align: left; }
.facts dt { color: #c0c0c0; }
.facts dd { margin: 0; }
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 4px; }
}

.fine { position: relative; text-align: center; font-size: 12px; color: #aaaaff; }

.year {
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px dotted currentColor;
  font: inherit;
  color: inherit;
  cursor: help;
}

/* Win95 tooltip. title="" never shows on phones, so a tap toggles .open too. */
.tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(300px, 90vw);
  padding: 4px 6px;
  background: #ffffe1;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
  color: #000;
  font: 12px/1.35 Tahoma, Verdana, sans-serif;
  text-align: left;
  visibility: hidden;
  z-index: 10;
}

.year:hover + .tip, .year:focus-visible + .tip, .tip.open { visibility: visible; }

/* Matrix rain behind the cursor: each glyph drips down, flickers and dims like phosphor on an old CRT. */
.trail {
  position: fixed;
  pointer-events: none;
  font: bold 15px "MS Gothic", "Osaka", "Courier New", monospace;
  text-shadow: 0 0 3px rgba(0, 255, 65, 0.45), 0 0 8px rgba(0, 143, 17, 0.35);
  filter: blur(0.3px);
  animation: drip 1.4s linear forwards;
  z-index: 99;
}

@keyframes drip {
  0% { transform: translateY(0); color: #3cdc5c; }
  12% { color: #008f11; }
  60% { color: #006b0d; opacity: 0.9; }
  100% { transform: translateY(70px); color: #003b00; opacity: 0; }
}

.dos-log { white-space: pre-wrap; overflow-wrap: anywhere; }
.dos-session { position: sticky; bottom: 0; padding-bottom: 10px; background: #000; }
.dos-line { display: flex; align-items: baseline; gap: 1ch; margin-top: 6px; }
.dos-line label { color: #c0c0c0; }
/* 16px: anything smaller makes an iPhone zoom in on focus. */
.dos-line input {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  outline: 0;
  color: #00ff00;
  caret-color: #00ff00;
  font: 16px "Courier New", monospace;
}

.format-screen {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 24px;
  background: #000;
  border: 0;
  color: #c0c0c0;
  font: 16px/1.4 "Courier New", monospace;
}
.format-screen::backdrop { background: #000; }
.format-screen pre { margin: 0 0 16px; font: inherit; white-space: pre-wrap; }

/* Cheats. Each effect sits above the page and lets clicks through. Motion off skips the animated ones in 90s.js. */
.cheat-toast {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  max-width: min(320px, calc(100vw - 24px));
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #ff66cc;
  color: #ff99dd;
  font: 15px/1.3 "Courier New", monospace;
  white-space: pre-line;
  pointer-events: none;
}
.cheat-toast::first-line { color: #ffff66; font: 20px Impact, "Arial Black", sans-serif; letter-spacing: 1px; }
.cheat-toast:empty { padding: 0; background: none; border: 0; }

.wanted {
  position: fixed;
  top: 46px;
  right: 12px;
  z-index: 100;
  color: #ffdd00;
  font-size: 26px;
  line-height: 1;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  pointer-events: none;
}

.fx-hole {
  position: fixed;
  z-index: 98;
  width: 48px;
  translate: -50% -50%;
  filter: drop-shadow(0 0 1px #fff);
  pointer-events: none;
}

.fx-vehicle {
  position: fixed;
  bottom: var(--taskbar-height);
  left: 0;
  z-index: 97;
  width: min(250px, 55vw);
  animation: roll 5s linear both;
  pointer-events: none;
}
.fx-vehicle.truck { width: min(290px, 65vw); animation-direction: reverse; }
.fx-vehicle svg { display: block; width: 100%; height: auto; }
.fx-vehicle text { fill: #fff; font: 34px Impact, "Arial Black", sans-serif; letter-spacing: 1px; text-anchor: middle; }
.fx-vehicle .wheel { transform-box: fill-box; transform-origin: center; animation: spin 0.7s linear infinite; }
.fx-vehicle.truck .wheel { animation-direction: reverse; }
@keyframes roll {
  from { transform: translateX(-100%); }
  to { transform: translateX(100vw); }
}

.fx-flash {
  position: fixed;
  inset: 0;
  z-index: 96;
  background: #fff;
  animation: fx-flash 0.4s ease-out both;
  pointer-events: none;
}
@keyframes fx-flash { from { opacity: 0.9; } to { opacity: 0; } }

.fx-boom {
  position: fixed;
  z-index: 97;
  width: min(280px, 60vw);
  translate: -50% -50%;
  animation: fx-boom 0.9s ease-out both;
  pointer-events: none;
}
.fx-boom svg { display: block; width: 100%; height: auto; }
.fx-boom text { fill: #fff; stroke: #000; stroke-width: 5px; paint-order: stroke; font: 44px Impact, "Arial Black", sans-serif; text-anchor: middle; }
@keyframes fx-boom {
  from { scale: 0; rotate: -20deg; }
  25% { scale: 1.1; }
  70% { scale: 1; opacity: 1; }
  to { scale: 1; opacity: 0; }
}

.exploding { overflow: hidden; }
.window.blown { position: relative; z-index: 95; animation: blown 1s cubic-bezier(0.3, 0, 0.8, 0.6) forwards; }
@keyframes blown {
  to { transform: translate(var(--fly-x), var(--fly-y)) rotate(var(--fly-spin)); opacity: 0; }
}

.shake { animation: shake 0.45s steps(6); }
@keyframes shake {
  17% { transform: translate(-7px, 4px); }
  33% { transform: translate(6px, -5px); }
  50% { transform: translate(-5px, -3px); }
  67% { transform: translate(5px, 4px); }
  83% { transform: translate(-3px, 2px); }
}

/* Motion off: by the star in the tray, or by the system setting unless the star turned it back on. */
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
.no-motion .marquee span { padding-left: 0; white-space: normal; }
.no-motion .marquee { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) *, html:not(.motion-on) *::before, html:not(.motion-on) *::after { animation: none !important; }
  html:not(.motion-on) .marquee span { padding-left: 0; white-space: normal; }
  html:not(.motion-on) .marquee { text-align: center; }
}

/* Hidden until it gets keyboard focus. */
.skip { position: absolute; left: 8px; top: -100px; z-index: 100; padding: 6px 12px; background: #ffff00; color: #000; font-weight: bold; }
.skip:focus { top: 8px; }

.window .bar h2 { margin: 0; font: inherit; overflow-wrap: anywhere; }
.window .bar h2:focus-visible { outline: 2px dotted #fff; outline-offset: 2px; }
main:focus { outline: none; }

/* Language flags in the tray. With no script there is no taskbar, so they sit in the top right instead. */
.lang {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font: 12px "MS Sans Serif", Tahoma, Geneva, sans-serif;
  color: #ccccff;
}

.lang a { display: block; padding: 2px; border: 2px outset #c0c0c0; line-height: 0; }
.lang a:hover { background: #ffff00; }
.lang a[aria-current="page"] { border-style: inset; background: #ffff00; }
.lang img { display: block; width: 27px; height: 18px; }
.tray .lang { gap: 2px; margin-bottom: 0; }
.tray .lang a { padding: 1px; }
.tray .lang img { width: 21px; height: 14px; }
