@font-face {
  font-family: 'Fusion Pixel';
  src: url('../fonts/fusion-pixel-12.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bar-h: 46px; /* 与 js/os/windows.js BAR_H 一致 */
  --px: 3px;
  --night: #060920;
  --panel: #0e1640;
  --panel-2: #16205a;
  --line: #2a3a8c;
  --ink: #0b1240;
  --dim: #7d86c4;
  --stitch: #4a7ff0;
  --stitch-hi: #9cc0ff;
  --periwinkle: #5a82c0;
  --chest: #68b0c9;
  --ear: #b48dbc;
  --angel: #ff8fc8;
  --sand: #ffe7b3;
  --sun: #ffc94a;
  --hibiscus: #ff5d73;
  --leaf: #4cc38a;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: var(--sand);
  font: 12px/2 'Fusion Pixel', monospace;
  -webkit-font-smoothing: none;
  -webkit-tap-highlight-color: transparent;
}

p, h2, h3, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--stitch-hi); }
a:hover { color: var(--sun); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px dashed var(--sun); outline-offset: 3px; }
img { -webkit-user-drag: none; user-select: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px-icon { image-rendering: pixelated; display: block; }
.sticker { display: block; }

/* 像素描边：四向实心阴影形成缺角边框 */
.pf, .win, .start, .btn, .start-btn, .task, .pet-bubble, .boot__bar, .ctx, .toast, .field, .chip, .tab {
  --pf: var(--line);
  box-shadow:
    0 calc(-1 * var(--px)) 0 var(--pf), 0 var(--px) 0 var(--pf),
    calc(-1 * var(--px)) 0 0 var(--pf), var(--px) 0 0 var(--pf),
    var(--pf-extra, 0 0 #0000);
}

.btn {
  --pf: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 2px 14px; border: 0; text-decoration: none;
  background: var(--stitch); color: var(--sand);
  transition: transform .08s;
}
.btn:hover { background: var(--stitch-hi); color: var(--ink); }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn--sun { background: var(--sun); color: var(--ink); }
.btn--sun:hover { background: var(--sand); }
.btn--danger { background: var(--hibiscus); color: #fff; }
.btn--danger:hover { background: #ff8a9a; color: var(--ink); }
.btn--tool { background: var(--panel-2); color: var(--sand); padding: 0 10px; }
.btn--tool[aria-checked="true"], .btn--tool[aria-pressed="true"] { background: var(--sun); color: var(--ink); }

.field {
  --pf: var(--line);
  width: 100%; padding: 4px 8px; border: 0; border-radius: 0; resize: vertical;
  background: var(--ink); color: var(--sand);
}
.field:focus { --pf: var(--sun); outline: none; }
.field::placeholder { color: var(--dim); }

.chip {
  --pf: var(--ink);
  padding: 0 10px; border: 0; line-height: 22px;
  background: var(--sand); color: var(--ink);
}
.chip:hover { background: var(--sun); }

.tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.tab { --pf: var(--line); padding: 0 12px; border: 0; background: var(--panel-2); }
.tab[aria-selected="true"] { --pf: var(--sun); background: var(--stitch); }

.lead { color: var(--stitch-hi); }
.tip { color: var(--dim); line-height: 20px; margin-top: 10px; }
.empty { color: var(--dim); }
.plain li { padding-left: 1.5em; text-indent: -1.5em; line-height: 22px; margin: 6px 0; }
.plain li::before { content: '* '; color: var(--sun); }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

@keyframes pop { from { transform: scale(.92); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hop { 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
