Triforce v0.6.0 "Sage Of Power"

Faster frames (the replay's memory work, held submits, helper threads, collection and capture cuts), the game letting old areas go (QueryMemoryInfo), the 0.5.2 stutter fixed, AMD RX 5000/6000 and integrated-GPU fixes, the GPU device chosen by name, the in-game menus and launcher reworked, controller, Linux and benchmark fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-20 17:06:21 -06:00
parent b0e46adb48
commit 6c7117635c
265 changed files with 26893 additions and 2549 deletions

View File

@@ -25,7 +25,7 @@
#s-work.failed .center h1 { color: #ffd6d9; }
#s-work.failed .nowmusic, #s-work.failed .workfoot { display: none; }
.drawer { position: absolute; left: 0; right: 0; bottom: 0; height: 0; overflow: hidden; z-index: 12; background: rgba(8, 7, 6, .97);
border-top: 1px solid rgba(224, 178, 62, .4); transition: height .25s ease; }
border-top: 1px solid rgba(var(--gold-rgb), .4); transition: height .25s ease; }
.drawer.open { height: 330px; }
.drawer .dhead { display: flex; gap: 22px; align-items: baseline; padding: 14px 64px 8px; font-size: 14px; }
.drawer .dhead b { flex: 1; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 19px; color: var(--gold-hi); }
@@ -51,9 +51,9 @@
.search input { width: 100%; height: 100%; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; }
.search input::placeholder { color: var(--text3); }
.mods { top: 222px !important; max-height: 500px; overflow-y: auto; align-content: start; }
.mods::-webkit-scrollbar { width: 6px; } .mods::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
.mods::-webkit-scrollbar { width: 6px; } .mods::-webkit-scrollbar-thumb { background: rgba(var(--gold-rgb), .35); }
.mod { grid-template-columns: 64px 1fr auto !important; gap: 14px; }
.mod .mi { width: 64px; height: 40px; background-size: cover; background-position: center; outline: 1px solid rgba(224, 178, 62, .3); }
.mod .mi { width: 64px; height: 40px; background-size: cover; background-position: center; outline: 1px solid rgba(var(--gold-rgb), .3); }
.mod .mi.none { background: rgba(255, 255, 255, .04); }
.mod em.offm { color: var(--text3); }
.mod.more b { color: var(--gold); }
@@ -85,12 +85,12 @@
.opts.many .opt { padding: 12px 14px; }
.opt > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a long text in a sheet scrolls with the launcher's own thin bar, not the system's */
.asktext::-webkit-scrollbar { width: 6px; } .asktext::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
.asktext::-webkit-scrollbar { width: 6px; } .asktext::-webkit-scrollbar-thumb { background: rgba(var(--gold-rgb), .35); }
.asktext::-webkit-scrollbar-button { display: none; } .asktext { padding-right: 10px; }
/* settings: the list scrolls inside the page (it is longer than the window) */
.set { max-height: 572px; overflow-y: auto; padding-right: 14px; }
.set::-webkit-scrollbar { width: 6px; } .set::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
.opts.grid::-webkit-scrollbar { width: 6px; } .opts.grid::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
.set::-webkit-scrollbar { width: 6px; } .set::-webkit-scrollbar-thumb { background: rgba(var(--gold-rgb), .35); }
.opts.grid::-webkit-scrollbar { width: 6px; } .opts.grid::-webkit-scrollbar-thumb { background: rgba(var(--gold-rgb), .35); }
/* (Cormorant's old-style figures read "1" as "ı": lining figures everywhere) */
body { font-variant-numeric: lining-nums; }
/* Mods: the tabs under the title, not over it */
@@ -127,3 +127,52 @@ body { font-variant-numeric: lining-nums; }
.place.two .pg { height: 40px; }
.recs .compare { margin-top: 14px; width: 100%; }
.recs .act .qlink { white-space: nowrap; }
/* Color scheme (Settings > Launcher): any colour in place of the gold. theme.css holds the shades, app.js moves them. */
/* the crest's metal turned to the colour; img/crest-gold.png is its mask, so the three stones and the dark stone stay */
.tint .mark::after, .tint .seal::after, .tint.noart .mini::after { content: ''; position: absolute; inset: 0; pointer-events: none;
background: url(img/crest.png) center / contain no-repeat; -webkit-mask: url(img/crest-gold.png) center / contain no-repeat; mask: url(img/crest-gold.png) center / contain no-repeat;
filter: hue-rotate(var(--tint-h)) saturate(var(--tint-s)) brightness(var(--tint-b)); }
.tint.noart .mini::after { background-size: 92px; -webkit-mask-size: 92px; mask-size: 92px; }
/* the game's ornament and the logo's aura: the same sepia gold as drawn, turned by as much */
.tint .orn { filter: sepia(1) saturate(calc(3.2 * var(--tint-s))) hue-rotate(calc(-10deg + var(--tint-h))) brightness(calc(1.05 * var(--tint-b))); }
.tint .rule i, .tint .frame .top i { filter: sepia(1) saturate(calc(3.2 * var(--tint-s))) hue-rotate(calc(-10deg + var(--tint-h))) brightness(var(--tint-b)); }
.tint .logo .aura, .tint .mini .aura { filter: sepia(1) saturate(calc(2.2 * var(--tint-s))) hue-rotate(calc(-6deg + var(--tint-h))) brightness(var(--tint-b)); }
.tint .rlogo .aura { filter: sepia(1) saturate(calc(2.4 * var(--tint-s))) hue-rotate(calc(-8deg + var(--tint-h))) brightness(var(--tint-b)) blur(6px); }
/* the row: its value is the colour (a diamond, as the sliders' knob) and its hex; selecting it drops the picker under it */
.row-set .sw { display: inline-block; width: 11px; height: 11px; margin: 0 12px 0 3px; transform: rotate(45deg); vertical-align: 0; background: var(--gold);
box-shadow: 0 0 0 1px rgba(var(--gold-hi-rgb), .55), 0 0 0 3px rgba(10, 9, 8, .9); }
.cpick { height: 0; overflow: hidden; visibility: hidden; border-bottom: 1px solid var(--line-soft); margin-bottom: -1px;
transition: height .25s ease, visibility 0s linear .25s; }
.cpick.open { height: 222px; visibility: visible; margin-bottom: 0; transition: height .25s ease; }
/* (16px on the left: the focus ring, the frame and the diamond at the left end stay inside the list, which clips there) */
.cp { display: grid; grid-template-columns: 250px 1fr; gap: 38px; padding: 20px 4px 22px 16px; }
/* the square: saturation across, brightness up; the hue under it as one of the launcher's sliders */
.cp-sv { position: relative; height: 140px; cursor: crosshair; outline: 1px solid rgba(var(--gold-rgb), .42); outline-offset: 4px;
background: linear-gradient(0deg, #000, rgba(0, 0, 0, 0)), linear-gradient(90deg, #fff, hsl(var(--cp-h, 43), 100%, 50%)); }
.cp-sv u, .cp-hue u { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; transform: rotate(45deg); pointer-events: none;
background: var(--cp-c, var(--gold)); box-shadow: 0 0 0 2px var(--text), 0 0 0 4px rgba(10, 9, 8, .9); }
.cp-sv.held { outline: 2px solid var(--gold-hi); }
/* held (Enter / A: the arrows set it): a double ring over the focus ring, and the bigger diamond */
body.kb .cp-sv.held.kf { outline: 4px double var(--gold-hi) !important; box-shadow: 0 0 0 9px rgba(var(--gold-hi-rgb), .3); }
.cp-sv.held u { transform: rotate(45deg) scale(1.3); }
.cp-hue { margin-top: 26px; background: linear-gradient(90deg, #f00, #ff0 16.667%, #0f0 33.333%, #0ff 50%, #00f 66.667%, #f0f 83.333%, #f00); }
.cp-hue::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.cp-hue u { top: 50%; box-shadow: 0 0 0 3px rgba(10, 9, 8, .9); }
/* hex and r, g, b: the launcher's field (the mods search), checked as typed */
.cp-f { display: flex; gap: 14px; }
.cp-f label { display: block; font-size: 13px; font-weight: 600; color: var(--text3); }
.cp-f input { display: block; width: 62px; height: 38px; margin-top: 5px; padding: 0 12px; font: inherit; font-size: 14.5px; font-variant-numeric: tabular-nums; color: var(--text);
background: rgba(10, 9, 8, .6); border: 1px solid rgba(var(--gold-rgb), .35); outline: 0; border-radius: 0; }
.cp-f input#cpHex { width: 112px; letter-spacing: .03em; text-transform: uppercase; }
.cp-f input:focus { border-color: var(--gold-hi); }
.cp-f input.bad { border-color: #ff8a92; color: #ffd6d9; }
.cp-msg { height: 18px; margin-top: 6px; font-size: 12.5px; color: var(--text3); } .cp-msg.bad { color: #ff8a92; }
/* the ready colours (Triforce gold first) and the way back to it */
.cp-pre { display: flex; gap: 17px; margin: 6px 0 0 4px; }
.cp-pre span { width: 18px; height: 18px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 0 1px rgba(243, 234, 213, .25), 0 0 0 3px rgba(10, 9, 8, .9); cursor: pointer; }
.cp-pre span.on { box-shadow: 0 0 0 2px var(--text), 0 0 0 4px rgba(10, 9, 8, .9); }
.cp-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; font-size: 14px; }
.cp-foot em { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 17px; color: var(--gold-hi); }
.cp-foot .lnk { font-weight: 600; color: var(--gold); cursor: pointer; }

View File

@@ -4,7 +4,7 @@
page -> launcher {t:'ready'} {t:'win', a:'min'|'max'|'close'} {t:'pick', kind:'file'|'folder'} {t:'drop', files:[file:// on Linux]}
{t:'cmd', c:<name>, ...args} (build, stop, retry, play, update, playold, showgame, open, lang, folder, setting,
saves.import, saves.export, saves.open, mods.*, bench, benchstop, benchapply,
report, sound, workback, ...)
report, sound, color, workback, ...)
launcher -> page {t:'hello', chrome, os} {t:'state', ...parts} {t:'go', s} {t:'check', st, name, msg}
{t:'work', ...} {t:'log', lines} {t:'toast', html} {t:'sfx', id} {t:'bench', ...} {t:'max', on}
@@ -40,32 +40,119 @@ const S = { media: { art: false, music: false, sfx: false }, sound: { music: .4,
/* ---------------- sound: the game's own music and menu sounds (only once a game is known) ---------------- */
const TRACKS = { saria: "Saria's Song", fairy: 'Fairy Fountain', temple: 'Temple of Time', itemget: 'Item get' };
const live = []; // music being played: { el, k, target, rate, name }
let curTrack = null, unlocked = !!HOST;
addEventListener('pointerdown', () => unlocked = true, true); addEventListener('keydown', () => unlocked = true, true);
/* Music plays through Web Audio: a track is read and decoded once into an AudioBuffer and played by a buffer source that
loops between the game's own loop points, sample for sample, so an intro plays once and the loop joins with no gap and
no jump back to the start (the launcher writes the loop into the WAV as a smpl chunk: launcher/Core/GameFiles/Bwav.cs
ToWav). An <audio> element's loop starts the whole file again, intro and all, after a pause: it is only the fallback,
for a page without Web Audio or a file it cannot read or decode. A file without a loop (made by an older launcher)
loops whole, still without a gap. */
const live = []; // music being played: { k, target, rate, name, loop, and src + g (Web Audio) or el (<audio>) once started }
let curTrack = null, unlocked = !!HOST, actx = null, actxTried = false, lastResume = 0;
const decoded = new Map(); // track -> Promise of { buf, start, end } (the loop, in seconds), for media version decodedFor
let decodedFor;
function audioCtx() {
if (actxTried) return actx;
actxTried = true;
const AC = window.AudioContext || window.webkitAudioContext;
// (at the game's rate, so the buffers are not resampled and the loop points stay whole samples)
if (AC) try { actx = new AC({ sampleRate: 48000 }); } catch { try { actx = new AC(); } catch { actx = null; } }
return actx;
}
function unlock() { unlocked = true; if (actx && actx.state === 'suspended') actx.resume().catch(() => {}); }
addEventListener('pointerdown', unlock, true); addEventListener('keydown', unlock, true);
/* The loop a WAV file carries, in samples: a smpl chunk's first loop (smpl counts its last sample in; end here is the
sample after it), else the whole file. { rate, frames, start, end }, or null for what is not a PCM WAV file. */
function wavLoop(ab) {
const d = new DataView(ab), len = d.byteLength;
const tag = at => String.fromCharCode(d.getUint8(at), d.getUint8(at + 1), d.getUint8(at + 2), d.getUint8(at + 3));
if (len < 12 || tag(0) !== 'RIFF' || tag(8) !== 'WAVE') return null;
let rate = 0, align = 0, frames = 0, loop = null;
for (let at = 12; at + 8 <= len;) {
const id = tag(at), n = Math.min(d.getUint32(at + 4, true), len - at - 8), body = at + 8;
if (id === 'fmt ' && n >= 16) { rate = d.getUint32(body + 4, true); align = d.getUint16(body + 12, true); }
else if (id === 'data' && !frames && align) frames = Math.floor(n / align);
else if (id === 'smpl' && n >= 60 && d.getUint32(body + 28, true) > 0) loop = { start: d.getUint32(body + 44, true), end: d.getUint32(body + 48, true) + 1 };
at = body + n + (n & 1);
}
if (!rate || !frames) return null;
const ok = loop && loop.start < loop.end && loop.end <= frames;
return { rate, frames, start: ok ? loop.start : 0, end: ok ? loop.end : frames };
}
function track(name) {
if (decodedFor !== S.media.v) { decoded.clear(); decodedFor = S.media.v; }
let p = decoded.get(name);
if (!p) {
p = fetch('audio/' + name + '.wav').then(r => { if (!r.ok) throw new Error(name + ': ' + r.status); return r.arrayBuffer(); }).then(ab => {
const lp = wavLoop(ab);
// (the callback form too: an older WebKit's decodeAudioData returns nothing)
return new Promise((ok, no) => { const q = actx.decodeAudioData(ab, ok, no); if (q && q.then) q.then(ok, no); })
.then(buf => ({ buf, start: lp ? lp.start / lp.rate : 0, end: lp ? Math.min(lp.end / lp.rate, buf.duration) : buf.duration }));
});
p.catch(() => { if (decoded.get(name) === p) decoded.delete(name); });
decoded.set(name, p);
}
return p;
}
function startBuffer(m, t) {
const src = actx.createBufferSource(), g = actx.createGain();
src.buffer = t.buf;
if (m.loop) { src.loop = true; src.loopStart = t.start; src.loopEnd = t.end; }
// (at the level it has now, from the first sample: 0 for a looping track, which fades in; the full level for the
// fanfare, which would otherwise wait for the next frame and a ramp, or play silent while frames are held back)
const v = level(m);
g.gain.value = v;
src.connect(g); g.connect(actx.destination);
if (!m.loop) src.onended = () => { m.ended = true; if (!m.stopped) oneShotEnded(m); };
src.start();
m.src = src; m.g = g; m.v = v; m.loading = false;
}
function startElement(m) {
const el = new Audio('audio/' + m.name + '.wav'); el.loop = m.loop; el.volume = level(m);
m.el = el; m.loading = false;
el.play().catch(() => { m.blocked = true; });
if (!m.loop) el.onended = () => oneShotEnded(m);
}
function level(m) { return Math.max(0, Math.min(1, m.k * m.k * (S.sound.muted ? 0 : S.sound.music))); }
function oneShotEnded(m) { m.target = 0; m.k = 0; if (curTrack === m.name) { curTrack = null; afterOneShot(m.name); } nowPlaying(); }
function stopVoice(m) {
m.dead = true;
if (m.el) { m.el.pause(); m.el.removeAttribute('src'); }
// (a source that has played to its end fires no second ended: its gain is let go at once)
else if (m.src) {
m.stopped = true;
if (m.ended) m.g.disconnect();
else { m.src.onended = () => m.g.disconnect(); try { m.src.stop(actx.currentTime + .05); } catch { m.g.disconnect(); } }
}
// (a track no longer playing lets go of its decoded samples, up to 30 MB for a long one: read again when wanted)
if (m.name !== curTrack && !live.some(o => o !== m && !o.dead && o.name === m.name)) decoded.delete(m.name);
}
function music(name, loop = true, fade = 1.4) {
if (name && !S.media.music) name = null;
if (curTrack === name) return;
curTrack = name;
for (const m of live) { m.target = 0; m.rate = 1 / fade; }
if (name) {
const el = new Audio('audio/' + name + '.wav'); el.loop = loop; el.volume = 0;
const m = { el, k: 0, target: 1, rate: 1 / fade, name };
el.play().catch(() => { m.blocked = true; });
if (!loop) el.onended = () => { m.target = 0; m.k = 0; if (curTrack === name) { curTrack = null; afterOneShot(name); } };
// (a one-shot, the item fanfare, starts at its full level: fading it in would swallow its first notes)
const m = { k: loop ? 0 : 1, target: 1, rate: 1 / fade, name, loop, loading: true };
live.push(m);
if (audioCtx()) track(name).then(t => { if (!m.dead) startBuffer(m, t); }, () => { if (!m.dead) startElement(m); });
else startElement(m);
}
nowPlaying();
}
let lastT = performance.now();
function audioTick(t) {
const dt = Math.min(.1, (t - lastT) / 1000); lastT = t;
const mv = S.sound.muted ? 0 : S.sound.music;
if (actx && unlocked && actx.state === 'suspended' && t - lastResume > 1000) { lastResume = t; actx.resume().catch(() => {}); }
for (let i = live.length - 1; i >= 0; i--) {
const m = live[i];
// (a track still being read waits at its first level, so its fade-in is heard whole; one faded out before it starts is dropped)
if (m.loading) { if (m.target === 0) { stopVoice(m); live.splice(i, 1); } continue; }
m.k += Math.sign(m.target - m.k) * Math.min(Math.abs(m.target - m.k), m.rate * dt);
m.el.volume = Math.max(0, Math.min(1, m.k * m.k * mv));
if (m.k <= 0 && m.target === 0) { m.el.pause(); m.el.removeAttribute('src'); live.splice(i, 1); }
const v = level(m);
if (m.el) m.el.volume = v;
else if (Math.abs(v - m.v) > 1e-4) { m.v = v; m.g.gain.setTargetAtTime(v, actx.currentTime, .015); }
if (m.k <= 0 && m.target === 0) { stopVoice(m); live.splice(i, 1); }
else if (m.blocked && unlocked) { m.blocked = false; m.el.play().catch(() => { m.blocked = true; }); }
}
}
@@ -113,7 +200,7 @@ const MUSIC = { welcome: null, reveal: 'saria', work: 'temple', done: 'itemget',
let screen = null;
function go(name) {
if (name === screen || !$('#s-' + name)) return;
closeSheet(true); closeVol(true);
closeSheet(true); closeVol(true); closeColor();
screen = name;
$$('.screen').forEach(s => s.classList.toggle('on', s.id === 's-' + name));
const busy = FIRST_RUN.includes(name) || name === 'work' || name === 'brun' || name === 'playing';
@@ -137,14 +224,20 @@ function visible(el) { return !!(el.offsetParent || el.getClientRects().length)
function focusables() {
if ($('#sheetBg').classList.contains('open')) return $$('[data-f]', $('#sheet')).filter(visible);
if ($('#vol').classList.contains('open')) return $$('[data-f]', $('#vol')).concat($('#spk'));
const out = $$('[data-f]', $('#s-' + screen)).filter(visible);
// ((Triforce, 11-19) before the first screen is shown screen is null and there is no #s-null: a controller's press or a drifting
// stick then threw here, in the frame loop)
const page = screen && $('#s-' + screen);
const out = page ? $$('[data-f]', page).filter(el => visible(el) && !el.closest('.cpick:not(.open)')) : [];
if (!$('#bar').classList.contains('bare')) out.push(...$$('[data-f]', $('#bar')).filter(visible));
return out;
}
function setFocus(el, sound) {
if (!el || el === focused) return;
if (focused) focused.classList.remove('kf');
const letGo = focused && focused.id === 'cpSv' && focused.classList.contains('held'); // (the colour square lets go when focus leaves it)
if (letGo) focused.classList.remove('held');
focused = el; el.classList.add('kf');
if (letGo || el.id === 'cpSv') colorMsg();
if (el.tagName === 'INPUT') el.focus(); else if (document.activeElement && document.activeElement.tagName === 'INPUT') document.activeElement.blur();
if (document.body.classList.contains('kb')) el.scrollIntoView({ block: 'nearest' });
if (sound) sfx('cursor');
@@ -165,13 +258,20 @@ function move(dx, dy) {
}
if (best) setFocus(best, true);
}
document.addEventListener('mouseover', e => { const el = e.target.closest('[data-f]'); if (el && focusables().includes(el)) setFocus(el, true); });
document.addEventListener('mouseover', e => {
const el = e.target.closest('[data-f]'); if (!el || !focusables().includes(el)) return;
const a = document.activeElement; // (while a colour field is typed in, the pointer passing over the others does not take it away; a click does)
if (a && a.tagName === 'INPUT' && a !== el && a.closest('#cpick')) return;
setFocus(el, true);
});
document.addEventListener('focusin', e => { if (e.target.tagName === 'INPUT' && e.target.closest('#cpick') && e.target !== focused) setFocus(e.target); });
document.addEventListener('mousemove', () => document.body.classList.remove('kb'));
/* ---------------- actions ---------------- */
function activate(el) {
if (!el) return;
if (el.tagName === 'INPUT') { el.focus(); return; }
if (el.id === 'cpSv') return holdSv();
if (el.dataset.go) { if (el.dataset.go !== screen) { sfx('decide'); go(el.dataset.go); } return; }
const act = el.dataset.act; if (!act) return;
const i = act.indexOf(':'), verb = i < 0 ? act : act.slice(0, i), arg = i < 0 ? '' : act.slice(i + 1);
@@ -192,6 +292,8 @@ function back() {
if ($('#drawer').classList.contains('open')) return ACTIONS.details();
if ($('#sheetBg').classList.contains('open')) return closeSheet();
if ($('#vol').classList.contains('open')) return closeVol();
if (focused && focused.id === 'cpSv' && focused.classList.contains('held')) return holdSv();
if (CS.open && screen === 'settings') return closeColor('close');
const b = $('#s-' + screen).dataset.back; if (!b) return;
sfx('cancel');
if (ACTIONS[b]) return ACTIONS[b]();
@@ -401,7 +503,7 @@ $('#modQ').addEventListener('keydown', e => { if (e.key === 'Enter' || e.key ===
/* ---------------- settings: a list the launcher sends, and the game's own Options menu in tabs ---------------- */
S.settab = 'launcher';
function launcherRows() {
return (S.settings || []).map(r => r.h ? `<h4>${esc(r.h)}</h4>` : r.kind === 'slider' ?
return withColorRow(S.settings || []).map(r => r.h ? `<h4>${esc(r.h)}</h4>` : r.kind === 'color' ? colorRow(r) : r.kind === 'slider' ?
`<div class="row-set" style="cursor:default"><b>${esc(r.label)}</b><div class="rng"><div class="slider" data-f data-vol="${esc(r.id)}" id="row-${esc(r.id)}"><i></i><u></u></div><span data-volv="${esc(r.id)}"></span></div><em></em></div>` :
`<div class="row-set${r.danger ? ' danger' : ''}${r.off ? ' off' : ''}" data-f data-act="row:${esc(r.id)}" id="row-${esc(r.id)}"><b>${esc(r.label)}</b><span>${esc(r.value || '')}</span><em>${esc(r.actLabel || 'Change')}</em></div>`).join('');
}
@@ -418,7 +520,9 @@ function drawSettings() {
if (!tabs.some(t => t.id === S.settab)) S.settab = 'launcher';
const keep = focused && focused.id;
$('#setTabs').innerHTML = tabs.map(t => `<span data-f data-act="settab:${t.id}" id="st-${t.id}" class="${t.id === S.settab ? 'on' : ''}">${esc(t.name)}</span>`).join('');
const cp = $('#cpick'); // (the open picker is kept as it is, with what is being typed in it, through a redraw)
$('#set').innerHTML = S.settab === 'launcher' ? launcherRows() : gameRows(S.settab);
if (cp && $('#cpick')) { cp.classList.toggle('open', CS.open); $$('.kf', cp).forEach(e => e.classList.remove('kf')); $('#cpick').replaceWith(cp); }
$('#s-settings').dataset.first = 'st-' + S.settab;
setVol('music', S.sound.music, true); setVol('sfx', S.sound.sfx, true);
$('#benchCard').style.display = S.bench && S.bench.available && (S.settab === 'launcher' || S.settab === 'graphics') ? '' : 'none';
@@ -426,7 +530,7 @@ function drawSettings() {
$('#benchLast').textContent = S.bench && S.bench.last || '';
if (keep && $('#' + keep) && screen === 'settings') { focused = null; setFocus($('#' + keep)); }
}
ACTIONS.settab = (t) => { S.settab = t; drawSettings(); $('#set').scrollTop = 0; setFocus($('#st-' + t)); };
ACTIONS.settab = (t) => { CS.open = false; S.settab = t; drawSettings(); $('#set').scrollTop = 0; setFocus($('#st-' + t)); };
ACTIONS.gopt = (key) => cmd('gopt.choose', { key });
/* the game's sliders: drag, or left / right while focused; the value goes to the launcher when let go */
function gStep(el, v) {
@@ -452,6 +556,185 @@ function settingRow(id) { cmd('setting', { id }); }
// (the list is asked for each time the page opens, so it shows what is true now: Steam, shortcuts, the game folder)
new MutationObserver(() => { if ($('#s-settings').classList.contains('on')) cmd('settings.list'); }).observe($('#s-settings'), { attributes: true, attributeFilter: ['class'] });
/* ---------------- settings: Color scheme (any colour in place of the gold) ---------------- */
/* One colour stands in for Triforce gold. Every gold the look is made of (theme.css, --gold-*-rgb) sits from it as it sits
from gold today: its hue turned by as much, its saturation scaled by as much, its lightness kept in proportion on the way
to white or to black. So Triforce gold gives back today's values, and is drawn with theme.css's own (nothing set here).
Text on gold takes dark ink or light, whichever reads better on the colour. The row is the page's own, under Sounds; the
choice is kept in this window's storage and sent to the launcher ({t:'cmd', c:'color', hex}); a launcher that keeps it
sends it back as state.color, and that wins. */
const GOLD = '#e0b23e';
const GOLD_SHADES = { 'gold': [224, 178, 62], 'gold-hi': [247, 220, 140], 'gold-lit': [255, 244, 204], 'gold-low': [168, 118, 28], 'gold-deep': [154, 106, 24],
'gold-edge': [61, 42, 8], 'gold-glow': [247, 200, 110], 'gold-warm': [255, 196, 92],
'gold-w1': [255, 241, 184], 'gold-w2': [232, 184, 64], 'gold-w3': [181, 126, 28], 'gold-w4': [243, 207, 106] };
const GOLD_INK = { dark: { ink: [61, 42, 8], ink2: [36, 23, 0], emboss: [255, 244, 204] }, light: { ink: [255, 244, 204], ink2: [255, 244, 204], emboss: [36, 23, 0] } };
const PRESETS = [[GOLD, 'Triforce gold'], ['#c9ccd4', 'Silver'], ['#d98c5f', 'Copper'], ['#e2687a', 'Goron ruby'], ['#c77dda', 'Fairy violet'],
['#5e9cf0', 'Zora sapphire'], ['#4fc3b4', 'Lake Hylia'], ['#79c463', 'Kokiri emerald']];
const CS = { hex: GOLD, h: 0, s: 0, v: 0, open: false };
const clamp01 = x => Math.max(0, Math.min(1, x));
const hexRgb = h => [1, 3, 5].map(i => parseInt(h.slice(i, i + 2), 16));
const rgbHex = c => '#' + c.map(x => Math.round(x).toString(16).padStart(2, '0')).join('');
function rgbHsl([r, g, b]) {
r /= 255; g /= 255; b /= 255;
const mx = Math.max(r, g, b), mn = Math.min(r, g, b), d = mx - mn, l = (mx + mn) / 2;
if (!d) return [0, 0, l];
const h = mx === r ? ((g - b) / d + 6) % 6 : mx === g ? (b - r) / d + 2 : (r - g) / d + 4;
return [h * 60, d / (1 - Math.abs(2 * l - 1)), l];
}
function hslRgb([h, s, l]) {
const k = n => (n + h / 30) % 12, a = s * Math.min(l, 1 - l);
return [0, 8, 4].map(n => Math.round(255 * (l - a * Math.max(-1, Math.min(k(n) - 3, 9 - k(n), 1)))));
}
function hsvRgb(h, s, v) { const f = n => { const k = (n + h / 60) % 6; return Math.round(255 * (v - v * s * Math.max(0, Math.min(k, 4 - k, 1)))); }; return [f(5), f(3), f(1)]; }
function rgbHsv([r, g, b]) { const mx = Math.max(r, g, b), d = mx - Math.min(r, g, b); return [d ? rgbHsl([r, g, b])[0] : CS.h, mx ? d / mx : 0, mx / 255]; }
const GOLD_HSL = rgbHsl(GOLD_SHADES.gold);
[CS.h, CS.s, CS.v] = rgbHsv(GOLD_SHADES.gold);
/* a shade of today's gold, moved to the chosen colour (as h, s, l) */
function moveShade(c, [th, ts, tl]) {
const [h, s, l] = rgbHsl(c), [gh, gs, gl] = GOLD_HSL;
return hslRgb([(h - gh + th + 360) % 360, Math.min(1, s * ts / gs), l >= gl ? tl + (1 - tl) * (l - gl) / (1 - gl) : tl * l / gl]);
}
function lum(c) { const [r, g, b] = c.map(x => { x /= 255; return x <= .04045 ? x / 12.92 : ((x + .055) / 1.055) ** 2.4; }); return .2126 * r + .7152 * g + .0722 * b; }
function contrast(a, b) { const x = lum(a), y = lum(b); return (Math.max(x, y) + .05) / (Math.min(x, y) + .05); }
/* Two sets are made from the colour. The polished bars (Play, "Find my best settings", Apply...: --gold-bar-*) take it as
it is, but no lighter than BAR_TOP, so their highlight, sheen and foot keep gold's steps on a near-white colour. Text,
links, lines, rings and diamonds on the dark ground (--gold-*) take it as it is, but no darker than reads on that ground
(TEXT_MIN to 1 on --ink), so a near-black colour cannot hide them, nor the way back to gold. Gold is far from both. */
const BAR_SHADES = ['gold', 'gold-hi', 'gold-lit', 'gold-low', 'gold-deep', 'gold-edge'], BAR_TOP = .78, INK_BG = [10, 9, 8], TEXT_MIN = 4.5;
function textSafe([h, s, l]) {
while (l < 1 && contrast(moveShade(GOLD_SHADES.gold, [h, s, l]), INK_BG) < TEXT_MIN) l = Math.min(1, l + .005);
return [h, s, l];
}
function paintColor(hex) {
const root = document.documentElement, st = root.style;
const vars = Object.keys(GOLD_SHADES).concat('gold-ink', 'gold-ink2', 'gold-emboss', BAR_SHADES.map(n => n.replace('gold', 'gold-bar')));
root.classList.toggle('tint', hex !== GOLD);
if (hex === GOLD) { vars.forEach(n => st.removeProperty(`--${n}-rgb`)); ['h', 's', 'b'].forEach(n => st.removeProperty('--tint-' + n)); return; }
const c = hexRgb(hex), to = rgbHsl(c), tt = textSafe(to), tb = [to[0], to[1], Math.min(to[2], BAR_TOP)];
for (const n in GOLD_SHADES) st.setProperty(`--${n}-rgb`, moveShade(GOLD_SHADES[n], tt).join(', '));
for (const n of BAR_SHADES) st.setProperty(`--${n.replace('gold', 'gold-bar')}-rgb`, moveShade(GOLD_SHADES[n], tb).join(', '));
const bar = moveShade(GOLD_SHADES.gold, tb), dark = moveShade(GOLD_INK.dark.ink, tb), light = moveShade(GOLD_INK.light.ink, tb);
const ink = GOLD_INK[contrast(dark, bar) >= contrast(light, bar) ? 'dark' : 'light'];
for (const n in ink) st.setProperty(`--gold-${n}-rgb`, moveShade(ink[n], tb).join(', '));
st.setProperty('--tint-h', Math.round(((to[0] - GOLD_HSL[0]) % 360 + 540) % 360 - 180) + 'deg');
st.setProperty('--tint-s', (to[1] / GOLD_HSL[1]).toFixed(3));
st.setProperty('--tint-b', Math.max(.35, Math.min(1.6, to[2] / GOLD_HSL[2])).toFixed(3));
}
/* from: where the colour came from (load, host, sv, hue, hex, rgb, preset, reset); the field being typed in is left alone */
let colorSave = 0;
function setColor(hex, from) {
hex = hex.toLowerCase(); if (hex[0] !== '#') hex = '#' + hex;
if (!/^#[0-9a-f]{6}$/.test(hex)) return;
// (a choice not sent yet wins over the launcher's kept one, which is older)
if (from === 'host' && colorSave) return;
if (from !== 'sv' && from !== 'hue') [CS.h, CS.s, CS.v] = rgbHsv(hexRgb(hex));
const was = CS.hex; CS.hex = hex;
if (hex !== was || from === 'load') paintColor(hex);
drawColor(from);
if (from === 'host') { try { localStorage.setItem('triforce.color', hex); } catch { } }
else if (from !== 'load' && hex !== was) { clearTimeout(colorSave); colorSave = setTimeout(() => { colorSave = 0; try { localStorage.setItem('triforce.color', CS.hex); } catch { } cmd('color', { hex: CS.hex }); }, 400); }
}
function fromHsv(from) { setColor(rgbHex(hsvRgb(CS.h, CS.s, CS.v)), from); }
/* the row goes under Sounds (or last in the Launcher group), unless the launcher sends one with id 'color' itself */
function withColorRow(list) {
if (!list.length || list.some(r => r.id === 'color')) return list.map(r => r.id === 'color' ? Object.assign({}, r, { kind: 'color' }) : r);
let at = list.findIndex(r => r.id === 'sfx');
if (at < 0) { at = list.findIndex(r => r.h === 'Launcher'); while (at >= 0 && list[at + 1] && !list[at + 1].h) at++; }
return at < 0 ? list : list.slice(0, at + 1).concat({ id: 'color', label: 'Color scheme', kind: 'color' }, list.slice(at + 1));
}
function colorValue() { return `<i class="sw" style="background:${CS.hex}"></i>${CS.hex.toUpperCase()}`; }
function colorRow(r) {
const o = CS.open ? ' open' : '', [cr, cg, cb] = hexRgb(CS.hex), field = (id, l, v, n) => `<label>${l}<input data-f id="${id}" value="${v}" maxlength="${n}" spellcheck="false" autocomplete="off"></label>`;
return `<div class="row-set cs${o}" data-f data-act="color" id="row-color"><b>${esc(r.label || 'Color scheme')}</b><span>${colorValue()}</span><em>${CS.open ? 'Done' : 'Change'}</em></div>` +
`<div class="cpick${o}" id="cpick"><div class="cp"><div><div class="cp-sv" data-f id="cpSv"><u></u></div><div class="slider cp-hue" data-f id="cpHue"><u></u></div></div>` +
`<div><div class="cp-f">${field('cpHex', 'Hex', CS.hex.toUpperCase(), 7)}${field('cpR', 'R', cr, 3)}${field('cpG', 'G', cg, 3)}${field('cpB', 'B', cb, 3)}</div><p class="cp-msg" id="cpMsg"></p>` +
`<div class="cp-pre">${PRESETS.map(([c, n], i) => `<span data-f data-act="cpre:${c}" id="cpp${i}" title="${n}" style="--c:${c}"></span>`).join('')}</div>` +
`<div class="cp-foot"><em id="cpName"></em><span class="lnk" data-f data-act="creset" id="cpReset">Reset to gold</span></div></div></div></div>`;
}
function drawColor(from) {
const row = $('#row-color'); if (!row) return;
row.querySelector('span').innerHTML = colorValue();
const sv = $('#cpSv'), hu = $('#cpHue'), [r, g, b] = hexRgb(CS.hex);
sv.style.setProperty('--cp-h', CS.h); sv.style.setProperty('--cp-c', CS.hex);
sv.querySelector('u').style.left = CS.s * 100 + '%'; sv.querySelector('u').style.top = (1 - CS.v) * 100 + '%';
hu.style.setProperty('--cp-c', `hsl(${CS.h}, 100%, 50%)`); hu.querySelector('u').style.left = CS.h / 360 * 100 + '%';
if (from !== 'hex') { $('#cpHex').value = CS.hex.toUpperCase(); $('#cpHex').classList.remove('bad'); }
if (from !== 'rgb') [['#cpR', r], ['#cpG', g], ['#cpB', b]].forEach(([s, v]) => { $(s).value = v; $(s).classList.remove('bad'); });
const p = PRESETS.find(x => x[0] === CS.hex);
$$('.cp-pre span').forEach(s => s.classList.toggle('on', s.dataset.act === 'cpre:' + CS.hex));
$('#cpName').textContent = p ? p[1] : '';
colorMsg();
}
function colorMsg() {
if (!$('#cpMsg')) return;
const hexBad = $('#cpHex').classList.contains('bad'), rgbBad = $$('#cpR, #cpG, #cpB').some(i => i.classList.contains('bad'));
const sv = $('#cpSv'), on = focused === sv, held = sv.classList.contains('held');
$('#cpMsg').textContent = hexBad ? 'Hex: six digits, 0-9 and A-F, as E0B23E' : rgbBad ? 'R, G and B: whole numbers from 0 to 255'
: held ? 'Left / Right: saturation · Up / Down: brightness · A or Enter to let go'
: on ? 'Drag in the square, or A / Enter to set it with the arrows' : 'Pick in the square, or type the color';
$('#cpMsg').classList.toggle('bad', hexBad || rgbBad);
}
function openColor() {
CS.open = true; $('#row-color').classList.add('open'); $('#cpick').classList.add('open'); $('#row-color em').textContent = 'Done'; drawColor();
setTimeout(() => { const s = $('#set'), p = $('#cpick'); if (!p || !CS.open) return; const over = p.offsetTop + p.offsetHeight - s.scrollTop - s.clientHeight; if (over > 0) s.scrollTop += over; }, 260);
}
function closeColor(sound) {
if (!CS.open) return;
CS.open = false;
const row = $('#row-color'), p = $('#cpick'); if (!row || !p) return;
const inside = focused && p.contains(focused);
row.classList.remove('open'); p.classList.remove('open'); $('#cpSv').classList.remove('held'); row.querySelector('em').textContent = 'Change';
drawColor(); // (a half-typed field goes back to the colour)
if (sound) sfx(sound);
if (inside && screen === 'settings') { focused = null; setFocus(row); }
}
function holdSv() { const h = $('#cpSv').classList.toggle('held'); sfx(h ? 'decide' : 'cancel'); colorMsg(); }
/* arrows on the square (while it is held with Enter / A: left / right saturation, up / down brightness; not held, they move
on, as anywhere) and on the hue (left / right, as a slider); down from the open row goes into the picker and up from its
top line back to the row (the nearest-by-distance move would skip past it) */
function colorNudge(dx, dy) {
if (!focused) return false;
if (focused.id === 'cpHue' && dx) { CS.h = Math.max(0, Math.min(359, CS.h + dx * 5)); fromHsv('hue'); }
else if (focused.id === 'cpSv' && focused.classList.contains('held')) { CS.s = clamp01(CS.s + dx * .04); CS.v = clamp01(CS.v + dy * .04); fromHsv('sv'); }
else if (CS.open && dy < 0 && focused.id === 'row-color') { setFocus($('#cpSv'), true); return true; }
else if (dy > 0 && /^cp(Sv|Hex|[RGB])$/.test(focused.id)) { setFocus($('#row-color'), true); return true; }
else return false;
sfx('cursor'); return true;
}
ACTIONS.color = () => CS.open ? closeColor() : openColor();
ACTIONS.cpre = (hex) => setColor(hex, 'preset');
ACTIONS.creset = () => setColor(GOLD, 'reset');
document.addEventListener('pointerdown', e => {
const el = e.target.closest('#cpSv, #cpHue'); if (!el) return;
e.preventDefault(); setFocus(el, true);
const id = el.id;
const mv = ev => {
const b = $('#' + id).getBoundingClientRect(), x = clamp01((ev.clientX - b.left) / b.width), y = clamp01((ev.clientY - b.top) / b.height);
if (id === 'cpHue') CS.h = Math.round(x * 359); else { CS.s = x; CS.v = 1 - y; }
fromHsv(id === 'cpHue' ? 'hue' : 'sv');
};
mv(e);
const up = () => { removeEventListener('pointermove', mv); removeEventListener('pointerup', up); sfx('cursor'); };
addEventListener('pointermove', mv); addEventListener('pointerup', up);
});
/* typed: a whole valid value is used at once; a wrong one is marked, and put back when the field is left */
document.addEventListener('input', e => {
const t = e.target;
if (t.id === 'cpHex') {
const v = t.value.trim().replace(/^#/, '');
t.classList.toggle('bad', /[^0-9a-f]/i.test(v) || v.length > 6);
if (/^[0-9a-f]{6}$/i.test(v)) setColor('#' + v, 'hex');
colorMsg();
} else if (/^cp[RGB]$/.test(t.id)) {
const f = $$('#cpR, #cpG, #cpB'), ok = i => /^\d{1,3}$/.test(i.value.trim()) && +i.value <= 255;
t.classList.toggle('bad', t.value.trim() !== '' && !ok(t));
if (f.every(ok)) setColor(rgbHex(f.map(i => +i.value)), 'rgb');
colorMsg();
}
});
document.addEventListener('focusout', e => { if (/^cp(Hex|[RGB])$/.test(e.target.id)) drawColor(); });
try { const c = localStorage.getItem('triforce.color'); if (c && /^#[0-9a-f]{6}$/.test(c)) setColor(c, 'load'); } catch { }
/* ---------------- benchmark ---------------- */
/* a scene's frame times (ms) as a small line: higher = slower, the 16.7 ms line (60 fps) dashed */
function sparkline(pts, cls) {
@@ -491,6 +774,7 @@ onHost(m => {
const had = { music: S.media.music, sfx: S.media.sfx };
for (const k in m) if (k !== 't') S[k] = m[k];
if (m.sound) { setVol('music', S.sound.music, true); setVol('sfx', S.sound.sfx, true); }
if (typeof m.color === 'string') setColor(m.color, 'host');
if (m.media) {
document.documentElement.classList.toggle('noart', !S.media.art);
if (S.media.art) $$('.gamelogo').forEach(i => { if (!i.complete || !i.naturalWidth) i.src = 'img/game/Logo_USEU_00.png?' + (S.media.v || ''); });
@@ -519,7 +803,9 @@ document.addEventListener('keydown', e => {
if (e.key === 'F2' && !HOST) { e.preventDefault(); return toggleJump(); }
if (document.activeElement && document.activeElement.tagName === 'INPUT' && !['Escape', 'Enter', 'ArrowDown', 'ArrowUp', 'Tab'].includes(e.key)) return;
const k = e.key; let used = true;
if (focused && focused.dataset.vol && (k === 'ArrowLeft' || k === 'ArrowRight')) { setVol(focused.dataset.vol, S.sound[focused.dataset.vol] + (k === 'ArrowLeft' ? -.05 : .05)); sfx('cursor'); }
const ca = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, 1], ArrowDown: [0, -1] }[k];
if (ca && colorNudge(ca[0], ca[1])) { } // (the colour picker's square and hue take the arrows first)
else if (focused && focused.dataset.vol && (k === 'ArrowLeft' || k === 'ArrowRight')) { setVol(focused.dataset.vol, S.sound[focused.dataset.vol] + (k === 'ArrowLeft' ? -.05 : .05)); sfx('cursor'); }
else if (focused && focused.dataset.gkey && (k === 'ArrowLeft' || k === 'ArrowRight')) gNudge(k === 'ArrowLeft' ? -1 : 1);
else if (k === 'ArrowLeft') move(-1, 0); else if (k === 'ArrowRight') move(1, 0);
else if (k === 'ArrowUp') move(0, -1); else if (k === 'ArrowDown') move(0, 1);
@@ -539,18 +825,21 @@ function pad(t) {
const gp = [...(navigator.getGamepads ? navigator.getGamepads() : [])].find(g => g && g.connected); if (!gp) return;
const B = i => gp.buttons[i] && gp.buttons[i].pressed;
const edge = (i, fn) => { const p = B(i); if (p && !held[i]) { document.body.classList.add('kb'); unlocked = true; fn(); } held[i] = p; };
const slide = d => { if (focused && focused.dataset.vol) { setVol(focused.dataset.vol, S.sound[focused.dataset.vol] + d * .05); sfx('cursor'); return true; } return gNudge(d); };
const slide = d => { if (colorNudge(d, 0)) return true; if (focused && focused.dataset.vol) { setVol(focused.dataset.vol, S.sound[focused.dataset.vol] + d * .05); sfx('cursor'); return true; } return gNudge(d); };
edge(0, () => activate(focused)); edge(1, back); edge(4, () => tab(-1)); edge(5, () => tab(1));
edge(3, toggleMute); edge(9, () => { if (MAIN.includes(screen)) go('settings'); });
edge(12, () => move(0, -1)); edge(13, () => move(0, 1)); edge(14, () => slide(-1) || move(-1, 0)); edge(15, () => slide(1) || move(1, 0));
edge(12, () => colorNudge(0, 1) || move(0, -1)); edge(13, () => colorNudge(0, -1) || move(0, 1)); edge(14, () => slide(-1) || move(-1, 0)); edge(15, () => slide(1) || move(1, 0));
const x = gp.axes[0] || 0, y = gp.axes[1] || 0, dir = Math.abs(x) > .55 ? (x > 0 ? 'r' : 'l') : Math.abs(y) > .55 ? (y > 0 ? 'd' : 'u') : '';
if (dir && (dir !== stickDir || t - stickAt > 220)) {
document.body.classList.add('kb'); stickAt = t + (dir !== stickDir ? 160 : 0);
({ l: () => slide(-1) || move(-1, 0), r: () => slide(1) || move(1, 0), u: () => move(0, -1), d: () => move(0, 1) })[dir]();
({ l: () => slide(-1) || move(-1, 0), r: () => slide(1) || move(1, 0), u: () => colorNudge(0, 1) || move(0, -1), d: () => colorNudge(0, -1) || move(0, 1) })[dir]();
}
stickDir = dir;
}
function frame(t) { audioTick(t); pad(t); requestAnimationFrame(frame); }
// ((Triforce, 11-19) #bug-tracker "launcher has no music" (menu sounds fine, an Xbox controller): the next frame is asked for
// first, so an error in one frame's work no longer ends the loop. It did: pad threw once at the start (focusables, above), the
// loop stopped, and audioTick, which fades the music in from 0, never ran again)
function frame(t) { requestAnimationFrame(frame); audioTick(t); pad(t); }
requestAnimationFrame(frame);
/* ---------------- preview only: jump to a screen (the stand-in plays along) ---------------- */

View File

@@ -84,7 +84,7 @@
{ id: 'c', name: 'Sample: Brighter nights', sub: 'Lighting · sample data', state: 'get' }, { id: 'd', name: 'Sample: Faster text', sub: 'Gameplay · sample data', state: 'get' },
{ id: 'e', name: 'Sample: Ocarina notes on screen', sub: 'Interface · sample data', state: 'get' },
];
const MINE = [{ id: 'm1', name: 'Sample: Quieter Navi', sub: 'In your mods folder', state: 'on', removable: true }, { id: 'm2', name: 'Sample: Tunic recolour', sub: 'In your mods folder', state: 'off', removable: true }];
const MINE = [{ id: 'm1', name: 'Sample: Quieter Navi', sub: 'In your mods folder', state: 'on', removable: true }, { id: 'm2', name: 'Sample: Tunic recolor', sub: 'In your mods folder', state: 'off', removable: true }];
function mods(tab, q) {
const items = (tab === 'mine' ? MINE : MODS).filter(m => !q || m.name.toLowerCase().includes(q.toLowerCase()));
emit({ t: 'state', mods: { tab, items, loaded: true, note: tab === 'mine' ? 'Changes take effect after the game is built again: <b>about 6 minutes</b>.' : '' } });

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -10,14 +10,14 @@ html, body { width: 100%; height: 100%; overflow: hidden; background: #000; marg
.play { transition: filter .15s ease, transform .15s ease; }
.play:hover { filter: brightness(1.08) saturate(1.05); }
.play:active { transform: translateY(1px); filter: brightness(.95); }
.qbtn { transition: background .15s, border-color .15s; } .qbtn:hover { background: rgba(243, 234, 213, .12); border-color: rgba(224, 178, 62, .65); }
.qbtn { transition: background .15s, border-color .15s; } .qbtn:hover { background: rgba(243, 234, 213, .12); border-color: rgba(var(--gold-rgb), .65); }
.ch:hover, .qlink:hover, .links b:hover, .lnk:hover { color: var(--gold-hi); }
.nav a:hover { color: var(--text); }
.f { transition: transform .15s, outline-color .15s; } .f:hover { outline-color: var(--gold); }
.sc .p { transition: filter .15s; } .sc:hover .p { filter: brightness(1.08); }
.wc span:hover { color: var(--text); } .wc span:last-child:hover { background: #a3272f; color: #fff; }
/* the pad / keyboard focus: a gold ring, only when the last input was not the mouse */
body.kb .kf { outline: 2px solid var(--gold-hi) !important; outline-offset: 5px; box-shadow: 0 0 0 7px rgba(247, 220, 140, .14); }
body.kb .kf { outline: 2px solid var(--gold-hi) !important; outline-offset: 5px; box-shadow: 0 0 0 7px rgba(var(--gold-hi-rgb), .14); }
body.kb .play.kf { outline-offset: 6px; }
/* the logo rise of the reveal */
@@ -31,7 +31,7 @@ body.kb .play.kf { outline-offset: 6px; }
/* drop area while a file is over it, and while it is checked */
.portal::before, .portal::after, .portal .c { pointer-events: none; } .portal > div { position: relative; z-index: 1; }
.portal.hot::before { border-color: var(--gold-hi); box-shadow: 0 0 40px rgba(247, 220, 140, .25) inset; }
.portal.hot::before { border-color: var(--gold-hi); box-shadow: 0 0 40px rgba(var(--gold-hi-rgb), .25) inset; }
.portal.checking h2::after { content: '…'; }
.portal.bad::before { border-color: #ff6b76; } .portal.bad p { color: #ff6b76; }
@@ -50,7 +50,7 @@ body.kb .play.kf { outline-offset: 6px; }
/* toasts and sheets */
.toast { position: absolute; left: 50%; top: 70px; z-index: 40; transform: translateX(-50%); padding: 13px 22px; font-size: 14.5px; color: var(--text);
background: rgba(16, 14, 10, .96); border: 1px solid rgba(224, 178, 62, .5); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); animation: fadeup .2s ease both; }
background: rgba(16, 14, 10, .96); border: 1px solid rgba(var(--gold-rgb), .5); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); animation: fadeup .2s ease both; }
.toast b { color: var(--emerald); }
.sheet-bg { position: absolute; inset: 0; z-index: 30; background: rgba(5, 4, 3, .66); display: none; }
.sheet-bg.open { display: block; animation: glowin .2s ease both; }
@@ -59,7 +59,7 @@ body.kb .play.kf { outline-offset: 6px; }
.sheet p { margin-top: 8px; font-size: 14.5px; color: var(--text2); }
.opt { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; padding: 14px 16px; border: 1px solid var(--line); cursor: pointer; }
.opt:first-of-type { margin-top: 18px; } .opt b { font-weight: 600; } .opt span { font-size: 13px; color: var(--text3); }
.opt.sel { border-color: var(--gold-hi); background: rgba(224, 178, 62, .08); }
.opt.sel { border-color: var(--gold-hi); background: rgba(var(--gold-rgb), .08); }
.sheet .acts { margin-top: 22px; display: flex; justify-content: flex-end; align-items: center; gap: 22px; }
/* settings */
@@ -81,7 +81,7 @@ body.kb .play.kf { outline-offset: 6px; }
.brun .hud h1 { font-size: 58px; } .brun .fps { font-size: 64px; font-weight: 750; font-variant-numeric: tabular-nums; }
.brun .fps small { font-size: 20px; color: var(--text2); font-weight: 600; margin-left: 8px; }
.brun .prog { position: absolute; left: 64px; right: 64px; bottom: 34px; height: 4px; background: rgba(255,255,255,.12); }
.brun .prog i { display: block; height: 100%; background: linear-gradient(90deg, #9a6a18, #e0b23e); width: 0; transition: width .2s linear; }
.brun .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); width: 0; transition: width .2s linear; }
.brun .stop { position: absolute; right: 64px; top: 84px; font-size: 14px; color: var(--text2); }
/* mods */
@@ -90,7 +90,7 @@ body.kb .play.kf { outline-offset: 6px; }
.mod b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 21px; font-weight: 700; } .mod span { display: block; font-size: 13px; color: var(--text3); margin-top: 2px; }
.mod em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--gold); } .mod em.inst { color: var(--emerald); }
.search { position: absolute; left: 64px; top: 150px; width: 420px; height: 38px; display: flex; align-items: center; padding: 0 14px; font-size: 14px; color: var(--text3);
border: 1px solid rgba(224, 178, 62, .35); background: rgba(10, 9, 8, .6); }
border: 1px solid rgba(var(--gold-rgb), .35); background: rgba(10, 9, 8, .6); }
.cats { position: absolute; left: 510px; top: 158px; display: flex; gap: 22px; font-size: 14px; color: var(--text3); }
.cats span.on { color: var(--gold-hi); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); padding-bottom: 4px; }

View File

@@ -2,11 +2,29 @@
the mark, serif titles, the three stones for state (style_tokens.md v3 values). Kept out: the halo, motes, letter-spaced
capitals and the painted crest as decoration. */
:root {
--ink: #0a0908; --panel: rgba(18, 16, 12, .8); --line: rgba(224, 178, 62, .2); --line-soft: #2c2518;
--ink: #0a0908; --panel: rgba(18, 16, 12, .8); --line: rgba(var(--gold-rgb), .2); --line-soft: #2c2518;
--text: #f3ead5; --text2: #cdc2a8; --text3: #948a70;
--gold: #e0b23e; --gold-hi: #f7dc8c; --gold-ink: #3d2a08;
--gold: rgb(var(--gold-rgb)); --gold-hi: rgb(var(--gold-hi-rgb)); --gold-ink: rgb(var(--gold-ink-rgb));
--emerald: #6be07f; --emerald-ink: #0a5a14; --sapphire: #8fc0ff; --ruby: #ff6b76; --amber: #f7dc8c;
}
/* the gold, as r, g, b: Settings > Launcher > Color scheme moves every one of them from the one chosen colour (app.js, gold
shades), and these are what Triforce gold gives back, so the default is the look as it was. lit / low / deep: the polished
bar's top, foot and the bars' dark end; edge: the hairlines cut into it; ink, ink2 and emboss: the text on gold and the light
under it (dark or light by the colour's luminance); glow and warm: the light under Play and over the title scene; w1-w4: the
wordmark. tint-*: how far the crest and the game's ornaments are turned to match (0deg, 1, 1 = as drawn). */
:root {
--gold-rgb: 224, 178, 62; --gold-hi-rgb: 247, 220, 140; --gold-lit-rgb: 255, 244, 204; --gold-low-rgb: 168, 118, 28; --gold-deep-rgb: 154, 106, 24;
--gold-edge-rgb: 61, 42, 8; --gold-ink-rgb: 61, 42, 8; --gold-ink2-rgb: 36, 23, 0; --gold-emboss-rgb: 255, 244, 204;
--gold-glow-rgb: 247, 200, 110; --gold-warm-rgb: 255, 196, 92;
--gold-w1-rgb: 255, 241, 184; --gold-w2-rgb: 232, 184, 64; --gold-w3-rgb: 181, 126, 28; --gold-w4-rgb: 243, 207, 106;
--gold-lit: rgb(var(--gold-lit-rgb)); --gold-low: rgb(var(--gold-low-rgb)); --gold-deep: rgb(var(--gold-deep-rgb)); --gold-ink2: rgb(var(--gold-ink2-rgb));
--tint-h: 0deg; --tint-s: 1; --tint-b: 1;
}
/* the polished bars' own shades: the gold's, until a colour is chosen (app.js keeps them from going too light to shine) */
:root {
--gold-bar-rgb: var(--gold-rgb); --gold-bar-hi-rgb: var(--gold-hi-rgb); --gold-bar-lit-rgb: var(--gold-lit-rgb); --gold-bar-low-rgb: var(--gold-low-rgb);
--gold-bar-deep-rgb: var(--gold-deep-rgb); --gold-bar-edge-rgb: var(--gold-edge-rgb);
}
.flair, h1, h2, .side h3, .slot p b, .found b { font-family: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif; font-variation-settings: normal; }
h1 { font-weight: 700; font-size: 70px; letter-spacing: -.01em; line-height: .98; }
h2 { font-weight: 700; font-size: 46px; letter-spacing: -.005em; }
@@ -21,28 +39,28 @@ h2 { font-weight: 700; font-size: 46px; letter-spacing: -.005em; }
/* the mark: the crest itself, and the wordmark in engraved gold */
.brand { gap: 12px; font-family: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif; font-size: 25px; font-weight: 700; letter-spacing: .01em; }
.brand span { background: linear-gradient(180deg, #fff1b8 0%, #e8b840 42%, #b57e1c 56%, #f3cf6a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand span { background: linear-gradient(180deg, rgb(var(--gold-w1-rgb)) 0%, rgb(var(--gold-w2-rgb)) 42%, rgb(var(--gold-w3-rgb)) 56%, rgb(var(--gold-w4-rgb)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { width: 30px; height: 28px; background: url(img/crest.png) center / contain no-repeat; }
.mark i { display: none; }
.nav a { border-radius: 0; padding: 9px 4px; margin: 0 12px; color: var(--text3); }
.nav a.on { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
.state { background: rgba(10, 9, 8, .6); border-color: var(--line); color: var(--text2); }
.dot { background: var(--emerald); } .dot.amber { background: var(--gold-hi); } .dot.blue { background: var(--sapphire); }
.dot { background: var(--emerald); } .dot.amber { background: var(--amber); } .dot.blue { background: var(--sapphire); }
/* the eyebrow: gold, in sentence case, after a gold hairline */
.over { color: var(--gold); font-weight: 600; } .over b { background: var(--gold); opacity: .8; height: 1px; width: 28px; }
/* the one gold action, as the polished bar of the old Setup; everything else is quiet */
.btn { background: rgba(243, 234, 213, .07); border-color: var(--line); color: var(--text); }
.btn.go { color: var(--gold-ink); background: linear-gradient(180deg, #fff4cc 0%, #f7dc8c 12%, #e0b23e 48%, #9a6a18 100%);
box-shadow: 0 12px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(61, 42, 8, .35);
text-shadow: 0 1px 0 rgba(255, 244, 204, .45); }
.btn.go { color: var(--gold-ink); background: linear-gradient(180deg, rgb(var(--gold-bar-lit-rgb)) 0%, rgb(var(--gold-bar-hi-rgb)) 12%, rgb(var(--gold-bar-rgb)) 48%, rgb(var(--gold-bar-deep-rgb)) 100%);
box-shadow: 0 12px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(var(--gold-bar-edge-rgb), .35);
text-shadow: 0 1px 0 rgba(var(--gold-emboss-rgb), .45); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--text2); }
.focus { outline-color: var(--gold-hi); }
/* pictures framed with a gold hairline */
.card::after, .slot { border-color: rgba(224, 178, 62, .32); }
.card::after { border: 1px solid rgba(224, 178, 62, .38); }
.card::after, .slot { border-color: rgba(var(--gold-rgb), .32); }
.card::after { border: 1px solid rgba(var(--gold-rgb), .38); }
.thumbs div.on { outline-color: var(--gold); }
.tag { background: rgba(10, 9, 8, .78); color: var(--text); }
@@ -53,9 +71,9 @@ h2 { font-weight: 700; font-size: 46px; letter-spacing: -.005em; }
.steps .done i { background: var(--emerald-ink); border-color: var(--emerald); color: var(--emerald); }
.steps .now { color: var(--text); } .steps .now i { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.box, .slot { background: var(--panel); border-color: var(--line); }
.file { background: rgba(224, 178, 62, .08); border-color: var(--line); color: var(--gold); }
.file { background: rgba(var(--gold-rgb), .08); border-color: var(--line); color: var(--gold); }
.field + .field { border-top-color: var(--line-soft); }
.track { background: #262017; height: 6px; } .track i { background: linear-gradient(90deg, #9a6a18, #e0b23e 70%, #fff4cc); }
.track { background: #262017; height: 6px; } .track i { background: linear-gradient(90deg, var(--gold-deep), var(--gold) 70%, var(--gold-lit)); }
.list div + div { border-top-color: var(--line-soft); }
.d .bul { background: var(--emerald-ink); border-color: var(--emerald); } .d .bul::after { border-color: var(--emerald); }
.n .bul { border-color: var(--gold); } .n .bul::after { background: var(--gold); } .list .n span { color: var(--gold); }

View File

@@ -11,7 +11,7 @@
radial-gradient(120% 90% at 72% 40%, rgba(10, 9, 8, 0) 30%, rgba(10, 9, 8, .55) 100%),
linear-gradient(90deg, rgba(10, 9, 8, .86) 0%, rgba(10, 9, 8, .55) 30%, rgba(10, 9, 8, .05) 60%),
linear-gradient(180deg, rgba(10, 9, 8, .55) 0%, rgba(10, 9, 8, 0) 18%, rgba(10, 9, 8, 0) 52%, rgba(10, 9, 8, .82) 74%, #0a0908 100%),
linear-gradient(180deg, rgba(255, 196, 92, .07), rgba(255, 196, 92, 0) 50%); }
linear-gradient(180deg, rgba(var(--gold-warm-rgb), .07), rgba(var(--gold-warm-rgb), 0) 50%); }
/* the game's own logo with its own aura behind it */
.logo { position: absolute; left: 38px; top: 58px; width: 470px; height: 362px; }
@@ -33,30 +33,30 @@
.orn.r { transform: scaleX(-1); }
.play { position: relative; width: 300px; height: 66px; margin: 0 -6px; display: grid; place-items: center;
clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
background: linear-gradient(180deg, #fff4cc 0%, #f7dc8c 14%, #e0b23e 50%, #a8761c 100%);
font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; font-size: 32px; letter-spacing: .01em; color: #241700; z-index: 1;
text-shadow: 0 1px 0 rgba(255, 244, 204, .5); }
background: linear-gradient(180deg, rgb(var(--gold-bar-lit-rgb)) 0%, rgb(var(--gold-bar-hi-rgb)) 14%, rgb(var(--gold-bar-rgb)) 50%, rgb(var(--gold-bar-low-rgb)) 100%);
font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; font-size: 32px; letter-spacing: .01em; color: var(--gold-ink2); z-index: 1;
text-shadow: 0 1px 0 rgba(var(--gold-emboss-rgb), .5); }
.play::before { content: ''; position: absolute; inset: 4px; clip-path: inherit;
background: linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(255, 255, 255, 0)); box-shadow: inset 0 0 0 1px rgba(61, 42, 8, .45); }
background: linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(255, 255, 255, 0)); box-shadow: inset 0 0 0 1px rgba(var(--gold-bar-edge-rgb), .45); }
.play::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 8%, rgba(255, 255, 255, .22) 16%, rgba(255, 255, 255, 0) 26%); }
.glow { position: absolute; left: 120px; top: 548px; width: 260px; height: 60px; border-radius: 50%; background: rgba(247, 200, 110, .22); filter: blur(30px); }
.glow { position: absolute; left: 120px; top: 548px; width: 260px; height: 60px; border-radius: 50%; background: rgba(var(--gold-glow-rgb), .22); filter: blur(30px); }
.links { position: absolute; left: 112px; top: 612px; display: flex; gap: 26px; font-size: 14px; color: var(--text2); }
.links span b { color: var(--gold); font-weight: 600; }
/* the dock: a gold hairline with the ornament at its centre, the files, and what's new */
.dock { position: absolute; left: 0; right: 0; bottom: 0; height: 156px; }
.rule { position: absolute; left: 64px; right: 64px; top: 0; height: 1px;
background: linear-gradient(90deg, rgba(224, 178, 62, 0), rgba(224, 178, 62, .55) 18%, rgba(224, 178, 62, .55) 82%, rgba(224, 178, 62, 0)); }
background: linear-gradient(90deg, rgba(var(--gold-rgb), 0), rgba(var(--gold-rgb), .55) 18%, rgba(var(--gold-rgb), .55) 82%, rgba(var(--gold-rgb), 0)); }
.rule i { position: absolute; top: -14px; width: 28px; height: 28px; background: url(img/game/TitleBtnDeco_00.png) center / contain no-repeat;
mix-blend-mode: screen; filter: sepia(1) saturate(3.2) hue-rotate(-10deg); }
.rule i.a { left: calc(50% - 30px); } .rule i.b { left: calc(50% + 2px); transform: scaleX(-1); }
.files { position: absolute; left: 64px; top: 30px; }
.files h4, .whatsnew h4 { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold-hi); }
.strip { display: flex; gap: 12px; margin-top: 10px; }
.f { position: relative; width: 118px; height: 66px; border-radius: 4px; overflow: hidden; outline: 1px solid rgba(224, 178, 62, .35); outline-offset: 0; }
.f { position: relative; width: 118px; height: 66px; border-radius: 4px; overflow: hidden; outline: 1px solid rgba(var(--gold-rgb), .35); outline-offset: 0; }
.f img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) brightness(.82); }
.f small { position: absolute; left: 7px; bottom: 5px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.f.on { outline: 2px solid var(--gold-hi); box-shadow: 0 0 22px rgba(247, 220, 140, .35); transform: translateY(-3px); }
.f.on { outline: 2px solid var(--gold-hi); box-shadow: 0 0 22px rgba(var(--gold-hi-rgb), .35); transform: translateY(-3px); }
.f.on img { filter: none; }
.whatsnew { position: absolute; left: 862px; right: 64px; top: 30px; }
.whatsnew p { margin-top: 8px; font-size: 13.5px; color: var(--text2); line-height: 1.35; }
@@ -68,8 +68,8 @@
.frame { position: absolute; left: 672px; top: 118px; width: 544px; height: 306px; }
.frame .pic { position: absolute; inset: 0; background: url(img/save3.jpg) center / cover; box-shadow: 0 40px 90px rgba(0, 0, 0, .7); }
.frame .pic::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 40%, rgba(0, 0, 0, 0) 55%, rgba(10, 9, 8, .45) 100%); }
.frame .edge { position: absolute; inset: -9px; border: 1px solid rgba(224, 178, 62, .55); }
.frame .edge::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(224, 178, 62, .22); }
.frame .edge { position: absolute; inset: -9px; border: 1px solid rgba(var(--gold-rgb), .55); }
.frame .edge::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(var(--gold-rgb), .22); }
.frame .top { position: absolute; left: calc(50% - 46px); top: -32px; width: 92px; height: 46px; display: flex; }
.frame .top i { flex: 1; background: url(img/game/TitleBtnDeco_00.png) center / 46px no-repeat; mix-blend-mode: screen; filter: sepia(1) saturate(3.2) hue-rotate(-10deg); }
.frame .top i + i { transform: scaleX(-1); }
@@ -78,17 +78,17 @@
/* sound: the speaker in the bar, and its panel (Music, Sounds, what is playing) */
.spk { width: 40px; height: 34px; display: grid; place-items: center; margin-left: 10px; border-radius: 17px; border: 1px solid var(--line); background: rgba(10, 9, 8, .6); color: var(--text); }
.spk svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spk.on { border-color: var(--gold); color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(224, 178, 62, .14); }
.spk.on { border-color: var(--gold); color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .14); }
.vol { position: absolute; right: 150px; top: 60px; width: 318px; padding: 18px 20px 16px; z-index: 5; background: rgba(16, 14, 10, .96);
border: 1px solid rgba(224, 178, 62, .45); box-shadow: 0 24px 60px rgba(0, 0, 0, .65); }
border: 1px solid rgba(var(--gold-rgb), .45); box-shadow: 0 24px 60px rgba(0, 0, 0, .65); }
.vol::before { content: ''; position: absolute; right: 22px; top: -7px; width: 12px; height: 12px; background: rgba(16, 14, 10, .96);
border-left: 1px solid rgba(224, 178, 62, .45); border-top: 1px solid rgba(224, 178, 62, .45); transform: rotate(45deg); }
border-left: 1px solid rgba(var(--gold-rgb), .45); border-top: 1px solid rgba(var(--gold-rgb), .45); transform: rotate(45deg); }
.vol h5 { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold-hi); }
.vrow { display: grid; grid-template-columns: 62px 1fr 36px; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; color: var(--text2); }
.vrow b { font-weight: 600; color: var(--text); } .vrow span { text-align: right; font-variant-numeric: tabular-nums; }
.slider { position: relative; height: 4px; background: #262017; }
.slider i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #9a6a18, #e0b23e); }
.slider u { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: #f7dc8c; transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(10, 9, 8, .9); }
.slider i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.slider u { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--gold-hi); transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(10, 9, 8, .9); }
.nowp { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text3); }
.nowp em { font-style: italic; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 16px; color: var(--text2); }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; } .eq i { width: 3px; background: var(--gold); }
@@ -111,10 +111,10 @@
/* steps of the first run: gold diamonds on a hairline */
.path { position: absolute; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 0; font-size: 14px; color: var(--text3); }
.path span { display: flex; align-items: center; gap: 10px; }
.path span + span::before { content: ''; width: 64px; height: 1px; margin: 0 16px; background: linear-gradient(90deg, rgba(224,178,62,.15), rgba(224,178,62,.5), rgba(224,178,62,.15)); }
.path span + span::before { content: ''; width: 64px; height: 1px; margin: 0 16px; background: linear-gradient(90deg, rgba(var(--gold-rgb), .15), rgba(var(--gold-rgb), .5), rgba(var(--gold-rgb), .15)); }
.path i { width: 11px; height: 11px; transform: rotate(45deg); border: 1px solid var(--text3); }
.path .done { color: var(--text2); } .path .done i { background: var(--gold); border-color: var(--gold); }
.path .now { color: var(--gold-hi); font-weight: 600; } .path .now i { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(247,220,140,.18); background: rgba(247,220,140,.25); }
.path .now { color: var(--gold-hi); font-weight: 600; } .path .now i { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(var(--gold-hi-rgb), .18); background: rgba(var(--gold-hi-rgb), .25); }
.center { position: absolute; left: 230px; width: 820px; text-align: center; }
.center .eb { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 21px; color: var(--gold-hi); }
@@ -122,8 +122,8 @@
.center .lead { margin-top: 10px; font-size: 16.5px; color: var(--text2); }
/* a framed box: two gold hairlines, as the picture frame */
.fbox { position: relative; background: rgba(18, 16, 12, .82); border: 1px solid rgba(224, 178, 62, .42); text-align: left; }
.fbox::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(224, 178, 62, .14); pointer-events: none; }
.fbox { position: relative; background: rgba(18, 16, 12, .82); border: 1px solid rgba(var(--gold-rgb), .42); text-align: left; }
.fbox::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(var(--gold-rgb), .14); pointer-events: none; }
.fbox .row2 { display: grid; grid-template-columns: 200px 1fr auto; align-items: center; gap: 18px; padding: 17px 26px; }
.fbox .row2 + .row2 { border-top: 1px solid var(--line-soft); }
.fbox label { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold-hi); }
@@ -131,22 +131,22 @@
.fbox .ch { font-size: 14px; font-weight: 600; color: var(--gold); }
.gamefile { display: flex; align-items: center; gap: 20px; padding: 20px 26px; }
.gamefile .nup { width: 50px; height: 62px; display: grid; place-items: end center; padding-bottom: 8px; font-size: 11px; font-weight: 800; color: var(--gold);
background: linear-gradient(180deg, rgba(224,178,62,.16), rgba(224,178,62,.04)); border: 1px solid rgba(224,178,62,.45); }
background: linear-gradient(180deg, rgba(var(--gold-rgb), .16), rgba(var(--gold-rgb), .04)); border: 1px solid rgba(var(--gold-rgb), .45); }
.gamefile b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 23px; font-weight: 700; }
.gamefile .ok { font-size: 14px; }
/* the chamfered gold bar at another size, and the quiet button with a gold hairline */
.play.sm { width: 240px; height: 56px; font-size: 26px; }
.qbtn { height: 48px; padding: 0 24px; display: inline-grid; place-items: center; font-size: 15px; font-weight: 600; color: var(--text);
background: rgba(243, 234, 213, .06); border: 1px solid rgba(224, 178, 62, .35); }
background: rgba(243, 234, 213, .06); border: 1px solid rgba(var(--gold-rgb), .35); }
.qlink { font-size: 15px; font-weight: 600; color: var(--text2); }
.act { position: absolute; display: flex; align-items: center; gap: 22px; }
/* the build: the time left, a gold line with a spark at its head, the steps with their times */
.gline { position: relative; height: 6px; margin: 30px auto 0; width: 820px; background: #262017; }
.gline i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #9a6a18, #e0b23e 75%, #fff4cc); }
.gline u { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: rotate(45deg); background: #fff4cc;
box-shadow: 0 0 14px 4px rgba(247, 220, 140, .55); }
.gline i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold) 75%, var(--gold-lit)); }
.gline u { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: rotate(45deg); background: var(--gold-lit);
box-shadow: 0 0 14px 4px rgba(var(--gold-hi-rgb), .55); }
.gline::before, .gline::after { content: ''; position: absolute; top: -4px; width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--gold); background: #0a0908; }
.gline::before { left: -16px; } .gline::after { right: -16px; }
.stepl { width: 820px; margin: 26px auto 0; text-align: left; }
@@ -154,7 +154,7 @@
.stepl div:first-child { border-top: 0; }
.stepl em { width: 11px; height: 11px; transform: rotate(45deg); border: 1px solid var(--text3); margin-left: 4px; }
.stepl .d { color: var(--text2); } .stepl .d em { background: var(--emerald); border-color: var(--emerald); }
.stepl .n { color: var(--text); } .stepl .n em { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(247, 220, 140, .6); }
.stepl .n { color: var(--text); } .stepl .n em { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(var(--gold-hi-rgb), .6); }
.stepl b { font-weight: 600; } .stepl span { font-size: 14px; } .stepl .n span { color: var(--gold-hi); font-weight: 600; }
.nowmusic { position: absolute; right: 64px; bottom: 26px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text3); }
.nowmusic em { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 16px; color: var(--text2); }
@@ -163,8 +163,8 @@
.sgrid { position: absolute; left: 64px; top: 196px; display: grid; grid-template-columns: repeat(3, 258px); gap: 34px 26px; }
.sc { position: relative; }
.sc .p { position: relative; width: 258px; height: 145px; background-size: cover; background-position: center; }
.sc .p::after { content: ''; position: absolute; inset: -6px; border: 1px solid rgba(224, 178, 62, .45); }
.sc.on .p::after { border-color: var(--gold-hi); box-shadow: 0 0 24px rgba(247, 220, 140, .3); }
.sc .p::after { content: ''; position: absolute; inset: -6px; border: 1px solid rgba(var(--gold-rgb), .45); }
.sc.on .p::after { border-color: var(--gold-hi); box-shadow: 0 0 24px rgba(var(--gold-hi-rgb), .3); }
.sc .t { margin-top: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.sc .t b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; font-weight: 700; }
.sc .t span { font-size: 12.5px; color: var(--text3); }
@@ -181,7 +181,7 @@
.places { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.place { position: relative; height: 112px; background-size: cover; background-position: center; }
.place::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,8,.1), rgba(10,9,8,.86)); }
.place::before { content: ''; position: absolute; inset: -5px; border: 1px solid rgba(224,178,62,.38); z-index: 1; }
.place::before { content: ''; position: absolute; inset: -5px; border: 1px solid rgba(var(--gold-rgb), .38); z-index: 1; }
.place div { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; }
.place b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 19px; font-weight: 700; }
.place span { font-size: 13px; color: var(--text2); } .place span strong { font-size: 22px; color: var(--text); font-weight: 700; }
@@ -200,7 +200,7 @@
/* ---- v4 first run (11-19, "the setup still looks like the old launcher"): a stage, a drop, a reveal ---- */
.stage { position: absolute; inset: 0; background: #070605; }
.stage::before { content: ''; position: absolute; left: 50%; top: 52%; width: 1100px; height: 640px; transform: translate(-50%, -50%);
background: radial-gradient(closest-side, rgba(224, 178, 62, .13), rgba(224, 178, 62, .04) 55%, rgba(0, 0, 0, 0)); }
background: radial-gradient(closest-side, rgba(var(--gold-rgb), .13), rgba(var(--gold-rgb), .04) 55%, rgba(0, 0, 0, 0)); }
.welcome { position: absolute; left: 96px; top: 120px; width: 520px; }
.welcome .k { font-size: 14px; font-weight: 600; color: var(--gold); }
.welcome h1 { font-size: 64px; margin-top: 10px; line-height: 1; }
@@ -208,12 +208,12 @@
.welcome p + p { margin-top: 10px; font-size: 14px; color: var(--text3); }
.portal { position: absolute; left: 660px; top: 120px; width: 524px; height: 520px; display: grid; place-items: center; text-align: center;
background: linear-gradient(180deg, rgba(24, 20, 13, .9), rgba(12, 10, 7, .9)); }
.portal::before { content: ''; position: absolute; inset: 0; border: 1px solid rgba(224, 178, 62, .55); }
.portal::after { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(224, 178, 62, .32); }
.portal::before { content: ''; position: absolute; inset: 0; border: 1px solid rgba(var(--gold-rgb), .55); }
.portal::after { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(var(--gold-rgb), .32); }
.portal .c { position: absolute; width: 22px; height: 22px; border-color: var(--gold-hi); border-style: solid; border-width: 0; }
.portal .c1 { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; } .portal .c2 { right: -1px; top: -1px; border-right-width: 2px; border-top-width: 2px; }
.portal .c3 { left: -1px; bottom: -1px; border-left-width: 2px; border-bottom-width: 2px; } .portal .c4 { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.portal .ic { width: 66px; height: 82px; margin: 0 auto; position: relative; border: 1.5px solid var(--gold); background: rgba(224, 178, 62, .06); }
.portal .ic { width: 66px; height: 82px; margin: 0 auto; position: relative; border: 1.5px solid var(--gold); background: rgba(var(--gold-rgb), .06); }
.portal .ic::before { content: ''; position: absolute; right: -1.5px; top: -1.5px; width: 20px; height: 20px; background: #070605; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); }
.portal .ic::after { content: '.nup'; position: absolute; left: 0; right: 0; bottom: 10px; font-size: 12px; font-weight: 800; color: var(--gold); }
.portal h2 { font-size: 34px; margin-top: 26px; } .portal p { margin-top: 8px; font-size: 14.5px; color: var(--text2); }
@@ -231,7 +231,7 @@
.rlogo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .8)); }
.found4 { position: absolute; left: 0; right: 0; top: 500px; text-align: center; font-size: 15px; color: var(--text2); }
.found4 b { color: var(--emerald); font-weight: 650; } .found4 em { font-style: normal; color: var(--text3); }
.choices { position: absolute; left: 150px; right: 150px; top: 556px; display: grid; grid-template-columns: 1fr 1.6fr; border-top: 1px solid rgba(224,178,62,.35); border-bottom: 1px solid rgba(224,178,62,.35); }
.choices { position: absolute; left: 150px; right: 150px; top: 556px; display: grid; grid-template-columns: 1fr 1.6fr; border-top: 1px solid rgba(var(--gold-rgb), .35); border-bottom: 1px solid rgba(var(--gold-rgb), .35); }
.choices > div { padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.choices > div + div { border-left: 1px solid var(--line-soft); }
.choices label { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 17px; color: var(--gold-hi); display: block; }