:root {
  color-scheme: light;
  --bg: #071312;
  --panel: #fffdf8;
  --ink: #18211f;
  --muted: #6d7773;
  --line: #d9e0da;
  --line-strong: #b9c7c1;
  --teal: #00c2ad;
  --teal-dark: #007f75;
  --leaf: #9bd746;
  --rose: #e5466d;
  --blue: #2f8cff;
  --amber: #ffb02e;
  --violet: #7c5cff;
  --night: #071312;
  --night-2: #10231f;
  --hud: rgba(11, 29, 27, 0.82);
  --hud-line: rgba(120, 255, 226, 0.26);
  --radius: 8px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.18);
  --glow-teal: 0 0 0 1px rgba(77, 255, 225, 0.16), 0 0 24px rgba(0, 194, 173, 0.22);
  --glow-amber: 0 0 0 1px rgba(255, 176, 46, 0.22), 0 0 24px rgba(255, 176, 46, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(0, 194, 173, 0.18) 0 1px, transparent 1px 28px),
    linear-gradient(45deg, rgba(255, 176, 46, 0.08) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, #10231f 0%, #071312 42%, #11160e 100%);
  color: #f5fff9;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.has-multiplayer-dock {
  padding-bottom: 96px;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.shortcut-warning {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  margin: 0;
  transform: translateY(-8px);
  border: 1px solid rgba(255, 176, 46, 0.42);
  border-radius: var(--radius);
  background: rgba(11, 29, 27, 0.94);
  box-shadow: var(--shadow-soft), var(--glow-amber);
  color: #fff5d6;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.shortcut-warning.is-visible {
  transform: translateY(0);
  opacity: 1;
}

a {
  color: var(--teal);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(36, 104, 162, 0.28);
  outline-offset: 2px;
}

.app-shell {
  width: min(1500px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 24px 24px;
}

.game-board {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.home-screen {
  display: grid;
  gap: 16px;
  min-height: auto;
  grid-template-rows: auto auto;
}

.home-board {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1fr);
  align-items: center;
  gap: 42px;
  min-height: 430px;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(0, 194, 173, 0.14), transparent 34%),
    linear-gradient(300deg, rgba(255, 176, 46, 0.14), transparent 40%),
    rgba(11, 29, 27, 0.84);
  padding: 40px 42px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-board::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

.home-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 16px;
  max-width: 560px;
}

.home-kicker {
  width: fit-content;
  border: 1px solid rgba(0, 194, 173, 0.38);
  border-left: 4px solid var(--teal);
  border-radius: 999px;
  background: rgba(0, 194, 173, 0.1);
  color: #87fff0;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: var(--glow-teal);
}

.home-copy h2 {
  margin: 0;
  color: #f8fff9;
  font-size: 56px;
  line-height: 1.08;
  text-shadow: 0 0 28px rgba(0, 194, 173, 0.34);
}

.home-copy p {
  margin: 0;
  color: #b8d0c8;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.55;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.home-start-button {
  min-width: 150px;
}

.home-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  border-left: 1px solid rgba(120, 255, 226, 0.2);
  padding-left: 42px;
}

