/* WorDungeon, the web game: the "pixel dungeon" style of design/canvas.
   Dark stone (#14101f with a 48x24 mortar grid), purple frames, gold and torch
   orange; Press Start 2P for labels and buttons, Pixelify Sans for text;
   bevels drawn with inset box-shadows, sprites as crisp inline SVG.
   Phones first (the 390 x 844 artboards), desktop from 1024px (G1-G6) */

@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/PressStart2P-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/PixelifySans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #14101f;
  --grid: #20182e;
  --panel: #241d36;
  --frame: #5b4b80;
  --line: #3a2f55;
  --well: #191423;
  --deep: #0c0912;
  --ink: #f2ead7;
  --dim: #bfb1d4;
  --soft: #c3b6d6;
  --muted: #a99cc4;
  --gold: #e8b730;
  --gold-hi: #f8d971;
  --gold-lo: #a87520;
  --gold-sh: #71441d;
  --torch: #f08a24;
  --torch-hi: #ffbb57;
  --torch-lo: #aa571b;
  --torch-edge: #ffc06b;
  --torch-in: #70452d;
  --red: #e8424f;
  --red-hi: #ff8791;
  --red-lo: #9c2732;
  --green: #2f8f4a;
  --green-hi: #59b86b;
  --green-lo: #1b5c2f;
  --blue: #7fb2ff;
  --epic: #c6b4f2;
  --p2p: "Press Start 2P", ui-monospace, monospace;
  --pix: "Pixelify Sans", system-ui, sans-serif;
  --drop: 0 4px 0 var(--deep);
  /* tiles: the board sets its own sizes */
  --tile: 50px;
  --gap: 6px;
  --tfont: 24px;
  --bev: 4px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 2px, transparent 2px), linear-gradient(90deg, var(--grid) 2px, transparent 2px);
  background-size: 48px 24px;
  color: var(--ink);
  font-family: var(--pix);
  font-size: 16px;
  line-height: 1.3;
  /* Pixelify Sans draws "fl" as one odd glyph */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body.in-run {
  overscroll-behavior-y: none;
}
button,
input {
  font: inherit;
  color: inherit;
  margin: 0;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  display: block;
  flex: none;
}
h1,
h2,
h3,
p,
ol,
dl,
dd {
  margin: 0;
  font-weight: 400;
}
:focus-visible {
  outline: 2px solid var(--torch);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- the app and screens */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.screen-root {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.screen {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  flex: 1 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
/* screens that live in one viewport and scroll inside (fight, leaderboard, language) */
body.is-fixed .app {
  height: 100vh;
  height: 100dvh;
}
body.is-fixed .screen-root {
  flex: 1 1 0;
  min-height: 0;
}
body.is-fixed .screen {
  min-height: 0;
  height: auto;
  flex: 1 1 0;
  overflow: hidden;
}
body.in-run .seo {
  display: none;
}

/* ---------------------------------------------------------------- type */

.label {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--dim);
}
.label.wide {
  letter-spacing: 1px;
}
.gold {
  color: var(--gold);
}
.dim {
  color: var(--dim);
}
.center {
  text-align: center;
}
.small {
  font-size: 14px;
  line-height: 18px;
}
.big-num {
  font-family: var(--p2p);
  font-size: 28px;
  line-height: 32px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--gold-sh);
}
.big-num.is-score {
  font-size: 22px;
}
.big-num-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: var(--gold);
}
.big-unit {
  font-size: 13px;
  line-height: 16px;
  color: var(--gold);
}
.record-rank {
  font-size: 13px;
  line-height: 16px;
  color: var(--soft);
  min-height: 16px;
}
.verified {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  line-height: 16px;
  color: var(--soft);
}
.verified.is-green {
  margin-top: 14px;
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--green-hi);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  width: 100%;
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 12px;
  border: 2px solid var(--frame);
  border-radius: 0;
  background: var(--line);
  color: var(--ink);
  box-shadow: inset -4px -4px 0 var(--panel), inset 4px 4px 0 var(--frame), var(--drop);
  font-family: var(--p2p);
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  text-transform: uppercase;
}
.btn-label {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.btn:active:not(:disabled) {
  transform: translateY(2px);
  --drop: 0 2px 0 var(--deep);
}
.btn:disabled {
  opacity: 0.4;
}
.btn-primary {
  height: 56px;
  gap: 16px;
  border-color: var(--torch-edge);
  background: var(--torch);
  color: var(--bg);
  box-shadow: inset -4px -4px 0 var(--torch-lo), inset 4px 4px 0 var(--torch-hi), var(--drop);
  font-size: 13px;
}
.btn-danger {
  border-color: var(--red-hi);
  background: var(--red);
  color: var(--bg);
  box-shadow: inset -4px -4px 0 var(--red-lo), inset 4px 4px 0 var(--red-hi), var(--drop);
}
.btn-link {
  height: 44px;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 9px;
  color: var(--dim);
}
.btn-link:hover {
  color: var(--ink);
}
.btn-tab {
  height: 44px;
  flex: 1;
  min-width: 0;
  padding: 0 6px;
  border-color: var(--line);
  background: var(--well);
  color: var(--dim);
  box-shadow: none;
  font-size: 9px;
}
.btn-tab[aria-pressed="true"] {
  border-color: var(--frame);
  background: var(--panel);
  color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--line), var(--drop);
}
.btn-tab2 {
  height: 44px;
  flex: 1;
  border: 2px solid transparent;
  background: transparent;
  box-shadow: none;
  color: var(--dim);
  font-size: 8px;
  gap: 8px;
}
.btn-tab2[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--well);
  color: var(--gold);
}
.btn-tab2[aria-pressed="true"]::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--gold);
}
.btn-nav {
  width: auto;
  height: 44px;
  padding: 0 14px;
  box-shadow: inset -3px -3px 0 var(--bg), inset 3px 3px 0 var(--line);
  background: var(--panel);
  font-size: 9px;
}
.btn-nav[aria-pressed="true"] {
  color: var(--gold);
}
.btn-pair {
  display: flex;
  gap: 10px;
  flex: none;
}
.btn-pair > .btn {
  flex: 1;
  min-width: 0;
}
.btn-pair.is-links > .btn {
  height: 44px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--frame);
  border-radius: 0;
  background: var(--panel);
  box-shadow: inset -3px -3px 0 var(--bg), inset 3px 3px 0 var(--line);
}
.icon-btn:active {
  transform: translateY(1px);
}

/* ---------------------------------------------------------------- frames */

