/* Chase OS — Windows-98-style desktop, modeled on retro98.framer.website.
   Authentic silver bevels, navy title bars, bottom taskbar + Start menu.
   Graded darker/moodier to taste: the wallpaper runs nocturnal, not bright. */

/* Pixel-accurate MS Sans Serif (shipped by the 98.css project) */
@font-face { font-family: "MS Sans Serif"; src: url("https://unpkg.com/98.css@0.1.20/dist/ms_sans_serif.woff2") format("woff2"); font-weight: normal; }
@font-face { font-family: "MS Sans Serif"; src: url("https://unpkg.com/98.css@0.1.20/dist/ms_sans_serif_bold.woff2") format("woff2"); font-weight: bold; }

:root {
  --face: #c0c0c0;         /* silver chrome */
  --hl: #ffffff;           /* bevel highlight */
  --lt: #dfdfdf;           /* bevel light */
  --sh: #808080;           /* bevel shadow */
  --dk: #000000;           /* bevel dark */
  --text: #000000;
  --title1: #00067a;       /* active title gradient (graded a touch deeper) */
  --title2: #2a6fd6;
  --title-off1: #6e6e7a;   /* inactive title */
  --title-off2: #aeaeb8;
  --accent: #00067a;
  --link: #0a0a8a;
  --taskbar-h: 32px;
  --ui: "MS Sans Serif", Tahoma, "Segoe UI", Geneva, sans-serif;

  /* bevels */
  --raise: inset -1px -1px 0 var(--dk), inset 1px 1px 0 var(--hl), inset -2px -2px 0 var(--sh), inset 2px 2px 0 var(--lt);
  --sink:  inset 1px 1px 0 var(--dk), inset -1px -1px 0 var(--hl), inset 2px 2px 0 var(--sh), inset -2px -2px 0 var(--lt);
  --press: inset 1px 1px 0 var(--dk), inset -1px -1px 0 var(--lt), inset 2px 2px 0 var(--sh);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--ui);
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  user-select: none;
  /* retro-futurist wallpaper (Higgsfield), under a light wash for icon legibility.
     Swap the url() to any file in wallpaper/ — opt1..opt6, option-a, option-b. */
  background:
    radial-gradient(55% 50% at 12% 18%, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0) 68%),
    url('wallpaper/forest-b.jpg') center/cover no-repeat,
    #2c3a30;
}
a { color: var(--link); }
button { font-family: var(--ui); font-size: 13px; cursor: pointer; }
.muted { color: #585858; }

/* ============================================ reusable bevels */
.raised { background: var(--face); box-shadow: var(--raise); }
.sunken { background: #ffffff; box-shadow: var(--sink); padding: 10px; }

/* ============================================ login / password intro */
/* ---- brand splash: the very first frame, fades to the login ---- */
#splash {
  position: fixed; inset: 0; z-index: 10000;
  background: radial-gradient(120% 120% at 50% 40%, #0d1424 0%, #07090f 65%, #04050a 100%);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.55s ease;
}
#splash.gone { opacity: 0; pointer-events: none; }
#splashMark {
  width: min(34vw, 220px); height: auto; display: block;
  opacity: 0; transform: scale(0.94);
  animation: splash-in 0.9s ease forwards;
  filter: drop-shadow(0 6px 28px rgba(0,0,0,0.55));
}
@keyframes splash-in {
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #splashMark { animation: none; opacity: 1; transform: none; }
}

#boot {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(120% 120% at 50% 35%, #15294f 0%, #0a1020 60%, #05070d 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity 0.5s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }

.login-dialog { width: min(420px, 88vw); background: var(--face); box-shadow: var(--raise); padding: 3px; }
.focused-bar { background: linear-gradient(90deg, var(--title1), var(--title2)); color: #fff; cursor: default; }
.login-body { display: flex; gap: 14px; padding: 18px 16px; }
.login-key {
  font-size: 2.6rem; color: #d11; line-height: 1; flex: 0 0 auto;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--face); box-shadow: var(--sink);
}
.login-fields { flex: 1; }
.login-intro { font-size: 0.85rem; margin-bottom: 12px; }
.login-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.login-label { width: 74px; font-size: 0.82rem; }
.login-input { flex: 1; background: #fff; box-shadow: var(--sink); padding: 3px 6px; font-size: 0.85rem; min-height: 20px; display: flex; align-items: center; }
#loginPass { font-family: "Lucida Console", monospace; letter-spacing: 2px; }
.login-caret { animation: caret 1s steps(1) infinite; margin-left: 1px; }
@keyframes caret { 50% { opacity: 0; } }
.login-buttons { display: flex; gap: 8px; margin-top: 12px; }
.login-buttons button { background: var(--face); box-shadow: var(--raise); border: 0; padding: 4px 16px; font-size: 0.82rem; }
.login-buttons button:active { box-shadow: var(--press); }
.login-status { font-size: 0.8rem; color: #00067a; margin-top: 10px; min-height: 1.1em; }
.login-status.ok { color: #0a7a2a; }
.boot-skip { font-size: 0.8rem; color: #5a6680; }
@media (prefers-reduced-motion: reduce) { .login-caret { animation: none; } }

/* ============================================ desktop */
#desktop { position: fixed; inset: 0 0 var(--taskbar-h) 0; overflow: hidden; }

/* ============================================ desktop icons (left) */
#icons {
  position: absolute; top: 14px; left: 12px; z-index: 1;
  display: flex; flex-direction: column; gap: 18px;
}
.icon {
  background: none; border: 1px solid transparent; width: 76px; padding: 4px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.9);
}
.icon .ico { font-size: 1.9rem; line-height: 1; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.6)); }
.icon .ico-photo { width: 46px; height: 46px; object-fit: cover; image-rendering: pixelated; border: 2px solid #fff; box-shadow: 2px 2px 0 0 rgba(0,0,0,0.5); }
.tb-icon .tb-photo { width: 16px; height: 16px; object-fit: cover; image-rendering: pixelated; display: block; border: 1px solid rgba(0,0,0,0.4); }
.icon .ico-label { font-size: 0.78rem; line-height: 1.15; }
.icon:focus-visible { outline: 1px dotted #fff; }
.icon.active { border: 1px dotted #fff; background: rgba(0,6,122,0.45); }
.icon.active .ico-label { background: #00067a; }

/* ============================================ windows */
.window {
  position: absolute; z-index: 100; display: none;
  background: var(--face); box-shadow: var(--raise);
  padding: 3px; min-width: 200px;
}
.window.open { display: block; }
.window.maximized { top: 0 !important; left: 0 !important; width: 100% !important; height: 100%; }

.title-bar {
  display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 3px 0 4px;
  background: linear-gradient(90deg, var(--title-off1), var(--title-off2));
  color: #d8d8d8; cursor: grab;
}
.window.focused .title-bar { background: linear-gradient(90deg, var(--title1), var(--title2)); color: #fff; }
.title-bar:active { cursor: grabbing; }
.tb-icon { font-size: 0.85rem; }
.title-bar-text { font-weight: bold; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.title-controls { display: flex; gap: 2px; }
.tb-btn {
  width: 17px; height: 15px; background: var(--face); box-shadow: var(--raise);
  color: #000; font-size: 0.7rem; font-weight: bold; line-height: 1;
  display: grid; place-items: center; padding: 0; border: 0;
}
.tb-btn:active { box-shadow: var(--press); }
.tb-close { font-weight: bold; }

.window-body { padding: 8px; font-size: 0.85rem; line-height: 1.5; -webkit-user-select: text; user-select: text; }
.window-body .sunken { max-height: 56vh; overflow: auto; }
.window-body p { margin-bottom: 7px; }
.window-body b { color: #00067a; }

/* ============================================ About = full webpage (sleek) */
.about-body { padding: 0; }
.about-page {
  --p-ink: #14181f; --p-muted: #5c6878; --p-accent: #1f3aa8; --p-line: #cdd5e2;
  --p-bg: #eef1f6; --p-card: #f6f8fc;
  max-height: 72vh; overflow: auto; background: var(--p-bg); color: var(--p-ink);
  font-family: Georgia, "Times New Roman", serif;
}
/* inner browser nav */
.ap-nav { display: flex; gap: 8px; padding: 10px 14px; background: var(--face); box-shadow: var(--sink); position: sticky; top: 0; z-index: 3; }
.ap-nav button { font-family: var(--ui); font-size: 0.8rem; background: var(--face); box-shadow: var(--raise); border: 0; padding: 5px 13px; }
.ap-nav button:active { box-shadow: var(--press); }

/* hero — sleek steel-blue gradient, no cheer */
.ap-hero {
  margin: 14px; height: 170px; position: relative; overflow: hidden;
  background: linear-gradient(115deg, #0e1729 0%, #1d3157 42%, #34547f 72%, #5b7bab 100%);
  border: 1px solid #0c1422;
}
.ap-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 80% 120%, rgba(255,255,255,0.12), transparent 60%); }
.ap-hero-mark {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  height: 116px; width: auto; z-index: 1; opacity: 0.92;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.35));
  pointer-events: none;
}
.ap-hero-text { position: absolute; right: 18px; bottom: 16px; text-align: right; color: #eaf0fb; z-index: 1; }
.ap-hero-lead { font-size: 1.05rem; font-style: italic; max-width: 30ch; margin-bottom: 4px; }
.ap-hero-mail { font-family: var(--ui); font-size: 0.78rem; opacity: 0.85; }

/* columns */
.ap-cols { display: grid; grid-template-columns: 210px 1fr; gap: 26px; padding: 6px 22px 26px; }
@media (max-width: 720px) { .ap-cols { grid-template-columns: 1fr; } }

/* sidebar */
.ap-photo { position: relative; margin: 0 0 12px; border: 1px solid var(--p-line); background: #fff; padding: 5px; }
.ap-star {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #e0301f; font-size: 3.2rem; line-height: 1; pointer-events: none; z-index: 2;
  text-shadow: 0 0 3px rgba(255,255,255,0.9), 0 1px 2px rgba(0,0,0,0.35);
}
.ap-photo img { width: 100%; display: block; animation: twin-pop 0.55s cubic-bezier(0.17,0.84,0.34,1.2) both; }
@keyframes twin-pop { 0% { opacity: 0; transform: translateY(10px) scale(0.94); } 100% { opacity: 1; transform: none; } }
.ap-status { font-family: var(--ui); font-size: 0.78rem; display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.ap-dot { width: 8px; height: 8px; border-radius: 50%; background: #2aa860; box-shadow: 0 0 0 0 rgba(42,168,96,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(42,168,96,0.5);} 70%{box-shadow:0 0 0 7px rgba(42,168,96,0);} 100%{box-shadow:0 0 0 0 rgba(42,168,96,0);} }
.ap-email { display: block; font-family: var(--ui); font-size: 0.8rem; color: var(--p-accent); margin-bottom: 18px; word-break: break-all; }
.ap-side-h { font-family: var(--ui); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--p-muted); border-bottom: 1px solid var(--p-line); padding-bottom: 5px; margin-bottom: 7px; }
.ap-social { display: flex; justify-content: space-between; gap: 10px; font-family: var(--ui); font-size: 0.8rem; padding: 3px 0; }
.ap-social span { color: var(--p-muted); }
.ap-social a { color: var(--p-accent); }

/* main column */
.ap-eyebrow { font-family: var(--ui); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--p-muted); margin-bottom: 4px; }
.ap-name { font-family: Georgia, serif; font-size: 2.5rem; line-height: 1; letter-spacing: -0.01em; margin-bottom: 18px; }
.ap-bio { font-size: 1.08rem; line-height: 1.6; max-width: 54ch; margin-bottom: 28px; }
.ap-h2 { font-family: var(--ui); font-weight: bold; font-size: 1.25rem; margin-bottom: 12px; }
.ap-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .ap-cards { grid-template-columns: 1fr; } }
.ap-card { display: flex; flex-direction: column; gap: 5px; padding: 14px; background: var(--p-card); border: 1px solid var(--p-line); transition: border-color 0.2s, transform 0.2s; cursor: pointer; }
.ap-card:hover { border-color: var(--p-accent); transform: translateY(-2px); }
.ap-card-k { font-family: var(--ui); font-size: 0.72rem; color: var(--p-accent); }
.ap-card-t { font-family: var(--ui); font-weight: bold; font-size: 0.92rem; color: var(--p-ink); }
.ap-card-d { font-size: 0.88rem; line-height: 1.45; color: var(--p-muted); }
@media (prefers-reduced-motion: reduce) { .ap-photo img { animation: none; } }

.filelist, .contact-list { list-style: none; }
.filelist-well { padding: 6px; }
.filelist li { padding: 4px 4px; }
.filelist li a:hover { background: #00067a; color: #fff; }
.contact-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 5px 2px; border-bottom: 1px solid #e3e3e3; }
.contact-list li span { color: #585858; }

/* ============================================ blog (Writing) */
.blog-body { padding: 8px; }
.blog-head { font-family: var(--ui); font-weight: bold; font-size: 0.9rem; padding: 5px 8px; margin-bottom: 8px; background: var(--face); box-shadow: var(--sink); }
.blog-list { list-style: none; }
.blog-item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline;
  padding: 9px 8px; border-bottom: 1px solid #d2d2d2; cursor: pointer;
}
.blog-item:hover { background: #00067a; color: #fff; }
.blog-item .blog-title { font-family: var(--ui); font-weight: bold; font-size: 0.92rem; }
.blog-item .blog-date { font-family: "Lucida Console", monospace; font-size: 0.74rem; color: #888; grid-row: 1; grid-column: 2; }
.blog-item:hover .blog-date { color: #9ec3ff; }
.blog-item .blog-blurb { grid-column: 1 / -1; font-size: 0.82rem; color: #5a5a5a; }
.blog-item:hover .blog-blurb { color: #d4ddf5; }
.blog-empty { list-style: none; padding: 16px 8px; color: #5a5a5a; font-style: italic; font-size: 0.85rem; }

/* post reader */
.post-reader { max-height: 64vh; overflow: auto; padding: 6px 10px; font-family: Georgia, "Times New Roman", serif; color: #15181f; }
.post-reader h1 { font-size: 1.9rem; line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 4px; }
.post-reader time { display: block; font-family: "Lucida Console", monospace; font-size: 0.74rem; color: #888; margin-bottom: 18px; }
.post-reader p { font-size: 1.05rem; line-height: 1.65; margin-bottom: 1rem; }
.post-reader p:last-child { margin-bottom: 0; }
.post-reader em { color: #1f3aa8; font-style: italic; }

/* ============================================ Recycle Bin */
.bin-head { font-family: var(--ui); font-weight: bold; font-size: 0.9rem; padding: 5px 8px; margin-bottom: 8px; background: var(--face); box-shadow: var(--sink); }
.bin-list { list-style: none; }
.bin-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 7px 6px; border-bottom: 1px solid #d2d2d2; cursor: default; }
.bin-photo { cursor: pointer; }
.bin-item:hover { background: #00067a; color: #fff; }
.bin-ico { font-size: 1.2rem; text-align: center; filter: grayscale(0.35); }
.bin-thumb { width: 28px; height: 28px; object-fit: cover; border: 1px solid #808080; image-rendering: auto; }
.bin-name { font-family: var(--ui); font-size: 0.86rem; }
.bin-meta { font-family: "Lucida Console", monospace; font-size: 0.72rem; color: #888; }
.bin-item:hover .bin-meta { color: #9ec3ff; }

/* ============================================ Chase FM (YouTube) */
.vid-body { padding: 8px; }
.vid-station {
  display: flex; align-items: baseline; gap: 8px; justify-content: space-between;
  font-family: var(--ui); font-weight: bold; font-size: 0.92rem; letter-spacing: 0.04em;
  color: #fff; background: linear-gradient(90deg, var(--title1), var(--title2));
  padding: 5px 9px; margin-bottom: 8px;
}
.vid-station span { font-weight: normal; font-size: 0.74rem; opacity: 0.92; letter-spacing: 0.08em; }
.vid-screen { position: relative; width: 100%; padding-top: 56.25%; background: #000; margin-bottom: 8px; }
.vid-screen #ytPlayer, .vid-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-unmute { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 5;
  font-family: inherit; font-size: 0.92rem; padding: 5px 12px; cursor: pointer;
  color: #fff; background: rgba(0,0,0,0.78); border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 1px 6px rgba(0,0,0,0.5); animation: vid-unmute-pulse 1.6s ease-in-out infinite; }
.vid-unmute[hidden] { display: none; }
@keyframes vid-unmute-pulse { 50% { box-shadow: 0 1px 12px rgba(255,255,255,0.45); } }
.vid-now { font-family: "Lucida Console", monospace; font-size: 0.82rem; color: #00067a; background: #fff; box-shadow: var(--sink); padding: 5px 8px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-controls { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.vid-controls button { min-width: 34px; height: 26px; background: var(--face); box-shadow: var(--raise); border: 0; font-size: 0.85rem; }
.vid-controls button:active { box-shadow: var(--press); }
.vid-hint { margin-left: auto; font-size: 0.74rem; color: #585858; }
.vid-list { list-style: none; max-height: 150px; overflow: auto; padding: 4px; }
.vid-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 4px 6px; font-size: 0.82rem; cursor: pointer; }
.vid-list li:hover { background: #d6d6d6; }
.vid-list li.playing { background: #00067a; color: #fff; }
.vid-list li .vnum { color: #888; }
.vid-list li.playing .vnum { color: #9ec3ff; }
.vid-list li .va { color: #777; font-size: 0.76rem; }
.vid-list li.playing .va { color: #cdd9f5; }
.vid-list li.dead .vt { text-decoration: line-through; opacity: 0.6; }
.vid-list li.dead .va::after { content: ' · YouTube ↗'; opacity: 0.8; }

/* ============================================ taskbar */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; height: var(--taskbar-h);
  display: flex; align-items: center; gap: 4px; padding: 2px 4px;
  background: var(--face); box-shadow: var(--raise);
}
#startBtn {
  display: flex; align-items: center; gap: 5px; height: 25px; padding: 0 8px;
  background: var(--face); box-shadow: var(--raise); border: 0; font-weight: bold; font-size: 0.85rem;
}
#startBtn.open { box-shadow: var(--press); }
.start-logo { color: #d11; font-size: 1rem; }
#taskWindows { flex: 1; display: flex; gap: 4px; overflow: hidden; min-width: 0; }
.task-btn {
  flex: 0 1 150px; min-width: 0; height: 25px; padding: 0 8px; text-align: left;
  background: var(--face); box-shadow: var(--raise); border: 0; font-size: 0.8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 5px;
}
.task-btn.active { box-shadow: var(--press); background: #d9d9d9; font-weight: bold; }
#tray { display: flex; align-items: center; gap: 8px; height: 25px; padding: 0 9px; font-size: 0.8rem; }
.tray-audio { background: none; border: 0; padding: 0; font-size: 0.9rem; line-height: 1; cursor: pointer; }
.tray-audio:active { transform: translateY(1px); }

/* ============================================ start menu */
#startMenu {
  position: fixed; left: 4px; bottom: var(--taskbar-h); z-index: 9100;
  display: none; background: var(--face); box-shadow: var(--raise); padding: 3px;
}
#startMenu.open { display: flex; }
.sm-rail {
  width: 30px; background: linear-gradient(180deg, #2a6fd6, #00067a); color: #fff;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
}
.sm-rail span { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: bold; letter-spacing: 0.08em; font-size: 0.95rem; }
.sm-items { list-style: none; min-width: 190px; padding: 2px; }
.sm-items li { display: flex; align-items: center; gap: 9px; padding: 6px 18px 6px 8px; font-size: 0.88rem; cursor: pointer; }
.sm-items li:not(.sm-sep):hover { background: #00067a; color: #fff; }
.sm-ico { font-size: 1rem; width: 20px; text-align: center; }
.sm-sep { height: 0; border-top: 1px solid var(--sh); border-bottom: 1px solid var(--hl); margin: 4px 2px; padding: 0 !important; cursor: default; }

/* ============================================ shut down screen */
#shutdown {
  position: fixed; inset: 0; z-index: 9999; display: none;
  background: #000; color: #ffb43b;
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem; text-align: center;
}
#shutdown.show { display: flex; }
.sd-text { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0.02em; }
#restartBtn { background: var(--face); box-shadow: var(--raise); color: #000; border: 0; padding: 8px 16px; font-size: 0.9rem; }
#restartBtn:active { box-shadow: var(--press); }

/* phone chrome (status bar + soft keys) — shown only on phones, below */
#statusbar, #softkeys { display: none; }

/* ============================================ tablets / mid screens */
@media (max-width: 720px) and (min-width: 641px) {
  .window { left: 3vw !important; right: 3vw; width: auto !important; max-width: 94vw; }
  #icons { gap: 12px; }
}

/* ============================================ iPhone / phones — "Chase Phone"
   On a phone, the Win98 desktop becomes an old monochrome cell phone (Nokia-
   style): a green LCD with a status bar, a Menu grid, and two soft keys. The
   windows are reused as full-screen "screens" re-skinned to the LCD palette.
   Color content (the Chase FM video, the photo) gets a green monochrome filter
   so it reads as if it's rendering on the LCD. */
@media (max-width: 640px) {
  :root {
    --status-h: calc(24px + env(safe-area-inset-top, 0px));
    --softkey-h: calc(46px + env(safe-area-inset-bottom, 0px));
    --lcd:   #aebc9f;   /* backlit LCD green */
    --lcd-2: #9cac8c;   /* panel / inset */
    --ink:   #18230f;   /* near-black pixels */
    --ink-2: #3c4a2b;   /* muted ink */
    --edge:  #2a3320;   /* hard pixel border */
    --pixel: 'VT323', 'Lucida Console', monospace;
  }
  body { -webkit-tap-highlight-color: transparent; background: #10160b; font-family: var(--pixel); }
  button, .icon, .sm-items li, .blog-item, .vid-list li, .ap-card { touch-action: manipulation; }

  #taskbar { display: none; }   /* replaced by the soft-key bar */

  /* ---- status bar (top) ---- */
  #statusbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9200; height: var(--status-h);
    display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
    padding: env(safe-area-inset-top, 0px) 12px 2px; background: var(--lcd); color: var(--ink);
    font-family: var(--pixel); font-size: 1.15rem; line-height: 1; letter-spacing: 0.03em;
    border-bottom: 2px solid var(--edge);
  }
  .sb-right { display: flex; align-items: center; gap: 6px; }
  .sb-signal, .sb-batt { letter-spacing: -1px; }

  /* ---- soft keys (bottom) ---- */
  #softkeys {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9200; height: var(--softkey-h);
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 7px 16px env(safe-area-inset-bottom, 0px); background: var(--lcd); color: var(--ink);
    border-top: 2px solid var(--edge); font-family: var(--pixel); font-size: 1.25rem;
  }
  .sk { background: none; border: 0; color: var(--ink); font: inherit; padding: 2px 8px; }
  .sk:active { color: var(--lcd); background: var(--ink); }
  .sk-left::before { content: '‹ '; }
  .sk-right::after { content: ' ›'; }
  .sk-c { font-size: 1rem; color: var(--ink-2); align-self: center; }

  /* ---- the LCD screen between status bar and soft keys ---- */
  #desktop {
    inset: var(--status-h) 0 var(--softkey-h) 0;
    background:
      repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 1px, transparent 1px 3px),
      var(--lcd);
    box-shadow: inset 0 0 0 2px var(--edge), inset 0 0 30px rgba(0,0,0,0.18);
    overflow: hidden;
  }

  /* ---- home: the Menu grid ---- */
  #icons {
    inset: 0; top: 8px; left: 0; right: 0; bottom: auto;
    display: grid; grid-template-columns: repeat(3, 1fr);
    align-content: start; gap: 8px; padding: 10px;
  }
  #icons::before {
    content: 'Menu'; grid-column: 1 / -1; font-family: var(--pixel); font-size: 1.3rem;
    color: var(--ink); border-bottom: 2px solid var(--edge); padding: 0 2px 4px; margin-bottom: 2px;
  }
  .icon {
    width: auto; max-width: none; padding: 12px 4px 9px; gap: 6px; text-shadow: none;
    background: var(--lcd-2); color: var(--ink);
    border: 2px solid var(--edge); box-shadow: 2px 2px 0 var(--edge);
  }
  .icon .ico { font-size: 2.1rem; filter: grayscale(1) brightness(0.55) contrast(1.3); }
  .icon .ico-photo { width: 48px; height: 48px; }
  .icon .ico-label { font-family: var(--pixel); font-size: 1.1rem; letter-spacing: 0.02em; line-height: 1; }
  .icon:active, .icon.active { background: var(--ink); color: var(--lcd); border-color: var(--edge); }
  .icon:active .ico-label, .icon.active .ico-label { color: var(--lcd); background: none; }
  .icon:active .ico, .icon.active .ico { filter: grayscale(1) brightness(2.4) contrast(1.1); }

  /* ---- windows reused as full-screen LCD screens ---- */
  .window {
    top: 0 !important; left: 0 !important; right: 0; bottom: 0;
    width: 100% !important; height: 100%; max-width: none; min-width: 0;
    padding: 0; display: none; flex-direction: column;
    background: var(--lcd); box-shadow: none;
  }
  .window.open { display: flex; }
  .window.maximized { height: 100%; }

  .title-bar, .window.focused .title-bar {
    height: 30px; flex: 0 0 auto; cursor: default; padding: 0 10px; gap: 8px;
    background: var(--ink); color: var(--lcd);
  }
  .tb-icon { font-size: 1rem; filter: grayscale(1) brightness(2.4); }
  .title-bar-text { font-family: var(--pixel); font-size: 1.2rem; letter-spacing: 0.02em; }
  .title-controls { display: none; }   /* the Back soft key closes screens */

  .window-body {
    flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch; padding: 12px;
    background: var(--lcd); color: var(--ink);
    font-family: var(--pixel); font-size: 1.2rem; line-height: 1.3;
  }
  .window-body b { color: var(--ink); }
  .window-body .sunken { max-height: none; overflow: visible; background: var(--lcd-2); box-shadow: inset 0 0 0 2px var(--edge); }
  a, .ap-social a, .contact-list a, .ap-email { color: var(--ink); }
  .muted { color: var(--ink-2); }

  /* ---- About screen (monochrome) ---- */
  .about-body { padding: 0; background: var(--lcd); }
  .about-page {
    max-height: none; overflow: visible; background: var(--lcd); color: var(--ink); font-family: var(--pixel);
    --p-ink: var(--ink); --p-muted: var(--ink-2); --p-accent: var(--ink);
    --p-line: var(--edge); --p-bg: var(--lcd); --p-card: var(--lcd-2);
  }
  .ap-nav { gap: 6px; flex-wrap: wrap; padding: 9px 10px; background: var(--lcd-2); box-shadow: inset 0 -2px 0 var(--edge); }
  .ap-nav button { font-family: var(--pixel); font-size: 1.05rem; padding: 4px 12px; background: var(--lcd); color: var(--ink); box-shadow: 2px 2px 0 var(--edge); border: 0; }
  .ap-nav button:active { background: var(--ink); color: var(--lcd); box-shadow: none; }
  .ap-hero {
    height: 110px; margin: 10px; border: 2px solid var(--edge);
    background:
      repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px),
      var(--ink);
  }
  .ap-hero::after { display: none; }
  .ap-hero-mark { left: 14px; height: 78px; opacity: 0.9;
    filter: brightness(0) saturate(100%) invert(78%) sepia(12%) saturate(420%) hue-rotate(46deg) brightness(94%); }
  .ap-hero-text { color: var(--lcd); right: 12px; bottom: 10px; }
  .ap-hero-lead { font-family: var(--pixel); font-size: 1.2rem; font-style: normal; line-height: 1.1; text-shadow: none; }
  .ap-hero-mail { font-family: var(--pixel); font-size: 1rem; color: var(--lcd); opacity: 0.85; }
  .ap-cols { grid-template-columns: 1fr; padding: 4px 14px 22px; gap: 14px; }
  .ap-photo { border: 2px solid var(--edge); background: var(--lcd-2); padding: 4px; }
  .ap-photo img { filter: grayscale(1) contrast(1.5) brightness(1.05) sepia(0.5) hue-rotate(38deg) saturate(0.7); image-rendering: pixelated; animation: none; }
  .ap-star {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -52%);
    font-size: 7rem; line-height: 1; color: #e0301f; z-index: 60; pointer-events: none;
    text-shadow: 0 0 8px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.3);
  }
  .ap-status, .ap-side-h, .ap-social, .ap-eyebrow { font-family: var(--pixel); }
  .ap-side-h { font-size: 1rem; border-color: var(--edge); }
  .ap-social { font-size: 1.05rem; }
  .ap-dot { background: var(--ink); box-shadow: none; animation: none; }
  .ap-name { font-family: var(--pixel); font-size: 2.4rem; letter-spacing: 0.01em; }
  .ap-bio { font-family: var(--pixel); font-size: 1.25rem; line-height: 1.3; }
  .ap-h2 { font-family: var(--pixel); font-size: 1.4rem; }
  .ap-cards { grid-template-columns: 1fr; gap: 8px; }
  .ap-card { background: var(--lcd-2); border: 2px solid var(--edge); box-shadow: 2px 2px 0 var(--edge); }
  .ap-card:hover { transform: none; border-color: var(--edge); }
  .ap-card-k, .ap-card-t { font-family: var(--pixel); color: var(--ink); }
  .ap-card-d { font-family: var(--pixel); color: var(--ink-2); font-size: 1.05rem; }

  /* ---- Notepad (blog) ---- */
  .blog-body, .vid-body { padding: 10px; }
  .blog-head { background: var(--ink); color: var(--lcd); font-family: var(--pixel); font-size: 1.15rem; box-shadow: none; }
  .blog-item { padding: 11px 6px; border-color: var(--edge); }
  .blog-item:hover, .blog-item:active { background: var(--ink); color: var(--lcd); }
  .blog-item .blog-title { font-family: var(--pixel); font-size: 1.2rem; }
  .blog-item .blog-date { font-family: var(--pixel); font-size: 0.95rem; color: var(--ink-2); }
  .blog-item:hover .blog-date, .blog-item:active .blog-date { color: var(--lcd); }
  .blog-item .blog-blurb { font-size: 1.05rem; color: var(--ink-2); }
  .blog-item:hover .blog-blurb, .blog-item:active .blog-blurb { color: var(--lcd); }
  .blog-empty { font-family: var(--pixel); font-size: 1.15rem; color: var(--ink-2); padding: 16px 6px; }
  .post-reader { max-height: none; overflow: visible; font-family: var(--pixel); color: var(--ink); }
  .post-reader h1 { font-family: var(--pixel); font-size: 1.9rem; }
  .post-reader time { font-family: var(--pixel); color: var(--ink-2); }
  .post-reader p { font-size: 1.2rem; line-height: 1.4; }
  .post-reader em { color: var(--ink); }

  /* ---- Chase FM (monochrome LCD video) ---- */
  .vid-station { background: var(--ink); color: var(--lcd); font-family: var(--pixel); font-size: 1.2rem; }
  .vid-station span { color: var(--lcd); opacity: 0.85; }
  .vid-screen { border: 2px solid var(--edge); }
  .vid-screen iframe, .vid-screen #ytPlayer { filter: grayscale(1) contrast(1.05) sepia(0.55) hue-rotate(40deg) saturate(0.8) brightness(0.95); }
  .vid-now { background: var(--lcd-2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--edge); font-family: var(--pixel); font-size: 1.1rem; }
  .vid-controls button { min-width: 44px; height: 34px; background: var(--lcd-2); color: var(--ink); box-shadow: 2px 2px 0 var(--edge); border: 0; }
  .vid-controls button:active { background: var(--ink); color: var(--lcd); box-shadow: none; }
  .vid-hint { color: var(--ink-2); }
  .vid-list { max-height: none; background: var(--lcd-2); box-shadow: inset 0 0 0 2px var(--edge); }
  .vid-list li { padding: 8px 6px; font-family: var(--pixel); font-size: 1.1rem; }
  .vid-list li:hover { background: var(--lcd); }
  .vid-list li.playing { background: var(--ink); color: var(--lcd); }
  .vid-list li .vnum, .vid-list li .va { color: var(--ink-2); }
  .vid-list li.playing .vnum, .vid-list li.playing .va { color: var(--lcd); }

  /* ---- Contact ---- */
  .contact-list li { padding: 9px 2px; border-color: var(--edge); font-family: var(--pixel); font-size: 1.15rem; }
  .contact-list li span { color: var(--ink-2); }

  /* ---- Recycle Bin ---- */
  .bin-head { background: var(--ink); color: var(--lcd); font-family: var(--pixel); font-size: 1.15rem; box-shadow: none; }
  .bin-item { border-color: var(--edge); padding: 10px 6px; }
  .bin-item:hover, .bin-item:active { background: var(--ink); color: var(--lcd); }
  .bin-name { font-family: var(--pixel); font-size: 1.15rem; }
  .bin-meta { font-family: var(--pixel); font-size: 0.95rem; color: var(--ink-2); }
  .bin-item:hover .bin-meta, .bin-item:active .bin-meta { color: var(--lcd); }
  .bin-thumb { border-color: var(--edge); filter: grayscale(1) contrast(1.3) sepia(0.4) hue-rotate(38deg); }
  .bin-ico { filter: grayscale(1) brightness(0.6); }

  /* ---- Start menu reused as a Nokia "Options" sheet ---- */
  #startMenu { left: 0; right: 0; width: 100%; bottom: var(--softkey-h); background: var(--lcd); box-shadow: 0 -2px 0 var(--edge); padding: 0; z-index: 9300; }
  .sm-rail { background: var(--ink); }
  .sm-rail span { color: var(--lcd); }
  .sm-items { flex: 1; min-width: 0; padding: 4px; font-family: var(--pixel); }
  .sm-items li { padding: 12px 16px; font-size: 1.2rem; }
  .sm-items li:not(.sm-sep):hover, .sm-items li:not(.sm-sep):active { background: var(--ink); color: var(--lcd); }
  .sm-ico { font-size: 1.1rem; filter: grayscale(1) brightness(0.6); }
  .sm-sep { border-top-color: var(--edge); border-bottom-color: var(--lcd-2); }

  /* ---- brand splash + boot as a monochrome power-on ---- */
  #splash { background: #10160b; }
  #splashMark {
    width: min(52vw, 240px);
    /* tint the white mark to the LCD green so it reads as the phone's screen */
    filter: brightness(0) saturate(100%) invert(78%) sepia(12%) saturate(420%) hue-rotate(46deg) brightness(94%) drop-shadow(0 0 14px rgba(174,188,159,0.25));
  }
  #boot { padding: 0 16px; background: #10160b; }
  .login-dialog { width: 100%; max-width: 340px; background: var(--lcd); box-shadow: 0 0 0 2px var(--edge); }
  .focused-bar { background: var(--ink); }
  .login-body { padding: 16px 14px; gap: 12px; }
  .login-key { color: var(--ink); background: var(--lcd-2); box-shadow: inset 0 0 0 2px var(--edge); }
  .login-intro, .login-label, .login-status { font-family: var(--pixel); font-size: 1.1rem; color: var(--ink); }
  .login-row { flex-wrap: wrap; gap: 4px 8px; }
  .login-label { width: 78px; }
  .login-input { min-width: 0; flex: 1 1 120px; overflow: hidden; background: var(--lcd-2); box-shadow: inset 0 0 0 2px var(--edge); color: var(--ink); font-family: var(--pixel); }
  .login-buttons button { padding: 9px 22px; font-family: var(--pixel); font-size: 1.05rem; background: var(--lcd-2); box-shadow: 2px 2px 0 var(--edge); }
  .login-status.ok { color: var(--ink); }
  .boot-skip { font-family: var(--pixel); font-size: 1rem; color: #6f7d5a; }

  /* ---- shut down ---- */
  #shutdown { background: #10160b; color: var(--lcd); }
  .sd-text { font-family: var(--pixel); font-size: 1.4rem; }
  #restartBtn { font-family: var(--pixel); background: var(--lcd-2); box-shadow: 2px 2px 0 var(--edge); color: var(--ink); }
}