.home-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.storage-note {
  margin: 0;
  color: rgba(227, 255, 247, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.history-screen,
.leaderboard-screen {
  display: grid;
  gap: 16px;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(0, 194, 173, 0.14), transparent 34%),
    linear-gradient(300deg, rgba(229, 70, 109, 0.12), transparent 42%),
    rgba(11, 29, 27, 0.88);
  padding: 26px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.history-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.history-heading > div:first-child {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.history-kicker-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tutorial-skip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  border: 1px solid rgba(120, 255, 226, 0.2);
  border-radius: 999px;
  background: rgba(5, 18, 16, 0.42);
  color: #b8d6cf;
  cursor: pointer;
  padding: 0 10px 0 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.tutorial-skip-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--teal);
}

.tutorial-skip-toggle:hover {
  border-color: rgba(120, 255, 226, 0.36);
  color: #e8fff9;
}

.history-heading h2 {
  margin: 0;
  color: #f8fff9;
  font-size: 34px;
  line-height: 1.1;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaderboard-heading-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.leaderboard-full-button {
  min-height: 30px;
  border: 1px solid rgba(120, 255, 226, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #87fff0;
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.leaderboard-full-button:hover {
  border-color: rgba(120, 255, 226, 0.42);
  background: rgba(0, 194, 173, 0.14);
}

.leaderboard-full-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.leaderboard-full-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(120, 255, 226, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
}

.leaderboard-full-meta span {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.leaderboard-full-meta strong {
  color: #87fff0;
  font-size: 18px;
  font-weight: 950;
}

.leaderboard-full-list {
  gap: 10px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 118px;
  border: 1px solid rgba(120, 255, 226, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(120, 255, 226, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.055);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.history-list > .history-empty {
  display: block;
  color: #95bbb1;
  font-size: 15px;
  font-weight: 750;
}

.history-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.history-top-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.history-top-line strong {
  overflow: hidden;
  color: #f8fff9;
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: min(560px, 58%);
}

.history-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(120, 255, 226, 0.18);
  border-radius: 999px;
  background: rgba(5, 18, 16, 0.45);
  color: #a9d5cb;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.history-main p {
  margin: 0;
  overflow: hidden;
  color: #d6f5ee;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.history-list details {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(255, 176, 46, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 176, 46, 0.065);
  color: #ffcf7a;
}

.history-list summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
}

.history-path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0 14px 14px;
  list-style: none;
  counter-reset: history-path;
}

.history-path-list li {
  counter-increment: history-path;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: #bad5cd;
  padding: 0 11px 0 9px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.history-path-list li::before {
  margin-right: 6px;
  color: #ffcf7a;
  content: counter(history-path) ".";
  font-weight: 900;
}

.history-share-button {
  flex: 0 0 auto;
  min-height: 42px;
  white-space: nowrap;
}

.history-pagination {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) auto minmax(96px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.history-page-controls {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.history-page-controls span {
  min-width: 120px;
  color: #b8d6cf;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.history-clear-button {
  grid-column: 3;
  justify-self: end;
}

.daily-card,
.leaderboard-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(120, 255, 226, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(8, 23, 21, 0.9);
  padding: 20px;
  color: #effff9;
  box-shadow: var(--glow-teal), var(--shadow-soft);
}

.daily-card::before,
.leaderboard-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--rose));
  content: "";
}

.daily-heading,
.leaderboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.daily-heading {
  justify-content: flex-start;
}

.daily-heading span:not(.preview-doc-icon),
.daily-meta span,
.leaderboard-heading span {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 800;
}

.daily-heading h3,
.leaderboard-heading h3 {
  margin: 2px 0 0;
  color: #f8fff9;
  font-size: 22px;
  line-height: 1.2;
}

.daily-meta {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(120, 255, 226, 0.16);
  padding-top: 14px;
}

.daily-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 176, 46, 0.34);
  border-radius: 6px;
  background: rgba(255, 176, 46, 0.1);
  padding: 10px 12px;
  box-shadow: var(--glow-amber);
}

.daily-meta strong {
  overflow: hidden;
  color: #87fff0;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-countdown span {
  color: #ffd08a;
  font-size: 12px;
  font-weight: 800;
}

.daily-countdown strong {
  color: #ffcf7a;
  font-size: 16px;
  line-height: 1.2;
}

.daily-route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.daily-route div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(120, 255, 226, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
}

.daily-route span,
.daily-preview-status {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 800;
}

.daily-route strong {
  overflow: hidden;
  color: #f8fff9;
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-preview-status {
  margin: 0;
  border-top: 1px solid rgba(120, 255, 226, 0.16);
  padding-top: 12px;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-columns,
.leaderboard-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 42px 58px 72px;
  align-items: center;
  gap: 10px;
}

.leaderboard-columns {
  padding: 0 10px;
  color: #95bbb1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.leaderboard-columns span:nth-child(n + 3) {
  text-align: right;
}

.leaderboard-columns span:first-child {
  text-align: center;
}

.leaderboard-list li > :nth-child(5) {
  border-left: 1px solid rgba(120, 255, 226, 0.2);
  padding-left: 10px;
}

.leaderboard-list li {
  min-height: 42px;
  border: 1px solid rgba(120, 255, 226, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
}

.leaderboard-rank {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(185, 207, 201, 0.14);
  color: #b8d6cf;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(185, 207, 201, 0.2);
}

.leaderboard-list li:nth-child(1) .leaderboard-rank {
  background: linear-gradient(180deg, #ffe58a, #ffb02e);
  color: #2a1903;
  box-shadow: 0 0 16px rgba(255, 176, 46, 0.34);
}

.leaderboard-list li:nth-child(2) .leaderboard-rank {
  background: linear-gradient(180deg, #f7fbff, #aab9c8);
  color: #18212a;
  box-shadow: 0 0 14px rgba(210, 225, 235, 0.24);
}

.leaderboard-list li:nth-child(3) .leaderboard-rank {
  background: linear-gradient(180deg, #f4bd80, #b86a32);
  color: #241104;
  box-shadow: 0 0 14px rgba(219, 134, 65, 0.24);
}

.leaderboard-list strong {
  overflow: hidden;
  color: #f8fff9;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-stat {
  color: #95bbb1;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.leaderboard-first-completed {
  position: relative;
  isolation: isolate;
  display: inline-block;
  color: #fff4c0;
  text-shadow: 0 0 10px rgba(255, 217, 92, 0.46);
}

.leaderboard-first-completed::before {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
  inset: 74% 0 0;
  border-radius: 999px;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(255, 250, 197, 0.5) 45%, transparent 60%),
    rgba(255, 191, 61, 0.24);
  background-size: 220% 100%, 100% 100%;
  box-shadow: 0 0 12px rgba(255, 191, 61, 0.2);
  animation: leaderboardFirstCompletedGlow 2.8s ease-in-out infinite;
}

@keyframes leaderboardFirstCompletedGlow {
  0%,
  28% {
    background-position: 140% 0, 0 0;
  }

  68%,
  100% {
    background-position: -80% 0, 0 0;
  }
}

.leaderboard-list .leaderboard-empty {
  display: block;
  color: #95bbb1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preview-strip div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
  padding: 12px;
  min-width: 0;
}

.preview-strip span,
.preview-article span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.preview-strip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-article {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.preview-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.preview-doc-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(0, 194, 173, 0.5);
  border-radius: var(--radius);
  background: rgba(0, 194, 173, 0.12);
  color: #87fff0 !important;
  font-weight: 900;
  box-shadow: var(--glow-teal);
}

.preview-title-row strong {
  overflow: hidden;
  font-size: 24px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-lines {
  display: grid;
  gap: 8px;
}

.preview-lines span {
  display: block;
  height: 10px;
  border-radius: 2px;
  background: #e8eeee;
}

.preview-lines span:nth-child(1) {
  width: 96%;
}

.preview-lines span:nth-child(2) {
  width: 82%;
}

.preview-lines span:nth-child(3) {
  width: 64%;
}

.preview-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.preview-link-row span {
  border: 1px solid rgba(11, 111, 189, 0.2);
  border-radius: 4px;
  background: rgba(11, 111, 189, 0.06);
  color: #0b6fbd;
  padding: 6px 8px;
  font-weight: 800;
}

.topbar,
.round-strip,
.game-control-bar,
.content-grid,
.path-panel,
.license-line {
  min-width: 0;
  width: 100%;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius);
  background: rgba(8, 23, 21, 0.9);
  padding: 10px 12px;
  color: #f8fff9;
  box-shadow: var(--glow-teal), var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid rgba(0, 194, 173, 0.7);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0, 194, 173, 0.24), rgba(0, 194, 173, 0.08));
  color: #87fff0;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0, 194, 173, 0.18), var(--glow-teal);
}

.brand h1,
.brand p,
.panel-heading h2,
.article-copy h2,
.article-copy p {
  margin: 0;
}

.brand h1 {
  color: #f8fff9;
  font-size: 23px;
  line-height: 1.1;
}

.brand p {
  margin-top: 4px;
  color: #95bbb1;
  font-size: 13px;
  font-weight: 650;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nickname-button {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 112px;
  min-height: 44px;
  border: 1px solid rgba(120, 255, 226, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fff9;
  cursor: pointer;
  padding: 6px 12px;
  text-align: center;
}

.nickname-button span {
  color: #95bbb1;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.nickname-button strong {
  overflow: hidden;
  max-width: 150px;
  color: #87fff0;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nickname-button:hover {
  background: rgba(0, 194, 173, 0.12);
}

.status-pill {
  display: inline-grid;
  min-width: 94px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(155, 215, 70, 0.36);
  border-radius: 999px;
  background: rgba(155, 215, 70, 0.1);
  color: #cdfc74;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 0 18px rgba(155, 215, 70, 0.16);
}

.primary-button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 0 18px;
  background: linear-gradient(135deg, #00d6c0, #1c8cff 56%, #7c5cff);
  color: #ffffff;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(0, 194, 173, 0.28), 0 0 22px rgba(47, 140, 255, 0.18);
}

.primary-button:hover {
  filter: brightness(1.08) saturate(1.05);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  min-height: 44px;
  border: 1px solid rgba(120, 255, 226, 0.24);
  border-radius: var(--radius);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #87fff0;
  cursor: pointer;
  font-weight: 800;
}

.secondary-button:hover {
  background: rgba(0, 194, 173, 0.12);
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.danger-button {
  border-color: rgba(255, 96, 122, 0.42);
  background: rgba(229, 70, 109, 0.16);
  color: #ff9aab;
}

.danger-button:hover {
  background: rgba(229, 70, 109, 0.26);
  color: #ffd6de;
}

.round-strip {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) 120px 104px minmax(210px, max-content);
  align-items: stretch;
  gap: 10px;
}

.round-strip.has-opponent {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 112px 96px 112px minmax(210px, max-content);
}

.round-loading-screen {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  min-height: 360px;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(0, 194, 173, 0.12), transparent 42%),
    linear-gradient(300deg, rgba(255, 176, 46, 0.1), transparent 48%),
    rgba(8, 23, 21, 0.94);
  padding: 30px;
  box-shadow: var(--glow-teal), var(--shadow);
}

.round-loading-screen::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(120deg, black, transparent 78%);
}

.round-loading-main,
.round-loading-countdown,
.round-loading-tips {
  position: relative;
  z-index: 1;
}

.round-loading-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(128px, 168px);
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(120, 255, 226, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  padding: 24px;
}

.round-loading-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.round-loading-kicker {
  color: #ffd58a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.round-loading-main h2 {
  margin: 0;
  color: #f8fff9;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.08;
}

.round-loading-main p {
  margin: 0;
  max-width: 620px;
  color: #b8d6cf;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.round-loading-countdown {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  justify-self: end;
  width: min(168px, 100%);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 176, 46, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 176, 46, 0.16), rgba(255, 176, 46, 0.04) 60%, transparent 62%),
    rgba(255, 255, 255, 0.06);
  color: #fff3ca;
  box-shadow: 0 0 0 1px rgba(255, 176, 46, 0.12), 0 14px 32px rgba(0, 0, 0, 0.2);
}

.round-loading-countdown span {
  max-width: 100%;
  padding: 16px 12px 0;
  overflow-wrap: anywhere;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 950;
  line-height: 0.96;
  text-align: center;
}

.round-loading-countdown small {
  margin: 0 0 22px;
  color: #d5a957;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.round-loading-countdown.is-start-button {
  border-color: rgba(255, 105, 123, 0.74);
  background:
    radial-gradient(circle, rgba(229, 70, 109, 0.38), rgba(229, 70, 109, 0.22) 62%, rgba(229, 70, 109, 0.12) 64%),
    #6f1f32;
  box-shadow: 0 0 0 1px rgba(255, 143, 170, 0.26), 0 16px 38px rgba(229, 70, 109, 0.28);
}

.round-loading-start-button {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff7f9;
  cursor: pointer;
  padding: 22px 18px;
  text-align: center;
}

.round-loading-start-button strong {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 950;
  line-height: 1;
}

.round-loading-start-button span {
  display: block;
  max-width: 118px;
  color: #ffe1e7;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.round-loading-start-button:hover {
  filter: brightness(1.08) saturate(1.08);
}

.round-loading-start-button:disabled {
  cursor: wait;
  opacity: 0.74;
}

.round-loading-tips-heading,
.round-loading-tips {
  position: relative;
  z-index: 1;
}

.round-loading-tips-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
}

.round-loading-tips-heading span {
  color: #ffd58a;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.round-loading-tips {
  counter-reset: round-loading-tip;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.round-loading-tips li {
  display: grid;
  grid-template-columns: 34px minmax(160px, 210px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 56px;
  border: 1px solid rgba(120, 255, 226, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.052);
  padding: 12px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  counter-increment: round-loading-tip;
}

.round-loading-tips li::before {
  display: grid;
  grid-row: 1;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(120, 255, 226, 0.18);
  border-radius: var(--radius);
  background: rgba(0, 194, 173, 0.14);
  color: #87fff0;
  content: counter(round-loading-tip);
  font-size: 12px;
  font-weight: 950;
}

.round-loading-tips strong {
  display: block;
  color: #87fff0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

.round-loading-tips span {
  display: block;
  color: #c7ddd7;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.game-control-bar {
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0;
}

.game-control-bar .secondary-button,
.game-control-bar .primary-button {
  min-height: 38px;
  padding: 0 14px;
}

.round-tile,
.stat-tile,
.article-panel,
.path-panel,
.license-line {
  border: 1px solid var(--hud-line);
  border-radius: var(--radius);
  background: rgba(8, 23, 21, 0.88);
  box-shadow: var(--glow-teal), var(--shadow-soft);
}

.round-tile,
.stat-tile {
  min-width: 0;
  min-height: 76px;
  padding: 13px 15px;
  border-left: 5px solid var(--leaf);
  color: #f8fff9;
}

.round-tile.goal {
  position: relative;
  overflow: visible;
  cursor: help;
  border-left-color: var(--rose);
  box-shadow: 0 0 0 1px rgba(229, 70, 109, 0.12), 0 0 24px rgba(229, 70, 109, 0.16);
}

.round-tile.goal:focus {
  outline: 2px solid rgba(255, 143, 170, 0.78);
  outline-offset: 3px;
}

.goal-preview {
  position: absolute;
  top: calc(100% + 10px);
  left: 8px;
  z-index: 30;
  display: grid;
  width: min(430px, calc(100vw - 32px));
  gap: 12px;
  border: 1px solid rgba(255, 143, 170, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 239, 244, 0.92), rgba(255, 255, 255, 0.98) 56%),
    #fffafb;
  color: #2e1d22;
  padding: 16px;
  box-shadow: 0 22px 46px rgba(4, 12, 10, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  visibility: hidden;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.goal-preview-anchor.is-preview-open .goal-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.goal-preview-section {
  display: grid;
  gap: 6px;
}

.goal-preview .goal-preview-label {
  display: block;
  color: #6f3a47;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.goal-preview-categories {
  max-height: 54px;
  overflow: hidden;
  color: #4a2832;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  mask-image: linear-gradient(180deg, #000 78%, transparent);
}

.goal-preview-categories ul,
.goal-preview-categories ol {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-preview-categories li {
  margin: 0;
}

.goal-preview-categories .game-wiki-link,
.goal-preview-categories a {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid rgba(122, 31, 50, 0.22);
  border-radius: 999px;
  background: rgba(122, 31, 50, 0.07);
  color: #5b2430;
  padding: 2px 8px;
  text-decoration: none;
}

.goal-preview-content {
  max-height: 96px;
  overflow: hidden;
  color: #37242a;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
  mask-image: linear-gradient(180deg, #000 76%, transparent);
}

.goal-preview .goal-preview-excerpt {
  max-height: 168px;
  color: #5a3a42;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.5;
}

.goal-preview-content p,
.goal-preview-content .wiki-paragraph {
  margin: 0 0 8px;
}

.goal-preview-content ul,
.goal-preview-content ol {
  display: grid;
  gap: 5px;
  margin: 0 0 8px;
  padding-left: 18px;
}

.goal-preview-content li {
  margin: 0;
}

.goal-preview-content .game-wiki-link {
  color: #126ed3;
  font-weight: inherit;
  text-decoration: none;
}

.goal-preview-content .wiki-edit-section,
.goal-preview-content .wiki-macro-toc,
.goal-preview-content .footnote-list {
  display: none;
}

.goal-preview-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(229, 70, 109, 0.2);
  padding-top: 12px;
}

.goal-preview-footer #goalPreviewMeta {
  color: #4f3038;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.goal-preview-footer a {
  margin-left: auto;
  min-height: 30px;
  border: 1px solid rgba(229, 70, 109, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: #7a1f32;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.goal-preview-footer a:hover {
  background: rgba(229, 70, 109, 0.08);
}

.opponent-click-tile {
  border-left-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(47, 140, 255, 0.12), 0 0 24px rgba(47, 140, 255, 0.16);
}

.round-tile span,
.stat-tile span,
.article-kicker {
  display: block;
  color: #95bbb1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.round-tile strong,
.stat-tile strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: #f8fff9;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.2;
}

.content-grid {
  display: block;
}

.source-link {
  width: fit-content;
  min-height: 34px;
  margin-top: 2px;
  border: 1px solid rgba(0, 194, 173, 0.3);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(0, 194, 173, 0.08);
  color: var(--teal-dark);
  font-weight: 750;
  font-size: 13px;
  text-decoration-thickness: 2px;
}

.wiki-stage {
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(120, 255, 226, 0.22);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 194, 173, 0.08);
}

.wiki-stage-header {
  position: static;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(120, 255, 226, 0.2);
  background:
    linear-gradient(90deg, rgba(0, 194, 173, 0.12), transparent 52%),
    rgba(250, 255, 252, 0.98);
  color: var(--ink);
  padding: 16px 20px;
  backdrop-filter: blur(10px);
}

.wiki-stage-header > div:first-child {
  min-width: 0;
}

.wiki-stage-header span {
  display: block;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.wiki-stage-header h2 {
  margin: 6px 0 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 26px;
  line-height: 1.15;
}

.article-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-left: auto;
}

.sticky-goal {
  display: grid;
  min-width: 160px;
  max-width: 280px;
  gap: 4px;
  border: 1px solid rgba(229, 70, 109, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 245, 248, 0.96);
  padding: 7px 10px;
  box-shadow: 0 0 18px rgba(229, 70, 109, 0.12);
}

.sticky-goal span {
  color: var(--rose);
}

.sticky-goal strong {
  overflow: hidden;
  color: #7d2434;
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-article {
  padding: 22px 26px 30px;
  overflow-wrap: anywhere;
  color: #202322;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

.wiki-article h1,
.wiki-article h2,
.wiki-article h3,
.wiki-article h4 {
  margin: 1.25em 0 0.55em;
  line-height: 1.25;
}

.wiki-article h1 {
  font-size: 28px;
}

.wiki-article h2 {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 7px;
  font-size: 22px;
}

.wiki-article .wiki-section-folding {
  margin: 18px 0;
}

.wiki-article .wiki-section-folding > summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.wiki-article .wiki-section-folding > summary::marker {
  content: "";
}

.wiki-article .wiki-section-folding > summary::-webkit-details-marker {
  display: none;
}

.wiki-article .wiki-section-folding > summary::before {
  flex: 0 0 auto;
  color: #111827;
  content: "▶";
  font-size: 13px;
  line-height: 1;
}

.wiki-article .wiki-section-folding[open] > summary::before {
  content: "▼";
}

.wiki-article .wiki-section-folding > summary h1,
.wiki-article .wiki-section-folding > summary h2,
.wiki-article .wiki-section-folding > summary h3,
.wiki-article .wiki-section-folding > summary h4,
.wiki-article .wiki-section-folding > summary h5,
.wiki-article .wiki-section-folding > summary h6 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  vertical-align: middle;
}

.wiki-article .wiki-section-folding-content {
  margin-top: 14px;
}

.wiki-article .wiki-folding-animation-content {
  overflow: hidden;
  transition:
    max-height 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
  will-change: max-height, opacity, transform;
}

.wiki-article p,
.wiki-article .wiki-paragraph {
  margin: 0.7em 0;
}

.wiki-article .wiki-category-box {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  width: 100%;
  margin: 0 0 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  padding: 5px 14px;
  color: #202322;
  font-size: 15px;
  line-height: 1.55;
}

.wiki-article .wiki-category-label {
  flex: 0 0 auto;
  margin: 0;
  color: #202322;
  font-weight: 400;
}

.wiki-article .wiki-category-label::after {
  content: ":";
}

.wiki-article .wiki-category-list {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wiki-article .wiki-category-list > li {
  display: inline;
  margin: 0;
  padding: 0;
}

.wiki-article .wiki-category-list > li:not(:last-child)::after {
  margin: 0 9px;
  color: #777;
  content: "|";
}

.wiki-article .wiki-category-box .wiki-link-disabled {
  color: #59635f;
  cursor: default;
  text-decoration: none;
}

.wiki-article .wiki-macro-toc {
  clear: both;
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 14px 0 22px 5px;
  border: 1px solid #ccc;
  border-radius: 0;
  background: transparent;
  padding: 12px 20px 12px 0;
  font-size: 14px;
  line-height: 1.55;
}

.wiki-article .wiki-macro-toc summary {
  min-height: 0;
  min-width: 60px;
  margin-left: 14px;
  cursor: pointer;
  font-size: 1.25em;
  list-style: none;
}

.wiki-article .wiki-macro-toc details[open] summary {
  margin-bottom: 12px;
}

.wiki-article .wiki-macro-toc summary::marker {
  content: "";
  display: none;
}

.wiki-article .wiki-macro-toc summary::-webkit-details-marker {
  display: none;
}

.wiki-article .wiki-macro-toc summary::before {
  content: "목차";
}

.wiki-article .toc-indent {
  padding-left: 20px;
}

.wiki-article .toc-indent .toc-indent {
  margin-left: 0;
}

.wiki-article .toc-item {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wiki-article a,
.game-wiki-link {
  color: #0b6fbd;
  text-decoration: none;
  cursor: pointer;
}

.wiki-article .game-wiki-link {
  border-radius: 3px;
  border-bottom: 1px solid rgba(11, 111, 189, 0.34);
  font-weight: 600;
  transition:
    background-color 0.08s ease,
    border-color 0.08s ease,
    color 0.08s ease;
}

.wiki-article a:hover {
  text-decoration: underline;
}

.game-wiki-link:hover {
  background: rgba(11, 111, 189, 0.08);
  border-bottom-color: rgba(11, 111, 189, 0.64);
}

.wiki-article .game-wiki-link.is-visited {
  color: #6f7976;
}

.wiki-article .game-wiki-link.is-visited {
  border-bottom-color: rgba(111, 121, 118, 0.35);
}

body.is-loading .game-wiki-link {
  cursor: progress;
  pointer-events: none;
}

.wiki-link-disabled {
  color: #6f7976;
}

.wiki-article .wiki-link-external-disabled {
  border-bottom: 1px dotted rgba(111, 121, 118, 0.45);
  color: #6f7976;
  cursor: not-allowed;
}

.wiki-edit-section {
  display: none;
}

.wiki-article .wiki-image-align-normal,
.wiki-article .wiki-image-align-left,
.wiki-article .wiki-image-align-right,
.wiki-article .wiki-image-align-center,
.wiki-article .HuBzh58z,
.wiki-article .iLfWWmSy,
.wiki-article .M0qq8yfn,
.wiki-article .rfeFloO3,
.wiki-article .oepsuyMR,
.wiki-article .hp2z6Snw,
.wiki-article .jJFF-Zbl {
  font-size: 0;
  max-width: 100%;
  vertical-align: middle;
}

.wiki-article .wiki-image-align-normal,
.wiki-article .wiki-image-wrapper,
.wiki-article .YHi307Mf {
  display: inline-block;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
}

.wiki-article .wiki-image-align-normal,
.wiki-article .HuBzh58z {
  display: inline-block;
}

.wiki-article .wiki-image-align-left,
.wiki-article .oepsuyMR {
  display: block;
  float: left;
  margin: 0;
}

.wiki-article .wiki-image-align-right,
.wiki-article .M0qq8yfn {
  display: block;
  float: right;
  margin: 0 0 12px 16px;
}

.wiki-article .wiki-image-align-center,
.wiki-article .rfeFloO3,
.wiki-article .hp2z6Snw {
  display: block;
  margin: 12px auto;
  text-align: center;
}

.wiki-article .wiki-image-align-center .wiki-image-wrapper,
.wiki-article .rfeFloO3 .YHi307Mf,
.wiki-article .hp2z6Snw .YHi307Mf {
  display: inline-block;
}

.wiki-article .wiki-image-align-top,
.wiki-article .jJFF-Zbl {
  vertical-align: top;
}

.wiki-article .wiki-image-align-bottom,
.wiki-article .iLfWWmSy {
  vertical-align: bottom;
}

.wiki-article .wiki-image,
.wiki-article .LhxTIpX9 {
  inset: 0;
  position: absolute;
}

.wiki-article .wiki-image-loading,
.wiki-article .DeArQah4 {
  display: none;
}

.wiki-article .wiki-theme-dark,
.wiki-article .wiki-theme-image-hidden {
  display: none !important;
}

.wiki-article img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: contain;
}

.wiki-article span[style*="width:"] {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

.wiki-article span[style*="height:"] {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

.wiki-article span[style*="width:"] > span[style*="width: 100%"],
.wiki-article span[style*="width:"] > span[style*="width:100%"],
.wiki-article span[style*="height:"] > span[style*="height: 100%"],
.wiki-article span[style*="height:"] > span[style*="height:100%"] {
  display: inline-block;
  line-height: 0;
  max-width: 100%;
  vertical-align: middle;
}

.wiki-article span[style*="width:"] img[width="100%"] {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.wiki-article span[style*="height:"] img[height="100%"] {
  width: auto;
  height: 100% !important;
  max-height: 100%;
}

.wiki-article span[style*="width:"] > span[style*="width: 100%"] > img[src^="data:image/svg+xml"],
.wiki-article span[style*="width:"] > span[style*="width:100%"] > img[src^="data:image/svg+xml"],
.wiki-article span[style*="height:"] > span[style*="height: 100%"] > img[src^="data:image/svg+xml"],
.wiki-article span[style*="height:"] > span[style*="height:100%"] > img[src^="data:image/svg+xml"] {
  visibility: hidden;
}

.wiki-article > img,
.wiki-article .wiki-paragraph > img {
  display: block;
  margin: 10px auto;
}

.wiki-article .wiki-size-up-1,
.wiki-article .g28dLhH4 {
  font-size: 1.2888888889em;
}

.wiki-article .wiki-size-up-2,
.wiki-article .KsHQPl7b {
  font-size: 1.3888888889em;
}

.wiki-article .wiki-size-up-3,
.wiki-article .-PBqI9Gq {
  font-size: 1.4814444444em;
}

.wiki-article .wiki-size-up-4,
.wiki-article .JiifOGSJ {
  font-size: 1.574em;
}

.wiki-article .wiki-size-up-5,
.wiki-article .mzksOUKp {
  font-size: 1.6666666667em;
}

.wiki-article .wiki-size-down-1,
.wiki-article .FlhZEinM {
  font-size: 0.9258888889em;
}

.wiki-article .wiki-size-down-2,
.wiki-article .lx1xiVFH {
  font-size: 0.8333333333em;
}

.wiki-article .wiki-size-down-3,
.wiki-article .JAp5bdeb {
  font-size: 0.7406666667em;
}

.wiki-article .wiki-size-down-4,
.wiki-article .pwSIwYJf {
  font-size: 0.6481111111em;
}

.wiki-article .wiki-size-down-5,
.wiki-article .fdJspFNl {
  font-size: 0.6222222222em;
}

.wiki-article table,
.wiki-article .wiki-table,
.wiki-article ._5d8En-dC {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  background: #f5f5f5;
  font-size: 14px;
  table-layout: auto;
}

.wiki-article .wiki-table-wrap,
.wiki-article .fLK1WVog {
  display: block;
  margin: 10px 0;
  max-width: 100%;
  overflow-x: auto;
}

.wiki-article :is(div, figure):has(> table:only-child) {
  display: block;
  margin: 10px 0;
  max-width: 100%;
  overflow-x: auto;
}

.wiki-article .wiki-table-wrap.table-right,
.wiki-article .fLK1WVog.YMKO51Ba {
  float: right;
  margin: 0 0 20px 20px;
}

.wiki-article .wiki-table-wrap.table-left {
  float: left;
  margin: 0 20px 20px 0;
}

.wiki-article .wiki-table-wrap.table-center,
.wiki-article .fLK1WVog.wsHfjvwM {
  margin: 10px auto;
}

.wiki-article .wiki-table-wrap.table-center .wiki-table,
.wiki-article .fLK1WVog.wsHfjvwM ._5d8En-dC,
.wiki-article :is(div, figure):has(> table:only-child) > table:only-child {
  margin: auto;
}

.wiki-article td,
.wiki-article th {
  border: 1px solid #ddd;
  padding: 5px 10px;
  vertical-align: top;
}

.wiki-article .wiki-table-nopadding,
.wiki-article .YPmHKOfv {
  padding: 0 !important;
}

.wiki-article .wiki-table td .wiki-paragraph,
.wiki-article .wiki-table th .wiki-paragraph,
.wiki-article ._5d8En-dC td .NcVEjj4t,
.wiki-article ._5d8En-dC th .NcVEjj4t {
  margin: 0;
}

.wiki-article .wiki-table .wiki-table-keepall,
.wiki-article ._5d8En-dC ._3pnyYLIh {
  word-break: keep-all;
}

.wiki-article .wiki-table img,
.wiki-article ._5d8En-dC img {
  display: inline-block;
  max-width: none;
}

.wiki-article .wiki-horizontal-folding-navbox {
  display: grid;
  grid-template-columns: repeat(var(--folding-tab-count, 4), minmax(0, 1fr));
  overflow: hidden;
}

.wiki-article .wiki-horizontal-folding-navbox:has(
    > div:is(
        [style*="color:#ffffff"],
        [style*="color: #ffffff"],
        [style*="color:#fff"],
        [style*="color: #fff"],
        [style*="color:white"],
        [style*="color: white"],
        [style*="color:rgb(255, 255, 255)"],
        [style*="color: rgb(255, 255, 255)"],
        [style*="color:rgb(255,255,255)"],
        [style*="color: rgb(255,255,255)"]
      )
      > details.wiki-folding
  ) {
  width: min(800px, 100%);
  margin: 10px auto 16px;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    var(--wiki-navbox-accent-start, #ff9e23),
    var(--wiki-navbox-accent-end, #ff4703)
  );
  color: #fff;
  padding: 28px 24px 0;
}

.wiki-article .wiki-horizontal-folding-navbox > .wiki-horizontal-folding-heading {
  grid-column: 1 / -1;
}

.wiki-article .wiki-horizontal-folding-navbox:has(
    > div:is(
        [style*="color:#ffffff"],
        [style*="color: #ffffff"],
        [style*="color:#fff"],
        [style*="color: #fff"],
        [style*="color:white"],
        [style*="color: white"],
        [style*="color:rgb(255, 255, 255)"],
        [style*="color: rgb(255, 255, 255)"],
        [style*="color:rgb(255,255,255)"],
        [style*="color: rgb(255,255,255)"]
      )
      > details.wiki-folding
  )
  > .wiki-horizontal-folding-heading {
  text-align: center;
}

.wiki-article .wiki-horizontal-folding-navbox > .wiki-horizontal-folding-heading > div[style*="height"] {
  margin: 0 auto 8px !important;
}

.wiki-article .wiki-horizontal-folding-navbox > .wiki-horizontal-folding-heading .wiki-image-align-normal[style*="height:100%"],
.wiki-article .wiki-horizontal-folding-navbox > .wiki-horizontal-folding-heading .wiki-image-wrapper[style*="height: 100%"],
.wiki-article .wiki-horizontal-folding-navbox > .wiki-horizontal-folding-heading img[height="100%"] {
  width: auto;
  height: 100% !important;
  max-height: none;
}

.wiki-article .wiki-horizontal-folding-tab,
.wiki-article .wiki-horizontal-folding-details {
  display: contents;
}

.wiki-article .wiki-horizontal-folding-navbox:not(:has(.wiki-horizontal-folding-details[open])) > .wiki-horizontal-folding-tab {
  display: contents !important;
}

.wiki-article .wiki-horizontal-folding-details > summary {
  grid-column: var(--folding-tab-column);
  grid-row: 2;
  display: block;
  min-width: 0;
  border: 0;
  border-top: 1px solid currentColor;
  padding: 10px 6px 12px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 900;
  line-height: 1.2;
  list-style: none;
  text-align: center;
}

.wiki-article .wiki-horizontal-folding-navbox:has(
    > div:is(
        [style*="color:#ffffff"],
        [style*="color: #ffffff"],
        [style*="color:#fff"],
        [style*="color: #fff"],
        [style*="color:white"],
        [style*="color: white"],
        [style*="color:rgb(255, 255, 255)"],
        [style*="color: rgb(255, 255, 255)"],
        [style*="color:rgb(255,255,255)"],
        [style*="color: rgb(255,255,255)"]
      )
      > details.wiki-folding
  )
  .wiki-horizontal-folding-details
  > summary {
  color: inherit;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.wiki-article .wiki-horizontal-folding-details > summary::marker,
.wiki-article .wiki-horizontal-folding-details > summary::-webkit-details-marker {
  display: none;
  content: "";
}

.wiki-article .wiki-horizontal-folding-details > summary::before {
  content: "";
}

.wiki-article .wiki-horizontal-folding-details[open] > summary {
  background: rgba(255, 255, 255, 0.1);
}

.wiki-article .wiki-horizontal-folding-details > div {
  grid-column: 1 / -1;
  grid-row: 3;
  position: relative;
  min-width: 0;
  width: calc(var(--folding-tab-count, 4) * 100%);
}

.wiki-article .wiki-horizontal-folding-details:not([open]) > div:not(.wiki-folding-animation-content) {
  display: none !important;
}

.wiki-article .wiki-horizontal-folding-details > div {
  left: calc(var(--folding-tab-index, 0) * -100%);
}

.wiki-article .wiki-horizontal-folding-navbox:has(.wiki-horizontal-folding-details[open]) {
  display: block;
}

.wiki-article .wiki-horizontal-folding-navbox:has(.wiki-horizontal-folding-details[open]) > .wiki-horizontal-folding-tab,
.wiki-article .wiki-horizontal-folding-navbox:has(.wiki-horizontal-folding-details[open]) .wiki-horizontal-folding-details {
  display: block;
}

.wiki-article .wiki-horizontal-folding-navbox:has(.wiki-horizontal-folding-details[open]) .wiki-horizontal-folding-details > summary {
  display: block;
  width: 100%;
}

.wiki-article .wiki-horizontal-folding-navbox:has(.wiki-horizontal-folding-details[open]) .wiki-horizontal-folding-details > div {
  left: 0;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .wiki-article .wiki-folding-animation-content {
    transition: none;
  }
}

.wiki-article .wiki-square-image-grid,
.wiki-article .wiki-paragraph > div[style*="margin:-5px -10px"]:has(img[alt*="정사각형"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}

.wiki-article .wiki-square-image-grid > .wiki-square-image-card,
.wiki-article .wiki-paragraph > div[style*="margin:-5px -10px"]:has(img[alt*="정사각형"]) > div {
  flex: 0 1 14.285%;
  min-width: 92px;
  max-width: 180px;
  text-align: center;
}

.wiki-article .wiki-paragraph > div[style*="margin:-5px -10px"] > div:has([data-dark-style*="color:#eee"]) {
  display: inline-grid;
  width: min(180px, 50%);
  min-height: 96px;
  align-content: end;
  justify-content: center;
  vertical-align: top;
}

.wiki-article .wiki-square-image-grid .game-wiki-link,
.wiki-article .wiki-paragraph > div[style*="margin:-5px -10px"]:has(img[alt*="정사각형"]) .game-wiki-link {
  display: block;
  border-bottom: 0;
  color: inherit;
  font-weight: 800;
  line-height: 1.2;
}

.wiki-article .wiki-square-image-grid .wiki-image-align-normal[style*="width:100%"],
.wiki-article .wiki-square-image-grid .wiki-image-wrapper[style*="width: 100%"],
.wiki-article .wiki-paragraph > div[style*="margin:-5px -10px"]:has(img[alt*="정사각형"]) .wiki-image-align-normal[style*="width:100%"],
.wiki-article .wiki-paragraph > div[style*="margin:-5px -10px"]:has(img[alt*="정사각형"]) .wiki-image-wrapper[style*="width: 100%"] {
  width: 100% !important;
}

.wiki-article .wiki-square-image-grid img[width="100%"],
.wiki-article .wiki-paragraph > div[style*="margin:-5px -10px"]:has(img[alt*="정사각형"]) img[width="100%"] {
  display: block;
  width: 100%;
  height: auto;
}

.wiki-article .wiki-compact-link-grid {
  display: grid;
  grid-template-columns: repeat(var(--compact-link-count, 7), minmax(0, 1fr));
  align-items: center;
  justify-items: stretch;
  width: 100%;
}

.wiki-article .wiki-compact-link-grid > .game-wiki-link {
  display: block;
  min-width: 0;
  border-bottom: 0;
  color: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.wiki-article .wiki-compact-link-grid > .game-wiki-link > div {
  min-width: 0;
  width: auto !important;
}

.wiki-article td .wiki-image-align-normal,
.wiki-article th .wiki-image-align-normal {
  max-width: 100%;
}

.wiki-article td img,
.wiki-article th img {
  max-width: none;
}

.wiki-article td .wiki-image-align-normal[style*="height:100%"],
.wiki-article th .wiki-image-align-normal[style*="height:100%"],
.wiki-article td .wiki-image-wrapper[style*="height: 100%"],
.wiki-article th .wiki-image-wrapper[style*="height: 100%"] {
  height: auto !important;
  max-height: 72px;
}

.wiki-article td img[height="100%"],
.wiki-article th img[height="100%"] {
  width: auto;
  height: auto !important;
  max-height: 72px;
}

.wiki-article td .wiki-image-align-normal[style*="height:"][style*="px"],
.wiki-article th .wiki-image-align-normal[style*="height:"][style*="px"],
.wiki-article td .wiki-image-align-left[style*="height:"][style*="px"],
.wiki-article th .wiki-image-align-left[style*="height:"][style*="px"],
.wiki-article td .wiki-image-align-right[style*="height:"][style*="px"],
.wiki-article th .wiki-image-align-right[style*="height:"][style*="px"],
.wiki-article td .wiki-image-align-center[style*="height:"][style*="px"],
.wiki-article th .wiki-image-align-center[style*="height:"][style*="px"] {
  max-height: none;
}

.wiki-article td .wiki-image-align-normal[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"],
.wiki-article th .wiki-image-align-normal[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"],
.wiki-article td .wiki-image-align-left[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"],
.wiki-article th .wiki-image-align-left[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"],
.wiki-article td .wiki-image-align-right[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"],
.wiki-article th .wiki-image-align-right[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"],
.wiki-article td .wiki-image-align-center[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"],
.wiki-article th .wiki-image-align-center[style*="height:"][style*="px"] .wiki-image-wrapper[style*="height: 100%"] {
  height: inherit !important;
  max-height: inherit;
}

.wiki-article td .wiki-image-align-normal[style*="height:"][style*="px"] img[height="100%"],
.wiki-article th .wiki-image-align-normal[style*="height:"][style*="px"] img[height="100%"],
.wiki-article td .wiki-image-align-left[style*="height:"][style*="px"] img[height="100%"],
.wiki-article th .wiki-image-align-left[style*="height:"][style*="px"] img[height="100%"],
.wiki-article td .wiki-image-align-right[style*="height:"][style*="px"] img[height="100%"],
.wiki-article th .wiki-image-align-right[style*="height:"][style*="px"] img[height="100%"],
.wiki-article td .wiki-image-align-center[style*="height:"][style*="px"] img[height="100%"],
.wiki-article th .wiki-image-align-center[style*="height:"][style*="px"] img[height="100%"] {
  width: auto;
  height: 100% !important;
  max-height: 100%;
}

.wiki-article ul,
.wiki-article ol {
  padding-left: 1.4em;
}

.wiki-article blockquote,
.wiki-article pre {
  overflow-x: auto;
  border-left: 4px solid var(--line);
  border-radius: 6px;
  background: #f7faf9;
  padding: 10px 12px;
}

.wiki-article .wiki-macro-footnote {
  display: grid;
  gap: 6px;
  clear: both;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: #303836;
  font-size: 13px;
  line-height: 1.55;
}

.wiki-article .footnote-list {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wiki-article .wiki-fn-content {
  color: var(--teal-dark);
  font-size: 0.92em;
  vertical-align: super;
}

.wiki-placeholder {
  margin: 0;
  color: var(--muted);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2 {
  color: #f8fff9;
  font-size: 16px;
  line-height: 1.2;
}

.panel-heading #pathCount {
  min-width: 36px;
  color: #95bbb1;
  text-align: right;
  font-weight: 800;
}

.path-panel {
  position: sticky;
  z-index: 6;
  top: 82px;
  max-height: 120px;
  overflow: auto;
  padding: 14px 16px;
  background:
    linear-gradient(90deg, rgba(0, 194, 173, 0.12), transparent 36%),
    rgba(8, 23, 21, 0.9);
  backdrop-filter: blur(10px);
}

.path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.path-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.path-goal-label {
  border: 1px solid rgba(229, 70, 109, 0.42);
  border-radius: 999px;
  background: rgba(229, 70, 109, 0.14);
  color: #ff9aad;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  box-shadow: 0 0 14px rgba(229, 70, 109, 0.18);
}

.path-meta strong {
  max-width: min(360px, 48vw);
  overflow: hidden;
  color: #ffd2da;
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-list li {
  position: relative;
  max-width: 240px;
  overflow: hidden;
  border: 1px solid rgba(120, 255, 226, 0.18);
  border-radius: 999px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  color: #bad5cd;
  font-size: 13px;
}

.path-list button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  padding: 7px 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.path-list button:hover,
.path-list button:focus-visible {
  color: #f8fff9;
}

.path-list li:focus-within {
  border-color: rgba(0, 194, 173, 0.58);
  box-shadow: 0 0 0 3px rgba(0, 194, 173, 0.16);
}

.path-list li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -15px;
  color: var(--amber);
  content: "›";
  font-weight: 900;
  transform: translateY(-50%);
}

.path-list li[aria-current="page"] {
  border-color: rgba(0, 194, 173, 0.5);
  background: rgba(0, 194, 173, 0.16);
  color: #f8fff9;
  font-weight: 750;
  box-shadow: var(--glow-teal);
}

.license-line {
  padding: 12px 14px;
  color: #95bbb1;
  font-size: 13px;
}

.result-dialog {
  width: min(420px, calc(100% - 32px));
  border: 1px solid rgba(120, 255, 226, 0.32);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(8, 23, 21, 0.96);
  color: #f8fff9;
  box-shadow: var(--shadow);
}

.game-mode-dialog,
.multiplayer-dialog {
  width: min(420px, calc(100% - 32px));
  border: 1px solid rgba(120, 255, 226, 0.32);
  border-radius: var(--radius);
  padding: 0;
  background: rgba(8, 23, 21, 0.96);
  color: #f8fff9;
  box-shadow: var(--shadow);
}

.game-mode-dialog {
  width: min(560px, calc(100% - 32px));
}

.multiplayer-dialog {
  width: min(820px, calc(100% - 32px));
  max-height: min(900px, calc(100vh - 32px));
  overflow: auto;
  border-color: rgba(120, 255, 226, 0.38);
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 194, 173, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(14, 38, 34, 0.98), rgba(6, 18, 16, 0.98));
  box-shadow:
    0 26px 90px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.game-mode-dialog form {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 24px;
}

.game-mode-dialog h2 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.2;
}

.game-mode-dialog label {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.game-mode-dialog input,
.multiplayer-dialog input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(120, 255, 226, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  color: #f8fff9;
  font-weight: 750;
}

.multiplayer-shell {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.multiplayer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.multiplayer-heading > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.multiplayer-heading h2,
.multiplayer-panel h3 {
  margin: 0;
  color: #f8fff9;
  line-height: 1.2;
}

.multiplayer-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
  text-shadow: 0 0 26px rgba(0, 194, 173, 0.2);
}

.multiplayer-heading .secondary-button {
  min-width: 76px;
}

.multiplayer-panel h3 {
  color: #dffdf5;
  font-size: 15px;
}

.multiplayer-room-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
}

.multiplayer-shell:has(.multiplayer-lobby:not([hidden])) .multiplayer-room-grid {
  display: none;
}

.multiplayer-panel,
.multiplayer-lobby {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(120, 255, 226, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.multiplayer-lobby {
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  grid-template-areas:
    "code chat"
    "status chat"
    "route chat"
    "actions form";
  align-items: stretch;
}

.join-room-row,
.chat-form,
.multiplayer-ready-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.room-code-panel,
.connection-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 176, 46, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 176, 46, 0.14), rgba(120, 255, 226, 0.05));
  padding: 14px;
}

.room-code-panel {
  grid-area: code;
}

.connection-panel {
  grid-area: status;
  grid-template-columns: auto minmax(0, 1fr);
  border-color: rgba(120, 255, 226, 0.2);
  background: rgba(0, 194, 173, 0.09);
  padding: 12px 14px;
}

.room-code-panel span,
.connection-panel span {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.room-code-panel > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.room-code-panel strong,
.connection-panel strong {
  color: #f8fff9;
  font-size: 18px;
  line-height: 1.2;
}

.room-code-panel strong {
  color: #ffcf7a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(34px, 5vw, 46px);
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(255, 176, 46, 0.24);
}

.connection-panel strong {
  justify-self: end;
  font-size: 20px;
}

.chat-form {
  grid-template-columns: minmax(0, 1fr) 86px;
}

.multiplayer-ready-actions {
  grid-template-columns: minmax(0, 1fr) 176px;
}

.multiplayer-route-panel {
  grid-area: route;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border: 1px solid rgba(120, 255, 226, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  padding: 10px;
}

.multiplayer-route-panel div {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(120, 255, 226, 0.16);
  border-radius: 6px;
  background: rgba(2, 8, 8, 0.18);
  padding: 12px;
}

.multiplayer-route-panel span,
.multiplayer-route-panel p {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.multiplayer-route-panel div > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lock-route-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(120, 255, 226, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #87fff0;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.lock-route-button::before {
  content: "🔓";
  font-size: 14px;
}

.lock-route-button.is-locked {
  border-color: rgba(255, 176, 46, 0.42);
  background: rgba(255, 176, 46, 0.14);
  color: #ffcf7a;
  box-shadow: var(--glow-amber);
}

.lock-route-button.is-locked::before {
  content: "🔒";
}

.lock-route-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.multiplayer-route-panel strong {
  overflow: hidden;
  color: #f8fff9;
  font-size: 19px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-route-panel p {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: #ffcf7a;
}

.chat-log {
  grid-area: chat;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 100%;
  max-height: none;
  overflow: auto;
  border: 1px solid rgba(120, 255, 226, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(2, 8, 8, 0.3), rgba(2, 8, 8, 0.2));
  padding: 12px;
}

.chat-form {
  grid-area: form;
}

.multiplayer-ready-actions {
  grid-area: actions;
}

.chat-message {
  display: grid;
  gap: 3px;
  max-width: 82%;
  border: 1px solid rgba(120, 255, 226, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
}

.chat-message.local {
  justify-self: end;
  border-color: rgba(255, 176, 46, 0.22);
  background: rgba(255, 176, 46, 0.08);
}

.chat-message.system {
  justify-self: center;
  max-width: 100%;
  border-color: rgba(155, 215, 70, 0.2);
  background: rgba(155, 215, 70, 0.08);
}

.chat-message strong {
  color: #87fff0;
  font-size: 11px;
  font-weight: 850;
}

.chat-message.local strong {
  color: #ffcf7a;
}

.chat-message.system strong {
  color: #cdfc74;
}

.chat-message span {
  overflow-wrap: anywhere;
  color: #f8fff9;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.multiplayer-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  width: min(430px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(120, 255, 226, 0.28);
  border-radius: var(--radius);
  background: rgba(8, 23, 21, 0.96);
  color: #f8fff9;
  box-shadow: var(--glow-teal), var(--shadow);
  backdrop-filter: blur(16px);
}

.multiplayer-dock-toggle {
  display: grid;
  grid-template-columns: auto minmax(52px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: #f8fff9;
  cursor: pointer;
  padding: 9px 12px;
  text-align: left;
}

.multiplayer-dock-toggle::after {
  content: "▴";
  color: #87fff0;
  font-size: 15px;
  font-weight: 900;
}

.multiplayer-dock.is-open .multiplayer-dock-toggle::after {
  content: "▾";
}

.multiplayer-dock-toggle span {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.multiplayer-dock-toggle strong {
  color: #ffcf7a;
  font-size: 24px;
  line-height: 1;
}

.multiplayer-dock-toggle em {
  justify-self: end;
  min-width: 54px;
  border: 1px solid rgba(120, 255, 226, 0.22);
  border-radius: 999px;
  background: rgba(0, 194, 173, 0.1);
  color: #87fff0;
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

.multiplayer-dock-body {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(120, 255, 226, 0.16);
  padding: 10px;
}

.dock-chat-log {
  min-height: 170px;
  max-height: min(320px, 38vh);
}

.dock-chat-form input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(120, 255, 226, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  color: #f8fff9;
  font-weight: 750;
}

.game-mode-options {
  display: grid;
  gap: 10px;
}

.mode-option-card {
  border: 1px solid rgba(120, 255, 226, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fff9;
}

.mode-option-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 74px;
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.mode-option-button:hover {
  background: rgba(0, 194, 173, 0.12);
}

.mode-option-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.mode-option-index {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 176, 46, 0.36);
  border-radius: 999px;
  background: rgba(255, 176, 46, 0.14);
  color: #ffcf7a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.mode-option-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mode-option-button strong,
.specified-game-panel h3 {
  margin: 0;
  color: #87fff0;
  font-size: 17px;
  line-height: 1.2;
}

.mode-option-copy > span,
.specified-game-panel p {
  margin: 0;
  color: #95bbb1;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.specified-game-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.specified-game-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid rgba(120, 255, 226, 0.14);
  padding-top: 14px;
}

.specified-game-field {
  display: grid;
  gap: 6px;
}

.specified-game-field input {
  min-height: 38px;
}

.specified-game-start-button {
  grid-column: 1 / -1;
  min-height: 40px;
}

.specified-game-status {
  min-height: 18px;
  margin: -4px 0 0;
  color: #ffcf7a !important;
  font-size: 12px;
  font-weight: 800;
}

.recent-specified-games {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(120, 255, 226, 0.14);
  padding-top: 12px;
}

.recent-specified-games > span {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.recent-specified-games > div {
  display: grid;
  gap: 7px;
}

.recent-specified-games button {
  overflow: hidden;
  min-height: 34px;
  border: 1px solid rgba(120, 255, 226, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 10px;
  color: #bad5cd;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-specified-games button:hover {
  border-color: rgba(120, 255, 226, 0.36);
  background: rgba(0, 194, 173, 0.1);
  color: #f8fff9;
}

.game-mode-cancel-button {
  justify-self: end;
  min-height: 38px;
  padding: 0 14px;
}

.result-dialog h2 {
  margin: 6px 0 8px;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.15;
}

.result-dialog p {
  margin: 0;
  color: #95bbb1;
  font-weight: 750;
}

.result-kicker {
  color: #87fff0;
  font-size: 12px;
  font-weight: 850;
}

.result-path-list {
  display: grid;
  gap: 7px;
  max-height: 220px;
  margin: 18px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.multiplayer-result-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.multiplayer-result-panel[hidden] {
  display: none;
}

.multiplayer-result-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid rgba(120, 255, 226, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  padding: 10px;
}

.multiplayer-result-card.is-pending {
  border-color: rgba(255, 176, 46, 0.22);
  background: rgba(255, 176, 46, 0.08);
}

.multiplayer-result-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.multiplayer-result-card strong {
  overflow: hidden;
  color: #f8fff9;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-result-card span {
  flex: 0 0 auto;
  border: 1px solid rgba(120, 255, 226, 0.24);
  border-radius: 999px;
  background: rgba(0, 194, 173, 0.1);
  color: #87fff0;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
}

.multiplayer-result-card p {
  margin: 0;
  color: #bad5cd;
  font-size: 12px;
  line-height: 1.35;
}

.multiplayer-result-path {
  display: grid;
  gap: 5px;
  max-height: 116px;
  margin: 0;
  overflow: auto;
  padding: 0;
  list-style: none;
}

.multiplayer-result-path li {
  overflow: hidden;
  border: 1px solid rgba(120, 255, 226, 0.14);
  border-radius: 6px;
  background: rgba(2, 8, 8, 0.18);
  padding: 6px 7px;
  color: #bad5cd;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-path-list li {
  overflow: hidden;
  border: 1px solid rgba(120, 255, 226, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  color: #bad5cd;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-path-list li:last-child {
  border-color: rgba(0, 194, 173, 0.5);
  background: rgba(0, 194, 173, 0.16);
  color: #f8fff9;
  font-weight: 750;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.share-status {
  min-height: 18px;
  margin-top: 10px !important;
  color: #87fff0 !important;
  font-size: 12px;
}

.daily-score-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.daily-score-form label {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.daily-score-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.daily-score-form input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(120, 255, 226, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  color: #f8fff9;
  font-weight: 750;
}

.daily-score-form p {
  min-height: 18px;
  color: #87fff0;
  font-size: 12px;
}

.daily-rank-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  border: 1px solid rgba(0, 194, 173, 0.38);
  border-radius: var(--radius);
  background: rgba(0, 194, 173, 0.12);
  padding: 13px 14px;
}

.daily-rank-panel span {
  color: #95bbb1;
  font-size: 12px;
  font-weight: 850;
}

.daily-rank-panel strong {
  color: #87fff0;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.result-dialog::backdrop,
.game-mode-dialog::backdrop,
.multiplayer-dialog::backdrop {
  background: rgba(2, 8, 8, 0.68);
}

@media (max-width: 960px) {
  .app-shell {
    padding: 16px;
  }

  .home-screen {
    min-height: auto;
  }

  .home-board {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .home-preview {
    min-height: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 24px 0 0;
  }

  .round-strip,
  .wiki-stage {
    grid-template-columns: 1fr;
  }

  .round-loading-screen {
    min-height: auto;
    padding: 22px;
  }

  .round-loading-header {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .round-loading-countdown {
    justify-self: start;
    width: 132px;
  }

  .round-loading-tips li {
    grid-template-columns: 34px minmax(140px, 190px) minmax(0, 1fr);
    min-height: auto;
  }

  .round-loading-tips span {
    max-width: 68ch;
  }

  .round-strip.has-opponent {
    grid-template-columns: 1fr;
  }

  .topbar,
  .wiki-stage-header {
    position: static;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .game-control-bar {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .game-control-bar .secondary-button,
  .game-control-bar .primary-button {
    min-width: 0;
    width: 100%;
  }

  .home-top-actions,
  .history-actions,
  .history-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .history-screen,
  .leaderboard-screen {
    padding: 18px;
  }

  .history-kicker-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .history-heading h2 {
    font-size: 28px;
  }

  :is(.history-screen, .leaderboard-screen) .history-heading {
    align-items: flex-end;
    flex-direction: row;
    flex-wrap: wrap;
  }

  :is(.history-screen, .leaderboard-screen) .history-heading > div:first-child {
    flex: 1 1 auto;
  }

  :is(.history-screen, .leaderboard-screen) .history-actions {
    align-items: flex-end;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
  }

  .history-list > li {
    grid-template-columns: 1fr;
  }

  .leaderboard-heading {
    align-items: flex-start;
  }

  .leaderboard-heading-actions {
    flex-shrink: 0;
  }

  .leaderboard-columns,
  .leaderboard-list li {
    grid-template-columns: 28px minmax(0, 1fr) 36px 50px 64px;
    gap: 6px;
  }

  .leaderboard-columns {
    padding: 0 8px;
  }

  .leaderboard-list li {
    padding: 8px;
  }

  .leaderboard-list li > :nth-child(5) {
    padding-left: 6px;
  }

  .leaderboard-stat {
    font-size: 11px;
  }

  .history-top-line,
  .history-card-actions {
    flex-direction: column;
  }

  .history-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .history-main p {
    white-space: normal;
  }

  .history-list details {
    width: 100%;
  }

  .history-pagination {
    grid-template-columns: 1fr;
  }

  .history-page-controls {
    grid-column: 1;
  }

  .history-clear-button {
    grid-column: 1;
    justify-self: end;
  }

  .history-share-button {
    width: 100%;
  }

  .status-pill {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .nickname-button {
    width: 100%;
  }

  :is(.history-screen, .leaderboard-screen) .history-actions :is(.primary-button, .secondary-button) {
    width: auto;
    white-space: nowrap;
  }

  .daily-score-form div {
    grid-template-columns: 1fr;
  }

  .specified-game-fields {
    grid-template-columns: 1fr;
  }

  .result-actions,
  .multiplayer-result-panel,
  .multiplayer-lobby,
  .multiplayer-room-grid,
  .join-room-row,
  .chat-form,
  .multiplayer-ready-actions,
  .multiplayer-route-panel {
    grid-template-columns: 1fr;
  }

  .multiplayer-lobby {
    grid-template-areas:
      "code"
      "status"
      "route"
      "chat"
      "form"
      "actions";
  }

  .result-actions {
    display: grid;
  }

  .multiplayer-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .room-code-panel,
  .connection-panel {
    grid-template-columns: 1fr;
  }

  .connection-panel strong {
    justify-self: start;
  }

  .chat-log {
    min-height: 180px;
    max-height: 260px;
  }

  .multiplayer-dock {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .multiplayer-dock-toggle {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }

  .home-copy h2 {
    font-size: 31px;
  }

  .home-copy p {
    font-size: 15px;
  }

  .preview-strip {
    grid-template-columns: 1fr;
  }

  .preview-article {
    padding: 16px;
  }

  .daily-route {
    grid-template-columns: 1fr;
  }

  .preview-title-row strong {
    font-size: 21px;
  }

  .home-actions,
  .home-start-button {
    width: 100%;
  }

  .wiki-stage-header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .article-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-left: 0;
  }

  .source-link {
    width: 100%;
    text-align: center;
  }

  .sticky-goal {
    min-width: 0;
    max-width: none;
  }

  .path-panel {
    top: 8px;
    z-index: 9;
    max-height: 34vh;
    padding: 12px;
  }

  .panel-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
  }

  .panel-heading h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 18px;
    white-space: nowrap;
  }

  .panel-heading #pathCount {
    min-width: 0;
    color: #95bbb1;
    text-align: right;
    font-size: 18px;
    line-height: 1.2;
  }

  .path-meta {
    display: grid;
    grid-template-columns: auto auto minmax(0, 18ch);
    align-items: center;
    justify-content: end;
    gap: 6px;
    min-width: 0;
    padding-right: 2px;
  }

  .path-meta strong {
    min-width: 0;
    max-width: 18ch;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .path-list {
    gap: 8px;
    margin-top: 10px;
  }

  .path-list li {
    max-width: min(100%, 240px);
  }

  .wiki-stage-header h2 {
    font-size: 24px;
  }

  .wiki-article {
    padding: 14px 16px;
  }

  .round-tile,
  .stat-tile {
    min-height: 68px;
  }

  .round-loading-screen {
    gap: 12px;
    border-color: rgba(120, 255, 226, 0.2);
    background:
      linear-gradient(150deg, rgba(0, 194, 173, 0.14), transparent 48%),
      linear-gradient(320deg, rgba(255, 176, 46, 0.08), transparent 56%),
      rgba(8, 23, 21, 0.96);
    padding: 14px;
  }

  .round-loading-header {
    gap: 14px;
    border-color: rgba(120, 255, 226, 0.18);
    background: rgba(5, 18, 16, 0.52);
    padding: 16px 14px;
  }

  .round-loading-main {
    gap: 8px;
  }

  .round-loading-kicker {
    font-size: 11px;
  }

  .round-loading-main h2 {
    font-size: 26px;
    line-height: 1.15;
  }

  .round-loading-main p {
    font-size: 14px;
    line-height: 1.45;
  }

  .round-loading-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    gap: 6px;
    width: 100%;
    min-height: 64px;
    aspect-ratio: auto;
    border-radius: var(--radius);
    background:
      linear-gradient(135deg, rgba(255, 176, 46, 0.16), rgba(255, 176, 46, 0.04)),
      rgba(255, 255, 255, 0.055);
  }

  .round-loading-countdown span {
    padding: 0;
    font-size: 36px;
    line-height: 1;
  }

  .round-loading-countdown small {
    margin: 7px 0 0;
    font-size: 12px;
  }

  .round-loading-countdown.is-start-button {
    min-height: 74px;
    border-color: rgba(255, 105, 123, 0.58);
    border-radius: var(--radius);
    background:
      linear-gradient(135deg, rgba(229, 70, 109, 0.54), rgba(143, 39, 65, 0.82)),
      #6f1f32;
    box-shadow: 0 0 0 1px rgba(255, 143, 170, 0.2), 0 12px 26px rgba(229, 70, 109, 0.24);
  }

  .round-loading-start-button {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 7px;
    min-height: 74px;
    border-radius: var(--radius);
    padding: 12px 16px;
    text-align: center;
  }

  .round-loading-start-button strong {
    font-size: 28px;
  }

  .round-loading-start-button span {
    max-width: none;
    font-size: 11px;
    line-height: 1.35;
  }

  .round-loading-tips-heading {
    margin-top: 0;
  }

  .round-loading-tips-heading span {
    font-size: 12px;
  }

  .round-loading-tips li {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    border-color: rgba(120, 255, 226, 0.16);
    background: rgba(255, 255, 255, 0.045);
    padding: 12px;
  }

  .round-loading-tips li::before {
    width: 28px;
    height: 28px;
    align-self: start;
  }

  .round-loading-tips strong {
    font-size: 15px;
  }

  .round-loading-tips span {
    grid-column: 2;
    font-size: 12px;
    line-height: 1.5;
    max-width: none;
  }

  .round-tile.goal {
    cursor: pointer;
  }

  .goal-preview {
    position: static;
    display: none;
    width: auto;
    margin-top: 12px;
    padding: 12px;
    box-shadow: 0 12px 28px rgba(4, 12, 10, 0.2);
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .goal-preview-anchor.is-preview-open .goal-preview {
    display: grid;
  }

  .goal-preview-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .goal-preview-footer a {
    margin-left: 0;
  }

  .wiki-article {
    font-size: 15px;
  }
}
