/* Fade web player: a Pocket PC on a desk. One game pixel = var(--u). */
:root {
  color-scheme: dark;
  --desk-1: #6e6363; --desk-2: #463d3e; --desk-3: #1d1819;
  --ink: #f1e9e5; --muted: #b7a8a4; --accent: #d93a32;
  --ppc-blue-1: #3f7be0; --ppc-blue-2: #0b3c9e; --ppc-select: #2f63c9;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .42 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 65% 70% at 46% 34%, var(--desk-1) 0%, var(--desk-2) 55%, var(--desk-3) 100%);
  background-color: var(--desk-3);
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #f0b54a; outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---- stage + device -------------------------------------------------------------------- */
.stage {
  position: fixed; inset: 0; container-type: size;
  display: grid; place-items: center; place-content: center; overflow: hidden;
}
.device {
  /* Zoomed in: the top of the case (speaker, LED, about 72u) and the bottom curve fall outside the window,
     leaving the screen, the d-pad and the four buttons in view. */
  --u: min(calc(100cqh / 504), calc((100cqw - 16px) / 344));
  transform: translateY(calc(-27 * var(--u)));
  position: relative; width: calc(344 * var(--u));
  padding: calc(20 * var(--u)) 0 calc(26 * var(--u));
  border-radius: calc(46 * var(--u)) calc(46 * var(--u)) calc(70 * var(--u)) calc(70 * var(--u)) / calc(40 * var(--u)) calc(40 * var(--u)) calc(92 * var(--u)) calc(92 * var(--u));
  background:
    radial-gradient(ellipse 120% 60% at 30% 0%, rgba(255,255,255,.45), transparent 55%),
    linear-gradient(90deg, #7d8186 0%, #c9ccd0 6%, #dfe2e5 22%, #c7cacd 50%, #d7dade 80%, #b4b7bb 94%, #6f7378 100%);
  box-shadow:
    inset 0 calc(2 * var(--u)) calc(1 * var(--u)) rgba(255,255,255,.85),
    inset 0 calc(-4 * var(--u)) calc(6 * var(--u)) rgba(0,0,0,.35),
    inset calc(3 * var(--u)) 0 calc(5 * var(--u)) rgba(255,255,255,.35),
    inset calc(-3 * var(--u)) 0 calc(6 * var(--u)) rgba(0,0,0,.28),
    0 1px 1px rgba(0,0,0,.55),
    calc(2 * var(--u)) calc(5 * var(--u)) calc(6 * var(--u)) rgba(0,0,0,.4),
    calc(8 * var(--u)) calc(20 * var(--u)) calc(30 * var(--u)) calc(-4 * var(--u)) rgba(0,0,0,.5),
    calc(26 * var(--u)) calc(56 * var(--u)) calc(80 * var(--u)) calc(-8 * var(--u)) rgba(0,0,0,.55);
}
/* Contact shadow where the case meets the desk. */
.device::after {
  content: ""; position: absolute; z-index: -1; left: 8%; right: 4%; bottom: calc(-14 * var(--u)); height: calc(36 * var(--u));
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.65), transparent 70%); filter: blur(calc(6 * var(--u)));
}
/* Brushed-metal sheen across the face. */
.device::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, rgba(0,0,0,.03) 1px 3px);
}

