@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "BYM Grobold";
  src: url("/fonts/groboldov.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #10151b;
  --surface: #3e4247;
  --surface-2: #555a60;
  --line: #62676d;
  --chrome: #484c51;
  --chrome-hover: #595e64;
  --ink: #f5f1e8;
  --muted: #c7cbd0;
  --green: #59d174;
  --gold: #f2b84b;
  --bar-height: 48px;
  font: 13px Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button, a, select, input { touch-action: manipulation; }
:is(button, a, select, input, summary):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; top: -100px; left: 14px; z-index: 10;
  background: var(--green); color: var(--bg); padding: 12px;
}
.skip-link:focus { top: 6px; }
.play-header { position: relative; min-width: 0; z-index: 2; }
.play-bar {
  height: var(--bar-height); display: flex; align-items: stretch; gap: 0;
  padding: 0 0 0 8px; border-top: 0; border-bottom: 1px solid #363a3f;
  background: var(--chrome); color: #eceef0;
}
.shell-brand {
  display: flex; align-items: center; gap: 9px;
  flex: none; padding: 0 18px 0 5px;
  border-right: 1px solid var(--line);
}
/* Same artwork, display face and wordmark colours as the homepage. */
.wordmark-pokey { display: block; width: 32px; height: 38px; flex: none; object-fit: contain; }
.wordmark-name {
  color: #ede8cf; font: 400 16px/1.2 "BYM Grobold", Inter, sans-serif;
  font-synthesis: none; letter-spacing: 0; white-space: nowrap;
  filter: drop-shadow(0 2px 1px #050904);
}
.brand-reborn { color: #c2e629; }
.shell-brand:hover { background: var(--chrome-hover); }
.shortcuts { display: flex; align-items: stretch; min-width: 0; flex: 1; white-space: nowrap; }
.shortcut, .menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex: none; min-width: 72px; height: 100%; padding: 0 18px;
  background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0;
  color: #eceef0; font-size: 12px; font-weight: 650; line-height: 1;
  text-transform: uppercase; letter-spacing: .4px;
}
.shortcut:hover, .menu-toggle:hover, .shortcut-overflow[open] > summary { color: #fff; background: var(--chrome-hover); }
.chevron { width: 5px; height: 5px; margin-top: -3px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.shortcut-overflow { position: relative; flex: none; }
.shortcut-overflow > summary, .display-settings > summary { list-style: none; cursor: pointer; }
.shortcut-overflow > summary::-webkit-details-marker, .display-settings > summary::-webkit-details-marker { display: none; }
.overflow-panel {
  position: absolute; top: calc(100% + 1px); left: 0; width: 222px;
  padding: 8px; border: 1px solid var(--line); border-top: 2px solid var(--green);
  border-radius: 0 0 4px 4px; background: var(--surface); box-shadow: 0 12px 30px #0005;
}
.menu-heading { display: block; padding: 8px 10px; color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; }
.overflow-panel :is(a, button) {
  display: flex; width: 100%; gap: 12px; align-items: center; min-height: 38px;
  padding: 8px 10px; border: 0; border-radius: 2px; background: transparent;
  font-size: 12px; color: #eceef0; text-align: left;
}
.overflow-panel :is(a, button):hover { color: #fff; background: var(--chrome-hover); }
.overflow-panel .shiny-shortcut { color: var(--gold); }
.menu-divider { margin: 6px 10px; border-top: 1px solid var(--line); }
.player-tools { display: flex; align-items: stretch; flex: none; border-left: 1px solid var(--line); }
.quiet-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 100%; padding: 0; background: transparent;
  border: 0; border-right: 1px solid var(--line); border-radius: 0; color: #d5d9de;
}
.quiet-button:hover, .display-settings[open] > summary { background: var(--chrome-hover); color: #fff; }
.quiet-button .icon { width: 19px; height: 19px; }
.control-label { display: none; }
.display-settings { position: relative; }
.settings-panel {
  position: absolute; top: calc(100% + 1px); right: 0;
  width: 302px; max-width: calc(100vw - 16px); padding: 20px;
  border: 1px solid var(--line); border-top: 2px solid var(--green); border-radius: 0 0 4px 4px;
  background: var(--surface); box-shadow: 0 12px 36px #0005; white-space: normal; z-index: 5;
}
.settings-title { margin: 0 0 16px; color: var(--ink); font-size: 14px; font-weight: 650; }
.graphics-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 500; }
select { color: var(--ink); background: var(--chrome); border: 1px solid #7c838c; border-radius: 4px; padding: 8px 9px; max-width: 154px; }
#graphics-help { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--green); }
.account-chip { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; padding: 0 13px; border-left: 1px solid var(--line); margin-left: auto; }
.account-chip:hover { background: var(--chrome-hover); color: #fff; }
.account-avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 2px; border: 1px solid #7c838c; background: var(--surface); color: #ade6b6; font-size: 9px; font-weight: 700; overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-details { display: grid; gap: 3px; min-width: 0; }
#account-name { display: block; max-width: 144px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #e6e8e2; }
#account-level { font-size: 10px; line-height: 1; color: #9beaaf; white-space: nowrap; }
main { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: var(--bg); }
#welcome { max-width: 640px; margin: 8vh auto 0; padding: 24px; text-align: center; }
#welcome img { object-fit: contain; }
h1 { font-size: 30px; letter-spacing: -.04em; }
#status { min-height: 24px; color: var(--muted); line-height: 1.6; }
.primary {
  display: inline-flex; align-items: center; justify-content: center; padding: 11px 22px;
  background: var(--green); color: #101b14; border: 1px solid var(--green);
  border-radius: 6px; font-weight: 650;
}
.primary:hover:not(:disabled) { background: #77de8d; }
#game {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; display: none; outline: none; overflow: hidden; background: #263226;
}
body.playing #game { display: block; }
ruffle-player { display: block; width: 100%; height: 100%; }
#game:fullscreen { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-height: none; }
body.focus-mode .play-header { height: 0; }
body.focus-mode .play-bar {
  position: absolute; top: 8px; right: 8px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 2px 8px #0005;
}
body.focus-mode :is(.shell-brand, .shortcuts, .shortcut-overflow, .account-chip) { display: none; }
body.focus-mode .player-tools { border: 0; }
body.focus-mode #focus-mode { color: var(--green); background: var(--surface); }
.icon-button {
  display: inline-grid; place-items: center; padding: 5px; border: 0;
  border-radius: 5px; background: none; color: var(--muted); width: 30px; height: 30px;
}
.icon-button:hover { background: var(--surface-2); }
dialog {
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; width: min(460px, calc(100vw - 32px)); padding: 22px 28px 28px;
  box-shadow: 0 24px 80px #0008; max-height: calc(100dvh - 48px); overflow: auto;
}
dialog::backdrop { background: #080b10b8; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.eyebrow { font-size: 9px; letter-spacing: .17em; color: var(--green); font-weight: 700; }
dialog h2 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 16px; }
dialog p { color: var(--muted); line-height: 1.7; font-size: 13px; }
dialog label { display: block; font-size: 11px; color: var(--muted); margin: 18px 0 8px; }
dialog input { width: 100%; padding: 12px; background: var(--chrome); border: 1px solid var(--line); border-radius: 5px; color: var(--ink); font-size: 12px; }
.dialog-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.dialog-actions a:not(.primary) { font-size: 12px; color: var(--green); text-decoration: underline; }
.dialog-status { font-size: 11px; min-height: 18px; margin: 12px 0 0; color: var(--green); }
@media (max-width: 1000px) {
  #account-name { max-width: 112px; }
  .secondary-shortcut { display: none; }
  .account-chip { padding: 0 9px; }
  .shortcut, .menu-toggle { padding-inline: 11px; }
}
@media (max-width: 760px) {
  .play-bar { padding: 0 0 0 4px; }
  .shell-brand { padding-inline: 4px 12px; gap: 7px; }
  .wordmark-name { display: none; }
  .brand-reborn { display: block; margin-top: 2px; }
  .secondary-shortcut { display: none; }
  .shortcut, .menu-toggle { min-width: 52px; padding-inline: 12px; font-size: 11px; gap: 6px; }
  .account-chip { padding: 0 6px; gap: 6px; }
  .quiet-button { width: 40px; }
  .settings-panel { position: fixed; top: calc(var(--bar-height) + 1px); right: 8px; }
  body.focus-mode .settings-panel { top: 53px; }
  .overflow-panel { position: fixed; top: var(--bar-height); left: 8px; }
}
@media (max-width: 520px) {
  .shell-brand { padding-inline: 5px; }
  .wordmark-name { display: none; }
  #account-name { max-width: 68px; font-size: 11px; }
}
@media (max-width: 360px) {
  .shortcut, .menu-toggle { min-width: 44px; padding-inline: 9px; }
  #account-name { max-width: 48px; }
}
@media (pointer: coarse) {
  :root { --bar-height: 52px; }
  .shortcut, .menu-toggle, .quiet-button, .account-chip { min-width: 40px; min-height: 44px; }
  body.focus-mode .play-bar { height: 48px; }
  body.focus-mode .settings-panel { top: 57px; }
  .overflow-panel :is(a, button) { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
