/* SHIFT-IT · Little Worlds edition. Shared controls remain in style.css. */
:root {
  --ink: #f5f2e9;
  --muted: #b8c4c8;
  --night: #101b23;
  --panel: #1d2b34;
  --line: #dcece323;
  --mint: #d6f3a1;
  --coral: #efb097;
  --scene-image: url("art/rooftop-relay.webp");
}
html {
  background: #101b23;
}
body {
  background: #101b23;
  overflow-x: hidden;
}
.world-atmosphere {
  position: fixed;
  inset: -80px;
  pointer-events: none;
  background:
    linear-gradient(90deg, #101b23ed, #101b23c4 48%, #101b23ee),
    var(--scene-image) center/cover;
  filter: blur(34px);
  opacity: 0.76;
}
.world-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 48% 20%, #b7d9a310, transparent 62%);
}
.app-shell {
  max-width: 1440px;
  padding: max(16px, env(safe-area-inset-top))
    max(40px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom))
    max(40px, env(safe-area-inset-left));
}
.app-shell::before {
  display: none;
}
.topbar {
  height: 64px;
  border-bottom: 1px solid #e4ecdc17;
  margin-bottom: 34px;
}
.brand {
  font-size: 23px;
  letter-spacing: -0.055em;
  font-weight: 950;
  gap: 11px;
}
.brand-symbol {
  width: 34px;
  height: 34px;
  border-radius: 10px 10px 10px 3px;
  background: var(--mint);
  color: #16231d;
  font:
    italic 900 26px Georgia,
    serif;
  box-shadow: 0 3px 0 #6f8b48;
  transform: rotate(-6deg);
}
.brand-symbol span {
  font: 800 13px sans-serif;
  top: 1px;
  right: 1px;
}
.studio-label {
  color: #aebfbd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
}
.studio-label b {
  color: var(--ink);
  margin-left: 5px;
}
.icon-button {
  border-radius: 50%;
  border-color: #e4ecdc35;
  background: #e4ecdc07;
}
.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
#pause-button {
  font-size: 18px;
}
.pause-dialog {
  width: min(92vw, 390px);
  padding: 32px 25px 27px;
  border: 1px solid #dcece343;
  border-radius: 24px;
  background: radial-gradient(ellipse at top, #3c5143, #203039 70%);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 90px #0008;
}
.pause-dialog::backdrop {
  background: #09171cd9;
  backdrop-filter: blur(18px);
}
.pause-signal {
  display: block;
  color: var(--mint);
  font-size: 49px;
  margin: 2px 0 23px;
}
.pause-dialog h2 {
  font:
    400 43px/1.1 Georgia,
    serif;
  letter-spacing: -0.055em;
  margin: 14px 0;
}
.pause-dialog > p:not(.section-kicker) {
  font-size: 14px;
  line-height: 1.8;
  color: #c9d7cd;
  margin: 17px 0 27px;
}
.pause-dialog .primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  border-radius: 11px;
  padding: 0 16px;
}
.app-shell main {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(340px, 450px) minmax(
      190px,
      1fr
    );
  gap: clamp(24px, 4vw, 64px);
  padding: 0;
  align-items: start;
}
.intro {
  padding: 42px 0 0;
  display: block;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.17em;
  line-height: 1.6;
  color: var(--mint);
  margin-bottom: 20px;
}
.eyebrow-dot {
  width: 5px;
  height: 5px;
  background: var(--mint);
  box-shadow: 0 0 12px #d6f3a160;
}
.intro h1 {
  font-size: clamp(37px, 3.55vw, 52px);
  letter-spacing: -0.065em;
  line-height: 1.07;
  font-weight: 400;
}
.intro h1 em {
  color: #edb69c;
}
.intro-copy {
  display: block;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px 0 26px;
  max-width: 240px;
}
.scene-postcard {
  display: block;
  width: min(100%, 226px);
  padding: 8px 8px 0;
  background: #e7e1d1;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 12px 35px #0005;
  transform: rotate(-4deg);
  transition: transform 0.2s ease;
}
.scene-postcard:hover {
  transform: rotate(-1deg) translateY(-3px);
}
.postcard-art {
  display: block;
  aspect-ratio: 1.12;
  background: var(--scene-image) center/cover;
}
.postcard-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  color: #39413d;
  font-size: 8px;
  letter-spacing: 0.18em;
  font-weight: 800;
}
.postcard-label span {
  font-size: 18px;
}
.how-to-shift {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 245px;
}
.mini-shift {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}
.mini-shift i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d6f3a140;
  border-radius: 6px;
  color: var(--mint);
  font-style: normal;
  font-size: 11px;
  background: #d6f3a10d;
}
.mini-shift i:last-child {
  border-style: dashed;
  background: none;
}
.how-to-shift p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
}
.how-to-shift strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.play-stage {
  min-width: 0;
  position: relative;
}
.mode-switch {
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 13px;
  border: 1px solid #dcece31c;
  background: #07131b70;
  gap: 3px;
}
.mode-switch button {
  min-height: 43px;
  font-size: 12px;
  color: #b8c4c8;
  border-radius: 9px;
}
.mode-switch button.active {
  background: #d6f3a1;
  color: #1b2921;
  box-shadow: 0 2px 7px #0003;
}
.play-panel {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  padding: 17px;
  border-radius: 22px;
  border: 1px solid #d7e5dc36;
  background: linear-gradient(145deg, #31424bdc, #202e36e8 58%, #26343b);
  box-shadow:
    0 20px 65px #030b145c,
    inset 0 1px #ffffff12;
}
.puzzle-heading {
  margin-bottom: 15px;
  min-height: 44px;
}
.section-kicker {
  color: var(--mint);
  font-size: 9px;
  letter-spacing: 0.16em;
  margin: 0 0 5px;
}
.puzzle-heading h2 {
  font-family: "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-weight: 700;
  font-size: 27px;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.daily-number {
  color: #dce5df;
  border-color: #dcece32b;
  background: #101e2760;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0.07em;
  padding: 9px;
}
.puzzle-heading-side {
  gap: 6px;
}
.puzzle-heading-side button {
  font-size: 11px;
  background: #334840;
  border-color: #d6f3a155;
}
.board-wrap {
  max-width: min(100%, max(240px, calc(100svh - 370px)));
  margin-inline: auto;
  padding: 0;
  border: 5px solid #101b24;
  border-radius: 12px;
  box-shadow:
    0 2px 0 #e8d9b326,
    0 12px 26px #06101955,
    inset 0 0 0 1px #000;
}
.board {
  padding: 3px;
  gap: 4px;
  background: #101b24;
}
.tile {
  border-radius: 5px;
  background-color: #54677b;
  box-shadow:
    inset 0 1px 0 #fff5,
    inset 0 -3px 0 #08162060,
    0 2px 3px #0005;
  isolation: isolate;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px #ffffff18;
}
.tile:not(:disabled):hover {
  filter: brightness(1.1);
}
.tile:focus-visible {
  outline-offset: -4px;
  z-index: 2;
}
.tile-number {
  min-width: 22px;
  height: 22px;
  margin: 0 0 6px 6px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 750;
  color: #fffdf5;
  background: #10202bbb;
  border: 1px solid #fff4;
  box-shadow: 0 2px 7px #0002;
  backdrop-filter: blur(8px);
}
.gap-tile {
  position: relative;
  overflow: hidden;
  border: 1px dashed #b8d5c64d;
  color: #cfe8bf;
  background: radial-gradient(circle, #29443980, #0b1720 70%);
  border-radius: 5px;
  font-size: 29px;
  box-shadow: inset 0 3px 12px #0005;
}
.gap-tile::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  box-shadow: 0 0 20px #d6f3a10e;
  pointer-events: none;
}
.new-run .gap-tile {
  animation: gap-breathe 2.8s ease-in-out 2;
}
@keyframes gap-breathe {
  50% {
    border-color: #d6f3a19c;
    color: #f2ffdc;
  }
}
.board-flash {
  background: #e7f9b820;
}
.puzzle-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0 0;
  min-height: 42px;
  font-size: 11px;
  line-height: 1.3;
  color: #c1cdcd;
}
.puzzle-caption > span:first-child {
  flex: 1;
}
.scene-mark {
  display: none;
}
.peek-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 62px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #ffffff09;
  color: #f3f5e9;
  font-size: 11px;
  font-weight: 700;
}
.peek-button span {
  color: var(--mint);
  font-size: 15px;
}
.alignment {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  color: #b2c3bc;
  font-size: 8px;
  letter-spacing: 0.11em;
}
.alignment-track {
  height: 3px;
  flex: 1;
  min-width: 0;
  background: #070f184d;
  border-radius: 3px;
  overflow: hidden;
}
.alignment-track i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--mint);
  transition: width 0.25s ease;
  box-shadow: 0 0 10px #d6f3a160;
}
.alignment strong {
  flex: 0 0 auto;
  white-space: nowrap;
  color: #dceacd;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.stats {
  margin: 17px 0 13px;
  padding: 0;
  border: 0;
  background: none;
  gap: 0;
}
.stats > div {
  padding: 6px 0;
  border-right: 1px solid #dcece31a;
}
.stats > div:last-child {
  border: 0;
}
.stat-label {
  color: #acbdbd;
  font-size: 9px;
  letter-spacing: 0.13em;
}
.stats strong {
  font-size: 23px;
  font-weight: 550;
  letter-spacing: -0.03em;
  margin-top: 5px;
  color: #f4f4e8;
  font-variant-numeric: tabular-nums;
}
.actions,
body.large-text.relay-mode .actions {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: none;
  gap: 8px;
  grid-template-columns: 1.25fr 1fr 1fr;
}
.actions button {
  min-height: 49px;
  font-size: 12px;
  border-radius: 12px;
}
.primary-button {
  background: var(--mint);
  border: 1px solid #eafac8;
  color: #18281d;
  box-shadow:
    0 3px 0 #627c42,
    0 5px 12px #0002;
  font-weight: 800;
}
.primary-button:hover {
  background: #e1f8bd;
}
.primary-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #627c42;
}
.secondary-button {
  background: #cedcdb09;
  border: 1px solid #ccdfd334;
  color: #e0e7df;
  font-weight: 650;
}
.secondary-button:hover:not(:disabled) {
  background: #ccdfd317;
}
button:disabled {
  opacity: 0.42;
}
.tile:disabled {
  opacity: 1;
}
.utility-row {
  display: flex;
  justify-content: space-between;
  gap: 3px;
  margin: 13px 0 0;
}
.utility-row button {
  min-height: 44px;
  font-size: 11px;
  color: #bdc9c8;
  padding: 0 5px;
  border-radius: 8px;
}
.utility-row button:hover,
.utility-row button[aria-expanded="true"] {
  color: var(--mint);
  background: #d6f3a10a;
}
.live-status {
  color: var(--mint);
  min-height: 0;
  margin: 6px 0 0;
  line-height: 1.5;
  font-size: 11px;
}
.live-status:empty {
  margin: 0;
}
.relay-rule {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  background: #101f2680;
  border: 1px solid #d6f3a12b;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}
.relay-rule strong {
  grid-column: 1/-1;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--mint);
}
.relay-rule span {
  font-size: 10px;
  line-height: 1.5;
  color: #c3d0c9;
}
.relay-rule b {
  font-weight: 650;
  color: #f0eadc;
}
body.relay-mode .intro {
  padding-top: 42px;
}
body.relay-mode .intro-copy {
  display: block;
}
.route-atlas {
  padding-top: 47px;
  max-width: 260px;
}
.route-atlas .eyebrow {
  font-size: 8px;
  color: #b7c2bb;
  margin-bottom: 17px;
}
.route-atlas h2 {
  font:
    400 34px/1.1 Georgia,
    serif;
  letter-spacing: -0.055em;
  margin: 0;
}
.route-atlas h2 em {
  color: #d9ebaa;
}
.atlas-intro {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 230px;
  margin: 17px 0 24px;
}
.atlas-world {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
}
.atlas-thumb {
  display: block;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: url("art/rooftop-relay.webp") center/cover;
  border: 1px solid #dcece33b;
  box-shadow: 0 4px 14px #0003;
}
.atlas-world small {
  display: block;
  color: #9fb6aa;
  font-size: 7px;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}
