/* re:Blue's pages (index.html, settings.html, about.html), styled after the game's own menus:
   - type: Saira (fonts/saira.woff2, SIL Open Font License, fonts/OFL.txt), one variable font with a
     width axis. Words are thin and a little condensed, as the game's names and places are; numbers
     are wide and bold with a dark edge (.num), as its gold, levels and slot numbers are;
   - colour: white for what matters, neutral grey for what supports it, the game's gold for medals;
   - lines: hairlines of light grey, as under the Load screen's portraits;
   - art: the title in cartoon letters (wordmark.png, scripts/make-wordmark.py) and, where the site was
     built with them, the game's own portraits and icons (game-art/, scripts/make-game-art.py;
     html.game-art). */
@font-face {
  font-family: "Saira";
  src: url(fonts/saira.woff2) format("woff2-variations"), url(fonts/saira.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --panel: rgba(8, 22, 50, 0.86); --edge: rgba(200, 210, 230, 0.26); --rule: rgba(200, 206, 220, 0.22);
  --accent: #4aa3ff; --accent-deep: #1d6fd6;
  --text: #f2f4f8; --grey: #a6abb8; --dim: #7f8594; --gold: #d8b850;
  --font: "Saira", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--text); font: 300 15px/1.6 var(--font); font-stretch: 92%; }
/* Day and night (theme.js sets html[data-theme]): a blue sky by day, the game's violet night sky by
   night; with the game's art, its own sky or scene behind the panels (game-art/bg-day, bg-night). */