.panel {
  border: 2px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--line), var(--drop);
}
.panel.is-hot {
  border-color: var(--torch);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--torch-in), var(--drop);
}
.well {
  border: 2px solid var(--line);
  background: var(--well);
}
.slot {
  background: var(--bg);
  box-shadow: inset 2px 2px 0 var(--deep), inset -2px -2px 0 var(--line);
}
.slot-44 {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.divider {
  height: 18px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.divider-line {
  height: 2px;
  flex: 1;
  background: var(--frame);
}
.divider-text {
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 16px;
  color: var(--ink);
  text-align: center;
}
.divider.is-small .divider-text {
  font-size: 8px;
  line-height: 14px;
}
.divider.is-gold .divider-text {
  font-size: 8px;
  color: var(--gold);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 6px 8px;
  border: 2px solid var(--line);
  background: var(--well);
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.chip.is-gold {
  border-color: var(--gold);
  color: var(--gold);
}
.chip.is-red {
  border-color: var(--red);
  color: var(--red-hi);
}
.tag {
  display: inline-block;
  padding: 4px 6px;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
  white-space: nowrap;
}
.quote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  line-height: 22px;
  color: var(--soft);
}
.quote svg {
  flex: none;
}

/* ---------------------------------------------------------------- hud and bars */

.hud {
  height: 44px;
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.hud-lives {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.hud-lives-label {
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 1px;
  color: var(--dim);
  white-space: nowrap;
}
.hud-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.hud-floor {
  font-family: var(--p2p);
  font-size: 11px;
  line-height: 15px;
  color: var(--gold);
  white-space: nowrap;
}
.hud-pts {
  font-size: 13px;
  line-height: 15px;
  color: var(--soft);
  white-space: nowrap;
}
.hud-right {
  display: flex;
  justify-content: flex-end;
}
.hud-spacer {
  width: 44px;
  height: 44px;
}
.hearts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hearts-n {
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 18px;
  color: var(--ink);
}
.topbar {
  height: 44px;
  flex: none;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
}
.topbar.is-left {
  grid-template-columns: 1fr 44px;
}
.topbar.is-left .topbar-title {
  text-align: start;
}
.topbar-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-family: var(--p2p);
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}
.topbar.is-left .topbar-title {
  align-items: flex-start;
  font-size: 12px;
}
.topbar-sub {
  font-size: 11px;
  line-height: 15px;
  color: var(--gold);
}
.topbar-spacer {
  width: 44px;
  height: 44px;
}
[dir="rtl"] .icon-btn svg[aria-hidden],
[dir="rtl"] .btn > svg:last-child:not(:first-child),
[dir="rtl"] .quote > svg:first-child,
[dir="rtl"] .lost-note > svg:first-child {
  transform: scaleX(-1);
}


/* ---------------------------------------------------------------- relic slots */

.relic-cell {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
}
.relic-slot {
  width: 40px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.relic-slot.is-empty {
  opacity: 0.4;
}
.relic-cell.is-button:disabled .relic-slot {
  opacity: 0.4;
}
.relic-cell.is-button:not(:disabled):active .relic-slot {
  transform: translateY(1px);
}
.slot-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 3px;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 9px;
}

/* ---------------------------------------------------------------- the boss on its pedestal */

.stage {
  position: relative;
  width: 100%;
  flex: none;
}
.stage-torch {
  position: absolute;
  top: 32%;
}
.stage-torch.is-left {
  left: 16px;
}
.stage-torch.is-right {
  right: 16px;
}
.stage-pedestal {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
}
.stage-boss {
  position: absolute;
  bottom: var(--boss-bottom, 53px);
  left: 50%;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------- tiles */

.tile {
  width: var(--tile);
  height: var(--tile);
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--p2p);
  font-size: var(--tfont);
  line-height: 1;
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
}
.m-empty,
.m-think {
  background: #1b1528;
  border: 2px solid var(--line);
  box-shadow: inset 2px 2px 0 #100c19;
}
.m-typed,
.m-pending {
  background: var(--line);
  border: 2px solid var(--muted);
  color: var(--ink);
  box-shadow: inset -3px -3px 0 var(--panel), inset 3px 3px 0 var(--frame);
}
.m-pending {
  border-style: dashed;
  color: var(--soft);
}
.m-cursor {
  background: var(--panel);
  border: 3px solid var(--torch);
  box-shadow: inset 0 0 0 2px var(--bg);
}
.m-c {
  background: var(--green);
  color: var(--ink);
  box-shadow: inset calc(var(--bev) * -1) calc(var(--bev) * -1) 0 var(--green-lo), inset var(--bev) var(--bev) 0 var(--green-hi);
}
.m-p {
  background: var(--gold);
  color: var(--bg);
  box-shadow: inset calc(var(--bev) * -1) calc(var(--bev) * -1) 0 var(--gold-lo), inset var(--bev) var(--bev) 0 var(--gold-hi);
}
.m-a {
  background: var(--panel);
  color: var(--muted);
  box-shadow: inset calc(var(--bev) * -1) calc(var(--bev) * -1) 0 var(--bg), inset var(--bev) var(--bev) 0 var(--line);
}
.m-f {
  /* the Fog Wraith: a checker of mist over the tile */
  background-color: var(--panel);
  background-image: conic-gradient(var(--line) 25%, transparent 0 50%, var(--line) 0 75%, transparent 0);
  background-size: calc(var(--tile) * 0.28) calc(var(--tile) * 0.28);
  color: var(--soft);
  box-shadow: inset calc(var(--bev) * -1) calc(var(--bev) * -1) 0 var(--bg);
}
.m-s {
  background: #1b1528;
  border: 2px dashed var(--frame);
}
.m-s.has-letter {
  color: var(--soft);
}
.tile-hand {
  position: absolute;
  right: 1px;
  bottom: 1px;
}
.m-burn {
  background: #3a0f1a;
  border: 2px solid var(--red-lo);
  box-shadow: inset 2px 2px 0 #1f0710;
}
.m-drain {
  background: #24101a;
  border: 2px dashed var(--red-lo);
}
.m-void {
  background: transparent;
  border: 2px solid rgba(58, 47, 85, 0.35);
}
.m-faded {
  background: var(--well);
  border: 2px dashed var(--line);
  opacity: 0.6;
}
.m-reveal {
  background: var(--panel);
  color: var(--gold);
  box-shadow: inset -4px -4px 0 var(--bg), inset 4px 4px 0 var(--line);
}
.tile.is-ghost {
  color: rgba(242, 234, 215, 0.35);
}
.tile.is-mine-col::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px dashed var(--red);
  pointer-events: none;
}
.tile-dot {
  position: absolute;
  width: 20%;
  height: 20%;
  background: var(--bg);
  opacity: 0.7;
}
.think-dot {
  width: 6px;
  height: 6px;
  background: var(--frame);
  animation: think 1.2s steps(2) infinite;
  animation-delay: calc(var(--i, 0) * 0.15s);
}
/* high contrast tiles: orange for the right place, blue for elsewhere */
.hc .m-c,
.hc-c {
  background: var(--torch);
  color: var(--bg);
  box-shadow: inset calc(var(--bev) * -1) calc(var(--bev) * -1) 0 var(--torch-lo), inset var(--bev) var(--bev) 0 var(--torch-hi);
}
.hc .m-p,
.hc-p {
  background: var(--blue);
  color: var(--bg);
  box-shadow: inset calc(var(--bev) * -1) calc(var(--bev) * -1) 0 var(--frame), inset var(--bev) var(--bev) 0 var(--soft);
}
/* a row popping in letter by letter: held in the typed look, then popped */
.tile.pre.pre {
  background: var(--line);
  border: 2px solid var(--muted);
  color: var(--ink);
  box-shadow: inset -3px -3px 0 var(--panel), inset 3px 3px 0 var(--frame);
  background-image: none;
}
.tile.pop {
  animation: pop 0.22s steps(4) both;
}
.row.shake {
  animation: shake 0.42s steps(6);
}
.row-pop {
  animation: rowpop 0.3s steps(4) both;
}
.row-burn .tile {
  animation: burn 0.5s steps(4);
}
.wtiles {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.wtile {
  --tile: 44px;
  --tfont: 24px;
}
.wtiles.is-small {
  gap: 3px;
}
.wtiles.is-small .wtile {
  --tile: 34px;
  --tfont: 18px;
  --bev: 3px;
}
.legend-sq {
  width: 18px;
  height: 18px;
  flex: none;
  --bev: 3px;
}
.legend-sq.big {
  width: 24px;
  height: 24px;
  --bev: 4px;
}
.legend-sq.m-a {
  box-shadow: inset -3px -3px 0 var(--bg), inset 3px 3px 0 var(--line);
}

/* ---------------------------------------------------------------- toasts, dialogs, sheet */

.toasts {
  position: fixed;
  top: max(72px, calc(env(safe-area-inset-top) + 60px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 10px 14px;
  border: 2px solid var(--gold);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--bg), var(--drop);
  font-family: var(--p2p);
  font-size: 9px;
  line-height: 14px;
  color: var(--ink);
  text-align: center;
  animation: drop 0.2s steps(3);
  transition: opacity 0.3s;
}
.toast-error {
  color: var(--gold);
}
.toast.is-out {
  opacity: 0;
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(12, 9, 18, 0.82);
}
.dialog:focus,
.sheet:focus {
  outline: none;
}
.dialog {
  width: min(330px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 22px 22px;
  animation: drop 0.18s steps(3);
}
.dialog-art {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.dialog-title {
  font-family: var(--p2p);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  color: var(--ink);
}
.dialog-title.is-danger {
  font-size: 14px;
  line-height: 22px;
  color: var(--red-hi);
}
.dialog-body {
  margin-top: 16px;
  font-size: 18px;
  line-height: 23px;
  text-align: center;
  color: var(--soft);
}
.dialog .chip {
  margin-top: 16px;
}
.dialog-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.veil-sheet {
  align-items: flex-end;
  padding: 0;
}
.sheet {
  width: 100%;
  max-width: 480px;
  max-height: min(700px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  padding: 14px 18px max(22px, env(safe-area-inset-bottom));
  animation: rise 0.2s steps(4);
}
.veil.is-closing .sheet {
  animation: sink 0.16s steps(3) forwards;
}
.sheet-handle {
  width: 44px;
  height: 4px;
  flex: none;
  align-self: center;
  background: var(--frame);
  box-shadow: 0 2px 0 var(--bg);
}
.sheet-title {
  align-self: center;
  margin-top: 16px;
  font-family: var(--p2p);
  font-size: 20px;
  line-height: 26px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-sh);
}
.sheet-sub {
  align-self: center;
  margin-top: 6px;
  font-size: 16px;
  line-height: 20px;
  color: var(--soft);
}
.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 18px;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--frame) var(--panel);
}
.sheet-close {
  margin-top: 16px;
}
.relic-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.relic-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
}
.relic-row.is-empty .slot {
  opacity: 0.4;
}
.relic-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.relic-row-text > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.relic-row-name {
  font-size: 18px;
  line-height: 20px;
  font-weight: 700;
}
.relic-row-n {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--gold);
}
.relic-row.is-empty .relic-row-n {
  color: var(--muted);
}
.relic-row-desc {
  font-size: 14px;
  line-height: 17px;
  color: var(--soft);
}
.btn-use {
  width: auto;
  min-width: 56px;
  max-width: 42%;
  height: auto;
  min-height: 44px;
  padding: 4px 8px;
  font-size: 9px;
  line-height: 12px;
  box-shadow: inset -3px -3px 0 var(--panel), inset 3px 3px 0 var(--frame);
}

/* ---------------------------------------------------------------- switches and radios */

.switch {
  width: 52px;
  height: 28px;
  position: relative;
  flex: none;
  display: block;
  background: var(--line);
  box-shadow: inset 2px 2px 0 var(--bg), inset -2px -2px 0 var(--frame);
}
.switch-knob {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--ink);
  box-shadow: inset -2px -2px 0 var(--muted);
}
[aria-checked="true"] > .switch {
  background: var(--green);
  box-shadow: inset 2px 2px 0 var(--green-lo), inset -2px -2px 0 var(--green-hi);
}
[aria-checked="true"] > .switch .switch-knob {
  left: auto;
  right: 4px;
}
.radio {
  width: 20px;
  height: 20px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--muted);
  background: var(--bg);
  box-shadow: inset 2px 2px 0 var(--deep);
}
.radio-dot {
  width: 10px;
  height: 10px;
}
[aria-checked="true"] > .radio {
  border-color: var(--gold);
}
[aria-checked="true"] > .radio .radio-dot {
  background: var(--gold);
}

