:root {
  --bg-card: rgba(199, 179, 138, 0.94);
  --bg-card-alt: rgba(162, 140, 100, 0.94);
  --text-dark: #17140d;
  --text-light: #f2e8cf;
  --danger: #a33b2c;
  --success: #365a34;
  --accent: #df7f34;
  --border-heavy: #5d4229;
  --border-shadow: #0b0b08;
  --overlay: rgba(24, 21, 15, 0.72);
}

* {
  box-sizing: border-box;
  min-width: 0;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: "Courier New", Courier, monospace;
  background:
    radial-gradient(circle at top, rgba(255, 209, 102, 0.09), transparent 35%),
    linear-gradient(180deg, #3a382e 0%, #171711 70%);
  color: var(--text-light);
}

body.rules-page {
  overflow: auto;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.18;
}

.game-shell {
  width: min(1280px, calc(100vw - 24px));
  height: 100svh;
  margin: 0 auto;
  padding: 12px 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

body.rules-page .game-shell {
  height: auto;
  min-height: 100svh;
  padding-bottom: 24px;
  overflow: visible;
}

.hero-panel,
.playfield,
.stage {
  border: 4px solid var(--border-shadow);
  box-shadow:
    inset 0 0 0 4px var(--border-heavy),
    0 8px 0 rgba(0, 0, 0, 0.2);
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(43, 55, 40, 0.95), rgba(32, 34, 25, 0.96));
}

.hero-copy {
  min-width: 0;
}

.mobile-menu-toggle {
  display: none;
}

.hero-mobile-actions {
  display: none;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.achievement-panel {
  width: min(540px, 100%);
  max-height: 210px;
  margin-top: 12px;
  padding: 12px;
  color: var(--text-dark);
  background: rgba(199, 179, 138, 0.97);
  border: 4px solid var(--border-shadow);
  box-shadow: inset 0 0 0 4px var(--border-heavy);
  overflow: auto;
}

.stats-panel {
  width: min(620px, 100%);
  max-height: 260px;
  margin-top: 12px;
  padding: 12px;
  color: var(--text-dark);
  background: rgba(199, 179, 138, 0.97);
  border: 4px solid var(--border-shadow);
  box-shadow: inset 0 0 0 4px var(--border-heavy);
  overflow: auto;
}

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

.achievement-panel__header p {
  margin: 0;
}

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

.stats-panel__header p {
  margin: 0;
}

.achievement-panel__content {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.stats-panel__content {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.achievement-panel__empty {
  margin: 0;
  padding: 10px;
  background: rgba(24, 22, 18, 0.12);
  border: 3px dashed rgba(23, 20, 13, 0.48);
  font-size: 0.82rem;
  line-height: 1.45;
}

.stats-panel__empty {
  margin: 0;
  padding: 10px;
  background: rgba(24, 22, 18, 0.12);
  border: 3px dashed rgba(23, 20, 13, 0.48);
  font-size: 0.82rem;
  line-height: 1.45;
}

.achievement-card {
  padding: 10px 12px;
  background: rgba(255, 249, 235, 0.52);
  border: 3px solid rgba(39, 27, 16, 0.22);
}

.achievement-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievement-card__emoji {
  font-size: 1.3rem;
  line-height: 1;
}

.achievement-card__title {
  margin: 0;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.achievement-card__desc,
.achievement-card__countries {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.achievement-card__countries strong {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.stats-group {
  padding: 10px 12px;
  background: rgba(255, 249, 235, 0.52);
  border: 3px solid rgba(39, 27, 16, 0.22);
}

.stats-group h3 {
  margin: 0;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.stats-group__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
}

.stats-item {
  padding: 8px 10px;
  background: rgba(24, 22, 18, 0.08);
  border: 2px dashed rgba(23, 20, 13, 0.2);
}

.stats-item strong,
.stats-item span {
  display: block;
}

.stats-item strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-item span {
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.stats-achievement-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.stats-achievement-item {
  display: flex;
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  background: rgba(24, 22, 18, 0.08);
  border: 2px dashed rgba(23, 20, 13, 0.2);
}

.stats-achievement-item__emoji {
  font-size: 1.1rem;
  line-height: 1;
}

.stats-achievement-item__text strong,
.stats-achievement-item__text span {
  display: block;
}

.stats-achievement-item__text strong {
  font-size: 0.8rem;
  text-transform: uppercase;
}

.stats-achievement-item__text span {
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.hero-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
  grid-auto-rows: min-content;
}

.hero-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #e4d8b9;
}

.travel-buff {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #f8edc4;
  background: rgba(63, 92, 116, 0.72);
  border: 3px solid rgba(242, 232, 207, 0.18);
}

.travel-buff__icon {
  font-size: 1rem;
  line-height: 1;
}

.travel-buff__timer {
  font-size: 0.78rem;
  font-weight: 700;
}

.travel-buff__help {
  width: 22px;
  height: 22px;
  border: 0;
  padding: 0;
  color: var(--text-light);
  background: rgba(17, 18, 14, 0.55);
  box-shadow: inset 0 0 0 2px rgba(242, 232, 207, 0.18);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.travel-buff__tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  padding: 10px;
  color: var(--text-light);
  background: rgba(20, 18, 14, 0.94);
  border: 3px solid rgba(242, 232, 207, 0.18);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
  text-align: left;
  font-size: 0.74rem;
  line-height: 1.35;
  z-index: 10;
}

.achievement-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 36px));
  pointer-events: none;
}

.achievement-toast {
  padding: 12px 14px;
  color: var(--text-light);
  background: linear-gradient(180deg, rgba(49, 69, 40, 0.96), rgba(24, 31, 19, 0.98));
  border: 4px solid var(--border-shadow);
  box-shadow:
    inset 0 0 0 4px rgba(167, 147, 94, 0.86),
    0 10px 22px rgba(0, 0, 0, 0.34);
  transform: translateY(12px);
  opacity: 0;
  animation: achievement-toast-in 180ms steps(3, end) forwards;
}

.achievement-toast--out {
  animation: achievement-toast-out 180ms steps(3, end) forwards;
}

.achievement-toast__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievement-toast__emoji {
  font-size: 1.2rem;
  line-height: 1;
}

.achievement-toast__eyebrow {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d6cca8;
}

.achievement-toast__title {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.achievement-toast__desc {
  margin: 8px 0 0;
  font-size: 0.77rem;
  line-height: 1.4;
  color: #e9ddbf;
}

@keyframes achievement-toast-in {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes achievement-toast-out {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

.passport-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 8, 6, 0.72);
  backdrop-filter: blur(4px);
}

.passport-modal {
  width: min(920px, 100%);
  max-height: min(92svh, 860px);
  padding: 18px;
  color: var(--text-dark);
  background: linear-gradient(180deg, rgba(204, 185, 147, 0.98), rgba(170, 147, 106, 0.98));
  border: 4px solid var(--border-shadow);
  box-shadow:
    inset 0 0 0 4px var(--border-heavy),
    0 18px 32px rgba(0, 0, 0, 0.35);
}

.passport-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.passport-modal__actions {
  display: flex;
  gap: 10px;
  align-items: start;
  flex-wrap: wrap;
  justify-content: end;
}

.passport-modal__header h2 {
  margin: 6px 0 0;
  text-transform: uppercase;
}

.passport-book {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.passport-nav {
  width: 56px;
  height: 88px;
  border: 0;
  color: var(--text-light);
  background: #4a583d;
  box-shadow:
    0 4px 0 #27301f,
    inset 0 0 0 3px rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.passport-nav:disabled {
  cursor: default;
  opacity: 0.45;
}

.passport-page {
  min-height: min(68svh, 620px);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 252, 243, 0.96), rgba(233, 223, 194, 0.96)),
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.02),
      rgba(0, 0, 0, 0.02) 2px,
      transparent 2px,
      transparent 7px
    );
  border: 4px solid rgba(39, 27, 16, 0.6);
  box-shadow:
    inset 0 0 0 3px rgba(93, 66, 41, 0.22),
    inset 0 0 48px rgba(120, 94, 56, 0.08);
  overflow: auto;
}

.passport-page-counter,
.passport-help {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: #2a2217;
}

.passport-help {
  color: #463726;
}

.passport-identity {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  height: 100%;
}

.passport-identity__header h3,
.passport-visa h3,
.passport-stamps h3,
.passport-achievements h3 {
  margin: 0;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.passport-identity__header p,
.passport-visa p,
.passport-stamps p,
.passport-achievements p {
  margin: 6px 0 0;
}

.passport-fields {
  display: grid;
  gap: 14px;
}

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

.passport-field label,
.passport-field strong,
.passport-field span,
.passport-detail-label,
.passport-visa-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.passport-name-input {
  width: 100%;
  padding: 12px 14px;
  border: 3px solid rgba(39, 27, 16, 0.55);
  background: rgba(253, 249, 240, 0.92);
  color: var(--text-dark);
  font: inherit;
  font-size: 1rem;
}

.passport-name-input:disabled {
  cursor: not-allowed;
  color: rgba(42, 34, 23, 0.72);
  background: rgba(216, 204, 171, 0.58);
}

.passport-readonly-value {
  padding: 12px 14px;
  border: 3px solid rgba(39, 27, 16, 0.25);
  background: rgba(216, 204, 171, 0.58);
  font-size: 0.95rem;
  min-height: 50px;
}

.passport-lock-note {
  margin: 6px 0 0;
  color: #7b3327;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.passport-birth-value {
  padding: 12px 14px;
  border: 3px solid rgba(39, 27, 16, 0.25);
  background: rgba(216, 204, 171, 0.58);
  font-size: 0.95rem;
}

.passport-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.8fr);
  gap: 18px;
}

.passport-photo {
  min-height: 200px;
  background:
    linear-gradient(180deg, rgba(193, 205, 212, 0.68), rgba(150, 164, 173, 0.68)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 24%);
  border: 4px solid rgba(39, 27, 16, 0.55);
  position: relative;
}

.passport-photo::before {
  content: "";
  position: absolute;
  left: 24%;
  width: 52%;
  top: 12%;
  bottom: 14%;
  background:
    linear-gradient(180deg, #111 0 100%) 38% 48% / 8% 14% no-repeat,
    linear-gradient(180deg, #111 0 100%) 58% 48% / 8% 14% no-repeat,
    linear-gradient(180deg, #7b3652 0 100%) 47% 66% / 14% 6% no-repeat,
    linear-gradient(180deg, #f0cf67 0 22%, #bf8d27 22% 32%, #ddb78e 32% 100%);
  box-shadow:
    inset 0 0 0 5px #111;
}

.passport-photo::after {
  content: "PHOTO";
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  color: #2a2217;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.passport-facts {
  display: grid;
  gap: 12px;
}

.passport-fact {
  padding: 12px;
  border: 3px dashed rgba(39, 27, 16, 0.38);
  background: rgba(255, 249, 235, 0.52);
}

.passport-fact strong,
.passport-fact span {
  display: block;
}

.passport-fact span {
  margin-top: 4px;
  font-size: 0.95rem;
}

.passport-stamps {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  height: 100%;
}

.passport-stamp-list {
  display: grid;
  gap: 16px;
}

.passport-stamp-card {
  min-height: 138px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(206, 112, 67, 0.14), rgba(140, 52, 28, 0.22)),
    rgba(255, 246, 235, 0.72);
  border: 4px solid rgba(136, 55, 38, 0.68);
  box-shadow:
    inset 0 0 0 3px rgba(136, 55, 38, 0.18),
    inset 0 0 28px rgba(136, 55, 38, 0.1);
  transform: rotate(-1.2deg);
}

.passport-stamp-card:nth-child(2) {
  transform: rotate(1deg);
}

.passport-stamp-card:nth-child(3) {
  transform: rotate(-0.5deg);
}

.passport-stamp-card--ban {
  background:
    linear-gradient(180deg, rgba(143, 34, 34, 0.16), rgba(87, 10, 10, 0.3)),
    rgba(255, 236, 236, 0.78);
  border-color: rgba(122, 26, 26, 0.82);
  box-shadow:
    inset 0 0 0 3px rgba(122, 26, 26, 0.2),
    inset 0 0 28px rgba(122, 26, 26, 0.12);
}

.passport-stamp-country {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
}

.passport-stamp-time,
.passport-stamp-zone {
  margin: 8px 0 0;
  font-size: 0.88rem;
}

.passport-achievements {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
}

.passport-achievement-list {
  display: grid;
  gap: 12px;
}

.passport-achievement-card {
  padding: 12px;
  background: rgba(255, 249, 235, 0.62);
  border: 3px dashed rgba(39, 27, 16, 0.38);
}

.passport-achievement-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.passport-achievement-card__head strong {
  font-size: 0.92rem;
  text-transform: uppercase;
}

.passport-achievement-card__emoji {
  font-size: 1.3rem;
  line-height: 1;
}

.passport-achievement-card__desc,
.passport-achievement-card__countries,
.passport-achievements__empty {
  margin: 8px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.passport-visa {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(84, 112, 148, 0.12), rgba(47, 85, 122, 0.18)),
    linear-gradient(180deg, rgba(255, 250, 237, 0.94), rgba(227, 221, 198, 0.94));
  border: 4px solid rgba(44, 55, 76, 0.38);
  padding: 18px;
}

.passport-visa__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.passport-visa__badge {
  padding: 10px 12px;
  border: 3px solid rgba(48, 66, 86, 0.5);
  background: rgba(89, 113, 137, 0.16);
  text-align: right;
}

.passport-visa-zone {
  margin: 8px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.passport-visa__body {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.passport-visa-mark {
  min-height: 180px;
  background:
    radial-gradient(circle at 30% 30%, rgba(90, 123, 160, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(195, 209, 221, 0.8), rgba(130, 152, 170, 0.8));
  border: 4px solid rgba(44, 55, 76, 0.36);
}

.passport-visa-details {
  display: grid;
  gap: 12px;
}

.passport-detail-row {
  padding: 10px 12px;
  background: rgba(245, 242, 231, 0.8);
  border: 3px solid rgba(44, 55, 76, 0.18);
}

.passport-detail-value {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.eyebrow,
.card-label,
.hud-label,
.status-text {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.hero-panel h1,
.summary-card h2,
#question-text,
.map-title,
.destination-title {
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
}

.hero-panel h1 {
  font-size: clamp(1.7rem, 3vw, 3rem);
}

.subtitle {
  margin: 8px 0 0;
  max-width: 46rem;
  font-size: 0.92rem;
  color: #e4d8b9;
}

.status-text {
  max-width: 20rem;
  text-align: right;
}

.stage {
  height: 100%;
  min-height: 0;
  padding: 12px;
  background: linear-gradient(180deg, rgba(35, 28, 18, 0.98), rgba(20, 20, 14, 0.98));
  overflow: hidden;
}

.stage--map {
  display: block;
}

.stage--inspection {
  min-height: 0;
}

.stage--arrest {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(145, 39, 39, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(42, 10, 10, 0.98), rgba(20, 8, 8, 0.98));
}

.map-stage-layout {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
}

.playfield {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 12px;
  min-height: 0;
  padding: 12px;
  background: linear-gradient(180deg, rgba(35, 28, 18, 0.98), rgba(20, 20, 14, 0.98));
  overflow: hidden;
}

.pixel-button {
  border: 0;
  display: inline-block;
  padding: 12px 16px;
  color: var(--text-light);
  background: var(--accent);
  box-shadow:
    0 4px 0 #6b2f12,
    inset 0 0 0 3px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  text-transform: uppercase;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 120ms ease, filter 120ms ease;
}

.pixel-button.secondary {
  background: #556448;
  box-shadow:
    0 4px 0 #27301f,
    inset 0 0 0 3px rgba(0, 0, 0, 0.28);
}

.pixel-button.danger {
  background: #9e3c32;
  box-shadow:
    0 4px 0 #5e1d18,
    inset 0 0 0 3px rgba(0, 0, 0, 0.28);
}

.pixel-button.tiny {
  padding: 10px 12px;
  font-size: 0.72rem;
}

#passport-button {
  justify-self: stretch;
  min-width: 220px;
  padding: 12px 18px;
}

#passport-button-mobile {
  display: none;
}

#reset-progress-button {
  max-width: 220px;
  font-size: 0.68rem;
  line-height: 1.25;
}

.hero-link {
  justify-self: stretch;
  text-align: center;
}

.hero-link--inline {
  justify-self: start;
  width: fit-content;
  min-width: 160px;
}

.pixel-button:hover:enabled,
.choice-button:hover:enabled,
.map-country:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.pixel-button:disabled,
.choice-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.card,
.hud-item {
  background: var(--bg-card);
  color: var(--text-dark);
  border: 4px solid var(--border-shadow);
  box-shadow: inset 0 0 0 4px var(--border-heavy);
}

.card {
  padding: 14px;
  overflow: hidden;
}

.hud-item {
  padding: 10px 12px;
}

.destination-card,
.briefing-card,
.feedback-card,
.summary-card,
.arrest-card {
  background: var(--bg-card-alt);
}

.arrest-card {
  width: min(560px, 100%);
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  background:
    linear-gradient(180deg, rgba(126, 38, 38, 0.96), rgba(66, 16, 16, 0.98));
}

.arrest-card h2 {
  margin: 10px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  text-transform: uppercase;
}

.arrest-countdown {
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 700;
  line-height: 1;
}

.arrest-subtitle,
.arrest-helper-text {
  margin: 12px 0 0;
  font-size: 0.95rem;
}

.arrest-helper-text {
  padding: 14px;
  background: rgba(255, 241, 211, 0.08);
  border: 3px dashed rgba(255, 241, 211, 0.2);
}

.destination-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.destination-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.destination-title {
  font-size: clamp(1.2rem, 1.6vw, 1.8rem);
}

.destination-copy,
.briefing-card p,
.feedback-card p,
.summary-card p {
  margin: 8px 0 0;
  font-size: 0.86rem;
}

.map-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  background: linear-gradient(180deg, rgba(180, 170, 119, 0.32), transparent 26%), #8e9a78;
}

.rules-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.rules-sidebar,
.rules-content {
  min-height: 0;
}

.rules-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.rules-sidebar p,
.rules-sidebar ul,
.rules-section p,
.rules-section ul {
  margin: 0;
}

.rules-sidebar ul,
.rules-section ul {
  padding-left: 18px;
}

.rules-sidebar li,
.rules-section li {
  margin-top: 6px;
}

.rules-content {
  display: grid;
  gap: 12px;
}

.rules-section {
  padding: 16px;
}

.rules-section h2,
.rules-section h3 {
  margin: 0;
  text-transform: uppercase;
}

.rules-section h2 {
  font-size: 1.18rem;
}

.rules-section h3 {
  margin-top: 14px;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

.rules-section p,
.rules-section ul {
  margin-top: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #21180f;
}

.rules-anchor-list {
  display: grid;
  gap: 8px;
}

.rules-anchor-list a {
  color: var(--text-light);
  text-decoration: none;
}

.rules-note {
  padding: 12px;
  background: rgba(26, 23, 17, 0.14);
  border: 3px dashed rgba(21, 18, 12, 0.38);
}

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

.rules-mini-card {
  padding: 12px;
  background: rgba(255, 248, 233, 0.52);
  border: 3px solid rgba(38, 28, 18, 0.2);
}

.map-card--full {
  height: 100%;
}

.map-card--locked {
  opacity: 0.72;
}

.map-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.map-selection {
  margin: 0;
  max-width: 16rem;
  text-align: right;
  font-weight: 700;
  font-size: 0.82rem;
}

.europe-map {
  min-height: 0;
  border: 4px solid #20251d;
  background: linear-gradient(180deg, #97a486 0%, #6d7b62 100%);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.europe-map__svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.map-zoom-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  position: relative;
  z-index: 2;
}

.map-zoom-hint {
  margin: 0;
  font-size: 0.76rem;
  color: #20180f;
}

.map-zoom-controls {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.europe-map {
  touch-action: none;
  cursor: grab;
}

.europe-map--dragging {
  cursor: grabbing;
}

.map-country {
  fill: #d8d2c2;
  stroke: #141612;
  stroke-width: 0.8;
  cursor: pointer;
  transition: fill 120ms ease, filter 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.map-country.active {
  fill: #cb6f2b;
}

.map-country.map-country--visa-locked {
  fill: #56524b;
}

.map-country.map-country--visa-locked.active {
  fill: #787268;
}

.map-country.visited {
  fill: #4f874b;
}

.map-country.visited.active {
  fill: #cb6f2b;
}

.map-country:focus,
.map-country:focus-visible {
  outline: none;
}

.map-country--locked {
  cursor: default;
}

.checkpoint-art {
  --art-overlay: rgba(82, 80, 59, 0.25);
  --art-floor: #2c3029;
  --art-floor-band: #6b6049;
  --art-wall: #485651;
  --skyline-band: rgba(14, 17, 15, 0.92);
  --skyline-bars: rgba(19, 22, 20, 0.76);
  --booth-edge: #29291e;
  --booth-main: #575340;
  --booth-bottom: #2c2b22;
  --booth-top: #726f58;
  --window-frame: #26322e;
  --window-top: rgba(191, 222, 216, 0.68);
  --window-bottom: rgba(64, 92, 92, 0.82);
  --lamp-left-top: #d4c779;
  --lamp-left-bottom: #746515;
  --lamp-right-top: #6e3924;
  --lamp-right-bottom: #3d180e;
  --desk-top: #7b5335;
  --desk-bottom: #4a2d1d;
  --desk-highlight: #b78253;
  --passport-top: #6d2630;
  --passport-bottom: #4d1c24;
  --stamp-top: #746246;
  --stamp-bottom: #2b261e;
  --officer-beard-color: #8a745a;
  --female-hair-light: #f1cf63;
  --female-hair-dark: #c08d29;
  position: relative;
  min-height: 0;
  height: 100%;
  background:
    linear-gradient(180deg, var(--art-overlay), transparent 32%),
    linear-gradient(0deg, var(--art-floor) 0 16%, var(--art-floor-band) 16% 18%, var(--art-wall) 18% 100%);
  border: 4px solid #111;
  overflow: hidden;
}

.checkpoint-art--visa {
  --art-overlay: rgba(91, 82, 59, 0.22);
  --art-floor: #3a3228;
  --art-floor-band: #8b7151;
  --art-wall: #7b7d75;
  --skyline-band: rgba(95, 113, 120, 0.22);
  --skyline-bars: rgba(115, 121, 113, 0.8);
  --booth-edge: #6e746d;
  --booth-main: #c3c5b9;
  --booth-bottom: #7d684a;
  --booth-top: #d8d7ce;
  --window-frame: rgba(150, 165, 170, 0.58);
  --window-top: rgba(245, 246, 242, 0.7);
  --window-bottom: rgba(191, 203, 212, 0.85);
  --lamp-left-top: #c7d3d8;
  --lamp-left-bottom: #6e7d85;
  --lamp-right-top: #b2bdbf;
  --lamp-right-bottom: #616b6f;
  --desk-top: #8d6948;
  --desk-bottom: #5f402a;
  --desk-highlight: #c5986b;
  --passport-top: #35556b;
  --passport-bottom: #243e52;
  --stamp-top: #8a8578;
  --stamp-bottom: #454239;
  background:
    linear-gradient(180deg, var(--art-overlay), transparent 35%),
    linear-gradient(0deg, var(--art-floor) 0 16%, var(--art-floor-band) 16% 18%, var(--art-wall) 18% 100%);
}

.side-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 10px;
  overflow: hidden;
}

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

.skyline,
.booth,
.booth-window,
.lamp,
.desk,
.landmark-painting,
.passport,
.stamp,
.border-guard,
.guard-cap,
.guard-head,
.guard-eye,
.guard-mouth,
.guard-torso,
.guard-arm,
.art-toolbar,
.dossier-panel,
.question-overlay,
.inspector-badge {
  position: absolute;
  image-rendering: pixelated;
}

.question-overlay-slot--panel {
  display: none;
}

.skyline {
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 54%, var(--skyline-band) 54% 58%, transparent 58% 100%),
    linear-gradient(90deg, transparent 0 12%, var(--skyline-bars) 12% 16%, transparent 16% 27%, color-mix(in srgb, var(--skyline-bars) 92%, transparent) 27% 35%, transparent 35% 55%, color-mix(in srgb, var(--skyline-bars) 92%, transparent) 55% 62%, transparent 62% 100%);
}

.checkpoint-art--visa .skyline {
  background:
    linear-gradient(180deg, transparent 0 28%, var(--skyline-band) 28% 31%, transparent 31% 100%),
    linear-gradient(90deg, transparent 0 8%, var(--skyline-bars) 8% 14%, transparent 14% 19%, var(--skyline-bars) 19% 25%, transparent 25% 74%, color-mix(in srgb, var(--skyline-bars) 102%, transparent) 74% 80%, transparent 80% 85%, color-mix(in srgb, var(--skyline-bars) 102%, transparent) 85% 91%, transparent 91% 100%);
}

.booth {
  inset: 8% 7% 20%;
  background: linear-gradient(90deg, var(--booth-edge) 0 10%, var(--booth-main) 10% 90%, var(--booth-edge) 90% 100%);
  box-shadow:
    inset 0 0 0 5px #161610,
    inset 0 -18px 0 var(--booth-bottom),
    inset 0 18px 0 var(--booth-top);
}

.checkpoint-art--visa .booth {
  inset: 10% 10% 22%;
  background: linear-gradient(90deg, var(--booth-edge) 0 12%, var(--booth-main) 12% 88%, var(--booth-edge) 88% 100%);
  box-shadow:
    inset 0 0 0 5px #292921,
    inset 0 -18px 0 var(--booth-bottom),
    inset 0 18px 0 var(--booth-top);
}

.booth-window {
  left: 20%;
  right: 20%;
  top: 17%;
  height: 28%;
  background: linear-gradient(180deg, var(--window-top) 0 10%, var(--window-bottom) 10% 100%);
  box-shadow:
    inset 0 0 0 6px #111,
    inset 0 0 0 18px var(--window-frame);
}

.checkpoint-art--visa .booth-window {
  left: 18%;
  right: 18%;
  top: 18%;
  height: 24%;
  background:
    linear-gradient(90deg, rgba(125, 143, 153, 0.82) 0 8%, rgba(207, 223, 232, 0.9) 8% 92%, rgba(125, 143, 153, 0.82) 92% 100%),
    linear-gradient(180deg, var(--window-top), var(--window-bottom));
  box-shadow:
    inset 0 0 0 6px #252720,
    inset 0 -18px 0 var(--window-frame);
}

.lamp {
  top: 50%;
  width: 11%;
  aspect-ratio: 1;
  background: linear-gradient(180deg, var(--lamp-left-top) 0 42%, var(--lamp-left-bottom) 42% 100%);
  box-shadow: 0 0 0 5px #111;
}

.lamp-left {
  left: 23%;
}

.lamp-right {
  right: 23%;
  background: linear-gradient(180deg, var(--lamp-right-top) 0 42%, var(--lamp-right-bottom) 42% 100%);
}

.landmark-painting {
  top: 22%;
  right: 25.75%;
  width: 20.5%;
  max-width: 168px;
  aspect-ratio: 1.18;
  z-index: 2;
}

.landmark-painting__frame {
  width: 100%;
  height: 100%;
  padding: 7px;
  background: linear-gradient(180deg, #bda978 0%, #7b6234 100%);
  box-shadow:
    inset 0 0 0 4px #20170d,
    inset 0 0 0 9px #ddd0a7,
    0 4px 0 rgba(17, 17, 14, 0.56);
}

.landmark-painting__image {
  display: block;
  width: 100%;
  height: 100%;
  background: #ece4d1;
  object-fit: cover;
  border: 3px solid #413222;
  filter: saturate(0.62) brightness(0.92) contrast(0.94);
}

.desk {
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: linear-gradient(180deg, var(--desk-top) 0 18%, var(--desk-bottom) 18% 100%);
  box-shadow: inset 0 7px 0 var(--desk-highlight);
}

.checkpoint-art--visa .desk {
  background: linear-gradient(180deg, var(--desk-top) 0 18%, var(--desk-bottom) 18% 100%);
  box-shadow: inset 0 7px 0 var(--desk-highlight);
}

.passport {
  width: 11%;
  aspect-ratio: 0.8;
  left: 5%;
  bottom: 5%;
  background: linear-gradient(180deg, var(--passport-top) 0 68%, var(--passport-bottom) 68% 100%);
  box-shadow:
    inset 0 0 0 4px #1f1012,
    inset 0 28px 0 rgba(255, 214, 125, 0.15);
  transform: rotate(-6deg);
}

.checkpoint-art--visa .passport {
  width: 13%;
  left: 7%;
  bottom: 6%;
  background: linear-gradient(180deg, var(--passport-top) 0 68%, var(--passport-bottom) 68% 100%);
}

.stamp {
  width: 9%;
  aspect-ratio: 1;
  right: 7%;
  bottom: 6%;
  background: linear-gradient(180deg, var(--stamp-top) 0 42%, var(--stamp-bottom) 42% 100%);
  box-shadow:
    inset 0 0 0 4px #111,
    -52px -18px 0 -12px rgba(175, 41, 28, 0.8);
}

.checkpoint-art--visa .stamp {
  right: 9%;
  background: linear-gradient(180deg, var(--stamp-top) 0 42%, var(--stamp-bottom) 42% 100%);
}

.border-guard {
  left: 25%;
  bottom: 10%;
  width: 32%;
  height: 56%;
  z-index: 3;
  animation: guard-bob 2.2s steps(2) infinite;
}

.guard-cap {
  left: 25%;
  top: 0;
  width: 50%;
  height: 10%;
  background: linear-gradient(180deg, #5b616a 0 58%, #2d3238 58% 100%);
  box-shadow:
    inset 0 0 0 4px #111,
    0 24px 0 -8px #2d3238;
}

.guard-head {
  left: 23%;
  top: 8%;
  width: 55%;
  height: 26%;
  background: linear-gradient(
    180deg,
    #d1b08a 0 56%,
    var(--officer-beard-color) 56% 100%
  );
  box-shadow: inset 0 0 0 5px #111;
}

.guard-eye {
  top: 36%;
  width: 10%;
  aspect-ratio: 1;
  background: #111;
  animation: guard-blink 4s steps(1) infinite;
}

.guard-eye.left {
  left: 25%;
}

.guard-eye.right {
  right: 25%;
}

.guard-mouth {
  left: 33%;
  bottom: 20%;
  width: 28%;
  height: 8%;
  background: #663621;
}

.guard-torso {
  left: 14%;
  top: 33%;
  width: 74%;
  height: 44%;
  background: linear-gradient(180deg, #6a755b 0 22%, #394033 22% 100%);
  box-shadow:
    inset 0 0 0 5px #111,
    inset 0 24px 0 rgba(255, 255, 255, 0.08);
}

.guard-arm {
  top: 40%;
  width: 20%;
  height: 34%;
  background: linear-gradient(180deg, #77806a 0 66%, #d1b08a 66% 100%);
  box-shadow: inset 0 0 0 4px #111;
  transform-origin: top center;
}

.guard-arm-left {
  left: 0;
  transform: rotate(12deg);
}

.guard-arm-right {
  right: 2%;
  transform: rotate(-16deg);
}

.inspector-badge {
  top: 28%;
  left: 18%;
  width: 26%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 4px solid rgba(15, 16, 13, 0.75);
  background: rgba(27, 34, 28, 0.72);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.inspector-flag-emoji {
  display: inline-block;
  font-size: clamp(1rem, 2vw, 1.7rem);
  line-height: 1;
  filter: saturate(0.45) brightness(0.86) contrast(1.08);
  opacity: 0.88;
  transform: translateY(1px);
}

.border-guard--female .guard-cap {
  background: linear-gradient(180deg, var(--female-hair-light) 0 58%, var(--female-hair-dark) 58% 100%);
  box-shadow:
    inset 0 0 0 4px #111,
    0 24px 0 -8px var(--female-hair-dark);
}

.border-guard--female .guard-head {
  background: linear-gradient(180deg, #ddb78e 0 100%, #ddb78e 100% 100%);
}

.border-guard--female .guard-head::before {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: -14%;
  height: 46%;
  background: linear-gradient(180deg, var(--female-hair-light) 0 62%, var(--female-hair-dark) 62% 100%);
  box-shadow: inset 0 0 0 4px #111;
}

.border-guard--female .guard-head::after {
  content: "";
  position: absolute;
  right: -8%;
  top: 10%;
  width: 16%;
  height: 112%;
  background:
    linear-gradient(
      180deg,
      var(--female-hair-light) 0 18%,
      var(--female-hair-dark) 18% 36%,
      var(--female-hair-light) 36% 54%,
      var(--female-hair-dark) 54% 72%,
      var(--female-hair-light) 72% 100%
    );
  box-shadow: inset 0 0 0 3px #111;
  transform: rotate(2deg);
}

.border-guard--female .guard-mouth {
  background: #7b3652;
}

.border-guard--female .guard-torso {
  background: linear-gradient(180deg, #65798b 0 22%, #31404d 22% 100%);
}

.checkpoint-art--visa .lamp {
  background: linear-gradient(180deg, #c7d3d8 0 42%, #6e7d85 42% 100%);
}

.checkpoint-art--visa .lamp-right {
  background: linear-gradient(180deg, #b2bdbf 0 42%, #616b6f 42% 100%);
}

.checkpoint-art--visa .landmark-painting {
  display: none;
}

.art-toolbar {
  top: 14px;
  left: 14px;
  z-index: 6;
}

.dossier-panel {
  top: 60px;
  left: 14px;
  width: min(42%, 320px);
  max-height: calc(100% - 170px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  z-index: 7;
  padding: 14px;
  color: var(--text-dark);
  background: rgba(199, 179, 138, 0.97);
  border: 4px solid var(--border-shadow);
  box-shadow: inset 0 0 0 4px var(--border-heavy);
  overflow: hidden;
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.rules-panel {
  margin: 10px 0 0;
  padding: 10px;
  min-height: 0;
  overflow: auto;
  background: rgba(24, 22, 18, 0.12);
  border: 3px dashed rgba(23, 20, 13, 0.48);
  font-size: 0.8rem;
}

.rules-panel p {
  margin: 0 0 8px;
}

.rules-panel p:last-child {
  margin-bottom: 0;
}

.question-overlay {
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  padding: 14px;
  color: var(--text-light);
  background: var(--overlay);
  border: 3px solid rgba(242, 232, 207, 0.18);
  backdrop-filter: blur(6px);
}

#question-text {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  margin-top: 6px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.question-hint {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: rgba(242, 232, 207, 0.86);
}

.choice-button {
  width: 100%;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  text-align: left;
  color: var(--text-light);
  background: rgba(56, 65, 50, 0.86);
  border: 0;
  box-shadow:
    0 4px 0 rgba(18, 22, 15, 0.9),
    inset 0 0 0 3px rgba(0, 0, 0, 0.3);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.choice-shortcut {
  display: inline-block;
  min-width: 48px;
  padding: 4px 6px;
  color: rgba(242, 232, 207, 0.92);
  background: rgba(17, 18, 14, 0.6);
  box-shadow: inset 0 0 0 2px rgba(242, 232, 207, 0.14);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.choice-label {
  display: block;
  line-height: 1.35;
}

.choice-button.correct {
  background: rgba(54, 90, 52, 0.92);
}

.choice-button.incorrect {
  background: rgba(163, 59, 44, 0.92);
}

.choice-button.arrest {
  background: rgba(108, 18, 18, 0.94);
}

.feedback-card.feedback-card--warning {
  background: linear-gradient(180deg, rgba(161, 136, 65, 0.94), rgba(113, 93, 37, 0.94));
}

.feedback-card.feedback-card--arrest {
  background: linear-gradient(180deg, rgba(126, 38, 38, 0.96), rgba(66, 16, 16, 0.96));
  color: var(--text-light);
}

.summary-card {
  background: linear-gradient(180deg, rgba(221, 163, 77, 0.92), rgba(152, 100, 35, 0.92)), var(--bg-card-alt);
}

.summary-card.summary-card--arrested,
.summary-card.summary-card--detained {
  background: linear-gradient(180deg, rgba(126, 38, 38, 0.96), rgba(66, 16, 16, 0.96));
  color: var(--text-light);
}

.hidden {
  display: none;
}

.border-guard--question .guard-head {
  animation: guard-inspect 1.1s steps(2) infinite;
}

.border-guard--approve .guard-arm-right {
  animation: guard-stamp 0.55s steps(2) infinite;
}

.border-guard--deny .guard-head {
  animation: guard-deny 0.45s steps(2) infinite;
}

@keyframes guard-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

@keyframes guard-blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }

  94%,
  96% {
    transform: scaleY(0.2);
  }
}

@keyframes guard-inspect {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(4px);
  }
}

@keyframes guard-stamp {
  0%,
  100% {
    transform: rotate(-16deg) translateY(0);
  }

  50% {
    transform: rotate(12deg) translateY(24px);
  }
}

@keyframes guard-deny {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@media (max-width: 980px) {
  .map-stage-layout,
  .playfield,
  .rules-layout,
  .rules-grid,
  .stats-group__grid {
    grid-template-columns: 1fr;
  }

  .choices,
  .hud {
    grid-template-columns: 1fr;
  }

  .status-text {
    text-align: left;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.mobile-interview-no-scroll {
    overflow: hidden;
  }

  .game-shell {
    width: 100vw;
    height: auto;
    min-height: 100dvh;
    padding: 8px;
    gap: 8px;
    overflow: visible;
  }

  body.mobile-interview-no-scroll .game-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    gap: 12px;
    padding: 10px 12px;
    position: relative;
    justify-items: stretch;
  }

  .hero-mobile-actions {
    display: flex;
    order: 2;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-panel h1 {
    font-size: 1.55rem;
  }

  .mobile-menu-toggle {
    display: inline-block;
    order: 0;
    justify-self: auto;
    align-self: auto;
    min-width: 0;
    padding-inline: 12px;
  }

  #passport-button-mobile {
    display: inline-block;
    min-width: 0;
    width: auto;
    padding-inline: 14px;
  }

  .hero-copy {
    order: 1;
  }

  .subtitle {
    margin-top: 6px;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .hero-links {
    gap: 8px;
    margin-top: 10px;
  }

  .hero-link--inline,
  #reset-progress-button {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  #passport-button {
    display: none;
  }

  .hero-tools {
    justify-items: stretch;
    text-align: left;
  }

  .hero-links,
  .hero-tools {
    display: none;
  }

  .hero-panel.hero-panel--menu-open .hero-links,
  .hero-panel.hero-panel--menu-open .hero-tools {
    display: grid;
  }

  .hero-panel.hero-panel--menu-open .hero-links {
    gap: 8px;
  }

  .hero-panel.hero-panel--menu-open .hero-tools {
    gap: 8px;
  }

  .hero-meta {
    font-size: 0.72rem;
  }

  .travel-buff {
    justify-self: start;
  }

  .achievement-panel,
  .stats-panel {
    width: 100%;
    max-height: 180px;
    padding: 10px;
  }

  .stage {
    padding: 8px;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.mobile-interview-no-scroll .stage--inspection {
    height: 100%;
    overflow: hidden;
  }

  .map-stage-layout {
    height: auto;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  .map-card {
    min-height: 0;
    height: auto;
  }

  .map-card-header {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
  }

  .map-selection {
    max-width: none;
    text-align: left;
    font-size: 0.74rem;
  }

  .map-title {
    font-size: 1rem;
  }

  .europe-map {
    min-height: 0;
    min-height: 250px;
  }

  .map-zoom-bar {
    display: grid;
    gap: 8px;
    align-items: start;
  }

  .map-zoom-controls {
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .destination-card {
    gap: 10px;
    padding: 12px;
  }

  .destination-title {
    font-size: 1.05rem;
  }

  .destination-copy {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .destination-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playfield {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 8px;
    height: auto;
    overflow: visible;
  }

  body.mobile-interview-no-scroll .playfield {
    height: 100%;
    grid-template-rows: minmax(240px, 42dvh) minmax(0, 1fr);
    overflow: hidden;
  }

  .checkpoint-art {
    min-height: 420px;
    height: 420px;
  }

  body.mobile-interview-no-scroll .checkpoint-art {
    min-height: 0;
    height: 100%;
  }

  .landmark-painting {
    top: 20%;
    right: 18%;
    width: 25%;
  }

  .border-guard {
    left: 21%;
    width: 38%;
    height: 58%;
  }

  .art-toolbar {
    top: 10px;
    left: 10px;
  }

  .dossier-panel {
    top: 52px;
    left: 10px;
    width: calc(100% - 20px);
    max-height: calc(100% - 150px);
    padding: 10px;
  }

  .rules-panel {
    font-size: 0.72rem;
  }

  .question-overlay {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 10px;
  }

  .question-overlay-slot--panel {
    display: block;
  }

  .question-overlay-slot--panel .question-overlay {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 10px;
    margin: 0;
    border: 4px solid var(--border-shadow);
    box-shadow: inset 0 0 0 4px var(--border-heavy);
  }

  #question-text {
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .choices {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
  }

  .choice-button {
    padding: 10px;
    gap: 8px;
    font-size: 0.76rem;
  }

  .choice-shortcut {
    min-width: 36px;
    font-size: 0.62rem;
  }

  .question-hint {
    margin-top: 8px;
    font-size: 0.68rem;
  }

  .side-panel {
    gap: 8px;
    overflow: visible;
  }

  body.mobile-interview-no-scroll .side-panel {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
  }

  .hud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .hud-item,
  .card {
    padding: 10px;
  }

  .hud-item strong {
    font-size: 0.92rem;
  }

  body.mobile-interview-no-scroll .hud-item {
    padding: 8px;
  }

  body.mobile-interview-no-scroll .hud-item strong {
    font-size: 0.84rem;
  }

  .briefing-card p,
  .feedback-card p,
  .summary-card p {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .summary-card h2 {
    font-size: 1rem;
  }

  .arrest-card {
    padding: 18px;
  }

  .arrest-subtitle,
  .arrest-helper-text {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .passport-overlay {
    padding: 8px;
  }

  .passport-modal {
    width: 100%;
    max-height: calc(100dvh - 16px);
    padding: 12px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    overflow: hidden;
  }

  .passport-modal__header {
    display: grid;
    gap: 10px;
  }

  .passport-modal__actions {
    justify-content: start;
  }

  .passport-modal__header h2 {
    font-size: 1rem;
  }

  .passport-book {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
  }

  .passport-nav {
    width: 100%;
    height: 44px;
  }

  .passport-page {
    grid-column: 1 / -1;
    min-height: 0;
    height: 100%;
    overflow: auto;
  }

  #passport-prev {
    grid-column: 1;
    grid-row: 2;
  }

  #passport-next {
    grid-column: 2;
    grid-row: 2;
  }

  .passport-page {
    min-height: min(50dvh, 440px);
    padding: 14px;
  }

  .passport-grid,
  .passport-visa__body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .passport-visa {
    grid-template-rows: auto auto;
    gap: 12px;
    height: auto;
    padding: 12px;
  }

  .passport-visa__top {
    display: grid;
    gap: 10px;
  }

  .passport-visa__badge {
    text-align: left;
  }

  .passport-visa__body {
    align-items: stretch;
  }

  .passport-visa-mark {
    min-height: 112px;
  }

  .passport-visa-details {
    gap: 8px;
  }

  .passport-detail-row {
    padding: 8px 10px;
  }

  .passport-detail-value {
    font-size: 0.86rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .passport-stamp-list {
    align-content: start;
    gap: 10px;
  }

  .passport-stamps {
    grid-template-rows: auto auto;
    gap: 12px;
    height: auto;
  }

  .passport-stamp-card {
    min-height: 96px;
    height: auto;
    align-self: start;
    padding: 10px 12px;
    transform: none;
  }

  .passport-stamp-card:nth-child(2),
  .passport-stamp-card:nth-child(3) {
    transform: none;
  }

  .passport-stamp-country {
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .passport-stamp-time,
  .passport-stamp-zone {
    margin-top: 6px;
    font-size: 0.76rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .passport-photo {
    min-height: 150px;
  }

  .rules-sidebar {
    order: 2;
  }

  .rules-content {
    order: 1;
  }

  .dossier-panel {
    width: calc(100% - 20px);
    max-height: calc(100% - 136px);
  }
}

@media (max-width: 760px) and (max-height: 820px) {
  .hero-panel {
    padding: 8px 10px;
    gap: 10px;
  }

  .hero-panel h1 {
    font-size: 1.35rem;
  }

  .subtitle {
    display: none;
  }

  .achievement-panel,
  .stats-panel {
    max-height: 150px;
  }

  .stage {
    padding: 6px;
  }

  .playfield {
    gap: 6px;
    padding: 6px;
  }

  body.mobile-interview-no-scroll .playfield {
    grid-template-rows: minmax(210px, 38dvh) minmax(0, 1fr);
  }

  .hud-item,
  .card,
  .destination-card {
    padding: 8px;
  }

  .checkpoint-art .lamp,
  .checkpoint-art .passport,
  .checkpoint-art .stamp {
    display: none;
  }

  .booth {
    inset: 6% 6% 15%;
  }

  .checkpoint-art--visa .booth {
    inset: 8% 8% 16%;
  }

  .booth-window {
    top: 14%;
    height: 24%;
  }

  .border-guard {
    left: 20%;
    bottom: 8%;
    width: 40%;
    height: 54%;
  }

  .question-overlay {
    padding: 8px;
  }

  #question-text {
    font-size: 0.84rem;
  }

  .choice-button {
    padding: 8px;
    font-size: 0.72rem;
  }

  .passport-page {
    min-height: min(52dvh, 420px);
    padding: 12px;
  }

  .checkpoint-art {
    min-height: 360px;
    height: 360px;
  }
}