:root, [data-theme="day"] { --sky: linear-gradient(180deg, #0c46ba 0%, #2678da 55%, #5ea6ea 100%); --sky-art: none; }
[data-theme="night"] { --sky: linear-gradient(180deg, #06061f 0%, #17134a 55%, #362763 100%); --sky-art: none;
                       --panel: rgba(9, 9, 32, 0.88); --edge: rgba(190, 180, 240, 0.24); }
/* The game's skies, with a soft darkening at the top so the white title text reads over the clouds. */
/* They wrap sideways in the game, so they tile across the width at the window's height: a 21:9 or 32:9
   screen sees the whole sky, repeated, rather than a stretched slice of it. */
.game-art[data-theme="day"] { --sky-art: linear-gradient(180deg, rgba(6, 30, 90, 0.5) 0%, rgba(6, 30, 90, 0.15) 30%, transparent 55%),
                                         url(game-art/bg-day.jpg) 50% 0 / auto 100% repeat-x; }
.game-art[data-theme="night"] { --sky-art: linear-gradient(180deg, rgba(4, 4, 24, 0.3), transparent 40%),
                                           url(game-art/bg-night.jpg) 50% 0 / auto 100% repeat-x; }
body { background: var(--sky) fixed; }
.game-art body { background: var(--sky-art), var(--sky); background-attachment: fixed; }
[hidden] { display: none !important; }
a { color: #9fd0ff; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* Numbers as the game draws them: wide, bold, with a dark edge. */
.num { font-weight: 700; font-stretch: 125%; letter-spacing: 0.5px; font-variant-numeric: tabular-nums;
       text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 0 2px 1px rgba(0, 0, 0, 0.6); }
.num.gold { color: var(--gold); }
.num.grey { color: var(--grey); }
/* Labels beside them: semi-bold, plain width. */
.label { font-weight: 600; font-stretch: 100%; color: var(--text); text-shadow: 1px 1px 0 #000; }

/* Pages. */
.page { max-width: 900px; margin: 0 auto; padding: 28px 20px; display: grid; gap: 18px; }
/* Big screens at low scaling (a 4K screen at 100%, a 1440-high 32:9): the column and its type grow, so
   the text stays readable from the usual distance. Only the page column: the game view isn't zoomed. */
@media (min-width: 2200px) and (min-height: 1300px) { .page { zoom: 1.25; } }
@media (min-width: 3000px) and (min-height: 1900px) { .page { zoom: 1.6; } }
header { text-align: center; }
header h1 { margin: 6px 0 0; line-height: 0; }
.brand { display: inline-block; }
.brand img { width: min(430px, 86vw); height: auto; filter: drop-shadow(0 6px 14px rgba(4, 24, 60, 0.45)); }
.tagline, nav.links, .legal { text-shadow: 0 1px 2px rgba(4, 20, 50, 0.9); }
.tagline { margin: 10px 0 0; color: #fff; font-weight: 300; letter-spacing: 0.4px; }
nav.links { display: flex; justify-content: center; gap: 26px; font-size: 15px; font-weight: 300; font-stretch: 110%;
            letter-spacing: 2px; text-transform: lowercase; }
nav.links a { color: rgba(255, 255, 255, 0.72); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
nav.links a:hover { color: #fff; }
nav.links a[aria-current] { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.7); }
#theme-toggle { font: inherit; letter-spacing: inherit; text-transform: inherit; text-shadow: inherit; color: rgba(255, 255, 255, 0.72);
                background: rgba(0, 0, 0, 0.18); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 12px; padding: 0 12px;
                cursor: pointer; }
#theme-toggle:hover { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 6px; padding: 18px 22px;
         box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.3); backdrop-filter: blur(3px); }
.panel h2 { margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-size: 14px; font-weight: 300;
            font-stretch: 115%; letter-spacing: 4px; text-transform: lowercase; color: var(--grey); }
.panel p { margin: 0 0 10px; }
.legal { font-size: 12px; font-weight: 400; color: #fff; text-align: center; }
.legal a { color: #fff; }
.hint { margin: 10px 0 0; color: var(--grey); font-size: 13px; }
.hint.warn { color: var(--gold); }
code { font-size: 13px; color: var(--grey); }

/* Buttons and fields: thin text, hairline edges. */
.panel select, .panel button { font: 400 14px var(--font); font-stretch: 100%; padding: 4px 12px; border-radius: 3px;
                               border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.05); color: var(--text); cursor: pointer;
                               transition: border-color 0.15s, background 0.15s; }
.panel button:hover:not(:disabled), .panel select:hover:not(:disabled) { border-color: rgba(230, 236, 250, 0.6); background: rgba(255, 255, 255, 0.09); }
.panel button:disabled, .panel select:disabled { opacity: 0.4; cursor: not-allowed; }
.panel select option { background: #0b1d38; }
.row { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* The save buttons: one row under the slots, lined up with them; Import first and stronger, Delete
   apart at the end. */
.save-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0 16px; }
.save-actions button { min-width: 112px; height: 34px; padding: 0 16px; }
.save-actions .primary { border-color: rgba(140, 195, 255, 0.7); background: rgba(74, 163, 255, 0.2); }
.save-actions .primary:hover:not(:disabled) { background: rgba(74, 163, 255, 0.32); }
.save-actions .danger { margin-left: auto; }
.save-actions .danger:hover:not(:disabled) { border-color: rgba(240, 140, 130, 0.8); background: rgba(226, 96, 90, 0.18); }
#saves-status { margin: 8px 0 0 16px; min-height: 1.2em; }
#saves-panel .hint { margin-left: 16px; }
[role=status] { color: var(--grey); font-size: 13px; }
[role=status].error { color: #f0a29e; }

/* The homepage. */
#play { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
/* START is grey until the browser has been checked; then it lights up with a sweep of light, and a
   "Ready" note shows beside it for a moment (page.js adds .ready). */
#start { display: flex; align-items: center; gap: 16px; }
#start-button { position: relative; overflow: hidden; font: 300 24px var(--font); font-stretch: 125%; letter-spacing: 8px;
                padding: 11px 54px 11px 62px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 3px; cursor: pointer; color: #fff;
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); background: linear-gradient(180deg, #3d97f5, var(--accent-deep));
                box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 18px rgba(74, 163, 255, 0.45);
                transition: background 0.4s, color 0.4s, box-shadow 0.4s, transform 0.15s; }
#start-button:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 28px rgba(74, 163, 255, 0.85); }
#start-button:active:not(:disabled) { transform: scale(0.98); }
#start-button:disabled { background: #2a3448; color: #7f8594; box-shadow: none; cursor: not-allowed; border-color: rgba(255, 255, 255, 0.18); text-shadow: none; }
#start-button::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
                       background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent); opacity: 0; }
#start-button.ready { animation: start-pop 0.6s ease-out; }
#start-button.ready::after { animation: start-sweep 0.9s ease-out 0.15s; }
@keyframes start-pop { 0% { transform: scale(0.94); } 55% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes start-sweep { 0% { left: -60%; opacity: 1; } 100% { left: 120%; opacity: 1; } }
#start-status { margin: 0; color: var(--grey); }
#start-status.flash { color: #d6ebff; font-weight: 300; font-stretch: 120%; letter-spacing: 4px; text-transform: uppercase; font-size: 13px;
                      animation: ready-note 2.8s ease-out forwards; }
@keyframes ready-note { 0% { opacity: 0; transform: translateX(-6px); } 15% { opacity: 1; transform: none; }
                        70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #start-button.ready, #start-button.ready::after { animation: none; }
  #start-status.flash { animation-duration: 0.01s; animation-delay: 2.5s; }
}
/* The latest save, beside START: the party's portraits, its slot, play time and when it was saved. */
#latest-save { display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 16px; padding: 2px 4px 2px 22px;
               border-left: 1px solid var(--rule); }
#latest-save:empty { display: none; }
.latest-title { grid-column: 1 / 3; font-size: 11px; font-weight: 300; font-stretch: 115%; letter-spacing: 3px; color: var(--grey); }
.latest-party { display: flex; gap: 0; }
.latest-party img { width: 50px; height: 50px; margin-right: -8px; }
.latest-party .member-name { margin-right: 8px; font-size: 14px; }
.latest-info { display: grid; grid-template-columns: auto auto; gap: 0 10px; align-items: baseline; font-size: 13px; }
.latest-line { display: contents; }
.latest-line .num { font-size: 15px; }
.latest-when { grid-column: 1 / 3; font-size: 12px; color: var(--grey); }
.latest-empty { grid-column: 1 / 3; color: var(--grey); font-size: 13px; max-width: 320px; }
/* The data notice, below the panels and above the legal line. */
#telemetry-notice { margin: 0 auto; max-width: 760px; text-align: center; font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, 0.9);
                    text-shadow: 0 1px 2px rgba(4, 20, 50, 0.9); }
/* Under START, each on a row of its own across the panel: what may trouble the game here (only when
   there is something), then a tip with a button for another. */
#play-notes { flex: 1 1 100%; margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
#play-notes[hidden], #home-tip[hidden] { display: none; }
#play-notes li { padding: 7px 12px; border-left: 2px solid var(--accent); background: rgba(255, 255, 255, 0.035); }
#play-notes li.warn { border-left-color: var(--gold); }
#play-notes li.error { border-left-color: #e2605a; }
#home-tip { flex: 1 1 100%; margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--grey); font-size: 14px; }
#home-tip .tip-label { margin-right: 6px; font-size: 12px; font-weight: 600; font-stretch: 125%; letter-spacing: 2px; color: var(--accent); text-transform: lowercase; }
#home-tip-next { margin-left: 6px; padding: 0 9px; line-height: 1.4; }
.patch-day { padding: 10px 0; border-top: 1px solid var(--rule); }
#patch-list > .patch-day:first-child { border-top: 0; padding-top: 0; }
.patch-day h3 { margin: 0 0 2px; font-size: 12px; font-weight: 600; font-stretch: 125%; letter-spacing: 1px; color: var(--grey); }
.patch h4 { margin: 4px 0 0; font-size: 16px; font-weight: 400; }
.patch ul { margin: 4px 0 0; padding-left: 18px; }
.patch li::marker { color: var(--dim); }
#patch-list details { margin-top: 10px; }
#patch-list summary { cursor: pointer; color: var(--grey); }

/* The settings page. */
#settings-list h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; font-size: 12px; font-weight: 400;
                    font-stretch: 115%; letter-spacing: 3px; text-transform: lowercase; color: var(--grey); }
#settings-list h3:first-child { margin-top: 0; }
#settings-list h3 img { width: 18px; height: 18px; }
.setting { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 1px 14px; padding: 7px 0;
           border-top: 1px solid var(--rule); }
.setting label { font-weight: 400; }
.setting input[type=range] { width: min(260px, 100%); vertical-align: middle; accent-color: var(--accent); }
.setting output { margin-left: 12px; font-size: 14px; font-weight: 700; font-stretch: 125%; text-shadow: 1px 1px 0 #000; }
.setting small { grid-column: 2; color: var(--grey); font-size: 12px; }
.setting select { justify-self: start; }
.game-art .setting input[type=range] { appearance: none; -webkit-appearance: none; height: 14px;
                                       background: url(game-art/slider-bar.png) center / 100% 100% no-repeat; }
.game-art .setting input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 20px; border-radius: 2px;
                                                           background: linear-gradient(180deg, #fff, #b9c3d6); border: 1px solid #3c4660; }
.game-art .setting input[type=range]::-moz-range-thumb { width: 10px; height: 20px; border-radius: 2px; background: #e8ecf4; border: 1px solid #3c4660; }

/* Save slots, after the game's Load screen (scoped under #save-slots: they are buttons, and the
   panel's button style would otherwise win): deep indigo cards; gold and medals at the top left; the
   party with each name thin above and the level bold over the portrait; under a hairline, when it was
   saved and the play time in grey; the slot number large at the bottom left; the chosen one outlined
   in white, with the game's pointer beside it where the art is there. */
/* Every slot one height, filled or not: the height a filled one takes (taller with the portraits). */
#save-slots { --slot-height: 92px; display: grid; gap: 8px; padding-left: 16px; }
.game-art #save-slots { --slot-height: 112px; }
#save-slots .slot { position: relative; display: grid; grid-template-columns: 150px 1fr; grid-template-rows: 1fr auto;
        grid-template-areas: "stats party" "number foot"; gap: 2px 18px; height: var(--slot-height); padding: 8px 14px 6px;
        text-align: left; cursor: pointer; color: var(--text); font: 300 13px var(--font); font-stretch: 92%;
        background: linear-gradient(180deg, #181650 0%, #0e0c34 45%, #07061c 100%);
        border: 1px solid rgba(175, 185, 240, 0.42); border-radius: 5px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -10px 18px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.4);
        transition: border-color 0.15s, box-shadow 0.15s; }
#save-slots .slot:hover { border-color: rgba(225, 230, 250, 0.75); }
#save-slots .slot[aria-selected="true"] { border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 0 14px rgba(170, 200, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.slot[aria-selected="true"]::before { content: ""; position: absolute; left: -14px; top: 50%; margin-top: -6px;
                                      border: 6px solid transparent; border-left: 8px solid #fff; }
.game-art .slot[aria-selected="true"]::before { border: 0; width: 14px; height: 14px; left: -18px; margin-top: -7px;
                                                background: url(game-art/pointer.png) center / contain no-repeat; }
/* Keyboard focus shows apart from the selection: a gold ring outside the selected slot's white one. */
.slot:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.slot-number { grid-area: number; align-self: end; font-size: 26px; line-height: 1; }
.slot-stats { grid-area: stats; display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 0 10px; font-size: 14px; }
.slot-stats .num { justify-self: end; display: inline-flex; align-items: center; gap: 4px; }
.slot-stats img { width: 15px; height: 15px; }
.slot-party { grid-area: party; display: flex; gap: 16px; align-items: flex-end; min-height: 52px; overflow: hidden; padding-top: 2px; }
.member { position: relative; display: grid; justify-items: center; min-width: 66px; padding-right: 10px; }
.member-name { font-size: 13px; font-weight: 300; font-stretch: 80%; line-height: 1.1; color: #fff; text-shadow: 1px 1px 0 #000; }
.member img { width: 66px; height: 66px; margin: -4px 0 -12px; }
/* The level sits over the portrait's top right, as in the game: a thin "LV" and a bold number. */
.member-level { position: absolute; right: -8px; top: 15px; display: flex; align-items: baseline; gap: 2px; line-height: 1; }
.member-level .lv { font-size: 10px; font-weight: 400; font-stretch: 100%; color: #fff; text-shadow: 1px 1px 0 #000; }
.member-level .num { font-size: 22px; }
/* Without the game's art: each name with its level after it, on one line. */
.slot:not(.with-art) .slot-party { align-items: center; min-height: 0; gap: 18px; }
.slot:not(.with-art) .member { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding-right: 0; }
.slot:not(.with-art) .member-name { font-size: 15px; }
.slot:not(.with-art) .member-level { position: static; }
.slot-foot { grid-area: foot; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
             padding-top: 3px; border-top: 1px solid rgba(205, 210, 225, 0.45); }
.slot-saved { color: var(--grey); font-size: 12px; }
.slot-time { display: flex; align-items: baseline; gap: 12px; font-size: 13px; }
.slot-time .label { color: var(--grey); }
.slot-time .num { font-size: 15px; letter-spacing: 1px; }
.slot-empty { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: center; font-size: 17px; font-weight: 300;
              letter-spacing: 1px; text-shadow: 1px 1px 0 #000; }
#save-slots .slot.empty { background: linear-gradient(180deg, #110f3c 0%, #0a0928 45%, #05041a 100%); }

/* The about page. */
.credits { display: grid; gap: 3px 18px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin: 6px 0 0; padding: 0; list-style: none; }
.credits li { color: var(--text); }
.credits small { color: var(--grey); }
.project + .project { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.project h3 { margin: 0; font-size: 17px; font-weight: 400; }
.project p { margin: 2px 0 6px; color: var(--grey); }
table.licenses { width: 100%; border-collapse: collapse; font-size: 14px; }
table.licenses td { padding: 5px 8px 5px 0; border-top: 1px solid var(--rule); vertical-align: top; }
table.licenses td + td { color: var(--grey); }

/* The game: the canvas fills the window, at the window's shape and pixel density (page.js sizes its
   drawing buffer); the game fits its picture to it. */
#game { position: fixed; inset: 0; background: #000; }
#stage { position: absolute; inset: 0; }
canvas { display: block; width: 100%; height: 100%; outline: none; }
#network-notice { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 6px 14px;
                  background: rgba(8, 22, 50, 0.9); border: 1px solid var(--gold); border-radius: 4px; color: var(--text);
                  font: 400 14px var(--font); }
/* Status lines over the game (no buttons: the game's own menus hold its controls). */
#game-notice { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 5; padding: 6px 14px;
               background: rgba(8, 22, 50, 0.9); border: 1px solid var(--edge); border-radius: 4px; color: var(--text);
               font: 400 14px var(--font); max-width: 80%; text-align: center; }
/* Loading bars (page.js). The loading screen covers the game until its first frame; the busy bar
   shows at the bottom edge only while the game waits on the network, and holds nothing to click. */
#game progress { appearance: none; -webkit-appearance: none; display: block; height: 6px; border: 0; border-radius: 3px;
                 background: rgba(200, 210, 230, 0.18); overflow: hidden; }
#game progress::-webkit-progress-bar { background: rgba(200, 210, 230, 0.18); border-radius: 3px; }
#game progress::-webkit-progress-value { background: var(--accent); border-radius: 3px; transition: width 0.2s; }
#game progress::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
#game progress:indeterminate { background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%) 0 0 / 40% 100% no-repeat,
                                           rgba(200, 210, 230, 0.18);
                               animation: busy-slide 1.2s linear infinite; }
#game progress:indeterminate::-webkit-progress-bar { background: transparent; }
@keyframes busy-slide { from { background-position: -40% 0, 0 0; } to { background-position: 140% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { #game progress:indeterminate { animation: none; background-position: 50% 0, 0 0; } }
#game-loading { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center;
                justify-content: center; gap: 10px; background: #000; color: var(--text); font: 400 15px var(--font); }
#game-loading[hidden], #game-busy[hidden], #game-notice-bar[hidden] { display: none; }
#game-loading p { margin: 0; }
#game-loading-bar { width: min(420px, 70vw); }
#game-loading-detail { color: var(--grey); font-size: 13px; font-variant-numeric: tabular-nums; }
#game-busy { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end;
             gap: 6px; max-width: min(420px, 60vw); padding: 5px 12px; background: rgba(8, 22, 50, 0.8); border: 1px solid var(--edge); border-radius: 4px;
             color: var(--grey); font: 400 13px var(--font); font-variant-numeric: tabular-nums; pointer-events: none; }
#game-busy progress { width: 120px; }
#game-busy .busy-row { display: flex; align-items: center; gap: 10px; }
/* A tip on the loading screen and above the busy bar (tips.mjs). */
.game-tip { margin: 0; color: var(--grey); font-size: 13px; line-height: 1.45; }
.game-tip .tip-label { color: var(--accent); font-weight: 600; }
.game-tip[hidden] { display: none; }
#game-loading-tip { order: 1; max-width: min(560px, 80vw); margin-top: 18px; text-align: center; }
#game-loading-band { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#game-busy-tip { align-self: stretch; text-align: left; }
/* The frame rate counter (F2, page.js): over the game's top-right corner, nothing to click. */
#perf-counter { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 6px 10px; border-radius: 4px; pointer-events: none;
                background: rgba(0, 0, 0, 0.55); color: #fff; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace;
                white-space: pre; text-align: right; }
#perf-counter[hidden] { display: none; }
#perf-counter .dim { color: rgba(255, 255, 255, 0.72); }
#perf-counter .hitch { color: #ff8a80; }
/* The control hints (page.js): the keys for what can be done now, bottom right, nothing to click.
   The busy bar moves up over them while they show. */
#input-hints { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; gap: 14px; align-items: center;
               pointer-events: none; color: #fff; font: 500 14px var(--font); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
#input-hints[hidden] { display: none; }
#input-hints .hint { display: flex; align-items: center; gap: 6px; }
#input-hints kbd { min-width: 22px; padding: 2px 6px; border-radius: 4px; background: rgba(245, 247, 252, 0.92); color: #10141f;
                   font: 700 12px var(--font); text-align: center; text-shadow: none; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }
#input-hints .divider { margin: 0 -2px; color: rgba(255, 255, 255, 0.7); font-weight: 400; }
#input-hints .hold { position: relative; overflow: hidden; }
#input-hints .hold::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--hold, 0%); background: var(--accent); }
#stage.hints-shown #game-busy { bottom: 52px; }
/* With the game's art: the tips sit in the game's message window (window.png, a border-image), and
   "another tip" is one of its buttons. The loading screen is the game's own: a picture of one of the
   party (page.js picks it), NOW LOADING and the bar on its message band at the bottom, the bar drawn
   with its config menu's slider. */
.game-art #home-tip { margin-top: 4px; padding: 6px 12px; border: 10px solid transparent; border-image: url(game-art/window.png) 10 fill / 10px;
                      color: var(--text); }
.game-art #home-tip-next { padding: 0 12px; border: 8px solid transparent; border-radius: 0; background: none;
                           border-image: url(game-art/button.png) 8 fill / 8px; color: var(--text); line-height: 1.2; }
.game-art #home-tip-next:hover { background: none; border-image-source: url(game-art/button-on.png); color: #10141f; }
.game-art .game-tip { padding: 6px 12px; border: 10px solid transparent; border-image: url(game-art/window.png) 10 fill / 10px;
                      color: var(--text); }
.game-art #game-busy { padding: 4px 8px; border: 10px solid transparent; border-image: url(game-art/window.png) 10 fill / 10px;
                       background: none; border-radius: 0; }