/* ---------------------------------------------------------------- splash */

.splash-screen {
  align-items: center;
}
.logo {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.logo-word {
  font-family: var(--p2p);
  font-size: 16px;
  line-height: 20px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--gold-sh);
  white-space: nowrap;
}
.logo-tag {
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
  color: var(--dim);
}
.logo-big {
  align-items: center;
  gap: 20px;
  margin-top: 70px;
}
.logo-big .logo-word {
  font-size: 26px;
  line-height: 32px;
  text-shadow: 4px 4px 0 var(--gold-sh);
}
.logo-big .logo-tag {
  font-size: 8px;
  line-height: 12px;
  color: var(--soft);
}
.dungeon-art {
  position: relative;
  flex: none;
  max-width: 100%;
  margin: 36px auto 0;
}
.dungeon-door {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
}
.dungeon-torch {
  position: absolute;
  top: 44%;
}
.dungeon-torch.is-left {
  left: 0;
}
.dungeon-torch.is-right {
  right: 0;
}
.dungeon-boss {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.splash-load {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}
.load-bar {
  width: 250px;
  height: 18px;
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 2px solid var(--line);
  background: var(--well);
}
.load-seg {
  flex: 1;
  height: 8px;
  background: var(--gold);
  box-shadow: inset 0 2px 0 var(--gold-hi), inset 0 -2px 0 var(--gold-lo);
  opacity: 0;
  animation: load 1.2s steps(1) infinite;
  animation-delay: calc(var(--i) * 0.07s);
}
.splash-screen .btn {
  margin-top: 28px;
}
.splash-error {
  max-width: 300px;
  font-size: 9px;
  line-height: 15px;
  text-align: center;
  color: var(--red-hi);
}
.load-bar.is-stuck .load-seg {
  animation: none;
  opacity: 0.25;
}
.splash-version {
  margin-top: auto;
  padding-bottom: 10px;
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 12px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- home */

.home-screen {
  gap: 0;
}
.home-top {
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-top-btns {
  display: flex;
  gap: 8px;
}
.home-screen .dungeon-art {
  margin-top: 18px;
}
.home-tagline {
  margin-top: 14px;
  font-size: 18px;
  line-height: 22px;
  text-align: center;
  color: var(--soft);
}
.home-screen > .btn-primary {
  margin-top: 18px;
}
.home-screen > .btn-secondary {
  margin-top: 14px;
}
.home-screen .divider {
  margin-top: 30px;
}
.home-screen .records-empty,
.home-screen .record-cards {
  margin-top: 14px;
}
.home-screen > .btn-secondary + .btn-pair,
.home-screen .record-cards + .btn,
.home-screen .records-empty + .btn {
  margin-top: 24px;
}
.home-screen .btn-pair {
  margin-top: 12px;
}
.home-note {
  align-self: center;
  margin-top: 10px;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  color: var(--dim);
}
.home-foot {
  align-self: center;
  margin-top: auto;
  padding-top: 24px;
  padding-bottom: 8px;
  font-size: 14px;
  line-height: 18px;
  color: var(--dim);
  text-align: center;
}
.saved-card {
  width: 100%;
  flex: none;
  display: flex;
  flex-direction: column;
  margin-top: 28px;
  padding: 20px;
  text-align: start;
  color: var(--ink);
  font: inherit;
}
.saved-card:active {
  transform: translateY(2px);
}
.saved-top {
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.saved-label {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--torch-edge);
}
.saved-top .label {
  font-size: 7px;
}
.saved-title {
  margin-top: 16px;
  font-family: var(--p2p);
  font-size: 12px;
  line-height: 18px;
}
.saved-stats {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}
.saved-sep {
  width: 2px;
  height: 22px;
  background: var(--line);
}
.saved-pts {
  font-family: var(--p2p);
  font-size: 11px;
  line-height: 16px;
  color: var(--gold);
}
.saved-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}
.saved-relics {
  display: flex;
  gap: 5px;
  min-height: 32px;
  flex-wrap: wrap;
}
.saved-relic {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.saved-go {
  font-family: var(--p2p);
  font-size: 9px;
  line-height: 14px;
  color: var(--torch-edge);
  white-space: nowrap;
}
.home-new {
  margin-top: 16px;
}
.records-empty {
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.records-empty-row {
  width: 100%;
  display: flex;
  align-items: stretch;
}
.records-empty-row > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.records-empty-sep {
  width: 2px;
  background: var(--line);
}
.records-empty p {
  font-size: 18px;
  line-height: 24px;
  text-align: center;
  color: var(--soft);
}
.record-cards {
  display: flex;
  gap: 10px;
  flex: none;
}
.record-card {
  flex: 1;
  min-width: 0;
  min-height: 136px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* ---------------------------------------------------------------- how to play */

.htp-body {
  display: flex;
  flex-direction: column;
  flex: none;
}
.htp-head {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  font-family: var(--p2p);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.htp-panel {
  margin-top: 18px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.htp-tiles {
  margin-top: 14px;
}
.htp-tiles .wtile {
  --tile: 50px;
}
.htp-legend {
  width: 100%;
  max-width: 274px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
.htp-legend > div {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  line-height: 20px;
}
.htp-screen .divider {
  margin-top: 26px;
}
.htp-rules {
  list-style: none;
  padding: 0 8px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.htp-rules li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 17px;
  line-height: 21px;
  color: var(--soft);
}
.htp-num {
  width: 32px;
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--gold);
}
.htp-text {
  margin-top: 20px;
  font-size: 18px;
  line-height: 24px;
  text-align: center;
  color: var(--soft);
}
.htp-art {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.htp-boss {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.htp-boss-pic {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.htp-boss-tag {
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
  color: var(--gold);
}
.htp-records {
  width: 100%;
  flex-wrap: nowrap;
}
.htp-records .record-card {
  min-height: 0;
  padding: 14px 8px;
  gap: 10px;
}
.htp-foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.htp-dots {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.dots {
  display: flex;
  gap: 8px;
}
.dot {
  width: 8px;
  height: 8px;
  border: 2px solid var(--frame);
  background: var(--well);
}
.dot.is-on {
  border: 0;
  background: var(--torch);
  box-shadow: inset -2px -2px 0 var(--torch-lo), inset 2px 2px 0 var(--torch-hi);
}
.htp-spacer {
  height: 44px;
}

/* ---------------------------------------------------------------- boss card (intro) */

.intro-floor {
  margin-top: 26px;
  font-family: var(--p2p);
  font-size: 24px;
  line-height: 30px;
  text-align: center;
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--gold-sh);
}
.intro-screen .stage {
  margin-top: 14px;
}
.intro-name,
.card-name {
  margin-top: 12px;
  font-family: var(--p2p);
  font-size: 20px;
  line-height: 26px;
  text-align: center;
  text-transform: uppercase;
}
.intro-quote,
.card-quote {
  margin-top: 10px;
}
.trial-panel {
  margin-top: 22px;
  padding: 18px 18px 16px;
}
.trial-text {
  margin-top: 12px;
  font-size: 19px;
  line-height: 24px;
  text-align: center;
  color: var(--soft);
}
.trial-panel .chips {
  margin-top: 14px;
}
.relics-play {
  margin-top: 14px;
  min-height: 54px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.relics-play.is-empty .dim {
  font-size: 15px;
}
.relics-play-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.lost-go {
  margin-top: auto;
  padding-top: 18px;
}
/* FIGHT! and TAKE RELIC stay reachable on short screens: they stick to the bottom */
.sticky-go {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: auto;
  padding: 16px 0 max(6px, env(safe-area-inset-bottom));
  background: linear-gradient(rgba(20, 16, 31, 0), var(--bg) 38%);
}

/* ---------------------------------------------------------------- fight (phones) */

.fight-screen {
  gap: 10px;
}
.fight-grid {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
}
.fight-left,
.fight-right,
.kbd-hint {
  display: none;
}
.fight-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.slot-boss,
.slot-relics,
.slot-timer,
.slot-hints,
.slot-flags,
.slot-duel,
.slot-kbd {
  flex: none;
}
.boss-strip {
  padding: 10px 12px 8px;
}
.boss-strip.is-compact {
  padding: 6px 10px;
}
.boss-strip-top {
  display: flex;
  align-items: center;
  gap: 13px;
}
.boss-pic {
  width: 56px;
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--well);
  box-shadow: inset 0 -4px 0 var(--line);
}
.boss-strip.is-compact .boss-pic {
  width: 48px;
  height: 48px;
}
.boss-strip-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.boss-strip.is-compact .boss-strip-text {
  gap: 7px;
}
.boss-name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.boss-name {
  font-family: var(--p2p);
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
}
.boss-desc {
  font-size: 14px;
  line-height: 16px;
  color: var(--soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boss-strip.is-compact .boss-desc {
  font-size: 16px;
  line-height: 18px;
}
.boss-strip .quote {
  justify-content: flex-start;
  height: 24px;
  margin-top: 8px;
  padding-top: 2px;
  border-top: 2px solid var(--line);
  font-size: 14px;
  line-height: 18px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
.relic-strip {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
}
.relic-strip-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.relic-sum {
  font-size: 13px;
  line-height: 13px;
  color: var(--dim);
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 380px) {
  .relic-empty:nth-child(n + 3) {
    display: none;
  }
}
.relic-strip-text .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.relic-all {
  min-width: 36px;
  max-width: 96px;
  height: 44px;
  flex: none;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 0;
  background: none;
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 12px;
  color: var(--dim);
}
.relic-icons {
  display: flex;
  margin-inline-start: auto;
}
.relic-empty,
.relic-more {
  width: 40px;
  height: 40px;
  margin: 2px;
  flex: none;
}
.relic-more {
  border: 0;
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 14px;
  color: var(--soft);
}
.timer-panel {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
}
.timer-main {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.timer-clock {
  font-family: var(--p2p);
  font-size: 22px;
  line-height: 28px;
  color: var(--gold);
}
.timer-panel.is-row .timer-clock,
.timer-panel.is-drain .timer-clock {
  font-size: 16px;
  line-height: 20px;
  color: var(--ink);
}
.timer-clock.is-low {
  color: var(--red-hi);
}
.timer-sub {
  height: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 16px;
  color: var(--dim);
}
.timer-bottle {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--gold);
}
.timer-bar {
  width: 166px;
  margin-inline-start: auto;
}
.timer-bar .label {
  display: block;
  margin-bottom: 8px;
  font-size: 7px;
  line-height: 10px;
}
.segs {
  display: flex;
  gap: 2px;
}
.seg {
  width: 5px;
  height: 10px;
  flex: none;
  border: 1px solid var(--frame);
  background: var(--panel);
}
.seg.is-on {
  border: 0;
}
.segs-fight .seg.is-on {
  background: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold-lo), inset 0 2px 0 var(--gold-hi);
}
.segs-row .seg.is-on {
  background: var(--torch);
  box-shadow: inset 0 -2px 0 var(--torch-lo), inset 0 2px 0 var(--torch-hi);
}
.segs-drain .seg.is-on,
.segs.is-low .seg.is-on {
  background: var(--red);
  box-shadow: inset 0 -2px 0 var(--red-lo), inset 0 2px 0 var(--red-hi);
}
.hint-bar {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 4px 8px;
}
.hint-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hint-cells {
  display: flex;
  gap: 4px;
}
.hint-cell {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 12px;
}
.hint-cell.is-known {
  border-color: var(--gold);
  color: var(--gold);
}
.hint-vowels {
  display: flex;
  gap: 7px;
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 14px;
}
.hint-vowels .is-lit {
  color: var(--gold);
}
.hint-vowels .is-dim {
  color: var(--frame);
}
.hint-echo {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--dim);
}
.hint-echo.is-yes {
  color: var(--gold);
}
.hint-board {
  font-family: var(--p2p);
  font-size: 7px;
  color: var(--dim);
}
.board-head {
  height: 20px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-self: center;
  width: var(--headw, 100%);
  max-width: 100%;
}
.board-head .label {
  font-size: 7px;
}
.board-head-right {
  font-size: 13px;
  line-height: 15px;
  color: var(--gold);
  white-space: nowrap;
}
.board-head-right.is-low {
  color: var(--red-hi);
}
.head-toast {
  padding: 4px 10px;
  border: 2px solid var(--gold);
  background: var(--panel);
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--ink);
  white-space: nowrap;
  animation: drop 0.16s steps(3);
}
.slot-flags {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.flag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.flag-row .chip {
  padding: 4px 6px;
  font-size: 7px;
  line-height: 10px;
}
.anagram {
  display: flex;
  align-items: center;
  gap: 10px;
}
.anagram-tiles {
  display: flex;
  gap: 4px;
}
.anagram-tile {
  --tile: 30px;
  --tfont: 14px;
}
.anagram-tile.is-spent {
  opacity: 0.35;
}
.board-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.board-tab {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--well);
  color: var(--dim);
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
}
.board-tab.is-seen {
  border-color: var(--frame);
  background: var(--panel);
  color: var(--gold);
}
.board-tab.is-solved {
  color: var(--green-hi);
}
.fight-screen.is-multi .board-scroll {
  scroll-snap-type: x proximity;
}
.fight-screen.is-multi .board {
  scroll-snap-align: start;
}
.board-area {
  flex: 1 1 0;
  min-height: 96px;
  max-width: 100%;
  align-self: center;
  position: relative;
  display: flex;
}
.board-area.is-bleed {
  align-self: stretch;
  max-width: none;
  margin: 0 -14px;
}
.board-area.is-bleed .pixbar-y {
  right: 0;
}
.board-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.board-scroll::-webkit-scrollbar {
  display: none;
}
.board-scroll:focus-visible {
  outline-offset: 4px;
}
.board-content {
  width: max-content;
  min-width: 100%;
  margin: 0 auto;
}
.board-content.is-duel {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.pixbar {
  position: absolute;
  background: var(--panel);
  pointer-events: none;
}
.pixbar-y {
  top: 0;
  bottom: 0;
  right: -10px;
  width: 4px;
}
.pixbar-x {
  left: 0;
  right: 0;
  bottom: -8px;
  height: 4px;
}
.pixbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--frame);
}
.pixbar-y .pixbar-thumb {
  width: 4px;
}
.pixbar-x .pixbar-thumb {
  height: 4px;
}
.boards {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--bgap);
}
.boards.is-multi {
  --bev: 3px;
}
.board-rows {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.board-label {
  height: 20px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 12px;
  color: var(--gold);
}
.board-label.is-solved {
  color: var(--green-hi);
}
.board-label.is-lost {
  color: var(--red-hi);
}
.board.is-solved .board-rows .tile.m-c {
  filter: brightness(1.08);
}
.boards {
  position: relative;
}
/* the Two-Faced Merchant: "OR" between the two word labels, no extra width */
.board-or {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: var(--bg);
  border: 2px solid var(--gold);
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
  color: var(--gold);
}
.row {
  display: flex;
  gap: var(--gap);
  position: relative;
  flex: none;
}
.row.is-counts {
  align-items: center;
}
.row-counts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-inline-start: 12px;
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--soft);
  white-space: nowrap;
}
.row-counts .is-hit {
  color: var(--gold);
}
.has-counts .board-rows {
  min-width: calc(var(--bw) + 90px);
}
.duel-board {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 0 auto;
  max-width: 100%;
  margin: 0 auto;
}
.duel-board.is-multi {
  --bev: 3px;
}
.duel-heads {
  display: flex;
  gap: var(--bgap);
}
.duel-heads .who-space {
  width: 24px;
  flex: none;
  margin-inline-end: -4px;
}
.duel-heads .board-label {
  width: var(--bw);
  margin-bottom: 0;
}
.duel-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.duel-row.is-you {
  align-self: flex-start;
}
.duel-row.is-bot {
  align-self: flex-end;
}
.duel-tiles {
  display: flex;
  gap: var(--bgap);
}
.who {
  width: 24px;
  height: 24px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.who-you {
  border: 2px solid var(--torch);
  background: var(--bg);
  box-shadow: inset 1px 1px 0 var(--deep), inset -1px -1px 0 var(--line);
}
.who-boss {
  background: var(--well);
  box-shadow: inset 0 -2px 0 var(--line);
}
.row-note {
  width: var(--bw);
  height: var(--tile);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--frame);
  background: var(--well);
  color: var(--dim);
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 14px;
}
.row-note.is-stunned {
  border-color: var(--gold);
  color: var(--gold);
}
.duel-bar {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.duel-clock {
  flex: 1;
  min-width: 0;
  height: 60px;
  padding: 8px 10px;
}
.duel-clock-top {
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.duel-turn {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--torch-edge);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duel-clock.is-bot .duel-turn {
  color: var(--dim);
}
.duel-time {
  font-family: var(--p2p);
  font-size: 11px;
  line-height: 16px;
}
.duel-time.is-low {
  color: var(--red-hi);
}
.duel-clock .segs {
  gap: 3px;
  margin-top: 8px;
}
.segs-move .seg,
.segs-bot .seg {
  flex: 0 1 12px;
  min-width: 3px;
  width: auto;
  height: 12px;
}
.segs-move .seg.is-on {
  background: var(--torch);
  box-shadow: inset 0 2px 0 var(--torch-hi), inset 0 -2px 0 var(--torch-lo);
}
.segs-bot .seg.is-on {
  background: var(--frame);
  box-shadow: inset 0 2px 0 #7a6aa0, inset 0 -2px 0 var(--line);
}
.segs-bot.is-low .seg.is-on {
  background: var(--frame);
  box-shadow: inset 0 2px 0 #7a6aa0, inset 0 -2px 0 var(--line);
}
.duel-pass {
  min-width: 84px;
  max-width: 132px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.btn-pass {
  height: 44px;
  padding: 0 6px;
  font-size: 10px;
  line-height: 12px;
  box-shadow: inset -3px -3px 0 var(--panel), inset 3px 3px 0 var(--frame);
}
.duel-skips {
  font-size: 13px;
  line-height: 12px;
  color: var(--dim);
  white-space: nowrap;
}

/* keyboard */
.kbd {
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: opacity 0.15s;
}
.kbd.is-disabled {
  opacity: 0.55;
}
.has-banner .slot-kbd,
.is-over .slot-kbd {
  opacity: 0.35;
}
.has-banner .kbd.is-disabled,
.is-over .kbd.is-disabled {
  opacity: 1;
}
.kbd-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.key {
  flex: 1 1 0;
  min-width: 0;
  max-width: 32px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 1;
  background: var(--line);
  color: var(--ink);
  box-shadow: inset -3px -3px 0 var(--panel), inset 3px 3px 0 var(--frame);
}
.kbd-row-2 .key {
  max-width: 34px;
}
.kbd-row-4 .key {
  max-width: none;
}
.key:active:not(:disabled) {
  transform: translateY(2px);
}
.key.k-c {
  background: var(--green);
  color: #080f09;
  box-shadow: inset -3px -3px 0 var(--green-lo), inset 3px 3px 0 var(--green-hi);
}
.key.k-p {
  background: var(--gold);
  color: var(--bg);
  box-shadow: inset -3px -3px 0 var(--gold-lo), inset 3px 3px 0 var(--gold-hi);
}
.key.k-a {
  background: var(--panel);
  color: var(--muted);
  box-shadow: inset -3px -3px 0 var(--bg), inset 3px 3px 0 #30273f;
}
.hc .key.k-c {
  background: var(--torch);
  color: var(--bg);
  box-shadow: inset -3px -3px 0 var(--torch-lo), inset 3px 3px 0 var(--torch-hi);
}
.hc .key.k-p {
  background: var(--blue);
  color: var(--bg);
  box-shadow: inset -3px -3px 0 var(--frame), inset 3px 3px 0 var(--soft);
}
.key-enter {
  background: var(--torch);
  color: var(--bg);
  box-shadow: inset -3px -3px 0 var(--torch-lo), inset 3px 3px 0 var(--torch-hi);
  font-size: 12px;
}
.key-erase {
  background: var(--line);
}
.kbd.is-striped .key-ch {
  transform: translateY(-3px);
}
.key-stripes {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 6px;
  display: flex;
}
.stripe {
  flex: 1;
}
.stripe.s-c {
  background: var(--green);
}
.stripe.s-p {
  background: var(--gold);
}
.stripe.s-a {
  background: var(--bg);
}
.hc .stripe.s-c {
  background: var(--torch);
}
.hc .stripe.s-p {
  background: var(--blue);
}

/* banners over the board */
.slot-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.slot-banner:empty {
  display: none;
}
.banner {
  pointer-events: auto;
  width: min(330px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 16px;
  animation: drop 0.24s steps(4);
}
.banner.is-win {
  border-color: var(--torch);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--torch-in), var(--drop);
}
.banner.is-loss {
  border-color: var(--red);
}
.banner-title {
  font-family: var(--p2p);
  font-size: 12px;
  line-height: 18px;
  color: var(--torch-edge);
  text-align: center;
}
.banner.is-loss .banner-title {
  font-size: 14px;
  color: var(--red-hi);
}
.banner-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}
.banner-boss svg {
  transform: scaleY(0.6) translateY(30%);
}
.banner-pts {
  font-family: var(--p2p);
  font-size: 24px;
  line-height: 32px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--gold-sh);
}
.banner-life {
  font-family: var(--p2p);
  font-size: 22px;
  line-height: 30px;
  color: var(--red-hi);
}
.banner-note {
  margin-top: 8px;
  font-size: 15px;
  line-height: 20px;
  color: var(--soft);
  text-align: center;
}
.banner .btn {
  margin-top: 14px;
}

/* ---------------------------------------------------------------- pause */

.pause-title {
  position: relative;
  min-height: 166px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
}
.pause-big {
  margin-top: 20px;
  font-family: var(--p2p);
  font-size: 24px;
  line-height: 34px;
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--gold-sh);
}
.pause-note {
  margin-top: 14px;
  font-size: 19px;
  line-height: 22px;
  color: var(--soft);
}
.pause-title .stage-torch {
  top: 60px;
}
.pause-title .stage-torch.is-left {
  left: 14px;
}
.pause-title .stage-torch.is-right {
  right: 14px;
}
.pause-panel {
  margin-top: 16px;
  padding: 17px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pause-panel .divider {
  width: 100%;
}
.pause-summary {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 16px;
  text-align: center;
}
.pause-relics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.pause-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}
.pause-abandon {
  margin-top: 24px;
}

/* ---------------------------------------------------------------- reward */

.reward-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  min-height: 120px;
}
.reward-big {
  max-width: 100%;
  margin-top: 14px;
  overflow-wrap: anywhere;
  font-family: var(--p2p);
  font-size: clamp(18px, 7.2vw, 28px);
  line-height: 34px;
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--gold-sh);
  text-align: center;
}
.reward-big.is-skip {
  margin-top: 22px;
  font-size: 18px;
  line-height: 26px;
}
.reward-pts {
  margin-top: 12px;
  font-family: var(--p2p);
  font-size: 16px;
  line-height: 20px;
  color: var(--gold);
}
.reward-pts.is-zero {
  font-size: 20px;
  line-height: 26px;
  color: var(--soft);
}
.reward-sub {
  margin-top: 10px;
  font-size: 19px;
  line-height: 22px;
  text-align: center;
}
.reward-head .stage-torch {
  top: 37px;
}
.reward-head .stage-torch.is-left {
  left: 5px;
}
.reward-head .stage-torch.is-right {
  right: 5px;
}
.reward-passage {
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reward-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
}
.reward-tiles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.reward-tiles.is-many {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
}
.word-meaning {
  max-width: 300px;
  margin-top: 11px;
  font-size: 16px;
  line-height: 19px;
  text-align: center;
  color: var(--soft);
}
.word-meaning b {
  font-weight: 400;
  color: var(--ink);
}
.solved-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 18px;
  color: var(--gold);
}
.reward-screen .divider {
  margin-top: 20px;
}
.relic-cards {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}
.relic-card {
  width: auto;
  min-width: 0;
  min-height: 244px;
  flex: 1 1 0;
  max-width: 132px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px 12px;
  color: var(--ink);
  text-align: center;
  --drop: 0 5px 0 var(--deep);
}
.relic-card.is-picked {
  border-color: var(--torch);
  background: #302239;
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--torch-in), 0 5px 0 #75471e;
  transform: translateY(-8px);
}
.relic-card-arrow {
  position: absolute;
  top: -23px;
  left: 50%;
  transform: translateX(-50%);
}
.relic-rarity {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
}
.r-common {
  color: var(--dim);
}
.r-rare {
  color: var(--blue);
}
.r-epic {
  color: var(--epic);
}
.r-legendary {
  color: var(--torch-edge);
}
.relic-card-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}
.relic-card.is-picked .relic-card-icon {
  box-shadow: inset 2px 2px 0 var(--deep), inset -2px -2px 0 var(--torch-in);
}
.relic-card-name,
.relic-card-desc,
.relic-rarity {
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: auto;
}
@media (max-width: 379px) {
  .relic-card {
    padding-left: 6px;
    padding-right: 6px;
  }
  .relic-card-name {
    font-size: 16px;
    line-height: 18px;
  }
  .relic-card-desc {
    font-size: 14px;
  }
}
.relic-card-name {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 13px;
  font-size: 19px;
  font-weight: 700;
  line-height: 20px;
}
.relic-card.is-picked .relic-card-name {
  color: var(--torch-edge);
}
.relic-card-desc {
  margin-top: 12px;
  font-size: 15px;
  line-height: 16px;
  color: var(--soft);
}
.relic-card.is-picked .relic-card-desc {
  color: var(--ink);
}
.relic-cards + .sticky-go {
  margin-top: 8px;
}
.reward-next {
  min-height: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 15px;
}

/* ---------------------------------------------------------------- life lost */

.lost-screen {
  align-items: stretch;
}
.lost-title {
  margin-top: 24px;
  font-family: var(--p2p);
  font-size: 22px;
  line-height: 28px;
  text-align: center;
  color: var(--red);
}
.lost-screen > svg {
  margin: 26px auto 0;
}
.lost-lives {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.lost-lives.is-row {
  flex-direction: row;
  justify-content: space-between;
  padding: 16px;
  margin-top: 16px;
}
.lost-lives-text {
  font-family: var(--p2p);
  font-size: 11px;
  line-height: 16px;
}
.lost-lives.is-row .lost-lives-text {
  color: var(--red-hi);
}
.lost-hearts {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lost-arrow {
  display: inline-block;
  font-size: 22px;
  line-height: 18px;
  color: var(--dim);
}
[dir="rtl"] .lost-arrow {
  transform: scaleX(-1);
}
.lost-word {
  margin-top: 16px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lost-note {
  margin-top: 24px;
  min-height: 68px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
  line-height: 22px;
}
.lost-board {
  margin-top: 16px;
  padding: 10px 8px 8px;
}
.lost-board-head {
  display: flex;
  justify-content: space-between;
  padding: 0 4px 8px;
}
.lost-board-scroll {
  max-height: 200px;
  overflow: auto;
  scrollbar-width: none;
}

/* ---------------------------------------------------------------- game over */

.over-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 8px;
}
.over-title {
  font-family: var(--p2p);
  font-size: 26px;
  line-height: 34px;
  color: var(--red);
  text-shadow: 3px 3px 0 var(--red-lo);
  text-align: center;
}
.grave {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}
.grave-art {
  height: 80px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-right: 24px;
}
.grave-torch {
  margin-bottom: 8px;
}
.grave-ground {
  width: 224px;
  height: 8px;
  background: #30273f;
  box-shadow: 0 4px 0 var(--deep);
}
.over-note {
  margin-top: 12px;
  font-size: 19px;
  line-height: 22px;
  text-align: center;
  color: var(--soft);
}
.over-cards {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.over-card {
  flex: 1;
  min-width: 0;
  min-height: 136px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.over-card.is-record {
  justify-content: flex-start;
}
.ribbon {
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--gold);
  color: var(--bg);
  box-shadow: inset 0 -3px 0 var(--gold-lo), inset 0 3px 0 var(--gold-hi);
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
}
.over-screen .verified {
  margin-top: 10px;
}
.over-place,
.over-ranks {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.place-nums {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.place-nums > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.place-num {
  font-family: var(--p2p);
  font-size: 22px;
  line-height: 28px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-sh);
}
.place-num.is-ink {
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--line);
}
.place-cap {
  font-size: 12px;
  line-height: 14px;
  text-align: center;
  color: var(--soft);
}
.around {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}
.around-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 2px solid var(--line);
  background: var(--well);
}
.around-row.is-you {
  border-color: var(--torch);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--bg);
}
.around-rank {
  width: 58px;
  flex: none;
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--muted);
}
.around-row.is-you .around-rank,
.around-you {
  color: var(--torch-edge);
}
.around-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 20px;
}
.around-you {
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
}
.around-val {
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 14px;
  color: var(--gold);
}
.over-best {
  margin-top: 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 12px;
  color: var(--soft);
  text-align: center;
}
.over-short {
  margin-top: 12px;
  font-size: 17px;
  line-height: 20px;
  text-align: center;
  color: var(--soft);
}
.over-stats {
  margin-top: 12px;
  font-size: 16px;
  color: var(--soft);
  text-align: center;
}
.over-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------------------------------------------------------------- name */

.name-hint {
  margin-top: 46px;
  font-size: 19px;
  line-height: 24px;
  text-align: center;
  color: var(--soft);
}
.name-panel {
  margin-top: 28px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
}
.name-input {
  width: 100%;
  height: 52px;
  margin-top: 12px;
  padding: 0 14px;
  border: 2px solid var(--torch);
  border-radius: 0;
  background: var(--bg);
  box-shadow: inset 2px 2px 0 var(--deep);
  font-family: var(--pix);
  font-size: 18px;
  color: var(--ink);
  caret-color: var(--torch);
  outline: none;
}
.name-input:focus-visible {
  outline: 2px solid var(--torch-edge);
  outline-offset: 2px;
}
.name-status {
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 16px;
  line-height: 20px;
}
.name-status.is-ok {
  color: var(--green-hi);
}
.name-status.is-bad {
  color: var(--red-hi);
}
.name-rules {
  margin-top: 6px;
  font-size: 14px;
  line-height: 18px;
  color: var(--dim);
}
.name-screen > .btn-primary {
  margin-top: 20px;
}
.name-later {
  margin-top: auto;
}

/* ---------------------------------------------------------------- leaderboard */

.lb-screen .tabs {
  margin-top: 14px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex: none;
}
.tabs.is-period {
  margin-top: 8px;
}
.lb-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.lb-body > .divider {
  margin-top: 12px;
}
.podium {
  height: 154px;
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.podium-card {
  width: 114px;
  height: 134px;
  flex: 0 1 114px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 6px;
}
.podium-card.p-1 {
  height: 154px;
  gap: 10px;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--torch-in), var(--drop);
}
.podium-card.p-3 {
  height: 124px;
}
.podium-crown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--p2p);
  font-size: 8px;
  color: var(--soft);
}
.p-1 .podium-crown {
  color: var(--gold);
}
.podium-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
}
.p-1 .podium-name {
  font-size: 16px;
  font-weight: 700;
}
.podium-val {
  font-family: var(--p2p);
  font-size: 18px;
  line-height: 20px;
  color: var(--gold);
}
.p-1 .podium-val {
  font-size: 20px;
  line-height: 22px;
  text-shadow: 2px 2px 0 var(--gold-sh);
}
.podium-card .label {
  font-size: 7px;
  line-height: 10px;
}
.podium-card.is-you {
  border-color: var(--torch);
}
.lb-head {
  height: 16px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0 14px;
  font-size: 7px;
}
.lb-head span:first-child {
  width: 34px;
}
.lb-head span:nth-child(2) {
  flex: 1;
}
.lb-scroll {
  flex: 1 1 0;
  min-height: 60px;
  overflow-y: auto;
  margin-top: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--frame) var(--panel);
}
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lb-row {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.lb-row.is-you {
  border-color: var(--torch);
}
.lb-rank {
  min-width: 34px;
  flex: none;
  font-family: var(--p2p);
  font-size: 9px;
  line-height: 14px;
  color: var(--muted);
}
.lb-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 20px;
}
.lb-you,
.lb-you-tag {
  font-family: var(--p2p);
  font-size: 7px;
  color: var(--torch-edge);
}
.lb-you-tag {
  margin-inline-start: 10px;
  padding: 3px 5px;
  background: var(--gold);
  color: var(--bg);
}
.lb-val {
  min-width: 44px;
  text-align: end;
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 16px;
  color: var(--gold);
}
.lb-pinned {
  min-height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
}
.lb-pinned-rank {
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 14px;
  color: var(--torch-edge);
}
.lb-pinned-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lb-pinned-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 20px;
  font-weight: 600;
}
.lb-pinned-who .label,
.lb-pinned-val .label {
  font-size: 7px;
  line-height: 10px;
}
.lb-pinned-val {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.lb-pinned-n {
  font-family: var(--p2p);
  font-size: 15px;
  line-height: 18px;
  color: var(--gold);
}
.lb-foot {
  height: 16px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 16px;
  color: var(--soft);
}
.lb-empty,
.lb-loading {
  margin: 48px 0;
  font-size: 18px;
  line-height: 24px;
  text-align: center;
  color: var(--soft);
}
.lb-loading {
  display: flex;
  justify-content: center;
}
.lb-offline {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
}
.lb-offline-art {
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
}
.lb-offline-title {
  margin-top: 24px;
  font-family: var(--p2p);
  font-size: 13px;
  line-height: 24px;
  text-align: center;
}
.lb-offline-body {
  margin-top: 16px;
  max-width: 300px;
  font-size: 17px;
  line-height: 24px;
  text-align: center;
  color: var(--soft);
}
.lb-offline .btn-primary {
  margin-top: auto;
}
.lb-device {
  width: 100%;
  margin-top: 18px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lb-device-line {
  display: flex;
  justify-content: space-between;
  font-family: var(--p2p);
  font-size: 11px;
  color: var(--gold);
}

/* ---------------------------------------------------------------- profile */

.profile-card {
  margin-top: 24px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.profile-who {
  display: flex;
  align-items: center;
  gap: 18px;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--frame);
}
.profile-name-box {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.profile-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 19px;
  font-weight: 700;
  line-height: 24px;
}
.profile-edit {
  width: auto;
  min-width: 64px;
  justify-content: flex-start;
  padding: 0;
}
.profile-note {
  margin-top: 16px;
  font-size: 14px;
  line-height: 18px;
  color: var(--dim);
}
.profile-screen .divider {
  margin-top: 30px;
}
.profile-screen .record-cards {
  margin-top: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.stat-box {
  min-height: 116px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.stat-box .label {
  font-size: 7px;
  line-height: 10px;
}
.stat-n {
  font-family: var(--p2p);
  font-size: 22px;
  line-height: 28px;
}
.profile-delete {
  margin-top: auto;
  padding-top: 30px;
}

/* ---------------------------------------------------------------- settings and language */

.settings-screen .divider {
  margin-top: 18px;
}
.set-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.set-row {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-radius: 0;
  color: var(--ink);
  text-align: start;
}
.set-label {
  font-family: var(--p2p);
  font-size: 9px;
  line-height: 14px;
}
.set-label.is-small {
  font-size: 8px;
}
.set-value {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  line-height: 22px;
  color: var(--soft);
}
.set-chev {
  font-family: var(--p2p);
  font-size: 14px;
  color: var(--dim);
}
[dir="rtl"] .set-chev {
  transform: scaleX(-1);
}
.contrast-preview {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 0 8px;
}
.contrast-preview .label {
  font-size: 7px;
}
.cp-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  line-height: 16px;
  color: var(--soft);
}
.cp-tile {
  --tile: 32px;
  --tfont: 16px;
}
.set-version {
  margin-top: 28px;
  padding-bottom: 8px;
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 12px;
  text-align: center;
  color: var(--dim);
}
.lang-note {
  max-width: 320px;
  margin-top: 18px;
  font-size: 18px;
  line-height: 22px;
  color: var(--soft);
}
.lang-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--frame) var(--panel);
}
.lang-row {
  width: 100%;
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--well);
  color: var(--ink);
  text-align: start;
}
.lang-row.is-on {
  border-color: var(--torch);
  background: var(--panel);
  color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--torch-in), var(--drop);
}
.lang-name {
  flex: 1;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}