.atlas-world strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
}
.atlas-state {
  display: block;
  font-size: 9px;
  color: #a9bbb7;
  margin-top: 5px;
  line-height: 1.5;
}
.atlas-world.restored .atlas-state {
  color: var(--mint);
}
.atlas-world.restored .atlas-thumb {
  border-color: #d6f3a18a;
}
.atlas-branch {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 30px 2px 12px;
  font-size: 7px;
  letter-spacing: 0.05em;
  color: #ccdbc8;
}
.atlas-branch::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 24%;
  right: 24%;
  height: 17px;
  border: 1px solid #d6f3a14f;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.atlas-destinations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.atlas-destinations .atlas-world {
  display: block;
}
.atlas-destinations .atlas-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1.05;
  margin-bottom: 9px;
}
.atlas-destinations strong {
  font-size: 11px;
}
[data-atlas-world="night-market"] .atlas-thumb {
  background-image: url("art/night-market.webp");
}
[data-atlas-world="signal-garden"] .atlas-thumb {
  background-image: url("art/signal-garden.webp");
}
.atlas-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  border: 1px solid #d6f3a150;
  border-radius: 11px;
  background: #d6f3a10a;
  color: #dcecb7;
  font-size: 11px;
  font-weight: 700;
  padding: 0 13px;
  margin-top: 25px;
}
.atlas-button:hover {
  background: #d6f3a11d;
}
.atlas-footnote {
  color: #a4b4b1;
  font:
    italic 12px Georgia,
    serif;
  text-align: center;
  margin-top: 13px;
}
.settings,
.worldbook {
  background: #1c2d35f5;
  border: 1px solid #dcece326;
  border-radius: 15px;
  box-shadow: 0 14px 35px #0003;
  padding: 17px;
}
.setting-row {
  border-color: #dcece319;
}
.setting-row strong {
  color: #e7eee7;
}
.toggle {
  background: var(--mint);
  border-color: #d6f3a170;
}
.toggle span {
  background: #14251e;
}
.toggle.off {
  background: #45545a;
}
.toggle.off span {
  background: #d3ddd7;
}
.size-switch button.active {
  background: var(--mint);
  color: #17271f;
}
.worldbook-heading h2 {
  font-size: 25px;
}
.worldbook-card {
  background: #11212a5c;
  border-color: #dcece322;
  border-radius: 11px;
}
.worldbook-card.restored {
  border-color: #d6f3a148;
}
.worldbook-thumb {
  background-size: cover;
  background-position: center;
  border-radius: 7px;
}
.worldbook-state {
  color: #abbeb5;
}
.worldbook-card.restored .worldbook-state {
  color: var(--mint);
}
.worldbook-note {
  color: #bccbc5;
}
footer {
  display: flex;
  margin-top: 26px;
  padding-top: 16px;
  color: #95a6a5;
  border-color: #dcece313;
  font-size: 8px;
  letter-spacing: 0.13em;
}
.modal {
  background: #08151be6;
  backdrop-filter: blur(18px);
}
.modal-card {
  background: linear-gradient(150deg, #30464b, #1b2c35 65%);
  border-color: #e0ecd746;
  border-radius: 23px;
  padding: 18px;
  max-width: 430px;
  box-shadow: 0 35px 100px #0008;
}
.win-scene {
  border-radius: 13px;
  margin-bottom: 20px;
  border: 1px solid #ffffff20;
  box-shadow: 0 8px 24px #0003;
}
.win-scene::after {
  left: 54%;
  top: 42%;
  width: 130px;
  height: 130px;
}
.win-scene[data-world="signal-garden"]::after {
  left: 60%;
  top: 35%;
  width: 190px;
  height: 190px;
}
.win-scene[data-world="night-market"]::after {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 23% 19%, #ffe5a580, transparent 7%),
    radial-gradient(circle at 35% 24%, #ffe5a580, transparent 7%),
    radial-gradient(circle at 46% 25%, #ffe5a580, transparent 7%),
    radial-gradient(circle at 62% 23%, #ffe5a580, transparent 7%),
    radial-gradient(circle at 74% 18%, #ffe5a580, transparent 7%),
    radial-gradient(circle at 87% 11%, #ffe5a580, transparent 7%);
}
.modal-card h2 {
  font-size: 42px;
  color: #f2f2df;
}
.modal-card .world-story {
  color: #d6decf !important;
  font-size: 16px !important;
  line-height: 1.5;
}
.modal-card .memento {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #d6f3a123;
  padding-top: 12px;
  margin: 12px 0 17px;
  color: #c9ddb5 !important;
  font-size: 11px !important;
}
.memento span {
  color: var(--mint);
  font-size: 21px;
}
.modal-actions button {
  min-height: 47px;
  border-radius: 10px;
}
.picture-dialog {
  width: min(94vw, 510px);
  max-height: calc(100svh - 28px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid #dcece349;
  border-radius: 21px;
  background: #20323a;
  color: var(--ink);
  box-shadow: 0 30px 90px #0008;
}
.picture-dialog::backdrop {
  background: #07151be6;
  backdrop-filter: blur(14px);
}
.picture-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.picture-heading h2 {
  margin: 0;
  font:
    400 29px Georgia,
    serif;
  letter-spacing: -0.04em;
}
.picture-heading .icon-button {
  flex: 0 0 auto;
}
.picture-dialog img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 11px;
  object-fit: cover;
}
.picture-dialog > p {
  font-size: 12px;
  color: #d0d8cc;
  text-align: center;
  line-height: 1.6;
  margin: 17px 0;
}
.picture-dialog > .primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  border-radius: 11px;
  padding: 0 17px;
}
.erase-dialog {
  background: #21333a;
  color: var(--ink);
}
.save-warning {
  background: #3b3329;
  border-color: #ecc99166;
}
.save-warning p {
  color: #ffe5bc;
}
body.large-text .puzzle-caption {
  font-size: 14px;
}
body.large-text .peek-button {
  font-size: 14px;
  min-height: 44px;
}
body.large-text .alignment {
  font-size: 10px;
}
body.large-text .alignment strong {
  font-size: 12px;
}
@media (max-width: 1150px) and (min-width: 701px) {
  .app-shell {
    padding-inline: 24px;
  }
  .app-shell main {
    grid-template-columns: minmax(320px, 430px) minmax(180px, 230px);
    justify-content: center;
    gap: 42px;
  }
  .intro,
  body.relay-mode .intro {
    display: none;
  }
  .topbar {
    margin-bottom: 23px;
  }
  .route-atlas {
    padding-top: 35px;
  }
}
@media (max-width: 700px) {
  .app-shell {
    max-width: 492px;
    padding: max(8px, env(safe-area-inset-top))
      max(17px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(17px, env(safe-area-inset-left));
  }
  .app-shell main {
    display: block;
    padding: 0;
  }
  .intro,
  body.relay-mode .intro,
  .route-atlas {
    display: none;
  }
  .topbar {
    height: 51px;
    margin-bottom: 13px;
  }
  .brand {
    font-size: 22px;
    gap: 9px;
  }
  .brand-symbol {
    width: 29px;
    height: 29px;
    font-size: 24px;
  }
  .studio-label {
    margin-left: auto;
    margin-right: 15px;
    font-size: 7px;
    letter-spacing: 0.08em;
    max-width: 75px;
    line-height: 1.6;
    text-align: right;
  }
  .studio-label b {
    margin: 0;
  }
  .mode-switch {
    margin-bottom: 12px;
  }
  .mode-switch button {
    min-height: 39px;
    font-size: 11px;
  }
  .play-panel {
    padding: 13px;
    border-radius: 19px;
  }
  .puzzle-heading {
    margin-bottom: 12px;
    min-height: 42px;
  }
  .puzzle-heading h2 {
    font-size: 26px;
  }
  .board-wrap {
    max-width: 100%;
  }
  .puzzle-caption {
    font-size: 11px;
    min-height: 42px;
  }
  .stats {
    margin: 12px 0 10px;
  }
  .stats strong {
    font-size: 22px;
  }
  .actions {
    margin: 0;
    padding: 0;
  }
  .actions button {
    min-height: 48px;
  }
  .utility-row {
    margin-top: 10px;
  }
  .utility-row button {
    font-size: 10px;
  }
  footer {
    margin-top: 15px;
    padding-top: 12px;
    font-size: 7px;
  }
  .alignment {
    font-size: 7px;
  }
  .alignment strong {
    font-size: 9px;
  }
}
@media (max-width: 380px) {
  .studio-label {
    display: none;
  }
  .app-shell {
    padding-inline: max(13px, env(safe-area-inset-left))
      max(13px, env(safe-area-inset-right));
  }
  .play-panel {
    padding: 10px;
  }
  .puzzle-heading h2 {
    font-size: 23px;
  }
  .board-wrap {
    max-width: 272px;
  }
  .puzzle-caption {
    font-size: 11px;
    gap: 5px;
  }
  .peek-button {
    min-width: 54px;
    font-size: 10px;
  }
  .actions {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .actions button {
    font-size: 11px;
  }
  .utility-row button {
    padding: 0 2px;
    font-size: 10px;
  }
  .daily-number {
    font-size: 9px;
    padding: 8px 6px;
  }
  .relay-rule {
    padding: 7px;
  }
  .relay-rule span {
    font-size: 9px;
  }
  .picture-dialog {
    padding: 15px;
  }
}
@media (max-width: 380px) and (max-height: 720px) {
  .board-wrap {
    max-width: 248px;
  }
  .topbar {
    height: 47px;
    margin-bottom: 10px;
  }
  .mode-switch {
    margin-bottom: 10px;
  }
  .puzzle-heading {
    min-height: 37px;
    margin-bottom: 9px;
  }
  .stats {
    margin: 9px 0;
  }
  .utility-row {
    margin-top: 6px;
  }
  footer {
    display: none;
  }
}
@media (orientation: landscape) and (min-width: 650px) and (max-width: 1200px) {
  .app-shell {
    max-width: none;
    padding: max(5px, env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    --landscape-panel-width: min(46vw, calc(100svh - 60px));
  }
  .topbar {
    height: 43px;
    margin-bottom: 9px;
  }
  .app-shell main {
    display: block;
    padding: 0;
  }
  .intro,
  body.relay-mode .intro,
  .route-atlas,
  footer {
    display: none;
  }
  .play-stage {
    padding-left: calc(var(--landscape-panel-width) + 24px);
    min-height: calc(100svh - 68px);
  }
  .play-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--landscape-panel-width);
    padding: 10px;
    border-radius: 15px;
  }
  .puzzle-heading {
    min-height: 29px;
    margin-bottom: 7px;
  }
  .puzzle-heading h2 {
    font-size: 21px;
  }
  .section-kicker {
    font-size: 7px;
    margin-bottom: 3px;
  }
  .board-wrap,
  body.relay-mode .board-wrap {
    max-width: min(100%, calc(100svh - 178px));
  }
  .alignment {
    display: none;
  }
  .puzzle-caption {
    min-height: 30px;
    font-size: 9px;
    padding: 0;
  }
  .peek-button {
    min-height: 44px;
  }
  .mode-switch {
    margin-bottom: 8px;
  }
  .mode-switch button {
    min-height: 38px;
  }
  .stats {
    margin: 9px 0 12px;
  }
  .stats strong {
    font-size: 22px;
  }
  .actions,
  body.large-text.relay-mode .actions {
    position: static;
  }
  .utility-row {
    margin-top: 7px;
  }
  body.relay-mode .relay-rule,
  body.large-text.relay-mode .relay-rule {
    position: absolute;
    top: 235px;
    left: calc(100% + 24px);
    width: calc(100vw - var(--landscape-panel-width) - 64px);
    margin: 0;
    padding: 8px;
  }
  body.large-text.relay-mode .relay-rule {
    top: 263px;
  }
  .settings,
  .worldbook {
    position: relative;
    z-index: 5;
  }
}
@media (forced-colors: active) {
  .world-atmosphere {
    display: none;
  }
  .alignment-track {
    border: 1px solid CanvasText;
  }
  .alignment-track i {
    background: Highlight;
  }
  .scene-postcard {
    border: 1px solid ButtonText;
  }
  .mode-switch button.active {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
  .tile-number {
    color: CanvasText;
    background: Canvas;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-postcard,
  .alignment-track i {
    transition: none;
  }
  .gap-tile {
    animation: none !important;
  }
}

/* Six chapters: visible progress, honest locks and replayable places. */
.mode-switch {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mode-switch button {
  padding-inline: 4px;
}
.journey-map {
  display: grid;
  gap: 9px;
}
.journey-map .atlas-world {
  width: 100%;
  text-align: left;
  background: #ffffff05;
  border: 1px solid #ffffff12;
  border-radius: 13px;
  padding: 9px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}
.journey-map .atlas-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
}
.journey-map .atlas-world strong {
  font-size: 13px;
}
.journey-map .atlas-world small {
  font-size: 8px;
}
.journey-map .atlas-state {
  font-size: 9px;
}
.journey-map .atlas-world:not(:disabled):hover {
  border-color: #d6f3a180;
  background: #d6f3a112;
}
.journey-map .atlas-world.locked {
  opacity: 0.66;
}
.locked .atlas-thumb,
.worldbook-card.locked .worldbook-thumb {
  filter: grayscale(0.9) brightness(0.7);
}
.world-play {
  margin-top: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #d6f3a166;
  border-radius: 9px;
  background: #d6f3a115;
  color: #d6f3a1;
  font: inherit;
  font-size: 12px;
}
.world-play:disabled {
  color: #c0c8c5;
  border-color: #ffffff22;
}
.relay-extra {
  margin-top: 8px;
  font-size: 10px;
}
@media (max-width: 600px) {
  .mode-switch button {
    font-size: 10px;
  }
}

/* Phone play: the picture is the surface; controls stay quiet around it. */
@media (max-width: 700px) and (orientation: portrait) {
  .app-shell {
    max-width: 492px;
    min-height: 100svh;
    padding: max(8px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }
  .topbar {
    height: 46px;
    margin-bottom: 8px;
    border: 0;
  }
  .brand {
    font-size: 19px;
    gap: 7px;
  }
  .brand-symbol {
    width: 27px;
    height: 27px;
    font-size: 22px;
  }
  .studio-label {
    display: none;
  }
  .header-controls {
    margin-left: auto;
    gap: 6px;
  }
  .header-controls .icon-button {
    width: 44px;
    height: 44px;
    border-color: #dcece321;
    background: #ffffff04;
  }
  .mode-switch {
    margin-bottom: 13px;
    padding: 3px;
    border: 1px solid #dcece313;
    background: #07171c50;
    border-radius: 15px;
    box-shadow: none;
  }
  .mode-switch button {
    min-height: 44px;
    padding-inline: 3px;
    font-size: 11px;
    border-radius: 11px;
  }
  .mode-switch button.active {
    background: #d6f3a11c;
    color: #e1f5bd;
    box-shadow: inset 0 0 0 1px #d6f3a142;
  }
  .play-panel {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
  .puzzle-heading {
    margin: 0 5px 12px;
    min-height: 41px;
  }
  .puzzle-heading h2 {
    font-size: 27px;
    line-height: 1.08;
  }
  .puzzle-heading .section-kicker {
    font-size: 8px;
    letter-spacing: 0.13em;
    margin-bottom: 5px;
    color: #bccbbf;
  }
  .daily-number {
    border-color: #ffffff15;
    background: #ffffff04;
    color: #c6d4ce;
  }
  .board-wrap,
  body.relay-mode .board-wrap {
    width: min(100%, calc(100svh - 335px));
    max-width: none;
    margin-inline: auto;
    padding: 5px;
    border-radius: 14px;
    border-color: #e1edd934;
    background: #08181da8;
    box-shadow:
      0 14px 36px #00000040,
      0 0 0 1px #ffffff06;
  }
  body.relay-mode .board-wrap {
    width: min(100%, calc(100svh - 405px));
  }
  .board {
    gap: 4px;
  }
  .tile,
  .gap-tile {
    border-radius: 7px;
  }
  .tile-number {
    font-size: 10px;
    background: #0b191ba8;
    box-shadow: none;
    border-color: #ffffff32;
  }
  .puzzle-caption {
    min-height: 44px;
    margin: 7px 4px 0;
    padding: 0;
    font-size: 11px;
  }
  .peek-button {
    min-width: 60px;
    min-height: 44px;
    font-size: 12px;
    background: none;
  }
  .alignment {
    margin: 0 5px;
    padding-top: 0;
    min-height: 14px;
    font-size: 8px;
  }
  .alignment strong {
    font-size: 10px;
  }
  .stats {
    margin: 12px 0;
    padding: 0;
  }
  .stats > div {
    padding: 0 8px;
  }
  .stats span {
    font-size: 8px;
    letter-spacing: 0.09em;
    color: #a8bcb9;
  }
  .stats strong {
    margin-top: 3px;
    font-size: 17px;
    color: #d6e0d8;
  }
  .actions {
    gap: 8px;
  }
  .actions button {
    min-height: 48px;
    border-radius: 13px;
    font-size: 12px;
  }
  body:not(.solved-mode) #new-button {
    color: #d6e0d8;
    background: #ffffff06;
    border: 1px solid #dcece327;
    box-shadow: none;
  }
  .utility-row {
    min-height: 44px;
    margin-top: 8px;
    gap: 6px;
  }
  .utility-row button {
    min-height: 44px;
    font-size: 11px;
  }
  .relay-rule {
    margin: 0 4px 10px;
    padding: 8px 10px;
    border-color: #d6f3a127;
    background: #d6f3a109;
  }
  .relay-rule strong {
    font-size: 8px;
    margin-bottom: 4px;
  }
  .relay-rule span {
    font-size: 10px;
  }
  footer {
    display: none;
  }
  .picture-dialog {
    width: calc(100vw - 24px);
    padding: 14px;
    border-radius: 20px;
  }
  .pause-dialog {
    border-radius: 24px;
  }
}
@media (max-width: 700px) and (orientation: portrait) and (max-height: 650px) {
  .topbar {
    margin-bottom: 4px;
  }
  .mode-switch {
    margin-bottom: 8px;
  }
  .puzzle-heading {
    margin-bottom: 8px;
    min-height: 35px;
  }
  .puzzle-heading h2 {
    font-size: 24px;
  }
  .stats {
    margin-block: 8px;
  }
}
@media (max-width: 700px) and (orientation: portrait) and (min-height: 800px) {
  .app-shell {
    padding-top: max(16px, env(safe-area-inset-top));
  }
  .topbar {
    margin-bottom: 14px;
  }
  .mode-switch {
    margin-bottom: 20px;
  }
  .puzzle-heading {
    margin-bottom: 15px;
  }
  .stats {
    margin-block: 16px;
  }
}

/* A quiet soundtrack panel; the picture remains the focus of play. */
.audio-level {
  gap: 16px;
}
.audio-level label {
  font-size: 12px;
  color: var(--text);
}
.audio-level input {
  width: min(45%, 150px);
  min-width: 80px;
  min-height: 44px;
  padding: 0;
  accent-color: #eac69b;
}
.music-retry {
  min-height: 44px;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  padding: 0 16px;
  background: #ffffff08;
  color: #f3d5b0;
}
.music-retry[hidden] {
  display: none;
}

/* The phone is a game screen. Everything outside play lives in Pause. */
#console-menu {
  display: none;
}
#play-navigation {
  display: none;
}
body.console-phone #play-navigation {
  display: block;
  width: min(100%, 420px);
  margin: 18px auto 0;
}
#pause-feedback {
  font-size: 12px;
  line-height: 1.5;
  color: #e1f5bd;
}
#pause-feedback:empty {
  display: none;
}
body.console-phone .app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}
body.console-phone .topbar {
  flex: 0 0 44px;
  margin: 0;
  padding: 0 5px;
}
body.console-phone .brand {
  font-size: 12px;
  opacity: 0.66;
  letter-spacing: 0.08em;
}
body.console-phone .brand-symbol {
  display: none;
}
body.console-phone .studio-label,
body.console-phone .intro,
body.console-phone .route-atlas,
body.console-phone footer,
body.console-phone .puzzle-heading-side,
body.console-phone .puzzle-heading .section-kicker,
body.console-phone .puzzle-caption,
body.console-phone .alignment {
  display: none;
}
body.console-phone main {
  display: flex;
  align-items: stretch;
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 0;
}
body.console-phone .play-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 16px 0 36px;
}
body.console-phone .play-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body.console-phone .puzzle-heading {
  display: block;
  text-align: center;
  margin: 0 0 22px;
  min-height: 0;
}
body.console-phone .puzzle-heading h2 {
  font-size: 27px;
  font-weight: 700;
  color: #e7e5da;
  letter-spacing: -0.025em;
}
body.console-phone .board-wrap {
  width: min(100%, max(224px, calc(100svh - 410px)));
  margin-inline: auto;
  padding: 4px;
  border: 1px solid #c9ddd32e;
  border-radius: 13px;
  background: #07181b80;
  box-shadow: 0 20px 60px #00000035;
}
body.console-phone .board {
  gap: 3px;
}
body.console-phone .tile,
body.console-phone .gap-tile {
  border-radius: 6px;
}
body.console-phone .actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 21px 0 0;
}
body.console-phone .actions button {
  width: 82px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 24px;
  background: #ffffff05;
  color: #c0ceca;
  font-size: 12px;
  box-shadow: none;
}
body.console-phone .actions #undo-button {
  order: 0;
}
body.console-phone .actions #peek-button {
  order: 1;
}
body.console-phone .actions #hint-button {
  order: 2;
}
body.console-phone .actions #result-button {
  order: 3;
}
body.console-phone .actions button:disabled {
  opacity: 0.35;
}
body.console-phone #status:empty {
  display: none;
}
body.console-phone #status {
  flex: 0 0 auto;
  margin: 10px 8px 0;
}
body.console-phone .pause-dialog {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100svh - 32px);
  padding: 24px 20px;
  border-radius: 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.console-phone .pause-signal,
