/* Public link-in-bio page */
.desktop {
  max-width: 480px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 12px calc(var(--taskbar-h) + 28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
}
.desktop > .window { scroll-margin-top: 14px; }

/* ---------- Profile ---------- */
.profile { display: flex; gap: 14px; align-items: center; padding: 4px 2px 12px; }
.avatar { width: 92px; height: 92px; flex: none; box-shadow: var(--sunken); background: #fff; padding: 3px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar .px-icon { width: 100%; height: 100%; }
.profile-text { min-width: 0; }
.profile-name { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.15; word-break: break-word; }
.profile-handle { font-size: 14px; color: var(--navy); margin-top: 2px; }
.profile-tagline { font-size: 14px; margin-top: 6px; line-height: 1.35; white-space: pre-line; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-top: 6px; color: #303030; }
.status-dot { display: inline-block; width: 8px; height: 8px; background: #00c000; box-shadow: inset -1px -1px #006000; margin-right: 5px; vertical-align: 1px; animation: blink 1.6s steps(1) infinite; }

.marquee { overflow: hidden; white-space: nowrap; background: #000; color: #00ff00; font-family: var(--mono); font-size: 14px; padding: 6px 0; box-shadow: var(--sunken); margin-bottom: 12px; }
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 14s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Links ---------- */
.links { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.link-btn {
  width: 100%; min-height: 62px; justify-content: flex-start; text-align: left;
  padding: 8px 12px 8px 10px; gap: 12px; position: relative;
}
.link-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.link-icon .px-icon { width: 32px; height: 32px; }
.link-icon.thumb { box-shadow: var(--sunken); padding: 2px; background: #fff; }
.link-icon.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.link-title { font-size: 17px; font-weight: 700; line-height: 1.2; }
.link-sub { font-size: 13px; color: #404040; margin-top: 3px; line-height: 1.25; }
.link-arrow { flex: none; width: 10px; height: 14px; }

.link-btn.featured { outline: none; }
.link-btn.featured::before {
  content: ''; position: absolute; inset: 5px; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 8px) top left / 200% 1px repeat-x,
    repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 8px) bottom left / 200% 1px repeat-x,
    repeating-linear-gradient(0deg, #000 0 4px, transparent 4px 8px) top left / 1px 200% repeat-y,
    repeating-linear-gradient(0deg, #000 0 4px, transparent 4px 8px) top right / 1px 200% repeat-y;
  animation: ants 0.8s steps(4) infinite;
}
@keyframes ants { to { background-position: 8px 0, -8px 100%, 0 -8px, 100% 8px; } }
.badge {
  position: absolute; top: -8px; right: -4px;
  font-size: 11px; font-weight: 700; padding: 2px 6px;
  background: #ff0000; color: #ffff00; box-shadow: 1px 1px 0 #000;
  animation: badge 1s steps(1) infinite; transform: rotate(4deg);
}
@keyframes badge { 50% { background: #ffff00; color: #ff0000; } }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- About (single Notepad window) ---------- */
.notepad-page { background: #fff; box-shadow: var(--sunken); padding: 14px 14px 18px; font-family: var(--mono); font-size: 15px; line-height: 1.55; word-break: break-word; }
.bio .para { margin: 0 0 14px; }
.bio .para:last-child { margin-bottom: 0; }
.doc-heading { display: flex; align-items: center; gap: 8px; font-family: var(--ui); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin: 22px 0 10px; padding-bottom: 5px; border-bottom: 2px solid #000; }
.notepad-page > .doc-heading:first-child { margin-top: 0; }
.beliefs { margin: 0; padding: 0 0 0 26px; }
.beliefs li { margin-bottom: 12px; }
.beliefs li::marker { font-weight: 700; }
.beliefs li:last-child { margin-bottom: 0; }
.belief-title { font-weight: 700; margin: 0; }
.belief-body { margin: 4px 0 0; }
.jobs { list-style: none; margin: 0; padding: 0; }
.job { margin-bottom: 14px; }
.job:last-child { margin-bottom: 0; }
.job-role { font-weight: 700; }
.job-org a { color: #0000ee; }
.job-dates { font-size: 13px; color: #555; }
.job-summary { margin: 4px 0 0; }

.footer {
  position: fixed; left: 0; right: 0; z-index: 400;
  bottom: calc(var(--taskbar-h) + env(safe-area-inset-bottom));
  text-align: center; color: #fff; font-size: 13px; line-height: 1.45;
  padding: 5px 12px; background: var(--desktop);
}
/* Leave room so the pinned footer never covers the last window. */
.desktop:has(> .footer) { padding-bottom: calc(var(--taskbar-h) + var(--footer-h, 56px) + 20px + env(safe-area-inset-bottom)); }
.footer .safe { color: #ffb000; font-size: 15px; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  height: calc(var(--taskbar-h) + env(safe-area-inset-bottom));
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  background: var(--face); box-shadow: inset 0 1px var(--face), inset 0 2px #fff;
  display: flex; align-items: center; gap: 4px;
}
.start-btn { min-width: 0; min-height: 0; height: 36px; padding: 2px 10px 2px 6px; font-weight: 700; gap: 6px; }
.start-btn .px-icon { width: 22px; height: 22px; }
.task-slot { flex: 1; min-width: 0; display: flex; }
.task-slot button { flex: 1; min-width: 0; max-width: 200px; height: 36px; min-height: 0; justify-content: flex-start; font-size: 14px; padding: 2px 8px; }
.task-slot button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-slot .px-icon { width: 16px; height: 16px; }
.tray { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 4px; font-size: 14px; flex: none; }
.tray button { min-width: 0; min-height: 0; width: 30px; height: 30px; padding: 0; box-shadow: none; background: none; }
.tray button:active { box-shadow: none; }
.tray .px-icon { width: 20px; height: 20px; }

.start-menu {
  position: fixed; left: 4px; bottom: calc(var(--taskbar-h) + env(safe-area-inset-bottom) - 2px); z-index: 600;
  display: flex; width: min(270px, calc(100vw - 8px));
}
.start-menu[hidden] { display: none; }
.start-side { width: 30px; background: linear-gradient(#000080, #1084d0); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.start-side span { writing-mode: vertical-rl; transform: rotate(180deg); color: #c0c0c0; font-weight: 700; font-size: 20px; white-space: nowrap; }
.start-side b { color: #fff; }
.start-menu ul { list-style: none; margin: 0; padding: 2px 0; flex: 1; }
.start-menu li button, .start-menu li a {
  width: 100%; min-height: 46px; box-shadow: none; background: none; justify-content: flex-start;
  gap: 12px; padding: 4px 10px; font-size: 16px; color: #000; text-decoration: none; display: flex; align-items: center;
}
.start-menu li button:hover, .start-menu li button:focus-visible, .start-menu li a:hover, .start-menu li a:focus-visible { background: var(--navy); color: #fff; outline: none; }
.start-menu li .px-icon { width: 28px; height: 28px; }
.start-menu li.sep { height: 2px; margin: 3px 4px; box-shadow: inset 0 1px var(--shadow), inset 0 -1px #fff; }
.start-menu u { text-decoration: underline; }

/* ---------- Boot + shutdown ---------- */
.boot { position: fixed; inset: 0; z-index: 2000; background: #000; color: #c0c0c0; font-family: var(--mono); font-size: 15px; padding: 24px 18px; cursor: pointer; }
.boot[hidden] { display: none; }
.boot .line { white-space: pre; }
.boot .splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: #000; font-family: var(--ui); }
.boot .splash-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 28px; text-align: center; padding: 0 16px; }
.boot .splash-logo .px-icon { width: 48px; height: 48px; }
.boot .splash-logo sup { color: #ffb000; font-size: 18px; }
.boot .progress { width: min(260px, 70vw); height: 20px; box-shadow: var(--sunken); background: var(--face); padding: 3px; }
.boot .progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--navy) 0 12px, transparent 12px 14px); animation: fill 1s steps(14) forwards; }
@keyframes fill { to { width: 100%; } }
.boot .skip { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 12px; color: #666; font-family: var(--mono); }

.shutdown { position: fixed; inset: 0; z-index: 2000; background: #000; color: #ffb000; display: grid; place-items: center; text-align: center; padding: 24px; font-size: 22px; cursor: pointer; font-weight: 700; }
.shutdown[hidden] { display: none; }
.shutdown small { display: block; margin-top: 18px; color: #666; font-size: 13px; font-weight: 400; }

.loading { color: #fff; text-align: center; padding: 40vh 0 0; font-size: 15px; }

/* ---------- Forms (mailing list + contact) ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-intro { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.signup-row { display: flex; gap: 6px; }
.signup-row input { flex: 1; min-width: 0; }
.signup-row button { min-width: 0; flex: none; }
.form-done { display: flex; gap: 12px; align-items: center; background: #fff; box-shadow: var(--sunken); padding: 12px; font-size: 15px; }
.form-done .px-icon { width: 32px; height: 32px; }
.contact-form { display: flex; flex-direction: column; gap: 6px; }
.mail-toolbar { display: flex; padding-bottom: 6px; margin-bottom: 2px; box-shadow: inset 0 -1px var(--shadow), 0 1px #fff; }
.mail-toolbar button { min-width: 0; }
.mail-toolbar .px-icon { width: 16px; height: 16px; }
.form-line { display: flex; align-items: center; gap: 8px; }
.form-line label { width: 62px; flex: none; font-size: 14px; }
.form-line input, .form-line select { flex: 1; min-width: 0; }
.contact-form textarea { font-family: var(--ui); font-size: 16px; min-height: 120px; }

/* ---------- Custom pages ---------- */
.page-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 2px 2px 10px; margin-bottom: 10px; box-shadow: 0 1px var(--shadow), 0 2px #fff; font-size: 15px; }
.page-brand-avatar { width: 44px; height: 44px; flex: none; background: #fff; box-shadow: var(--sunken); padding: 2px; display: block; }
.page-brand-avatar img, .page-brand-avatar .px-icon { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-brand > span:last-child { display: flex; flex-direction: column; }
.page-brand-handle { font-size: 13px; color: var(--navy); }
.page-body { display: flex; flex-direction: column; gap: 14px; }
.page-h { margin: 4px 0 0; font-size: 22px; line-height: 1.2; }
.page-text .para { margin: 0 0 10px; font-size: 16px; line-height: 1.5; }
.page-text .para:last-child { margin-bottom: 0; }
.page-img { margin: 0; }
.page-img .frame { box-shadow: var(--sunken); background: #fff; padding: 3px; }
.page-img img { display: block; width: 100%; height: auto; }
.page-img figcaption { font-size: 13px; margin-top: 5px; text-align: center; }
.page-video { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: var(--sunken); padding: 3px; }
.page-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.page-bullets { list-style: none; margin: 0; padding: 12px 12px 12px 10px; background: #fff; box-shadow: var(--sunken); display: flex; flex-direction: column; gap: 9px; font-size: 16px; line-height: 1.4; }
.page-bullets li { display: flex; gap: 10px; }
.page-bullets li::before { content: ''; flex: none; width: 12px; height: 12px; margin-top: 4px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23008000' d='M7 0H6v1H5v1H4v1H3v1H2V3H1V2H0v3h1v1h1v1h1V6h1V5h1V4h1V3h1V0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.page-btn { min-height: 56px; justify-content: center; text-align: center; }
.page-btn .link-text { align-items: center; }
.page-btn .link-title { font-size: 18px; }
.page-quote { margin: 0; background: #ffffe1; box-shadow: 0 0 0 1px #000; padding: 12px 14px; font-size: 15px; line-height: 1.5; }
.page-quote .para { margin: 0 0 8px; }
.page-quote cite { font-style: normal; font-weight: 700; font-size: 14px; }
.page-form { padding-top: 16px; }
.page-spacer { height: 10px; }
.status-link { color: var(--navy); text-decoration: underline; }
.notfound { min-height: 60vh; display: grid; place-items: center; }

/* ---------- In-app browser tip (Win95 help balloon) ---------- */
.balloon { position: relative; background: #ffffe1; box-shadow: 0 0 0 1px #000, 2px 2px 0 1px rgba(0, 0, 0, 0.35); padding: 10px 34px 10px 12px; font-size: 14px; line-height: 1.4; }
.balloon p { margin: 4px 0 0; }
.balloon button:not(.balloon-x) { margin-top: 8px; min-height: 30px; font-size: 14px; }
.balloon-x { position: absolute; top: 6px; right: 6px; min-width: 0; min-height: 0; width: 24px; height: 22px; padding: 0; font-size: 13px; }

/* ---------- Game ---------- */
.game-window { width: min(640px, 100%); }
.game-frame { box-shadow: var(--sunken); background: #fff; padding: 2px; }
.game-canvas { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.game-hint { font-size: 13px; margin: 8px 0 2px; }
#game-layer { background: rgba(0, 0, 0, 0.35); z-index: 900; }
body.game-open { overflow: hidden; }