.lang-auto {
  font-size: 15px;
  color: var(--dim);
}

/* ---------------------------------------------------------------- bestiary */

.best-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  text-align: center;
}
.best-head .dim {
  font-size: 14px;
  line-height: 18px;
}
.best-title {
  font-family: var(--p2p);
  font-size: 13px;
  line-height: 20px;
  color: var(--gold);
}
.best-grid {
  display: grid;
  grid-template-columns: repeat(6, 56px);
  gap: 8px 4px;
  justify-content: center;
  margin-top: 20px;
}
@media (max-width: 389px) {
  .best-grid {
    grid-template-columns: repeat(5, 54px);
  }
}
@media (max-width: 359px) {
  .duel-clock-top {
    height: auto;
    min-height: 16px;
  }
  .duel-turn {
    white-space: normal;
    font-size: 7px;
    line-height: 9px;
  }
  .duel-clock .segs {
    margin-top: 6px;
  }
}
.best-cell {
  width: 100%;
  height: 56px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 0;
}
.best-cell:hover {
  border-color: var(--frame);
}
.best-num {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 2px 3px;
  background: var(--bg);
  color: var(--dim);
  font-family: var(--p2p);
  font-size: 7px;
  line-height: 10px;
}
.best-duel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.best-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 16px;
  line-height: 20px;
  color: var(--dim);
}
.best-screen .center {
  margin-top: 12px;
}
.card-floor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
}
.card-floor-line {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
}
.card-floor-n {
  font-family: var(--p2p);
  font-size: 12px;
  line-height: 18px;
  color: var(--gold);
}
.card-screen .stage {
  margin-top: 8px;
}
.card-name {
  font-size: 16px;
}
.card-screen .trial-panel {
  margin-top: 18px;
}
.card-nav {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.card-nav .btn {
  width: 116px;
  font-size: 9px;
}
.card-nav .btn-primary {
  height: 52px;
}

/* ---------------------------------------------------------------- share */

.share-screen .tabs {
  margin-top: 10px;
}
.share-frame {
  align-self: center;
  margin-top: 10px;
  padding: 2px;
  border: 2px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--bg), var(--drop);
}
.share-img {
  display: block;
  image-rendering: pixelated;
  background: var(--bg);
}
.share-frame.is-story .share-img {
  width: 216px;
  height: 384px;
}
.share-frame.is-square .share-img {
  width: 300px;
  height: 300px;
}
.share-caption {
  margin-top: 10px;
  padding: 8px 10px;
  font-size: 16px;
  line-height: 18px;
  color: var(--soft);
  overflow-wrap: anywhere;
}
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.share-grid .btn {
  font-size: 9px;
  padding: 0 8px;
}
.share-native {
  grid-column: 1 / -1;
}