body.console-phone #pause-description {
  display: none;
}
body.console-phone .pause-dialog > .section-kicker {
  font-size: 9px;
  margin-bottom: 7px;
}
body.console-phone .pause-dialog h2 {
  margin: 0 0 16px;
  font-size: 30px;
}
body.console-phone #resume-button {
  width: 100%;
  min-height: 48px;
  position: sticky;
  top: 0;
  z-index: 2;
}
body.console-phone #console-menu {
  display: block;
  text-align: left;
}
body.console-phone #play-stats .stats {
  display: grid;
  width: min(100%, max(224px, calc(100svh - 410px)));
  margin: 0 auto 16px;
  padding: 0 4px;
  background: none;
  border: 0;
}
body.console-phone #play-stats .stat-label {
  font-size: 8px;
  letter-spacing: 0.1em;
  color: #a8bcb9;
}
body.console-phone #play-stats strong {
  margin-top: 3px;
  font-size: 16px;
  color: #d6e0d8;
  font-variant-numeric: tabular-nums;
}
body.console-phone #play-modes .mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 8px;
  border: 0;
  background: none;
  padding: 0;
}
body.console-phone #play-modes button {
  min-height: 44px;
  border-radius: 12px;
  background: #ffffff06;
}
body.console-phone #play-modes button.active {
  background: #d6f3a11c;
  color: #e1f5bd;
  box-shadow: inset 0 0 0 1px #d6f3a142;
}
body.console-phone #pause-tools,
body.console-phone #play-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
body.console-phone #play-tools #new-button,
body.console-phone #play-tools #leaderboard-button {
  flex: 1;
  min-height: 44px;
  font-size: 13px;
  border-radius: 12px;
  background: #ffffff06;
  border: 1px solid #dcece327;
  color: #d6e0d8;
  box-shadow: none;
  min-width: 0;
  padding-inline: 9px;
}
body.console-phone #play-tools #sound-button {
  flex: 0 0 44px;
}
body.console-phone #pause-tools #resume-daily-button {
  flex: 1 0 100%;
  min-height: 44px;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #ffffff08;
  color: #e1f5bd;
  padding: 8px;
}
body.console-phone #pause-navigation .utility-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0;
  gap: 3px;
}
body.console-phone #pause-navigation button {
  min-height: 44px;
  padding-inline: 6px;
  font-size: 11px;
}
body.console-phone #pause-panels .settings,
body.console-phone #pause-panels .worldbook {
  margin: 12px 0 0;
}
body.console-phone #pause-help {
  margin-top: 12px;
  color: #c0ceca;
  font-size: 12px;
  line-height: 1.6;
}
body.console-phone #pause-help summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
}
body.console-phone #pause-help .relay-rule {
  display: grid;
  font-size: 12px;
  position: static;
  width: auto;
}
body.console-phone #pause-help .relay-rule[hidden] {
  display: none;
}
@media (orientation: landscape) and (max-height: 500px) {
  body.console-phone .app-shell {
    padding: max(12px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  body.console-phone .topbar {
    position: absolute;
    z-index: 2;
    top: max(12px, env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
  }
  body.console-phone .play-stage {
    min-height: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
    align-content: center;
    align-items: center;
    column-gap: 24px;
    max-width: 680px;
    margin-inline: auto;
  }
  body.console-phone .play-panel {
    position: static;
    width: 100%;
    grid-column: 1;
    grid-row: 1;
  }
  body.console-phone .puzzle-heading {
    margin-bottom: 6px;
  }
  body.console-phone .puzzle-heading h2 {
    font-size: 20px;
    line-height: 24px;
  }
  body.console-phone .board-wrap,
  body.console-phone #play-stats .stats {
    width: min(100%, calc(100svh - 174px));
    max-width: none;
  }
  body.console-phone #play-stats .stats {
    margin-bottom: 8px;
  }
  body.console-phone .actions {
    margin-top: 8px;
    grid-column: 1;
    grid-row: 2;
    gap: 4px;
  }
  body.console-phone #play-navigation {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0;
  }
}
@media (orientation: portrait) and (max-height: 760px) {
  body.console-phone .play-stage {
    padding-block: 12px;
  }
  body.console-phone .puzzle-heading {
    margin-bottom: 14px;
  }
  body.console-phone .puzzle-heading h2 {
    font-size: 23px;
  }
  body.console-phone .actions {
    margin-top: 14px;
  }
  body.console-phone .board-wrap,
  body.console-phone #play-stats .stats {
    width: min(100%, max(224px, calc(100svh - 400px)));
  }
  body.console-phone .puzzle-heading {
    margin-bottom: 8px;
  }
  body.console-phone #play-modes .mode-switch {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  body.console-phone #play-modes button {
    font-size: 10px;
    padding-inline: 3px;
  }
  body.console-phone #play-navigation {
    margin-top: 10px;
  }
  body.console-phone .play-stage {
    justify-content: flex-start;
  }
}

