/* TonyOS — a Mac OS 8 "Platinum"-flavoured desktop.
   Everything is plain CSS; colours live in the tokens below. */

:root {
  --menu-h: 22px;
  --plat: #dddddd;
  --plat-hi: #ffffff;
  --plat-lo: #999999;
  --plat-dk: #666666;
  --ink: #000000;
  --sel: #3a3fae;          /* selection / highlight */
  --sel-ink: #ffffff;
  --paper: #ffffff;
  --ui-font: Charcoal, Chicago, "ChicagoFLF", Geneva, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --doc-font: Geneva, -apple-system, BlinkMacSystemFont, "Segoe UI", Verdana, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font: 12px/1.35 var(--doc-font);
  color: var(--ink);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Desktop patterns ---------- */
body.wp-platinum {
  background-color: #6a6fae;
  background-image:
    radial-gradient(rgba(255,255,255,.10) 1px, transparent 1.2px),
    radial-gradient(rgba(0,0,0,.10) 1px, transparent 1.2px);
  background-size: 6px 6px, 6px 6px;
  background-position: 0 0, 3px 3px;
}
body.wp-teal {
  background-color: #2f7f7f;
  background-image: linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%),
                    linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%);
  background-size: 8px 8px; background-position: 0 0, 4px 4px;
}
body.wp-pizza {
  background-color: #b8322a;
  background-image: linear-gradient(45deg, #f4ede1 25%, transparent 25%, transparent 75%, #f4ede1 75%),
                    linear-gradient(45deg, #f4ede1 25%, transparent 25%, transparent 75%, #f4ede1 75%);
  background-size: 28px 28px; background-position: 0 0, 14px 14px;
}

/* ---------- Bevel helpers ---------- */
.bevel { background: var(--plat); box-shadow: inset 1px 1px var(--plat-hi), inset -1px -1px var(--plat-lo); }

/* ---------- Menu bar ---------- */
#menubar {
  position: fixed; inset: 0 0 auto 0; height: var(--menu-h); z-index: 100000;
  display: flex; align-items: stretch;
  background: linear-gradient(#f4f4f4, #dcdcdc);
  border-bottom: 1px solid var(--ink);
  font: bold 12px/var(--menu-h) var(--ui-font);
  padding: 0 6px;
}
.mb-menu { position: relative; }
.mb-title {
  height: 100%; padding: 0 9px; border: 0; background: none; cursor: default; font-weight: bold;
  font-family: var(--ui-font);
}
.mb-title.logo { font-size: 15px; padding: 0 10px; }
.mb-menu.open > .mb-title { background: var(--sel); color: var(--sel-ink); }
.mb-drop {
  position: absolute; top: calc(var(--menu-h) - 1px); left: 0; min-width: 200px;
  background: var(--plat); border: 1px solid var(--ink); box-shadow: 2px 2px 0 rgba(0,0,0,.35);
  padding: 3px 0; display: none; font-weight: normal; line-height: 1.2;
}
.mb-menu.open > .mb-drop { display: block; }
.mb-item {
  position: relative; display: flex; width: 100%; gap: 12px; justify-content: space-between; align-items: center;
  padding: 3px 18px 3px 20px; background: none; border: 0; text-align: left; cursor: default;
  font: 12px var(--ui-font); white-space: nowrap;
}
.mb-item:hover:not(:disabled), .mb-item:focus-visible { background: var(--sel); color: var(--sel-ink); outline: none; }
.mb-item:disabled { color: var(--plat-lo); }
.mb-item .check { position: absolute; left: 7px; }
.mb-item .key { color: inherit; opacity: .7; margin-left: auto; padding-left: 18px; }
.mb-item .mi-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.mb-item .mi-icon { flex: none; width: 16px; display: grid; place-items: center; font-size: 13px; margin-right: -4px; }
.mb-item .mi-icon img { width: 16px; height: 16px; object-fit: contain; }
.mb-item.dim .mi-label, .mb-item.dim .mi-icon { opacity: .5; }   /* hidden windows, as Mac OS 8 dimmed hidden apps */
.mb-sep { height: 1px; margin: 3px 1px; background: var(--plat-lo); box-shadow: 0 1px var(--plat-hi); }
.mb-spacer { flex: 1; }
.mb-clock { padding: 0 8px; font-weight: bold; cursor: default; }
/* The Application menu: the front window's icon and name, far right. */
.mb-app { border-left: 1px solid var(--plat-lo); }
.mb-app > .mb-title { display: flex; align-items: center; gap: 6px; max-width: 220px; }
.mb-app-icon { display: grid; place-items: center; font-size: 14px; line-height: 1; }
.mb-app-icon img { width: 16px; height: 16px; object-fit: contain; }
.mb-app-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-app > .mb-drop { left: auto; right: 0; min-width: 240px; max-width: min(340px, 96vw); }

/* ---------- Desktop icons ---------- */
#desktop { position: fixed; inset: var(--menu-h) 0 0 0; }
#desktop:focus { outline: none; }
#icons {
  position: absolute; top: 10px; right: 10px; bottom: 120px; left: 10px;
  display: flex; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; gap: 6px;
  pointer-events: none;
}
#trash-slot { position: absolute; right: 10px; bottom: 10px; }
/* Icon size: the button's width, the picture's box and the label's text. */
.icon {
  --icon-w: 108px; --glyph: 58px; --label: 13px;
  pointer-events: auto; position: relative;
  width: var(--icon-w); padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; cursor: default; outline: none;
}
.icon .glyph {
  width: var(--glyph); height: var(--glyph); display: grid; place-items: center;
  font-size: calc(var(--glyph) * .8); line-height: 1;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,.35));
}
.icon .glyph img { width: calc(var(--glyph) - 4px); height: calc(var(--glyph) - 4px); object-fit: contain; image-rendering: pixelated; }
.icon .label {
  max-width: 100%; padding: 1px 4px; font: var(--label)/1.25 var(--doc-font); text-align: center;
  background: var(--paper); color: var(--ink); overflow-wrap: anywhere;
}
.icon.sel .glyph { filter: brightness(.55) drop-shadow(1px 1px 0 rgba(0,0,0,.35)); }
.icon.sel .label { background: var(--ink); color: var(--paper); }
.icon:focus-visible .label { outline: 1px dotted var(--ink); outline-offset: 1px; }
/* The badge sits on the picture's top-right corner, the lock on its bottom-right. */
.icon .badge {
  position: absolute; top: 2px; right: calc((var(--icon-w) - var(--glyph)) / 2 - 10px);
  font: bold 10px/1 var(--ui-font); padding: 2px 3px;
  background: #ffcc33; border: 1px solid var(--ink); border-radius: 2px;
}
.icon .lock { position: absolute; top: calc(var(--glyph) - 16px); right: calc((var(--icon-w) - var(--glyph)) / 2 - 4px); font-size: 20px; }
/* Icons inside folder windows sit on white paper. */
.folder-grid .icon .label { background: transparent; }
.folder-grid .icon.sel .label { background: var(--sel); color: var(--sel-ink); }
/* Aliases have italic names, as they did on the Mac. */
.icon.alias .label, .info .name.alias { font-style: italic; }