/* ---------------------------------------------------------------- the text below the game */

.seo {
  padding: 48px 14px 64px;
  border-top: 2px solid var(--line);
}
.seo-in {
  max-width: 760px;
  margin: 0 auto;
}
.seo h1 {
  font-family: var(--p2p);
  font-size: 16px;
  line-height: 26px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--gold-sh);
}
.seo-intro {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
}
.seo-faq {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.seo-q {
  padding: 18px 20px;
  border: 2px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--line), var(--drop);
}
.seo-q dt {
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 18px;
  color: var(--gold);
}
.seo-q dd {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--soft);
}
/* Our other game, a plain followed link (the owner wants both sites to point at each other) */
.seo-games {
  margin-top: 28px;
}
.seo-games h2 {
  font-family: var(--p2p);
  font-size: 10px;
  line-height: 18px;
  color: var(--gold);
}
.seo-game {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 18px;
  border: 2px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--line), var(--drop);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
  text-decoration: none;
}
.seo-game img {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.seo-game:hover,
.seo-game:focus-visible {
  border-color: var(--gold);
}
.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 28px;
  font-family: var(--p2p);
  font-size: 8px;
  line-height: 14px;
}
.seo-links a {
  color: var(--dim);
}
.seo-links a:hover {
  color: var(--gold);
}

