.migration-loading { display:grid; place-items:center; min-height:350px; color:#604634; }
.migration-languages { display:flex; flex-wrap:wrap; justify-content:center; margin: 0 auto 1em; gap:1.4rem; font-size:.85rem; }
.migration-languages a { text-decoration:underline; }
.game-card { max-width:100%; }
#migration-game:has(.migration-loading) {
  display:flex;
  width:min(1420px, calc(100vw - 40px), calc(100svh - 88px));
  height:min(1420px, calc(100vw - 40px), calc(100svh - 88px));
  max-width:100%;
  aspect-ratio:1;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(96, 70, 52, 0.08);
  border-radius:34px;
  color:#766957;
  background:#f7efdf;
  box-shadow:0 20px 54px rgba(86, 66, 43, 0.1), 0 3px 12px rgba(86, 66, 43, 0.05);
}
.journey-game-layout #migration-game:has(.migration-loading) {
  width:100%;
  height:auto;
  aspect-ratio:1;
}
#pattern-levels-slot:empty { min-height:530px; }
[data-widget="daily-momentum"]:empty { min-height:156px; margin-top:24px; }
[data-widget="walkthrough"]:empty { min-height:460px; }
.out-of-lives-journey-button {
  display:inline-flex;
  width:100%;
  min-height:44px;
  align-items:center;
  justify-content:center;
  gap:7px;
  margin-top:8px;
  padding:0 14px;
  color:var(--game-ink, #654a37);
  border:1px solid var(--line, #e1d6c1);
  border-radius:14px;
  background:#faf6ee;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.out-of-lives-journey-button:hover,
.out-of-lives-journey-button:focus-visible {
  border-color:var(--faint, #cbbca8);
  background:#f4ece0;
  outline:none;
}
.board-zoom-controls {
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:6;
  display:inline-flex;
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid rgba(96, 70, 52, 0.14);
  border-radius:999px;
  background:rgba(255, 253, 248, 0.9);
  box-shadow:0 6px 18px rgba(82, 62, 46, 0.12);
}
.board-zoom-controls button {
  display:grid;
  min-width:34px;
  height:34px;
  place-items:center;
  padding:0 6px;
  color:var(--game-ink, #654a37);
  border:0;
  border-radius:999px;
  background:transparent;
  font-size:15px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  line-height:1;
  cursor:pointer;
}
.board-zoom-controls button:hover:not(:disabled),
.board-zoom-controls button:focus-visible {
  background:rgba(96, 70, 52, 0.08);
  outline:none;
}
.board-zoom-controls button:disabled {
  opacity:0.35;
  cursor:not-allowed;
}
.board-zoom-controls .board-zoom-reset {
  padding-inline:8px;
  font-size:11px;
}
.journey-level-node.is-available {
  color:#654a37;
  border-color:#d8cbb8;
  background:#faf6ee;
  cursor:pointer;
  transition:transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.journey-level-node.is-available:hover,
.journey-level-node.is-available:focus-visible {
  background:#fffaf0;
  border-color:#b97a43;
  transform:translateY(-2px);
  outline:none;
}
.legend-dot.is-available {
  background:#d8cbb8;
}
.settings-transfer {
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid var(--line, #e1d6c1);
}
.settings-transfer-header strong {
  display:block;
  font-size:14px;
  color:var(--ink-strong, #3b2a1e);
}
.settings-transfer-header p {
  margin:4px 0 12px;
  color:var(--muted, #766957);
  font-size:12px;
  line-height:1.5;
}
.settings-transfer-copy {
  display:inline-flex;
  width:100%;
  min-height:44px;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 14px;
  color:var(--ink-strong, #3b2a1e);
  border:1px solid var(--line, #e1d6c1);
  border-radius:12px;
  background:#faf6ee;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.settings-transfer-copy:hover,
.settings-transfer-copy:focus-visible {
  border-color:#b97a43;
  background:#f4ece0;
  outline:none;
}
.settings-transfer-form {
  display:flex;
  gap:8px;
  margin-top:10px;
}
.settings-transfer-input {
  flex:1 1 auto;
  min-width:0;
  min-height:44px;
  padding:0 12px;
  color:var(--ink-strong, #3b2a1e);
  border:1px solid var(--line, #e1d6c1);
  border-radius:12px;
  background:#fffdf8;
  font-size:12px;
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
}
.settings-transfer-input[readonly] {
  width:100%;
  margin-top:8px;
  background:#f7f2e8;
}
.settings-transfer-restore {
  flex:0 0 auto;
  min-height:44px;
  padding:0 16px;
  color:#fffdf8;
  border:0;
  border-radius:12px;
  background:#654a37;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.settings-transfer-restore:hover,
.settings-transfer-restore:focus-visible {
  background:#4c3627;
  outline:none;
}
.settings-transfer-status {
  margin:8px 0 0;
  font-size:12px;
  font-weight:700;
  color:#386043;
}
.settings-transfer-status.is-error {
  color:#c53b34;
}
@media (min-width: 761px) {
  .journey-game-layout .game-card,
  #migration-game > .game-card {
    max-width:100%;
    height:auto;
    aspect-ratio:1;
  }
}
@media (max-width: 760px) {
  .home-game-wrap .game-card {
    height:auto;
    min-height:0;
  }
  #migration-game:has(.migration-loading) {
    width:100%;
    height:auto;
    aspect-ratio:auto;
    min-height:calc(100vw + 88px);
    border:0;
    border-radius:0;
    box-shadow:none;
  }
}
@media (max-width: 600px) {
  #pattern-levels-slot:empty { min-height:432px; }
  [data-widget="walkthrough"]:empty { min-height:360px; }
}