/* ---------- Windows ---------- */
#windows { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.win {
  position: absolute; pointer-events: auto; display: flex; flex-direction: column;
  background: var(--plat); border: 1px solid var(--ink);
  box-shadow: inset 1px 1px var(--plat-hi), inset -1px -1px var(--plat-lo), 2px 2px 0 rgba(0,0,0,.4);
  padding: 0 4px 4px; min-width: 200px;
}
.win-bar {
  flex: none; height: 20px; display: flex; align-items: center; gap: 4px; padding: 0 2px;
  cursor: default; touch-action: none;
}
.win-stripes { flex: 1; height: 11px; }
.win.active .win-stripes {
  background: repeating-linear-gradient(to bottom, var(--plat-hi) 0 1px, var(--plat-lo) 1px 2px);
}
.win-title {
  flex: 0 1 auto; padding: 0 6px; font: bold 12px var(--ui-font); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.win:not(.active) .win-title { color: var(--plat-dk); }
.win-box {
  flex: none; width: 13px; height: 13px; padding: 0; cursor: default;
  border: 1px solid var(--ink); background: linear-gradient(135deg, #fafafa, #bdbdbd);
  box-shadow: inset 1px 1px var(--plat-hi);
}
.win:not(.active) .win-box { visibility: hidden; }
.win-box:active { background: linear-gradient(135deg, #8a8a8a, #cfcfcf); }
.win-zoom { position: relative; }
.win-zoom::after { content: ''; position: absolute; left: 1px; top: 1px; width: 6px; height: 6px; border: 1px solid var(--ink); }
.win-shade { position: relative; }
.win-shade::after { content: ''; position: absolute; left: 1px; right: 1px; top: 5px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); height: 1px; }
.win-body {
  flex: 1; min-height: 0; position: relative; overflow: auto;
  background: var(--paper); border: 1px solid var(--plat-dk); border-right-color: var(--plat-hi); border-bottom-color: var(--plat-hi);
  user-select: text;
}
.win-body > iframe { display: block; width: 100%; height: 100%; border: 0; background: #111; }
/* While an app's page loads: a Mac-style ticking wristwatch over a plain window. */
.win-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: var(--paper); font: 12px var(--doc-font); color: #444; cursor: wait; }
.page .win-loading { top: 30px; }
.win-loading .watch { position: relative; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; background: #fff;
  box-shadow: 0 -7px 0 -3px var(--ink), 0 7px 0 -3px var(--ink); }
.win-loading .watch::after { content: ''; position: absolute; left: 50%; top: 4px; width: 2px; height: 10px; margin-left: -1px; background: var(--ink);
  transform-origin: 50% 100%; animation: tick 1.2s steps(8) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .win-loading .watch::after { animation: none; } }
.win-grip {
  position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; cursor: nwse-resize; touch-action: none;
  background: repeating-linear-gradient(135deg, transparent 0 3px, var(--plat-lo) 3px 4px, var(--plat-hi) 4px 5px);
}
.win.shaded { height: auto !important; padding-bottom: 0; }
.win.shaded .win-body, .win.shaded .win-grip { display: none; }
.win.maxed .win-grip { display: none; }
/* While dragging/resizing, iframes must not swallow pointer events. */
body.wm-busy iframe { pointer-events: none; }
body.wm-busy { cursor: grabbing; }

/* Dialogs (alerts, prompts, Get Info) */
.win.dialog { padding-top: 4px; }
.win.dialog .win-body { background: var(--plat); border: 0; padding: 14px 16px 12px; overflow: visible; }
.dlg { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; max-width: 380px; }
.dlg .dlg-icon { font-size: 34px; line-height: 1; }
.dlg .dlg-text { font: 12px/1.45 var(--doc-font); white-space: pre-line; }
.dlg .dlg-text b { font-family: var(--ui-font); }
.dlg input[type=text], .dlg input[type=password] {
  grid-column: 2; width: 100%; padding: 3px 5px; font: 12px var(--doc-font);
  border: 1px solid var(--ink); box-shadow: inset 1px 1px var(--plat-lo); background: var(--paper); user-select: text;
}
.dlg .dlg-buttons { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.btn {
  min-width: 68px; padding: 3px 12px; border: 1px solid var(--ink); border-radius: 5px;
  background: linear-gradient(#fbfbfb, #d6d6d6); font: 12px var(--ui-font); cursor: default;
}
.btn:active { background: linear-gradient(#9c9c9c, #c9c9c9); }
.btn.default { box-shadow: 0 0 0 2px var(--plat), 0 0 0 3px var(--ink); }
.btn:focus-visible { outline: 1px dotted var(--ink); outline-offset: 2px; }

/* ---------- Folder windows ---------- */
.folder { display: flex; flex-direction: column; height: 100%; }
.folder-head, .folder-foot {
  flex: none; padding: 3px 8px; font: 11px var(--doc-font); color: #333;
  background: var(--plat); border-bottom: 1px solid var(--plat-lo); display: flex; justify-content: space-between;
}
.folder-foot { border-bottom: 0; border-top: 1px solid var(--plat-lo); min-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.folder-grid {
  flex: 1; overflow: auto; padding: 10px; display: grid; gap: 6px 4px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); background: var(--paper);
}
.folder-empty { grid-column: 1 / -1; padding: 30px 10px; text-align: center; color: #666; font-style: italic; }

/* ---------- SimpleText documents ---------- */
.doc { padding: 14px 18px 20px; font: 13px/1.55 var(--doc-font); max-width: 640px; }
.doc h1 { font: bold 18px var(--ui-font); margin: 0 0 8px; }
.doc h2 { font: bold 13px var(--ui-font); margin: 16px 0 4px; }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 20px; }
.doc .muted { color: #666; }
.doc code { background: #eee; padding: 0 3px; }
.doc a { color: var(--sel); }
.doc.mono { white-space: pre-wrap; font: 12px/1.5 Monaco, Menlo, monospace; }
.doc dl.cv { display: grid; grid-template-columns: 54px 1fr; gap: 8px 12px; margin: 0 0 10px; }
.doc dl.cv dt { padding-top: 2px; font: 11px var(--ui-font); color: #666; }
.doc dl.cv dd { margin: 0; }
.doc dl.cv.kit { grid-template-columns: 64px 1fr; gap: 4px 12px; }

/* ---------- Postcards (Tony HD): the about page's pixel art, hard-edged ---------- */
.pc-tabs { display: flex; gap: 6px; padding: 6px 8px; background: var(--plat); border-bottom: 1px solid var(--plat-lo); }
.pc-tabs .btn { min-width: 0; padding: 2px 12px; font-size: 11.5px; }
.pc-tabs .btn[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.photos.postcards { grid-template-rows: auto minmax(0, 1fr) auto auto auto; }   /* the tabs row on top of the Photos layout */
.pc-stage img, .pc-strip img { image-rendering: pixelated; }
.pc-stage img.togo, .pc-strip .togo img { filter: grayscale(1) contrast(.9); opacity: .7; }
.pc-strip button { width: 64px; height: 48px; }

/* ---------- Top Fives (Tony HD): an arcade high-score table ---------- */
.hiscore { height: 100%; padding: 14px 18px; background: #121110; color: #efe8da; font: 14px/1.35 var(--doc-font);
  background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); }
.hs-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed #3a352d; }
.hs-head img { width: 64px; height: 64px; image-rendering: pixelated; }
.hs-head small { display: block; font: bold 10px Monaco, Menlo, monospace; letter-spacing: .2em; color: var(--hc); }
.hs-head b { display: block; font: bold 18px var(--ui-font); color: #fff; }
.hs-head i { display: block; font-size: 12px; color: #bdb4a2; }
.hiscore ol { list-style: none; margin: 0; padding: 0; }
.hiscore li { display: grid; grid-template-columns: 3em 1fr; padding: 4px 0; }
.hiscore li span { font: bold 11px/1.9 Monaco, Menlo, monospace; color: var(--hc); }
.hiscore li:first-child { color: #fff; font-weight: bold; }

/* ---------- Pages from tonypanariello.com (aliases in Tony HD) ---------- */
.page { position: relative; display: flex; flex-direction: column; height: 100%; }
.page-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: var(--plat); border-bottom: 1px solid var(--plat-lo); }
.page-url { flex: 1; min-width: 0; padding: 2px 6px; background: var(--paper); border: 1px solid var(--plat-dk); font: 11.5px var(--doc-font);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; }
.page-bar .btn { min-width: 0; padding: 1px 10px; font-size: 11px; color: var(--ink); text-decoration: none; }
.page iframe { flex: 1; width: 100%; min-height: 0; border: 0; background: var(--paper); }

/* ---------- Photos ---------- */
.photos { display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; height: 100%; background: #1d1d1d; outline: none; }
.ph-stage { position: relative; min-height: 0; background: #111; }
.ph-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .3s; }
.ph-stage img.fade { opacity: 0; }
.ph-cap { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding: 7px 12px; background: var(--plat); border-top: 1px solid var(--ink); }
.ph-cap b { display: block; font: bold 13px var(--ui-font); }
.ph-cap span { font: 11.5px var(--doc-font); color: #444; }
.ph-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; white-space: nowrap; }
.ph-strip { display: flex; gap: 4px; overflow-x: auto; padding: 6px; background: #2b2b2b; scrollbar-width: thin; }
.ph-strip button { flex: none; width: 74px; height: 50px; padding: 0; border: 2px solid transparent; background: #000; cursor: default; }
.ph-strip button[aria-selected="true"] { border-color: #fff; outline: 1px solid var(--sel); }
.ph-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-bar { display: flex; gap: 8px; padding: 7px 8px; background: var(--plat); border-top: 1px solid var(--plat-lo); }
.ph-bar .btn { min-width: 0; }
.ph-gap { flex: 1; }

/* ---------- Control panels ---------- */
.cp { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 12px 14px; background: var(--plat); font: 12px var(--doc-font); }
.cp-head { display: flex; gap: 10px; align-items: flex-start; }
.cp-icon { font-size: 30px; line-height: 1; }
.cp-head p { margin: 0; line-height: 1.45; }
.cp-row { display: flex; align-items: center; gap: 8px; }
.cp-row select { font: 12px var(--doc-font); }
.cp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; }
.cp .muted { color: #555; font-size: 11px; }

/* ---------- Screen saver ---------- */
#saver { position: fixed; inset: 0; z-index: 150000; overflow: hidden; background: #000; cursor: none; opacity: 0; transition: opacity .6s; }
#saver.in { opacity: 1; }
#saver img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.8s ease; }
#saver img.on { opacity: 1; }
#saver img.pan { animation: sv-pan 10s linear both; }
@keyframes sv-pan { from { transform: scale(1.04) translate(var(--x0, 0), var(--y0, 0)); } to { transform: scale(1.12) translate(var(--x1, 0), var(--y1, 0)); } }
.sv-cap { position: absolute; left: 28px; bottom: 26px; max-width: 70vw; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.85); opacity: 0; transition: opacity 1s .8s; }
.sv-cap.in { opacity: 1; }
.sv-cap b { display: block; font: bold 22px var(--ui-font); }
.sv-cap span { font: 13px var(--doc-font); opacity: .85; }
.sv-hint { position: absolute; right: 20px; bottom: 20px; font: 11px var(--doc-font); color: rgba(255,255,255,.45); }
/* While the saver runs its caption owns the bottom left, so toasts move up top. */
body:has(#saver) #toasts { top: 16px; bottom: auto; flex-direction: column; }

/* ---------- Get Info ---------- */
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 14px 16px; font: 12px var(--doc-font); }
.info .big { font-size: 40px; line-height: 1; grid-row: span 2; }
.info .big img { width: 44px; height: 44px; object-fit: contain; }
.info .name { font: bold 14px var(--ui-font); align-self: end; }
.info dl { grid-column: 1 / -1; display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; margin: 6px 0 0; }
.info dt { color: #555; text-align: right; }
.info dd { margin: 0; }
.info .actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: 8px; }

/* ---------- Percival ---------- */
.chat { display: flex; flex-direction: column; height: 100%; background: #f6f1e4; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 85%; padding: 7px 10px; border: 1px solid var(--ink); border-radius: 8px; font: 12.5px/1.45 var(--doc-font); white-space: pre-wrap; }
.chat-msg.bot { align-self: flex-start; background: var(--paper); box-shadow: 2px 2px 0 rgba(0,0,0,.18); }
.chat-msg.bot::before { content: '🎩 '; }
.chat-msg.me { align-self: flex-end; background: #dfe3ff; }
.chat-msg.wait { color: #666; font-style: italic; }
.chat-chips { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; }
.chat-chips:empty { display: none; }
.chat-chips.busy { opacity: .5; pointer-events: none; }
.chip { padding: 3px 9px; border: 1px solid var(--ink); border-radius: 10px; background: var(--paper); font: 11.5px var(--doc-font); text-align: left; cursor: default; }
.chip:hover, .chip:focus-visible { background: var(--sel); color: var(--sel-ink); outline: none; }
.chat-form { flex: none; display: flex; gap: 6px; padding: 8px; background: var(--plat); border-top: 1px solid var(--plat-lo); }
.chat-form input { flex: 1; min-width: 0; padding: 4px 6px; font: 12.5px var(--doc-font); border: 1px solid var(--ink); box-shadow: inset 1px 1px var(--plat-lo); }

/* ---------- Achievements ---------- */
.trophies { padding: 10px 12px; }
.trophies .summary { font: bold 12px var(--ui-font); margin: 2px 4px 10px; display: flex; justify-content: space-between; }
.meter { height: 10px; border: 1px solid var(--ink); background: var(--paper); margin: 0 4px 12px; }
.meter > i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--sel) 0 6px, #5a60d0 6px 8px); }
.trophy { display: grid; grid-template-columns: 36px 1fr auto; gap: 2px 10px; align-items: center; padding: 6px 4px; border-top: 1px dotted #bbb; }
.trophy .t-icon { font-size: 24px; grid-row: span 2; text-align: center; }
.trophy .t-title { font: bold 12px var(--ui-font); }
.trophy .t-hint { color: #555; font-size: 11.5px; }
.trophy .t-date { grid-row: span 2; color: #777; font-size: 11px; }
.trophy.locked .t-icon { filter: grayscale(1) opacity(.35); }
.trophy.locked .t-title { color: #888; }

/* ---------- Toasts ---------- */
/* Bottom left: the desktop icons fill the top right, and toasts used to cover them. Above the screen saver. */
#toasts { position: fixed; left: 10px; bottom: 10px; z-index: 160000; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast {
  display: flex; gap: 10px; align-items: center; width: 260px; padding: 9px 12px;
  background: var(--plat); border: 1px solid var(--ink);
  box-shadow: inset 1px 1px var(--plat-hi), inset -1px -1px var(--plat-lo), 3px 3px 0 rgba(0,0,0,.35);
  animation: toast-in .25s ease-out;
}
.toast .ti { font-size: 28px; line-height: 1; }
.toast small { display: block; font: 10px var(--ui-font); color: #555; text-transform: uppercase; letter-spacing: .05em; }
.toast b { font: bold 13px var(--ui-font); }
.toast.out { opacity: 0; transform: translateX(-20px); transition: all .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-30px); } }

/* ---------- Boot / shutdown ---------- */
#boot {
  position: fixed; inset: 0; z-index: 200000; background: #bfbfbf;
  display: grid; place-items: center; cursor: pointer;
}
.boot-box {
  width: min(360px, 86vw); padding: 22px 26px 18px; text-align: center;
  background: var(--plat); border: 1px solid var(--ink);
  box-shadow: inset 1px 1px var(--plat-hi), inset -1px -1px var(--plat-lo), 2px 2px 0 rgba(0,0,0,.4);
}
.boot-logo { font-size: 54px; line-height: 1; }
.boot-name { font: bold 22px var(--ui-font); margin: 8px 0 2px; letter-spacing: .02em; }
.boot-sub { font: 12px var(--doc-font); color: #444; margin-bottom: 14px; }
.boot-bar { height: 12px; border: 1px solid var(--ink); background: var(--paper); }
.boot-bar > i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--sel) 0 6px, #5a60d0 6px 8px); transition: width 1.3s cubic-bezier(.3,.1,.3,1); }
.boot-ext { position: fixed; left: 12px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 22px; max-width: calc(100vw - 24px); }
.boot-ext span { animation: ext-in .15s ease-out; }
/* Picture icons (Tony HD, Tony's Quest, Pizzaolo…) at emoji size: unsized, the
   HD's SVG used to balloon across the start-up screen. */
.boot-ext > img { width: 24px; height: 24px; object-fit: contain; animation: ext-in .15s ease-out; }
@keyframes ext-in { from { opacity: 0; transform: translateY(6px); } }
#boot.shutdown { background: #000; color: #9a9a9a; font: 13px var(--doc-font); text-align: center; }
#boot.fade { opacity: 0; transition: opacity .35s; }

/* ---------- Small screens: windows go full-screen ---------- */
@media (max-width: 700px) {
  #icons { flex-direction: row; flex-wrap: wrap; align-content: flex-start; justify-content: flex-start; bottom: 110px; gap: 6px 2px; }
  .icon { --icon-w: 88px; --glyph: 50px; --label: 12px; }
  .mb-title { padding: 0 6px; }
  .mb-hide-sm { display: none; }
  .mb-app-name { display: none; }
  #toasts { right: 10px; }
  .toast { width: auto; }
}