.game-art #game-busy-tip { padding: 0; border: 0; border-image: none; }
.game-art #game-loading { justify-content: flex-end; gap: 0; background: #fff var(--loading-art, none) center / contain no-repeat; }
.game-art #game-loading-tip { order: 0; margin: 0 0 14px; max-width: min(620px, 86vw); }
.game-art #game-loading-band { align-self: stretch; display: grid; grid-template-columns: auto auto; justify-content: center;
                               column-gap: 8px; row-gap: 8px; padding: 26px 0 22px; background: url(game-art/band.png) center / 100% 100%; }
.game-art #game-loading-band::before { content: ""; grid-row: 1; grid-column: 1 / -1; justify-self: center; width: 218px; height: 40px;
                                       background: url(game-art/now-loading.png) center / contain no-repeat; }
.game-art #game-loading-bar { grid-row: 2; grid-column: 1 / -1; justify-self: center; width: min(420px, 70vw); height: 14px; border-radius: 0;
                              background: url(game-art/slider-bar.png) center / 100% 100% no-repeat; }
.game-art #game-loading-bar::-webkit-progress-bar { background: url(game-art/slider-bar.png) center / 100% 100% no-repeat; border-radius: 0; }
.game-art #game-loading-bar::-webkit-progress-value { background: url(game-art/slider-fill.png) left center / 420px 100% no-repeat; border-radius: 0; }
.game-art #game-loading-bar::-moz-progress-bar { background: url(game-art/slider-fill.png) left center / 420px 100% no-repeat; border-radius: 0; }
.game-art #game-loading-step, .game-art #game-loading-detail { color: #e8ecf4; font-size: 13px; }
.game-art #game-loading-step { grid-row: 3; grid-column: 1; justify-self: end; }
.game-art #game-loading-step::after { content: " ·"; }
.game-art #game-loading-detail { grid-row: 3; grid-column: 2; justify-self: start; }
#game-notice-bar { width: 100%; margin-top: 6px; }
#message { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
           gap: 16px; background: rgba(0, 0, 0, 0.8); color: #fff; font-size: 16px; white-space: pre-wrap; text-align: center; padding: 40px; }
#message button { font-size: 15px; padding: 8px 20px; }
#log { position: fixed; left: 0; right: 0; bottom: 0; height: 30vh; overflow: auto; white-space: pre-wrap; margin: 0; padding: 4px;
       background: rgba(0, 0, 0, 0.85); color: #ccc; font: 12px monospace; z-index: 3; }
#report-dialog { font: 13px var(--font); }
