/* berd.lol: a 2001 desktop, hand-rolled. no frameworks, no cdns. */
@font-face {
  font-family: "berd impact";
  src: local("Impact"), url("fonts/anton.woff2") format("woff2");
  font-display: swap;
}
:root {
  --tb: 30px;
  --ui: Tahoma, Verdana, "Segoe UI", Geneva, sans-serif;
  --title: "Trebuchet MS", Tahoma, Verdana, sans-serif;
  --logo: "Franklin Gothic Medium", "Franklin Gothic", "ITC Franklin Gothic", "Arial Narrow", Arial, sans-serif;
  --mono: "Lucida Console", Consolas, "Courier New", monospace;
  --face: #ece9d8;
  --sel: #316ac5;
  --dh: calc(100vh - var(--tb));
}
@supports (height: 100dvh) { :root { --dh: calc(100dvh - var(--tb)); } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font: 11px/1.35 var(--ui);
  color: #000;
  background: #5a8fd6;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
img, a, .icon, .stand { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
img { user-select: none; -webkit-user-select: none; }
a { color: #0033cc; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 1em; height: 1em; }

/* ---------------------------------------------------------------- desktop */
.desktop {
  position: fixed; left: 0; top: 0; right: 0;
  height: var(--dh);
  background: #5a8fd6 url("assets/brand/wall-1600.jpg") center 46% / cover no-repeat;
  overflow: hidden; overflow: clip; /* clip: can't be scrolled by focus() either */
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
@media (max-width: 820px) { .desktop { background-image: url("assets/brand/wall-800.jpg"); } }

.stand {
  position: absolute; right: 13vw; bottom: 5vh;
  height: min(60vh, 46vw, 760px); aspect-ratio: 789 / 834;
  padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stand::before { /* contact shadow on the grass */
  content: ""; position: absolute; left: 28%; right: 6%; bottom: -2%; height: 7%;
  background: radial-gradient(closest-side, rgba(10, 50, 0, .38), rgba(10, 50, 0, 0));
}
.stand img { position: relative; height: 100%; width: auto; transform-origin: 50% 100%; }
.stand.hop img { animation: hop .52s cubic-bezier(.3, .7, .4, 1); }
.stand.hop::before { animation: hopshadow .52s cubic-bezier(.3, .7, .4, 1); }
@keyframes hop {
  0% { transform: none; }
  14% { transform: scale(1.05, .93); }
  42% { transform: translateY(-10%) scale(.97, 1.04); }
  70% { transform: translateY(0) scale(1.06, .92); }
  86% { transform: scale(.99, 1.02); }
  100% { transform: none; }
}
@keyframes hopshadow { 42% { opacity: .35; transform: scaleX(.8); } }
.stand:focus-visible { outline: 1px dotted #fff; outline-offset: 4px; }
.say {
  position: absolute; left: 44%; top: 1%; transform: translate(-50%, calc(-100% - 14px));
  background: #ffffe1; border: 1px solid #000; border-radius: 10px; padding: 8px 14px;
  font: bold 15px var(--ui); white-space: nowrap; color: #000;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, .25);
  animation: sayin .18s ease-out; transform-origin: 50% 100%;
}
@keyframes sayin { from { opacity: 0; scale: .7; } }
.say::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -4px; border: 7px solid transparent;
  border-top: 14px solid #ffffe1; border-bottom: 0; filter: drop-shadow(0 1px 0 #000);
}

/* icons */
.icons {
  list-style: none; margin: 0; padding: 8px 4px;
  position: absolute; inset: 0; pointer-events: none;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 84px); grid-auto-columns: 86px;
  gap: 4px 6px; align-content: start;
}
.icons li { display: contents; }
.icons .icon { pointer-events: auto; }
.icon {
  width: 82px; height: 80px; padding: 4px 2px; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 0; background: none; color: #fff; text-decoration: none; cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.icon .ico { position: relative; width: 40px; height: 40px; flex: none; }
.icon .ico svg, .icon .ico > img { width: 40px; height: 40px; filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .35)); }
.icon .ico > img:only-child { object-fit: contain; }
.icons .bin-slot .icon { position: absolute; right: 10px; bottom: 10px; }
.icon .badge { position: absolute; width: 24px !important; height: 24px !important; right: -2px; bottom: 0; }
.icon .lbl {
  font: 11px/1.2 var(--ui); text-align: center; padding: 1px 2px; max-width: 80px;
  text-shadow: 1px 1px 1px #000, 0 0 2px #000;
  overflow-wrap: anywhere;
}
.icon.sel .lbl, .icon:focus-visible .lbl { background: var(--sel); text-shadow: none; outline: 1px dotted #fff; }
.icon.sel .ico, .icon:focus-visible .ico { filter: brightness(.75) sepia(1) hue-rotate(180deg) saturate(3); }
.icon:focus { outline: none; }

/* ---------------------------------------------------------------- windows */
.win {
  position: absolute; display: flex; flex-direction: column;
  min-width: 260px; min-height: 140px; max-width: 100vw;
  background: var(--face);
  padding: 0 3px 3px;
  border-radius: 8px 8px 0 0;
  box-shadow: inset -1px -1px #00138c, inset 1px 1px #0831d9, inset -2px -2px #001ea0, inset 2px 2px #166aee,
              inset -3px -3px #003bda, inset 3px 3px #0855dd, 2px 3px 10px rgba(0, 0, 0, .35);
  resize: both; overflow: hidden;
  user-select: text; -webkit-user-select: text;
  font: 11px/1.35 var(--ui);
}
.win.dialog { resize: none; min-height: 0; }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; resize: none; border-radius: 0; }
.win.min { display: none; }
.win:not(.active) { box-shadow: inset -1px -1px #6582f5, inset 1px 1px #7996f5, inset -2px -2px #7b97ef, inset 2px 2px #a5baf3,
                                 inset -3px -3px #9fb4ee, inset 3px 3px #9ab0ec, 2px 3px 10px rgba(0, 0, 0, .25); }
.tb {
  flex: none; height: 30px; margin: 0 -3px; padding: 0 4px 0 7px;
  display: flex; align-items: center; gap: 5px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  color: #fff; cursor: default; touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.win:not(.active) .tb { background: linear-gradient(180deg, #7697e7 0%, #7e9ee3 3%, #94afe8 6%, #97b4e9 8%, #82a5e4 14%, #7c9fe2 17%, #7996de 25%, #7b99e1 56%, #82a9e9 81%, #80a5e7 89%, #7b96e1 94%, #7a93df 97%, #abbae3 100%); color: #d8e4f8; }
.win.max .tb { border-radius: 0; }
.tb .ti { width: 16px; height: 16px; flex: none; }
.tb h2 {
  flex: 1; min-width: 0; margin: 0; font: bold 13px var(--title); letter-spacing: 0;
  text-shadow: 1px 1px #0f1089; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win:not(.active) .tb h2 { text-shadow: none; }
.tbb { display: flex; gap: 2px; flex: none; }
.tbb button {
  position: relative; width: 21px; height: 21px; padding: 0; border: 1px solid #fff; border-radius: 3px;
  background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%);
  box-shadow: inset 0 0 1px rgba(0, 0, 0, .3);
}
.tbb button:hover { filter: brightness(1.18); }
.tbb button:active { filter: brightness(.85); }
.tbb .b-x { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.win:not(.active) .tbb button { opacity: .8; }
.b-min::before { content: ""; position: absolute; left: 4px; bottom: 4px; width: 7px; height: 3px; background: #fff; }
.b-max::before { content: ""; position: absolute; left: 3px; top: 3px; width: 9px; height: 9px; border: 1px solid #fff; border-top-width: 3px; }
.win.max .b-max::before { left: 6px; top: 2px; width: 7px; height: 7px; }
.win.max .b-max::after { content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; border: 1px solid #fff; border-top-width: 2px; background: #2263d5; }
.b-x::before, .b-x::after { content: ""; position: absolute; left: 8px; top: 3px; width: 3px; height: 13px; background: #fff; transform: rotate(45deg); }
.b-x::after { transform: rotate(-45deg); }

.menubar { flex: none; display: flex; gap: 0; padding: 1px 0; border-bottom: 1px solid #c8c5b5; user-select: none; -webkit-user-select: none; }
.menubar .mb { border: 0; background: none; padding: 2px 7px; font: 11px var(--ui); color: #000; }
.menubar .mb:hover, .menubar .mb.on, .menubar .mb:focus-visible { background: #316ac5; color: #fff; outline: none; }
.drop { z-index: 9700; min-width: 170px; }
.drop button { position: relative; padding-left: 22px; }
.drop .chk::before { content: ""; position: absolute; left: 8px; top: 5px; width: 4px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.nowrap .np pre { white-space: pre; overflow-wrap: normal; }
.explorer.small .grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.body { flex: 1; min-height: 0; overflow: auto; }
.np {
  background: #fff; border: 1px solid #7f9db9; margin: 0;
  font: 13px/1.45 var(--mono); padding: 4px 6px; color: #000;
}
.np pre { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.buy p { margin: 0 0 10px; }
.buy ol { margin: 0 0 12px; padding-left: 26px; }
.buy li { margin-bottom: 6px; }
.ca-row { display: flex; align-items: center; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.ca-row label { font-weight: bold; }
.ca { flex: 1 1 200px; min-width: 0; font: 12px var(--mono); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.note { color: #555; font: 11px/1.4 var(--ui); }
.note.pad { padding: 4px 12px; }

/* controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 75px; min-height: 23px; padding: 0 12px;
  font: 11px var(--ui); color: #000; text-decoration: none; white-space: nowrap;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ecebe6 86%, #d6d0c5);
  box-shadow: inset -1px 0 #fff, inset 1px 0 #fff;
}
.btn:hover { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.btn:active { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; }
.btn:disabled { color: #aca899; border-color: #c9c7ba; background: #f5f4ea; box-shadow: none; }
.btn.big { min-height: 30px; padding: 0 14px; font-weight: bold; }
.btn svg { width: 18px; height: 18px; }
.field { height: 23px; padding: 2px 4px; border: 1px solid #7f9db9; background: #fff; border-radius: 0; }
.field:focus { outline: 1px solid #316ac5; outline-offset: -2px; }
fieldset { border: 1px solid #d0d0bf; border-radius: 3px; margin: 0 0 8px; padding: 6px 8px 8px; }
legend { color: #0046d5; padding: 0 3px; }
input[type="range"] { width: 100%; accent-color: #2f6fde; }
input[type="radio"] { accent-color: #2f6fde; margin: 0 3px 0 0; vertical-align: -2px; }

/* explorer */
.addr { flex: none; display: flex; align-items: center; gap: 6px; padding: 3px 2px; border-bottom: 1px solid #c8c5b5; }
.addr > span { color: #555; }
.addr-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; }
.addr-box svg { width: 16px; height: 16px; flex: none; }
.ex { flex: 1; min-height: 0; display: flex; }
.pane { flex: none; width: 180px; padding: 10px; overflow: auto; background: linear-gradient(180deg, #7ba2e7, #6375d6); }
.pane-box { background: #d6dff7; border-radius: 3px 3px 0 0; margin-bottom: 12px; }
.pane-box h3 { margin: 0; padding: 5px 10px; font: bold 11px var(--ui); color: #215dc6; background: linear-gradient(90deg, #fff, #c6d3f7); border-radius: 3px 3px 0 0; }
.folders { display: flex; flex-direction: column; padding: 6px 4px; }
.folders button { text-align: left; border: 0; background: none; padding: 3px 6px; color: #215dc6; }
.folders button:hover { text-decoration: underline; color: #428eff; }
.folders button[aria-selected="true"] { font-weight: bold; color: #000; }
.pane-txt { margin: 0; padding: 6px 10px 8px; white-space: pre-line; }
.grid-wrap { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid #7f9db9; }
.grid { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.grid button { width: 100%; border: 1px solid transparent; background: none; padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.grid button:hover, .grid button:focus-visible { border-color: #b3c9ee; background: #e8f0fc; outline: none; }
.grid .th { position: relative; width: 100%; aspect-ratio: 1; background: #f7f7f7; border: 1px solid #d5d5d5; overflow: hidden; }
.stickers .th { background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.grid .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.grid .nm { max-width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 20px; color: #555; }
.status { flex: none; display: flex; gap: 12px; justify-content: space-between; padding: 3px 6px 0; color: #333; white-space: nowrap; overflow: hidden; }
.status span:last-child { overflow: hidden; text-overflow: ellipsis; }
.shortcuts { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.shortcuts a { display: flex; align-items: center; gap: 8px; padding: 6px; color: #000; text-decoration: none; border: 1px solid transparent; }
.shortcuts a:hover, .shortcuts a:focus-visible { border-color: #b3c9ee; background: #e8f0fc; outline: none; }
.shortcuts svg { width: 34px; height: 34px; flex: none; }
.shortcuts span { display: flex; flex-direction: column; font-weight: bold; }
.shortcuts small { font-weight: normal; color: #555; }
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-weight: normal; padding: 3px 8px; background: linear-gradient(180deg, #fff, #ebeadb); border-right: 1px solid #c7c5b2; border-bottom: 1px solid #c7c5b2; white-space: nowrap; }
.list td { padding: 3px 8px; white-space: nowrap; }
.list tr:hover td { background: #e8f0fc; }

/* viewer */
.viewer .vw-stage { position: relative; flex: 1; min-height: 0; background: #fff; border: 1px solid #7f9db9; overflow: hidden; }
.viewer .vw-stage::before { content: "loading..."; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #888; }
.viewer .vw-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; transition: opacity .15s; }
.viewer .vw-stage img.ld { opacity: 0; }
.vw-cap { flex: none; margin: 6px 2px 0; font: 12px/1.4 var(--ui); max-height: 5.6em; overflow: auto; user-select: text; }
.vw-bar { flex: none; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 6px 0 2px; }
.vw-bar .btn { min-width: 0; }

/* dialogs */
.dlg { display: flex; gap: 14px; align-items: flex-start; padding: 16px 16px 10px; font-size: 12px; }
.dlg svg { width: 34px; height: 34px; flex: none; }
.dlg p { margin: 8px 0 0; white-space: pre-line; }
.dlg-btns { display: flex; justify-content: center; gap: 8px; padding: 6px 0 10px; }

/* ---------------------------------------------------------------- berd paint */
.pt { flex: 1; min-height: 0; display: grid; grid-template-columns: 64px 1fr 250px; gap: 6px; padding-top: 4px; }
.pt-tools { display: flex; flex-direction: column; gap: 4px; }
.tool {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px;
  border: 1px solid #b9b6a6; border-radius: 3px; background: linear-gradient(180deg, #fff, #e6e3d3); font-size: 10px;
}
.tool:hover { border-color: #e5a01a; }
.tool:disabled { opacity: .45; cursor: default; }
.tool img { width: 26px; height: 26px; }
.tool b { font-size: 18px; line-height: 26px; height: 26px; font-weight: normal; }
.pt-stage { min-width: 0; min-height: 0; display: grid; place-items: center; background: #808080; border: 1px solid #7f9db9; padding: 8px; overflow: hidden; }
.pt-stage canvas { max-width: 100%; max-height: 100%; background: #fff; touch-action: none; cursor: grab; box-shadow: 1px 1px 0 #404040; }
.pt-stage canvas.drag { cursor: grabbing; }
.pt-opts { min-height: 0; overflow: auto; padding-right: 2px; }
.bgs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-bottom: 8px; }
.sw { aspect-ratio: 1; padding: 0; border: 1px solid #808080; box-shadow: inset 1px 1px #404040, inset -1px -1px #fff; background: var(--c); }
.sw-bliss { background: linear-gradient(180deg, #4d8fe8 0 52%, #47a832 52%); }
.sw.on { outline: 2px solid #316ac5; outline-offset: 1px; }
.file-btn { position: relative; width: 100%; overflow: hidden; margin-bottom: 8px; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 1px dotted #000; outline-offset: -4px; }
.sizes { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sizes label { white-space: nowrap; }
.rng { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 6px; }
.txt { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 6px; margin-bottom: 6px; }
.txt .field { width: 100%; min-width: 0; }
.save { width: 100%; }
fieldset:disabled .rng { opacity: .5; }

/* ---------------------------------------------------------------- taskbar */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tb); z-index: 9000;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg, #1f2f86 0, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%, #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%, #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
  user-select: none; -webkit-user-select: none;
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
}
.start {
  flex: none; display: flex; align-items: center; gap: 5px; padding: 0 22px 0 9px; margin: 0; border: 0;
  border-radius: 0 12px 12px 0;
  background: radial-gradient(circle at 70% 0, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 60%),
              linear-gradient(180deg, #4ca64c 0%, #3c9d3c 12%, #389a38 50%, #2f8a2f 80%, #257b25 95%, #1a641a 100%);
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, .35), inset 0 1px 2px rgba(255, 255, 255, .5), 2px 0 3px rgba(0, 0, 0, .3);
  color: #fff; font: italic bold 19px/1 var(--logo); text-shadow: 1px 1px 2px #1a4a1a; letter-spacing: .5px;
}
.start img { width: 24px; height: 24px; filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, .5)); }
.start:hover { filter: brightness(1.1); }
.start[aria-expanded="true"] { filter: brightness(.85); }
.tasks { flex: 1; min-width: 0; display: flex; gap: 3px; padding: 3px 6px; overflow-x: auto; scrollbar-width: none; }
.tasks::-webkit-scrollbar { display: none; }
.task {
  flex: 0 1 160px; min-width: 40px; display: flex; align-items: center; gap: 5px; padding: 0 8px;
  border: 0; border-radius: 3px; color: #fff; font: 11px var(--ui); white-space: nowrap; overflow: hidden;
  background: #3c81f3; box-shadow: inset -1px 0 rgba(0, 0, 0, .3), inset 1px 1px 1px rgba(255, 255, 255, .2);
}
.task:hover { background: #53a3ff; }
.task.on { background: #1e52b7; box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, .3), inset 1px 0 1px rgba(0, 0, 0, .7); }
.task svg { width: 16px; height: 16px; flex: none; }
.task span { overflow: hidden; text-overflow: ellipsis; }
.tray {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 8px;
  border-left: 1px solid #1042af;
  background: linear-gradient(180deg, #0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%, #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9 100%);
  box-shadow: inset 1px 0 1px #18bbff;
  color: #fff;
}
.tray-ico { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; background: none; }
.tray-ico svg, .tray-ico img { width: 16px; height: 16px; }
#clock { font: 11px var(--ui); white-space: nowrap; margin-left: 2px; }

.balloon {
  position: absolute; right: 8px; bottom: calc(100% + 14px); width: 260px; max-width: calc(100vw - 16px);
  background: #ffffe1; border: 1px solid #000; border-radius: 8px; padding: 9px 26px 10px 10px;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, .35); cursor: pointer; color: #000;
  animation: pop .25s ease-out;
}
.balloon::after { content: ""; position: absolute; right: 62px; bottom: -13px; border: 6px solid transparent; border-top: 12px solid #ffffe1; border-bottom: 0; filter: drop-shadow(0 1px 0 #000); }
.balloon b { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.balloon b svg { width: 16px; height: 16px; }
.balloon p { margin: 6px 0 0; }
.bl-x { position: absolute; right: 5px; top: 5px; width: 16px; height: 16px; padding: 0; line-height: 14px; font-size: 10px; border: 1px solid #ccc; border-radius: 3px; background: #fff; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

/* start menu */
.startmenu {
  position: fixed; left: 0; bottom: var(--tb); z-index: 9500; width: 390px; max-width: 100vw;
  background: #fff; border: 1px solid #0831d9; border-radius: 8px 8px 0 0; overflow: hidden;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, .45);
  user-select: none; -webkit-user-select: none;
  margin-bottom: env(safe-area-inset-bottom);
}
.sm-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: #fff;
  background: linear-gradient(180deg, #1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%, #1e70d9 54%, #2476dc 60%, #2978dc 65%, #2a7ade 77%, #2c80e0 79%, #2b7ede 90%, #2a7bdc 100%); }
.sm-head img { width: 48px; height: 48px; border: 2px solid #fff; border-radius: 4px; object-fit: cover; }
.sm-head b { font: italic bold 22px var(--logo); text-shadow: 1px 1px 2px #0a2a6a; }
.sm-body { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid #f8a04a; }
.sm-body ul { list-style: none; margin: 0; padding: 6px 0; }
.sm-right { background: #d3e5fa; border-left: 1px solid #95bdee; }
.sm-body li.sep { height: 1px; margin: 4px 8px; background: linear-gradient(90deg, transparent, #b0b0b0, transparent); }
.sm-body button, .sm-body a {
  width: 100%; display: flex; align-items: center; gap: 7px; padding: 4px 8px; border: 0; background: none;
  color: #000; text-decoration: none; text-align: left; font: 11px var(--ui);
}
.sm-right button, .sm-right a { color: #0a246a; }
.sm-body button:hover, .sm-body a:hover, .sm-body button:focus-visible, .sm-body a:focus-visible { background: #316ac5; color: #fff; outline: none; }
.sm-left svg { width: 30px; height: 30px; flex: none; }
.sm-right svg, .sm-right img { width: 22px; height: 22px; flex: none; }
.sm-body span { display: flex; flex-direction: column; }
.sm-body small { color: #777; }
.sm-body button:hover small { color: #dde; }
.sm-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 8px;
  background: linear-gradient(180deg, #4282d6 0%, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%, #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d6 75%, #1165d4 83%, #0f61cb 88%); }
.sm-foot button { display: flex; align-items: center; gap: 5px; border: 0; background: none; color: #fff; padding: 2px 4px; font: 11px var(--ui); }
.sm-foot button:hover { filter: brightness(1.2); text-decoration: underline; }
.sm-foot svg { width: 22px; height: 22px; }

/* desktop context menu */
.ctx { position: fixed; z-index: 9600; min-width: 150px; padding: 2px; background: #fff; border: 1px solid #aca899; box-shadow: 2px 2px 4px rgba(0, 0, 0, .35); }
.ctx button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 4px 20px; font: 11px var(--ui); }
.ctx button:hover, .ctx button:focus-visible { background: #316ac5; color: #fff; outline: none; }
.ctx hr { border: 0; border-top: 1px solid #aca899; margin: 2px 1px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tb) + 18px); z-index: 9800; transform: translate(-50%, 20px);
  background: #ffffe1; border: 1px solid #000; padding: 6px 12px; font: 12px var(--ui);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* boot */
.boot { position: fixed; inset: 0; z-index: 10000; background: #000; display: grid; place-items: center; transition: opacity .35s; cursor: pointer; }
.boot.out { opacity: 0; pointer-events: none; }
.boot-in { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.boot-in img { width: min(300px, 60vw); height: auto; }
.boot-bar { position: relative; width: 156px; height: 18px; border: 2px solid #b2b2b2; border-radius: 4px; overflow: hidden; padding: 2px; }
.boot-bar i { position: absolute; top: 2px; width: 9px; height: 10px; border-radius: 1px;
  background: linear-gradient(180deg, #2838c7 0%, #5979ef 17%, #869ef3 32%, #869ef3 45%, #5979ef 59%, #2838c7 100%);
  animation: boot 1.6s linear infinite; }
.boot-bar i:nth-child(2) { animation-delay: .1s; }
.boot-bar i:nth-child(3) { animation-delay: .2s; }
@keyframes boot { from { left: -36px; } to { left: 160px; } }
.boot-foot { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #aaa; font: 12px var(--ui); margin: 0; }

.nojs { position: fixed; inset: 20px; z-index: 11000; background: #fff; padding: 20px; font: 14px var(--ui); }

/* ---------------------------------------------------------------- phones */
@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {
  .icons { inset: 0 0 auto 0; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; padding: 10px 6px; gap: 6px 2px; }
  .icon { width: 100%; height: auto; }
  .icons .bin-slot .icon { position: static; }
  .icon .lbl { font-size: 12px; }
  .stand { right: 50%; transform: translateX(50%); bottom: 2.5vh; height: min(48vh, 100vw); }
  .say { white-space: normal; width: max-content; max-width: 70vw; }
  .win:not(.dialog) { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; resize: none; border-radius: 0; min-width: 0; }
  .win:not(.dialog) .tb { border-radius: 0; }
  .win:not(.dialog) .b-max, .win:not(.dialog) .b-min { display: none; }
  .tb { height: 36px; }
  .tbb button { width: 30px; height: 28px; }
  .b-x::before, .b-x::after { left: 12px; top: 6px; }
  .win.dialog { left: 50% !important; top: 30% !important; transform: translate(-50%, -30%); width: min(340px, 94vw) !important; }
  .pane { display: none; }
  .ex { flex-direction: column; }
  .explorer .addr .btn { min-width: 0; padding: 0 8px; }
  #w-memes .addr { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; padding: 6px; }
  .np { font-size: 13px; }
  .menubar { display: none; }
  .pt { grid-template-columns: 1fr; grid-template-rows: auto auto auto; overflow: auto; align-content: start; }
  .pt-stage { order: 0; height: auto; max-height: 52vh; }
  .pt-stage canvas { max-height: calc(52vh - 18px); }
  .pt-tools { order: 1; flex-direction: row; }
  .tool { flex: 1; }
  .pt-opts { order: 2; overflow: visible; }
  .startmenu { width: 100vw; border-radius: 0; }
  .start { padding: 0 14px 0 8px; }
  .task { flex-basis: 110px; }
  .tray { padding: 0 8px 0 6px; gap: 5px; }
}
.m-folders { display: none; }
@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {
  .m-folders { display: flex; gap: 4px; padding: 4px 2px; overflow-x: auto; flex: none; }
  .m-folders button { flex: none; }
  .m-folders button[aria-selected="true"] { font-weight: bold; border-color: #e5a01a; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-bar i, .balloon { animation: none; }
  .toast, .boot { transition: none; }
}