.device-head { position: relative; height: calc(62 * var(--u)); }
.grille {
  position: absolute; left: 50%; top: calc(12 * var(--u)); width: calc(84 * var(--u)); height: calc(20 * var(--u)); transform: translateX(-50%);
  border-radius: calc(10 * var(--u));
  background: radial-gradient(circle, #2a2c30 0 42%, transparent 48%) 0 0 / calc(6 * var(--u)) calc(6 * var(--u)), linear-gradient(#a9adb2, #d3d6d9);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.7);
}
.led {
  position: absolute; left: calc(46 * var(--u)); top: calc(18 * var(--u)); width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%;
  background: #4c4f45; box-shadow: inset 0 1px 1px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.7);
}
.device[data-state="loading"] .led { background: #ffb02e; box-shadow: 0 0 calc(6 * var(--u)) #ffb02e; animation: blink 1s steps(2) infinite; }
.device[data-state="on"] .led { background: #6dff5b; box-shadow: 0 0 calc(6 * var(--u)) #4dff3a, inset 0 0 1px #fff; }
@keyframes blink { 50% { opacity: .35; } }
.ir {
  position: absolute; right: calc(44 * var(--u)); top: calc(14 * var(--u)); width: calc(16 * var(--u)); height: calc(12 * var(--u)); border-radius: calc(3 * var(--u));
  background: linear-gradient(135deg, #3a1b20, #120708); box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(255,255,255,.6);
}
.power {
  /* Side switch on the right edge, beside the screen: toggles the screen filter. */
  position: absolute; right: calc(-5 * var(--u)); top: calc(150 * var(--u)); width: calc(6 * var(--u)); height: calc(34 * var(--u));
  border: 0; padding: 0; border-radius: 0 calc(3 * var(--u)) calc(3 * var(--u)) 0;
  background: linear-gradient(90deg, #5f6368, #9a9ea3 60%, #6c7075); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 1px 1px 2px rgba(0,0,0,.4);
}
.power[aria-pressed="true"] { background: linear-gradient(90deg, #8e2d29, #d93a32 60%, #9b302b); }
.power:active { transform: translateX(calc(-2 * var(--u))); }

.bezel {
  width: calc(264 * var(--u)); margin: 0 auto; padding: calc(12 * var(--u));
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#24272b, #191b1e);
  box-shadow: inset 0 calc(2 * var(--u)) calc(4 * var(--u)) rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.75), 0 -1px 0 rgba(0,0,0,.25);
}
.screen {
  position: relative; width: calc(240 * var(--u)); height: calc(320 * var(--u)); overflow: hidden;
  background: #0b0c0b; box-shadow: 0 0 0 1px #000;
}
.panel { position: relative; width: 100%; height: 100%; overflow: hidden; }
.screen canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
/* Glass above the panel: faint reflection and the shadow of the bezel's lip. */
.glass {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background:
    linear-gradient(118deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 28%, transparent 29%, transparent 62%, rgba(255,255,255,.035) 63%, transparent 80%),
    radial-gradient(ellipse 140% 90% at 50% 50%, transparent 70%, rgba(0,0,0,.22) 100%);
  box-shadow: inset 0 calc(3 * var(--u)) calc(4 * var(--u)) rgba(0,0,0,.55), inset 0 0 calc(2 * var(--u)) rgba(0,0,0,.6);
}
.lcd .glass { background:
    linear-gradient(118deg, rgba(225,240,255,.13) 0%, rgba(255,255,255,.05) 28%, transparent 29%, transparent 62%, rgba(255,255,255,.04) 63%, transparent 80%),
    radial-gradient(ellipse 140% 90% at 50% 50%, transparent 66%, rgba(0,0,0,.3) 100%); }

.wordmark {
  margin: calc(7 * var(--u)) 0 0; height: calc(18 * var(--u)); text-align: center;
  font: italic 700 calc(10 * var(--u)) / 1 Tahoma, Verdana, sans-serif; letter-spacing: .04em;
  color: #8d9196; text-shadow: 0 1px 0 rgba(255,255,255,.8), 0 -1px 0 rgba(0,0,0,.25);
}

/* ---- hardware buttons ------------------------------------------------------------------ */
.keys {
  position: relative; border-top: 1px solid rgba(0,0,0,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  border-radius: 50% 50% 0 0 / calc(14 * var(--u)) calc(14 * var(--u)) 0 0; padding-top: calc(4 * var(--u)); height: calc(112 * var(--u)); width: calc(300 * var(--u)); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr calc(92 * var(--u)) 1fr 1fr; align-items: center; justify-items: center;
}
.keys button { border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
.app {
  width: calc(32 * var(--u)); height: calc(32 * var(--u)); border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #eef0f2, #a7abb0 70%, #8a8e93);
  box-shadow: 0 calc(2 * var(--u)) calc(3 * var(--u)) rgba(0,0,0,.45), inset 0 -1px 2px rgba(0,0,0,.3), inset 0 1px 1px #fff, 0 0 0 calc(2 * var(--u)) rgba(0,0,0,.08);
  display: grid; place-items: center;
}
.app svg { width: 52%; height: 52%; fill: none; stroke: #5d6166; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.app1, .app4 { transform: translateY(calc(10 * var(--u))); }
.app.pressed, .app:active { background: radial-gradient(circle at 40% 30%, #d9dcdf, #979ba0 70%); box-shadow: 0 1px 1px rgba(0,0,0,.5), inset 0 1px 3px rgba(0,0,0,.4); }
.dpad {
  position: relative; width: calc(84 * var(--u)); height: calc(84 * var(--u)); border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #f3f4f6 0%, #c3c6ca 45%, #8e9297 100%);
  box-shadow: 0 calc(3 * var(--u)) calc(5 * var(--u)) rgba(0,0,0,.5), inset 0 1px 1px #fff, inset 0 -2px 4px rgba(0,0,0,.3), 0 0 0 calc(3 * var(--u)) rgba(0,0,0,.1);
  display: grid; grid-template: 1fr 1fr 1fr / 1fr 1fr 1fr;
}
.dpad button { background: none; position: relative; }
.dpad .up { grid-area: 1 / 2; } .dpad .left { grid-area: 2 / 1; } .dpad .action { grid-area: 2 / 2; }
.dpad .right { grid-area: 2 / 3; } .dpad .down { grid-area: 3 / 2; }
.dpad button:not(.action)::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -50%);
  border: calc(4 * var(--u)) solid transparent;
}
.dpad .up::after { border-bottom-color: #74787d !important; border-top-width: 0 !important; }
.dpad .down::after { border-top-color: #74787d !important; border-bottom-width: 0 !important; }
.dpad .left::after { border-right-color: #74787d !important; border-left-width: 0 !important; }
.dpad .right::after { border-left-color: #74787d !important; border-right-width: 0 !important; }
.dpad .action {
  border-radius: 50%; margin: calc(2 * var(--u));
  background: radial-gradient(circle at 45% 35%, #f6f7f8, #b4b8bc 75%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.8);
}
.dpad[data-tilt="up"] { transform: perspective(300px) rotateX(9deg); }
.dpad[data-tilt="down"] { transform: perspective(300px) rotateX(-9deg); }
.dpad[data-tilt="left"] { transform: perspective(300px) rotateY(-9deg); }
.dpad[data-tilt="right"] { transform: perspective(300px) rotateY(9deg); }
.dpad .action.pressed, .dpad .action:active { background: radial-gradient(circle at 45% 35%, #dfe1e3, #9fa3a8 75%); }

/* ---- Pocket PC screens drawn inside the panel ------------------------------------------- */
.ppc {
  position: absolute; inset: 0; display: flex; flex-direction: column; color: #000; background: #fff;
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif; font-size: calc(10 * var(--u)); line-height: 1.25;
}
.navbar {
  flex: none; height: calc(26 * var(--u)); padding: 0 calc(6 * var(--u)); display: flex; align-items: center; justify-content: space-between;
  color: #fff; font-weight: 700; font-size: calc(11 * var(--u));
  background: linear-gradient(var(--ppc-blue-1), var(--ppc-blue-2)); border-bottom: 1px solid #082460;
}
.start { display: flex; align-items: center; gap: calc(5 * var(--u)); }
.start i { width: calc(13 * var(--u)); height: calc(13 * var(--u)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e8433a 45%, #8f1410); box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.clock { font-weight: 400; font-size: calc(10 * var(--u)); }
.today-body {
  flex: 1; min-height: 0; overflow: auto; padding: calc(6 * var(--u)) calc(8 * var(--u));
  background: linear-gradient(rgba(255,255,255,.88), rgba(255,255,255,.62) 55%, rgba(255,255,255,.35)), url("today.jpg") center / cover;
}
.today-date, .today-owner { margin: 0; font-size: calc(9 * var(--u)); }
.today-date { font-weight: 700; }
.today-owner { padding-bottom: calc(5 * var(--u)); margin-bottom: calc(6 * var(--u)); border-bottom: 1px solid #7a8db8; color: #333; }
.today-title { margin: 0 0 calc(4 * var(--u)); font-size: calc(11 * var(--u)); color: var(--ppc-blue-2); }
.edition {
  position: relative; width: 100%; display: flex; gap: calc(7 * var(--u)); align-items: center; text-align: left;
  padding: calc(5 * var(--u)); margin-bottom: calc(4 * var(--u)); border: 1px solid transparent; border-radius: calc(2 * var(--u));
  background: rgba(255,255,255,.55); color: #000;
}
.edition img { width: calc(34 * var(--u)); height: calc(34 * var(--u)); border-radius: calc(7 * var(--u)); flex: none; }
.edition b { display: block; font-size: calc(12 * var(--u)); }
.edition small { display: block; font-size: calc(8.5 * var(--u)); color: #333; }
.edition em { display: block; font-style: normal; font-size: calc(8 * var(--u)); color: #555; }
.edition:hover, .edition:focus-visible { background: var(--ppc-select); color: #fff; border-color: #0b3c9e; outline: none; }
.edition:hover small, .edition:hover em, .edition:focus-visible small, .edition:focus-visible em { color: #e6eeff; }
.hd-badge {
  position: absolute; left: calc(25 * var(--u)); top: calc(27 * var(--u)); padding: 0 calc(2 * var(--u));
  font: 700 calc(7 * var(--u)) / 1.3 Tahoma, sans-serif; font-style: normal; color: #fff; background: #0b3c9e; border: 1px solid #fff;
}
.check { display: flex; align-items: center; gap: calc(5 * var(--u)); margin: calc(6 * var(--u)) 0 calc(3 * var(--u)); font-size: calc(9.5 * var(--u)); cursor: pointer; }
.check input { appearance: none; margin: 0; width: calc(11 * var(--u)); height: calc(11 * var(--u)); border: 1px solid #000; background: #fff; display: grid; place-items: center; }
.check input:checked::after { content: ""; width: 45%; height: 70%; border: solid #000; border-width: 0 calc(1.6 * var(--u)) calc(1.6 * var(--u)) 0; transform: translateY(-12%) rotate(45deg); }
.today-note { margin: 0; font-size: calc(8.5 * var(--u)); color: #333; }
.cmdbar {
  flex: none; height: calc(24 * var(--u)); display: flex; align-items: stretch; border-top: 1px solid #fff;
  background: linear-gradient(#f2f2f2, #cfcfcf); box-shadow: 0 -1px 0 #8a8a8a;
}
.cmdbar button { border: 0; background: none; padding: 0 calc(8 * var(--u)); font-size: calc(10 * var(--u)); font-family: inherit; color: #000; }
.cmdbar button:hover, .cmdbar button:focus-visible { background: var(--ppc-select); color: #fff; outline: none; }

.loading-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(16 * var(--u)); text-align: center; background: #fff; }
.loading-body img { width: calc(56 * var(--u)); height: calc(56 * var(--u)); border-radius: calc(12 * var(--u)); margin-bottom: calc(10 * var(--u)); }
.loading-body p { margin: calc(4 * var(--u)) 0; font-size: calc(10 * var(--u)); }
.loading-detail { color: #444; min-height: 1.25em; }
.bar { overflow: hidden; width: 100%; height: calc(12 * var(--u)); border: 1px solid #000; padding: 1px; background: #fff; }
#bar-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #0b3c9e 0 calc(6 * var(--u)), #fff calc(6 * var(--u)) calc(7.5 * var(--u))); transition: width .2s; }
.bar.indeterminate #bar-fill { width: 30%; animation: sweep 1.2s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(334%); } }
.ppc-button { margin-top: calc(8 * var(--u)); padding: calc(3 * var(--u)) calc(14 * var(--u)); font: calc(10 * var(--u)) Tahoma, sans-serif; color: #000; background: #e4e4e4; border: 1px solid #000; box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }

/* ---- walkthrough and help screens ------------------------------------------------------ */
.overlay { z-index: 3; }
.ok {
  height: calc(16 * var(--u)); min-width: calc(22 * var(--u)); padding: 0 calc(5 * var(--u)); border-radius: calc(8 * var(--u));
  border: 1px solid #fff; background: linear-gradient(#4f8ae6, #1446a8); color: #fff;
  font: 700 calc(9 * var(--u)) / 1 Tahoma, Verdana, sans-serif;
}
.ok:hover, .ok:focus-visible { background: #fff; color: var(--ppc-blue-2); outline: none; }
.spoiler {
  flex: none; margin: 0; padding: calc(2 * var(--u)) calc(6 * var(--u)); font-size: calc(8 * var(--u));
  background: #ffffe1; border-bottom: 1px solid #b9b98a; color: #333;
}
.doc {
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: calc(4 * var(--u)) calc(7 * var(--u)) calc(10 * var(--u));
  font-size: calc(9.5 * var(--u)); line-height: 1.32; outline: none; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: #9a9a9a #e6e6e6;
}
.doc::-webkit-scrollbar { width: calc(8 * var(--u)); }
.doc::-webkit-scrollbar-track { background: #e6e6e6; border-left: 1px solid #c8c8c8; }
.doc::-webkit-scrollbar-thumb { background: #c8c8c8; border: 1px solid #000; box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }
.doc h1 { margin: calc(4 * var(--u)) 0 calc(5 * var(--u)); font-size: calc(13 * var(--u)); line-height: 1.15; color: var(--ppc-blue-2); }
.doc h2 {
  margin: calc(12 * var(--u)) 0 calc(4 * var(--u)); padding-bottom: calc(2 * var(--u)); border-bottom: 1px solid #7a8db8;
  font-size: calc(11 * var(--u)); color: var(--ppc-blue-2); scroll-margin-top: calc(4 * var(--u));
}
.doc h3 { margin: calc(9 * var(--u)) 0 calc(2 * var(--u)); font-size: calc(10 * var(--u)); color: #000; }
.doc p { margin: calc(4 * var(--u)) 0; }
.doc ul, .doc ol { margin: calc(3 * var(--u)) 0; padding-left: calc(14 * var(--u)); }
.doc li { margin: calc(2.5 * var(--u)) 0; }
.doc li::marker { color: var(--ppc-blue-2); }
.doc a { color: #0000e0; }
.doc code { font: calc(8.5 * var(--u)) "Courier New", monospace; }
.doc table { width: 100%; border-collapse: collapse; margin: calc(5 * var(--u)) 0; font-size: calc(8.5 * var(--u)); }
.doc th, .doc td { padding: calc(2 * var(--u)) calc(3 * var(--u)); border: 1px solid #a0a0a0; text-align: left; vertical-align: top; }
.doc th { background: #dfe6f4; }
.doc footer { margin-top: calc(10 * var(--u)); padding-top: calc(4 * var(--u)); border-top: 1px solid #c8c8c8; color: #555; font-size: calc(8 * var(--u)); }
.doc-loading { color: #555; }
.cmdbar a { display: flex; align-items: center; padding: 0 calc(8 * var(--u)); color: #000; font-size: calc(10 * var(--u)); text-decoration: none; }
.cmdbar a:hover, .cmdbar a:focus-visible { background: var(--ppc-select); color: #fff; outline: none; }
.cmdbar a:last-child { margin-left: auto; }
.cmdbar button[aria-expanded="true"] { background: var(--ppc-select); color: #fff; }
/* Pocket PC popup menu, rising from the command bar. */
.menu {
  position: absolute; left: calc(2 * var(--u)); bottom: calc(23 * var(--u)); z-index: 2; max-height: calc(250 * var(--u)); overflow: auto;
  width: calc(190 * var(--u)); margin: 0; padding: 1px; list-style: none; background: #fff; border: 1px solid #000;
  box-shadow: calc(2 * var(--u)) calc(2 * var(--u)) 0 rgba(0,0,0,.35);
}
.menu button {
  display: block; width: 100%; padding: calc(3 * var(--u)) calc(6 * var(--u)); border: 0; background: none; text-align: left;
  font: calc(9.5 * var(--u)) / 1.25 Tahoma, Verdana, sans-serif; color: #000;
}
.menu button:hover, .menu button:focus-visible { background: var(--ppc-select); color: #fff; outline: none; }
.menu li + li { border-top: 1px solid #e4e4e4; }

/* ---- saved games row and notification balloon ---------------------------------------- */
.saves { display: flex; align-items: baseline; justify-content: space-between; gap: calc(6 * var(--u)); margin: calc(4 * var(--u)) 0 calc(3 * var(--u)); font-size: calc(9.5 * var(--u)); }
.saves-actions { display: flex; gap: calc(8 * var(--u)); }
.language { align-items: center; }
.flags { display: flex; gap: calc(3 * var(--u)); }
/* Toolbar toggle buttons: flat until pressed, then sunken on the checked (dithered) face. */
.flag { display: grid; place-items: center; padding: calc(2 * var(--u)) calc(3 * var(--u)); border: 1px solid transparent; background: none; cursor: pointer; }
.flag svg { display: block; height: calc(10 * var(--u)); width: auto; box-shadow: 0 0 0 1px #000; }
.flag:not([aria-checked="true"]):hover { border-color: #fff #808080 #808080 #fff; }
.flag[aria-checked="true"] {
  border-color: #808080 #fff #fff #808080; box-shadow: inset 1px 1px #000;
  background: repeating-conic-gradient(#fff 0 25%, #c0c0c0 0 50%) 0 0 / 2px 2px;
}
.flag[aria-checked="true"] svg { transform: translate(1px, 1px); }
.flag:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
.link { padding: 0; border: 0; background: none; font: inherit; color: #0000e0; text-decoration: underline; }
.link:disabled { color: #777; text-decoration: none; cursor: default; }
.notify {
  position: absolute; z-index: 4; top: calc(30 * var(--u)); left: calc(8 * var(--u)); right: calc(8 * var(--u));
  padding: calc(6 * var(--u)) calc(8 * var(--u)) calc(7 * var(--u)); background: #fff; color: #000;
  border: 1px solid #000; border-radius: calc(7 * var(--u)); box-shadow: calc(2 * var(--u)) calc(3 * var(--u)) 0 rgba(0,0,0,.35);
  font: calc(9.5 * var(--u)) / 1.3 Tahoma, Verdana, sans-serif;
  animation: drop .18s ease-out;
}
/* The balloon's tail points up at the title bar, as Pocket PC notifications did. */
.notify::before, .notify::after { content: ""; position: absolute; right: calc(26 * var(--u)); border: solid transparent; }
.notify::before { top: calc(-10 * var(--u)); border-width: 0 calc(6 * var(--u)) calc(10 * var(--u)); border-bottom-color: #000; }
.notify::after { top: calc(-8.6 * var(--u)); right: calc(27 * var(--u)); border-width: 0 calc(5 * var(--u)) calc(9 * var(--u)); border-bottom-color: #fff; }
.notify p { margin: 0 0 calc(5 * var(--u)); }
.notify-title { display: flex; align-items: center; gap: calc(4 * var(--u)); padding-bottom: calc(3 * var(--u)); border-bottom: 1px solid #7a8db8; font-weight: 700; color: var(--ppc-blue-2); }
.notify-title i { width: calc(10 * var(--u)); height: calc(10 * var(--u)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e8433a 45%, #8f1410); }
.notify-actions { display: flex; justify-content: flex-end; gap: calc(6 * var(--u)); }
.notify-actions .ppc-button { margin: 0; min-width: calc(44 * var(--u)); }
.ppc-button:focus-visible { outline: 1px dotted #000; outline-offset: calc(-3 * var(--u)); }
@keyframes drop { from { transform: translateY(calc(-8 * var(--u))); opacity: 0; } }

/* ---- dock (fullscreen only) ----------------------------------------------------------------- */
.dock {
  position: fixed; z-index: 10; top: 14px; right: 14px; display: none; gap: 6px; transition: opacity .3s;
}
body.fs .dock { display: flex; }
.dock button {
  position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.1);
  background: rgba(30,24,25,.55); color: #d9cdc9; display: grid; place-items: center; backdrop-filter: blur(6px);
}
.dock button:hover:not(:disabled) { background: rgba(70,55,57,.8); color: #fff; }
.dock button:disabled { opacity: .35; cursor: default; }
.dock button[aria-pressed="true"] { color: #fff; background: rgba(217,58,50,.75); border-color: rgba(255,180,170,.4); }
.dock svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.dock span {
  position: absolute; top: calc(100% + 8px); right: 0; white-space: nowrap; pointer-events: none;
  padding: 4px 8px; border-radius: 4px; font-size: 12px; background: #0d0a0a; color: #f1e9e5; opacity: 0; transition: opacity .15s;
}
.dock button:hover span, .dock button:focus-visible span { opacity: 1; }

@media (max-width: 600px) { .dock span { display: none; } }
/* Fullscreen: the device is put away and the panel fills the display at its 3:4 shape. */
body.fs { background: #000; }
body.fs .stage { inset: 0; container-type: normal; }
body.fs .device { position: fixed; inset: 0; width: auto; padding: 0; border-radius: 0; background: #000; box-shadow: none; transform: none; }
body.fs .device::before, body.fs .device::after, body.fs .device-head, body.fs .wordmark, body.fs .keys { display: none; }
body.fs .bezel { position: fixed; inset: 0; width: auto; padding: 0; border-radius: 0; background: #000; box-shadow: none;
  display: grid; place-items: center; }
body.fs .screen { --u: min(calc(100vw / 240), calc(100dvh / 320)); width: calc(240 * var(--u)); height: calc(320 * var(--u)); box-shadow: none; }
body.fs .glass { display: none; }
body.fs .dock { opacity: 0; }
body.fs .dock:hover, body.fs .dock:focus-within, body.fs.pointer-active .dock { opacity: 1; }
/* Phones: the buttons sit centred along the bottom, clear of the status bar, and always show.
   The game is fitted above them. */
@media (max-width: 600px), (pointer: coarse) {
  body.fs .dock {
    opacity: 1; top: auto; right: auto; left: 50%; transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom) + 10px);
  }
  body.fs .dock span { display: none; }
  body.fs .bezel { padding-bottom: calc(env(safe-area-inset-bottom) + 58px); padding-top: env(safe-area-inset-top); }
  body.fs .screen { --u: min(calc(100vw / 240), calc((100dvh - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 58px) / 320)); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