/* Quiet entry point; full standings appear only when requested. */
#leaderboard-button {
  min-height: 44px;
}
#leaderboard-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #b2c7bf38;
  border-radius: 24px;
  background: #17262d;
  color: #e3e9e1;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#leaderboard-dialog::backdrop {
  background: #071117cc;
  backdrop-filter: blur(8px);
}
.leaderboard-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.leaderboard-heading h2 {
  font:
    700 25px/1.15 "Trebuchet MS",
    system-ui,
    sans-serif;
  margin: 4px 0 20px;
}
.leaderboard-heading .section-kicker {
  font-size: 8px;
  letter-spacing: 0.12em;
}
.leaderboard-lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: #0c171d;
  border-radius: 14px;
}
.leaderboard-lanes button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #b9cac4;
  font-weight: 700;
}
.leaderboard-lanes button[aria-selected="true"] {
  background: #d6f3a119;
  border-color: #d6f3a165;
  color: #dff5b5;
}
.leaderboard-lanes small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.leaderboard-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 8px;
}
#leaderboard-dialog label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #b9cac4;
}
#leaderboard-dialog select,
#leaderboard-dialog input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #9fb9af55;
  background: #101e25;
  color: #eef3e9;
  font:
    14px system-ui,
    sans-serif;
}
#leaderboard-caption {
  color: #dff5b5;
  font-size: 12px;
}
.leaderboard-table-wrap {
  max-height: 260px;
  overflow: auto;
  border-block: 1px solid #ffffff16;
}
#leaderboard-dialog table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
#leaderboard-dialog th {
  position: sticky;
  top: 0;
  padding: 12px 4px;
  background: #17262d;
  color: #b9cac4;
  text-align: right;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#leaderboard-dialog td {
  padding: 14px 4px;
  border-bottom: 1px solid #ffffff0c;
  text-align: right;
}
#leaderboard-dialog th:first-child,
#leaderboard-dialog td:first-child {
  width: 24px;
  text-align: left;
  color: #dff5b5;
}
#leaderboard-dialog th:nth-child(2),
#leaderboard-dialog td:nth-child(2) {
  width: 40%;
  text-align: left;
  overflow-wrap: anywhere;
}
#leaderboard-status,
#leaderboard-account,
.leaderboard-rules,
.leaderboard-note {
  font-size: 12px;
  line-height: 1.6;
  color: #b9cac4;
}
#leaderboard-status {
  min-height: 20px;
}
#leaderboard-entry {
  border-top: 1px solid #ffffff16;
  margin-top: 16px;
  padding-top: 18px;
}
#leaderboard-start {
  width: 100%;
  min-height: 44px;
}
#leaderboard-refresh,
#leaderboard-signin,
#leaderboard-forget,
#leaderboard-forget-confirm button {
  min-height: 44px;
}
#leaderboard-signin {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #d6f3a165;
  color: #dff5b5;
}
#leaderboard-forget {
  border: 0;
  background: none;
  padding: 4px 0;
  color: #b9cac4;
  text-decoration: underline;
  font-size: 11px;
}
#leaderboard-result {
  color: #dff5b5;
  font-size: 13px;
}
#leaderboard-dialog [hidden],
#pause-help[hidden] {
  display: none !important;
}
body.console-phone #pause-navigation .utility-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 18px 0 12px;
  padding: 4px;
  border-radius: 14px;
  background: #0d1a20;
}
body.console-phone #pause-navigation button {
  border: 1px solid #b0c6be28;
  border-radius: 10px;
  background: #ffffff05;
  color: #c9d6d0;
  min-height: 50px;
  font-size: 12px;
  font-weight: 700;
}
body.console-phone #pause-navigation button[aria-selected="true"] {
  background: #d6f3a11c;
  border-color: #d6f3a175;
  color: #e3f6bd;
  box-shadow: inset 0 -3px #d6f3a1;
}
body.console-phone #pause-share:has(button:not([hidden])) {
  margin: 4px 0 12px;
}
body.console-phone #pause-share button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #b0c6be28;
  border-radius: 10px;
  background: transparent;
  color: #c9d6d0;
  font-size: 12px;
}
body.console-phone #pause-help {
  margin-top: 18px;
  padding: 16px;
  background: #ffffff05;
  border-radius: 14px;
}
body.console-phone #pause-help h3 {
  margin: 0 0 8px;
  color: #e3f6bd;
  font-size: 18px;
}
@media (max-width: 360px) {
  #leaderboard-dialog {
    padding: 16px;
  }
  .leaderboard-heading h2 {
    font-size: 22px;
  }
  body.console-phone #play-tools {
    gap: 6px;
  }
  body.console-phone #play-tools #new-button,
  body.console-phone #play-tools #leaderboard-button {
    font-size: 11px;
    padding-inline: 6px;
  }
  body.console-phone #pause-navigation button {
    font-size: 11px;
  }
}
.leaderboard-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 11px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ffffff16;
}
.ranked-key {
  color: #f3d399;
}
.unranked-key {
  color: #b9d9ec;
}
#leaderboard-dialog .leaderboard-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
#leaderboard-dialog .leaderboard-check input {
  width: 19px;
  height: 19px;
  min-height: 0;
  accent-color: #d6f3a1;
}
#leaderboard-premium-label {
  margin-bottom: 12px;
}
#leaderboard-dialog .score-ranked td:nth-child(2) {
  color: #f3d399;
}
#leaderboard-dialog .score-unranked td:nth-child(2) {
  color: #b9d9ec;
}
.score-badge {
  display: block;
  font-size: 9px;
  line-height: 1.5;
  margin-top: 4px;
  letter-spacing: 0.025em;
}
.score-you {
  background: #d6f3a111;
  box-shadow: inset 3px 0 #d6f3a1;
}
.leaderboard-placement {
  padding: 14px;
  border: 1px solid #d6f3a158;
  border-radius: 12px;
  color: #e3f6bd;
  background: #d6f3a10c;
  font-size: 14px;
  line-height: 1.5;
}