/* ---------------------------------------------------------------- motion */

@keyframes pop {
  0% {
    transform: scale(0.7);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes rowpop {
  0% {
    transform: scale(0.85);
    opacity: 0.2;
  }
  70% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}
@keyframes burn {
  0% {
    filter: brightness(2);
  }
  100% {
    filter: none;
  }
}
@keyframes drop {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
.slot-banner .banner {
  animation-name: drop;
}
@keyframes rise {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@keyframes sink {
  100% {
    transform: translateY(40px);
    opacity: 0;
  }
}
@keyframes think {
  0% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}
@keyframes load {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .load-seg {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------- short phones */

@media (max-height: 760px) and (max-width: 1023px) {
  .boss-strip .quote {
    display: none;
  }
  .key {
    height: 44px;
  }
  .kbd {
    gap: 6px;
  }
  .fight-main {
    gap: 8px;
  }
}
@media (max-height: 680px) and (max-width: 1023px) {
  .key {
    height: 40px;
  }
  /* the boss shrinks to one line, its name and tags: the rule stays in sight */
  .fight-screen .boss-strip,
  .fight-screen .boss-strip.is-compact {
    padding: 4px 10px;
  }
  .fight-screen .boss-pic,
  .fight-screen .boss-desc,
  .fight-screen .boss-strip .quote {
    display: none;
  }
  .fight-screen .boss-strip-text {
    gap: 0;
  }
  .relic-strip {
    height: 48px;
  }
  .timer-panel {
    height: 48px;
  }
  .timer-clock {
    font-size: 16px;
    line-height: 20px;
  }
}
@media (min-width: 420px) and (max-width: 1023px) {
  .key {
    max-width: 38px;
  }
  .kbd-row-2 .key {
    max-width: 40px;
  }
}
/* a phone on its side (844 x 390): the fight scrolls as a page instead of
   clipping its ENTER and Backspace row */
@media (max-height: 520px) and (max-width: 1023px) {
  body.is-fixed .app {
    height: auto;
  }
  body.is-fixed .screen-root,
  body.is-fixed .screen {
    flex: none;
    overflow: visible;
  }
  .fight-screen .fight-grid {
    flex: none;
  }
  .fight-screen .board-area {
    flex: none;
    height: 230px;
  }
  .lb-screen .lb-scroll,
  .language-screen .lang-list {
    flex: none;
    max-height: 60vh;
  }
}

/* ---------------------------------------------------------------- desktop (G1-G6) */

.deskbar {
  flex: none;
  padding: 0 14px;
}
@media (min-width: 1024px) {
  .deskbar-in {
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    padding: 13px 0;
    border-bottom: 2px solid var(--line);
  }
  .deskbar-logo {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
  }
  .deskbar-logo .logo-word {
    font-size: 20px;
    line-height: 28px;
  }
  .deskbar-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-inline-start: auto;
    align-items: center;
    gap: 12px 22px;
  }
  .deskbar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
  .deskbar-run {
    height: 44px;
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 22px;
  }
  .screen {
    min-height: 0;
    max-width: 520px;
    padding-top: 28px;
    padding-bottom: 32px;
  }
  /* the header carries the run's lives, floor and points */
  .intro-screen .hud,
  .pause-screen .hud,
  .reward-screen .hud,
  .lost-screen .hud {
    display: none;
  }
  .intro-screen {
    max-width: 640px;
  }
  .intro-floor {
    margin-top: 0;
  }
  /* desk layouts with columns */
  .desk-screen {
    max-width: 1280px;
    padding: 28px 14px 40px;
  }
  .desk-cols {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
  }
  .desk-side {
    flex: 1 1 280px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .desk-center {
    flex: 999 1 560px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .desk-panel {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .desk-panel .divider + * {
    margin-top: 22px;
  }
  .desk-record {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
  }
  .desk-record + .desk-record {
    margin-top: 12px;
  }
  .desk-record-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
  }
  .desk-record .big-num {
    font-size: 28px;
    line-height: 38px;
    text-shadow: none;
  }
  .desk-record .big-num.is-score {
    font-size: 24px;
  }
  .desk-record .record-rank {
    margin-top: 8px;
  }
  .desk-record-line .big-unit {
    margin-inline-end: auto;
  }
  .guide {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .guide-line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    line-height: 20px;
    color: var(--soft);
  }
  .guide-tile {
    --tile: 40px;
    --tfont: 24px;
  }
  .home-center > .label {
    font-size: 9px;
    line-height: 16px;
  }
  .desk-entrance {
    width: 320px;
    height: 256px;
    position: relative;
    margin-top: 12px;
  }
  .desk-door {
    position: absolute;
    left: 32px;
    top: 0;
  }
  .desk-entrance .dungeon-torch {
    top: 88px;
  }
  .desk-slime {
    position: absolute;
    left: 128px;
    top: 132px;
  }
  .how-deep {
    margin-top: 14px;
    font-family: var(--p2p);
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    color: var(--gold);
    text-shadow: 2px 2px 0 var(--gold-sh);
  }
  .home-center > .btn,
  .home-center > .saved-card,
  .home-center > .btn-pair {
    width: 100%;
    max-width: 416px;
    margin-top: 20px;
  }
  .home-center > .btn-primary {
    margin-top: 24px;
  }
  .home-center > .home-note {
    margin-top: 12px;
  }
  .tabs + .lb-preview-head {
    margin-top: 20px;
  }
  .lb-preview-head {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 7px;
  }
  .lb-preview-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
  }
  .lb-mini {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
  }
  .lb-mini.is-you {
    border-color: var(--torch);
  }
  .lb-mini-rank {
    min-width: 24px;
    font-family: var(--p2p);
    font-size: 8px;
    line-height: 12px;
    color: var(--muted);
  }
  .lb-mini-rank.is-top {
    color: var(--gold);
  }
  .lb-mini-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    line-height: 20px;
  }
  .lb-mini-val {
    font-family: var(--p2p);
    font-size: 9px;
    line-height: 14px;
    color: var(--gold);
  }
  .lb-preview-you:not(:empty) {
    margin-top: 18px;
  }
  .lb-you-box {
    padding: 12px 10px;
    border: 2px solid var(--torch);
    background: var(--well);
  }
  .lb-you-label {
    font-family: var(--p2p);
    font-size: 7px;
    line-height: 12px;
    color: var(--torch-edge);
  }
  .lb-you-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    font-size: 13px;
  }
  .desk-panel > .btn {
    margin-top: 18px;
  }
  .desk-panel > .verified {
    margin-top: 16px;
  }

  /* the fight: boss card, board and keyboard, run panel */
  body.in-fight .screen-root {
    flex: 1 1 0;
    min-height: 0;
  }
  .fight-screen {
    max-width: 1280px;
    padding: 28px 14px 20px;
  }
  .fight-screen .slot-hud,
  .fight-screen .slot-boss,
  .fight-screen .slot-relics {
    display: none;
  }
  .fight-grid {
    gap: 24px;
    align-items: stretch;
  }
  .fight-left,
  .fight-right {
    display: flex;
    flex-direction: column;
    gap: 22px;
    flex: 0 1 280px;
    min-width: 230px;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .fight-screen.is-wide .fight-left,
  .fight-screen.is-wide .fight-right {
    flex-basis: 220px;
    min-width: 200px;
  }
  .fight-main {
    gap: 12px;
  }
  .kbd-hint {
    display: block;
    flex: none;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: var(--dim);
  }
  .kbd {
    width: 100%;
    max-width: 476px;
    margin: 0 auto;
    gap: 8px;
  }
  .key {
    max-width: 44px;
    height: 58px;
    font-size: 12px;
  }
  .kbd-row-2 .key {
    max-width: 44px;
  }
  .kbd-row-4 .key {
    max-width: none;
  }
  .board-head .label {
    font-size: 9px;
  }
  .board-head-right {
    font-size: 16px;
  }
  .duel-bar {
    width: 100%;
    max-width: 476px;
    align-self: center;
  }
  .slot-timer,
  .slot-hints {
    width: 100%;
    max-width: 476px;
    align-self: center;
  }
  .boss-card {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    flex: none;
  }
  .boss-card-tags {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
  }
  .boss-card-pic {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    background: var(--well);
    box-shadow: inset 0 -4px 0 var(--line);
  }
  .boss-card-name {
    margin-top: 23px;
    font-family: var(--p2p);
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    text-transform: uppercase;
  }
  .boss-card-desc {
    margin-top: 9px;
    font-size: 14px;
    line-height: 18px;
    color: var(--soft);
    text-align: center;
  }
  .boss-card .chips {
    margin-top: 18px;
  }
  .boss-card-quote {
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 2px solid var(--line);
    font-size: 16px;
    line-height: 21px;
    color: var(--ink);
  }
  .boss-card-quote svg {
    margin-top: 5px;
  }
  .trial-box {
    margin-top: 20px;
    padding: 14px 12px;
  }
  .trial-box p {
    margin-top: 9px;
    font-size: 17px;
    line-height: 22px;
  }
  .legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 4px;
    font-size: 14px;
    line-height: 18px;
    color: var(--soft);
  }
  .legend > div {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .run-panel {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    flex: none;
  }
  .run-lives {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
  }
  .run-score {
    margin-top: 22px;
    padding: 22px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .run-score-n {
    font-family: var(--p2p);
    font-size: 22px;
    line-height: 32px;
    color: var(--gold);
  }
  .run-relics-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
  }
  .run-relics-head .divider-line {
    background: var(--line);
  }
  .run-relics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
  }
  .run-relic {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .run-relic-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .run-relic-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 18px;
  }
  .run-relic-desc {
    font-size: 13px;
    line-height: 16px;
    color: var(--soft);
  }
  .run-relic-n {
    font-family: var(--p2p);
    font-size: 8px;
    color: var(--gold);
  }
  .relic-icons.is-empty-row {
    height: 54px;
    margin-top: 14px;
    justify-content: center;
    gap: 6px;
  }
  .run-panel > .small {
    margin-top: 10px;
  }
  .run-pause {
    margin-top: 28px;
  }

  /* reward (G4) */
  .reward-screen.is-desk {
    max-width: 1000px;
  }
  .reward-screen.is-desk .reward-top {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
  }
  .reward-screen.is-desk .reward-head {
    min-width: 380px;
  }
  .reward-screen.is-desk .divider {
    margin-top: 40px;
    margin-left: 13%;
    margin-right: 13%;
  }
  .reward-screen.is-desk .relic-cards {
    gap: 24px;
    margin-top: 40px;
  }
  .reward-screen.is-desk .relic-card {
    width: 240px;
    flex-basis: 240px;
    min-height: 340px;
    padding: 24px 18px 18px;
  }
  .reward-screen.is-desk .relic-card-icon {
    width: 84px;
    height: 84px;
  }
  .reward-screen.is-desk .relic-card-icon svg {
    width: 64px;
    height: 64px;
  }
  .reward-screen.is-desk .reward-take {
    width: 360px;
    align-self: center;
  }
  .reward-screen.is-desk .reward-word .wtile {
    --tile: 58px;
    --tfont: 28px;
  }

  /* game over (G5) */
  .over-desk .desk-center {
    align-items: stretch;
    max-width: 720px;
  }
  .over-desk .over-cards {
    gap: 24px;
    margin-top: 28px;
  }
  .over-desk .over-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .over-desk .over-actions > .btn {
    flex: 1 1 200px;
  }
  .over-desk .over-actions > .btn-pair {
    flex: 2 1 400px;
  }
  .over-desk .desk-side {
    margin-top: 72px;
  }
  .over-around-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .over-around .dim {
    margin-top: 10px;
  }
  .over-around .divider {
    margin-top: 18px;
  }

  /* leaderboard (G6) */
  .lb-screen.desk-screen {
    max-width: 1280px;
  }
  .lb-desk-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .lb-desk-title {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .lb-desk-h1 {
    font-family: var(--p2p);
    font-size: 24px;
    line-height: 32px;
    color: var(--gold);
    text-shadow: 3px 3px 0 var(--gold-sh);
  }
  .lb-desk-verified {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-family: var(--p2p);
    font-size: 8px;
    color: var(--soft);
  }
  .lb-desk-tabs {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
  }
  .lb-desk-tabs .tabs {
    margin: 0;
  }
  .lb-desk-tabs .btn {
    width: auto;
    flex: none;
    padding: 0 36px;
    white-space: nowrap;
  }
  .lb-table {
    margin-top: 22px;
    padding: 4px;
  }
  .lb-trow {
    display: grid;
    grid-template-columns: 70px 50px 1fr 140px;
    align-items: center;
    min-height: 36px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
  }
  .lb-trow.is-head {
    min-height: 44px;
    border-bottom: 2px solid var(--frame);
    font-family: var(--p2p);
    font-size: 8px;
    color: var(--dim);
  }
  .lb-trow.is-head .gold {
    text-align: end;
  }
  .lb-trow .lb-name {
    font-size: 17px;
    font-weight: 600;
  }
  .lb-trow .lb-val {
    font-size: 11px;
  }
  .lb-trow.is-you {
    border: 2px solid var(--torch);
    background: #2a2038;
  }
  .lb-trow.is-you .lb-name {
    color: var(--torch-edge);
  }
  .lb-desk-foot {
    margin-top: 14px;
  }
  .lb-body {
    flex: none;
  }
}

/* Arabic, Hindi, Chinese and the other scripts the pixel fonts lack: the
   tiny pixel labels would be unreadable in a fallback font */
.wide-script :is(.label, .tag, .chip, .btn, .divider-text, .hud-floor, .saved-label, .saved-go, .relic-all,
    .set-label, .ribbon, .toast, .head-toast, .duel-turn, .hint-echo, .board-label, .board-tab, .around-you,
    .lb-you, .lb-you-tag, .row-counts, .relic-rarity,
    .relic-row-n, .pause-summary, .over-best, .topbar-title, .dialog-title, .seo-q dt, .logo-tag) {
  font-size: 12px;
  line-height: 1.35;
}

/* a narrow desktop (1024-1279) or a long translation: the header wraps, the
   run status keeps its place on the right */
@media (min-width: 1024px) and (max-width: 1279px) {
  .btn-nav {
    padding: 0 10px;
    font-size: 8px;
  }
  .deskbar-right {
    gap: 10px 16px;
  }
}
/* a short laptop screen (1366 x 657): the fight keeps its keyboard in view */
@media (min-width: 1024px) and (max-height: 780px) {
  .fight-screen {
    padding-top: 16px;
  }
  .key {
    height: 46px;
  }
  .kbd {
    gap: 6px;
  }
  .kbd-hint {
    display: none;
  }
  .boss-card-pic {
    height: 120px;
  }
  .boss-card-pic svg {
    width: 96px;
    height: 96px;
  }
}
