:root {
  --ink: #07142e;
  --paper: #fff7e8;
  --paper-raised: #fffaf1;
  --cobalt: #123bee;
  --cobalt-dark: #0926a8;
  --coral: #ff6b57;
  --mint: #a8e6cf;
  --gold: #ffd166;
  --muted: #627087;
  --shadow-s: 2px 3px 0 var(--ink);
  --shadow-m: 3px 4px 0 var(--ink);
  --shadow-l: 5px 6px 0 var(--ink);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  margin: 0;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 200;
  left: 12px;
  top: 12px;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.mono-label {
  color: var(--cobalt);
  font: 950 10px/1.2 "Courier New", ui-monospace, monospace;
  letter-spacing: 0.1em;
}

/* Travel world */

.world-page {
  min-height: 100svh;
  overflow: hidden;
  background: #57c5ed;
}

.world-map {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  isolation: isolate;
}

.world-scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.world-map-art,
.world-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.island-layers {
  display: none;
}

.world-map-art {
  z-index: -3;
  display: block;
  pointer-events: none;
}

.world-map-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.world-vignette {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 20, 46, 0.08), transparent 21%, transparent 76%, rgba(7, 20, 46, 0.18)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 16%, transparent 82%, rgba(7, 20, 46, 0.07));
  pointer-events: none;
}

.world-atmosphere {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.world-cloud-drift,
.world-sea-shimmer {
  position: absolute;
  display: block;
  pointer-events: none;
  will-change: opacity, transform;
}

.world-cloud-drift {
  left: -8%;
  width: 116%;
  background-repeat: no-repeat;
}

.world-cloud-drift-far {
  top: 3%;
  height: 28%;
  background-image:
    radial-gradient(ellipse at 5% 52%, rgba(255, 255, 255, 0.34) 0 5%, transparent 16%),
    radial-gradient(ellipse at 38% 34%, rgba(255, 255, 255, 0.18) 0 4%, transparent 13%),
    radial-gradient(ellipse at 74% 44%, rgba(255, 255, 255, 0.22) 0 4%, transparent 14%),
    radial-gradient(ellipse at 96% 56%, rgba(255, 255, 255, 0.32) 0 6%, transparent 17%);
  opacity: 0.72;
  animation: world-cloud-drift-far 34s ease-in-out infinite alternate;
}

.world-cloud-drift-near {
  top: 23%;
  height: 42%;
  background-image:
    radial-gradient(ellipse at 2% 56%, rgba(255, 255, 255, 0.22) 0 7%, transparent 18%),
    radial-gradient(ellipse at 23% 73%, rgba(255, 255, 255, 0.14) 0 5%, transparent 16%),
    radial-gradient(ellipse at 82% 59%, rgba(255, 255, 255, 0.15) 0 5%, transparent 16%),
    radial-gradient(ellipse at 99% 72%, rgba(255, 255, 255, 0.24) 0 7%, transparent 18%);
  opacity: 0.62;
  animation: world-cloud-drift-near 26s ease-in-out -8s infinite alternate;
}

.world-sea-shimmer {
  left: -12%;
  bottom: -4%;
  width: 124%;
  height: 76%;
  background: repeating-linear-gradient(
    112deg,
    transparent 0 54px,
    rgba(231, 251, 255, 0.2) 56px 58px,
    transparent 60px 116px
  );
  mask-image: radial-gradient(ellipse at 52% 48%, #000 0 38%, transparent 74%);
  mix-blend-mode: screen;
}

.world-sea-shimmer-wide {
  opacity: 0.34;
  animation: world-sea-shimmer-wide 11s ease-in-out infinite alternate;
}

.world-sea-shimmer-soft {
  bottom: -10%;
  background-position: 41px 18px;
  opacity: 0.18;
  transform: scaleX(-1);
  animation: world-sea-shimmer-soft 16s ease-in-out -5s infinite alternate;
}

@keyframes world-cloud-drift-far {
  0% { opacity: 0.56; transform: translate3d(-10px, 0, 0); }
  100% { opacity: 0.76; transform: translate3d(18px, 4px, 0); }
}

@keyframes world-cloud-drift-near {
  0% { opacity: 0.48; transform: translate3d(12px, 3px, 0); }
  100% { opacity: 0.68; transform: translate3d(-16px, -3px, 0); }
}

@keyframes world-sea-shimmer-wide {
  0% { opacity: 0.2; transform: translate3d(-18px, 0, 0); }
  100% { opacity: 0.38; transform: translate3d(22px, -3px, 0); }
}

@keyframes world-sea-shimmer-soft {
  0% { opacity: 0.12; transform: translate3d(12px, 2px, 0) scaleX(-1); }
  100% { opacity: 0.24; transform: translate3d(-18px, -2px, 0) scaleX(-1); }
}

.world-map[data-motion="reduced"] .world-cloud-drift,
.world-map[data-motion="reduced"] .world-sea-shimmer {
  animation: none;
  opacity: 0.18;
  transform: none;
}

.world-brand {
  position: absolute;
  z-index: 3;
  left: 44%;
  top: clamp(14px, 3vh, 28px);
  width: clamp(330px, 34vw, 500px);
  padding: 6px 22px 9px;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  background: linear-gradient(#fff7e8, #efd3a1);
  box-shadow: var(--shadow-l), inset 0 0 0 3px rgba(255, 255, 255, 0.55);
  text-align: center;
}

.world-brand::before,
.world-brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 18px;
  width: 48px;
  height: calc(100% - 20px);
  border: 3px solid var(--ink);
  background: #d9ac6c;
}

.world-brand::before {
  left: -34px;
  transform: skewY(-8deg);
}

.world-brand::after {
  right: -34px;
  transform: skewY(8deg);
}

.world-brand-mark {
  display: block;
  color: var(--cobalt);
  font: 950 9px/1 "Courier New", monospace;
  letter-spacing: 0.28em;
}

.world-brand h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(34px, 4.3vw, 64px);
  font-weight: 950;
  letter-spacing: -0.08em;
  line-height: 0.9;
  text-shadow: 3px 3px 0 #fff;
}

.world-brand p {
  margin: 7px -22px -9px;
  padding: 7px;
  border-top: 2px solid var(--ink);
  color: #a63e27;
  font: 950 clamp(13px, 1.3vw, 19px)/1 "Courier New", monospace;
  letter-spacing: 0.24em;
}

.world-hud {
  position: absolute;
  z-index: 5;
  right: max(14px, env(safe-area-inset-right));
  top: max(16px, env(safe-area-inset-top));
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 7px;
}

.world-hud button {
  min-height: 44px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: rgba(255, 250, 241, 0.94);
  box-shadow: var(--shadow-s);
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.world-hud button span {
  margin-right: 6px;
  color: var(--cobalt);
  font: 950 9px/1 "Courier New", monospace;
}

.world-hud button:hover {
  background: var(--paper);
  transform: translateY(-1px);
}

.world-hud button:active,
.island-entry:active,
.primary-action:active,
.dialog-close:active {
  transform: translate(2px, 3px);
  box-shadow: none;
}

.island-entry {
  position: absolute;
  z-index: 4;
  display: grid;
  min-height: 68px;
  align-content: center;
  padding: 8px 16px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: linear-gradient(180deg, #fff8df, #e8c891);
  box-shadow: var(--shadow-m), inset 0 0 0 2px rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms steps(2), filter 150ms ease;
}

.island-entry:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-3px);
}

.island-entry strong,
.island-entry small,
.island-entry-kicker {
  display: block;
}

.island-entry strong {
  font-size: clamp(19px, 2vw, 30px);
  font-weight: 950;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.island-entry small {
  width: calc(100% + 20px);
  margin: 7px -10px -5px;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  background: #1f774b;
  color: #fff;
  font-size: clamp(9px, 0.9vw, 12px);
  font-weight: 900;
  line-height: 1;
}

.island-entry-kicker {
  margin-bottom: 4px;
  color: #a4422d;
  font: 950 9px/1 "Courier New", monospace;
  letter-spacing: 0.08em;
}

.island-game {
  left: 47%;
  top: 64%;
  width: clamp(260px, 25vw, 390px);
  min-height: 96px;
  transform: translate(-50%, -50%);
  border-width: 4px;
  box-shadow: 6px 7px 0 var(--ink), inset 0 0 0 3px rgba(255, 255, 255, 0.62);
}

.island-game:hover {
  transform: translate(-50%, calc(-50% - 3px)) !important;
}

.island-game:active {
  transform: translate(calc(-50% + 3px), calc(-50% + 4px)) !important;
}

.island-game strong {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 44px);
}

.island-game small {
  background: var(--cobalt);
  font-size: clamp(12px, 1.25vw, 18px);
}

.island-hall {
  right: 8.2%;
  top: 25.5%;
  width: clamp(220px, 20vw, 315px);
}

.island-personality {
  left: 7.5%;
  top: 43.5%;
  width: clamp(170px, 17vw, 250px);
}

.island-workbench {
  right: 7.6%;
  bottom: 10.5%;
  width: clamp(180px, 17vw, 255px);
}

.island-entry.is-disabled {
  opacity: 0.82;
  cursor: not-allowed;
}

.island-entry.is-disabled small {
  background: #4b6672;
}

.world-status {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 11px;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 241, 0.92);
  box-shadow: var(--shadow-s);
  font: 900 11px/1 "Courier New", monospace;
}

.world-status span {
  width: 9px;
  height: 9px;
  border: 2px solid var(--ink);
  background: var(--mint);
}

.desktop-entry-state {
  display: none;
}

.game-page {
  min-width: 1024px;
  height: 100vh;
  height: 100svh;
  margin: 0;
  overflow: hidden;
  background: #071c35;
}

.game-frame {
  display: block;
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #071c35;
}

.game-frame[hidden],
.city-selector[hidden],
.city-map-shell[hidden] {
  display: none;
}

.city-selector {
  width: 100vw;
  height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 70px 5vw 32px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, #166bb0 0, #0a3d70 42%, #061a35 100%);
  background-size: 16px 16px, 16px 16px, auto;
  color: var(--paper);
}

.city-selector-header {
  width: min(1120px, 90vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  text-align: left;
}

.city-selector-header .mono-label {
  color: var(--gold);
}

.city-selector-header h1 {
  margin: 12px 0 8px;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1;
  text-shadow: 4px 5px 0 rgba(7, 20, 46, 0.85);
}

.city-selector-header p {
  margin: 0;
  color: #d9edff;
  font-weight: 800;
}

.city-selector-progress {
  display: flex;
  gap: 8px;
}

.city-selector-progress span {
  min-width: 92px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: var(--shadow-s);
  color: var(--ink);
  font: 900 10px/1.2 "Courier New", ui-monospace, monospace;
}

.city-selector-progress b {
  color: var(--cobalt);
  font-size: 18px;
}

.city-grid {
  width: min(1120px, 90vw);
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.88fr);
  gap: 16px;
}

.city-card {
  position: relative;
  min-width: 0;
  display: grid;
  align-items: start;
  gap: 10px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: #d8e0eb;
  box-shadow: 6px 7px 0 rgba(3, 13, 29, 0.8);
  color: #4b596c;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 140ms steps(2, end), box-shadow 140ms steps(2, end);
}

.city-card:hover,
.city-card:focus-visible {
  transform: translateY(-3px);
}

.city-card:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 3px 0 rgba(3, 13, 29, 0.8);
}

.city-card.is-open {
  background: linear-gradient(135deg, #fffaf1 0 60%, #dff8ec 60% 100%);
  color: var(--ink);
}

.city-card-featured {
  min-height: 386px;
  grid-template-columns: minmax(0, 0.9fr) minmax(240px, 1.1fr);
  grid-template-rows: auto auto auto auto 1fr auto;
}

.city-card-art {
  position: absolute;
  z-index: 0;
  right: -54px;
  bottom: -42px;
  width: 63%;
  max-height: 375px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.city-card-featured > :not(.city-card-art) {
  position: relative;
  z-index: 1;
  grid-column: 1;
}

.city-card-status {
  justify-self: end;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  background: #c4ccd7;
  color: var(--ink);
  font: 950 10px/1 "Courier New", monospace;
}

.city-card.is-open .city-card-status {
  background: var(--mint);
}

.city-card-featured .city-card-status {
  position: absolute;
  top: 18px;
  right: 18px;
  grid-column: auto;
}

.city-card-kicker {
  font: 950 10px/1.2 "Courier New", ui-monospace, monospace;
  letter-spacing: 0.08em;
}

.city-card strong {
  align-self: end;
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1;
}

.city-card-featured strong {
  margin-top: 34px;
  font-size: clamp(48px, 5vw, 72px);
}

.city-card small {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.city-card b {
  padding-top: 11px;
  border-top: 2px solid currentColor;
  font-size: 12px;
}

.city-route-stops,
.city-prep-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.city-route-stops {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 350px;
}

.city-route-stops li {
  padding: 5px 7px;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 241, 0.86);
  font: 900 10px/1 "Courier New", ui-monospace, monospace;
}

.city-card-action {
  width: min(280px, 100%);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 3px solid var(--ink);
  background: var(--cobalt);
  box-shadow: var(--shadow-m);
  color: #fff;
  font-size: 14px;
}

.city-upcoming {
  display: grid;
  grid-template-rows: minmax(214px, 1.2fr) minmax(150px, 0.8fr);
  gap: 16px;
}

.city-card-next {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr auto;
  background: #fff0bc;
  color: var(--ink);
}

.city-card-next::after {
  content: "02";
  position: absolute;
  right: 12px;
  bottom: -18px;
  color: rgba(255, 107, 87, 0.2);
  font: 950 92px/1 "Courier New", ui-monospace, monospace;
}

.city-card-next .city-card-status {
  grid-column: 2;
  grid-row: 1;
  background: var(--coral);
}

.city-card-next .city-card-kicker {
  grid-column: 1;
  grid-row: 1;
}

.city-card-next strong,
.city-card-next small,
.city-card-next .city-prep-list,
.city-card-next b {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
}

.city-card-next strong {
  grid-row: 2;
}

.city-card-next small {
  max-width: 310px;
}

.city-prep-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.city-prep-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 900;
}

.city-prep-list span {
  width: 9px;
  height: 9px;
  border: 2px solid var(--ink);
  background: var(--coral);
}

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

.city-card-queued {
  grid-template-rows: auto 1fr auto auto;
  padding: 14px;
  filter: saturate(0.45);
}

.city-card-queued .city-card-status {
  padding: 4px 6px;
  font-size: 9px;
}

.city-card-queued strong {
  font-size: 28px;
}

.city-card-queued b {
  font-size: 10px;
}

.city-selection-notice {
  width: min(1120px, 90vw);
  min-height: 42px;
  margin: 0;
  padding: 11px 16px;
  border: 2px solid rgba(255, 247, 232, 0.78);
  background: rgba(7, 20, 46, 0.75);
  color: #e9f5ff;
  font-size: 12px;
  font-weight: 850;
}

@media (prefers-reduced-motion: reduce) {
  .city-card {
    transition: none;
  }
}

.city-map-shell {
  width: 100vw;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 62fr) minmax(380px, 38fr);
  background: #07142e;
  color: var(--paper);
}

.city-map-surface {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-right: 3px solid var(--ink);
  background: #b8d8f4;
}

.city-map-scene {
  position: absolute;
  inset: 0 auto 0 0;
  width: 133.333%;
  height: 100%;
}

.city-map-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  image-rendering: pixelated;
  filter: saturate(0.9) contrast(1.04);
}

.city-map-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 20, 46, 0.42), transparent 24%),
    linear-gradient(90deg, rgba(7, 20, 46, 0.12), transparent 38% 82%, rgba(7, 20, 46, 0.08));
}

.city-map-heading {
  position: absolute;
  z-index: 3;
  left: 28px;
  top: 112px;
  max-width: 520px;
  color: var(--paper);
  text-shadow: 3px 3px 0 rgba(7, 20, 46, 0.92);
}

.city-map-heading h1 {
  margin: 0 0 7px;
  font-size: clamp(34px, 3.4vw, 54px);
  line-height: 1;
}

.city-map-heading p {
  margin: 0;
  font-size: 13px;
  font-weight: 850;
}

.city-map-node {
  position: absolute;
  z-index: 4;
  left: var(--city-x);
  top: var(--city-y);
  width: 72px;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  transform: translate(-36px, -100%);
  cursor: pointer;
}

.city-map-pin-visual {
  position: absolute;
  z-index: 1;
  left: 25px;
  bottom: 0;
  width: 22px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(3px 4px 0 rgba(7, 20, 46, 0.76));
  pointer-events: auto;
  cursor: pointer;
  transition: transform 120ms steps(2, end);
}

.city-map-node > span {
  position: absolute;
  z-index: 2;
  left: 46px;
  bottom: 2px;
  min-width: 56px;
  padding: 7px 10px;
  border: 3px solid var(--paper);
  background: var(--ink);
  box-shadow: 3px 4px 0 rgba(7, 20, 46, 0.72);
  color: var(--paper);
  font: 950 13px/1 "Courier New", ui-monospace, monospace;
  text-align: center;
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 120ms steps(2, end), transform 120ms steps(2, end), visibility 120ms;
}

.city-map-node.is-selected .city-map-pin-visual {
  transform: scale(1.08);
}

.city-map-node.is-completed > span {
  background: var(--mint);
  color: var(--ink);
}

.city-map-node.is-selected > span {
  background: var(--coral);
  color: var(--ink);
}

.city-map-node[data-pin-state="queued"] {
  filter: saturate(0.45);
  opacity: 0.74;
}

.city-map-node:hover,
.city-map-node:focus-visible {
  outline: 0;
}

.city-map-node:hover > span,
.city-map-node:focus-visible > span,
.city-map-node.is-selected > span {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.city-map-node:focus-visible > span {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.node-guangzhou > span {
  left: auto;
  right: 36px;
}

.city-map-inspector {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(190px, 37vh) auto minmax(0, 1fr) auto auto;
  gap: 20px;
  padding: 28px 16px 14px;
  border: 0;
  background: var(--paper-raised);
  color: var(--ink);
  overflow: hidden;
}

#selectedCityStatus {
  position: absolute;
  top: -3px;
  right: 4px;
  padding: 8px 16px;
  border: 3px solid var(--ink);
  background: var(--mint);
  color: var(--ink);
  font: 950 18px/1 "Courier New", ui-monospace, monospace;
}

.city-preview-hero {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  border: 3px solid var(--ink);
  background: #a8cae9;
  box-shadow: 5px 6px 0 var(--ink);
}

.city-preview-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.city-preview-title {
  min-width: 0;
  padding-bottom: 12px;
}

.city-preview-title h1 {
  margin: 0;
  font-size: clamp(42px, 4.8vw, 78px);
  line-height: 0.9;
}

.city-preview-title p {
  margin: 12px 0 0;
  color: #627087;
  font-size: 14px;
  font-weight: 900;
}

.city-preview-editorial {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.city-preview-editorial h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 17px;
}

.city-preview-editorial h2::after {
  content: "";
  height: 2px;
  flex: 1;
  background: rgba(7, 20, 46, 0.55);
}

#selectedCitySummary p {
  margin: 0 0 16px;
  color: #33445e;
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 780;
  line-height: 1.6;
}

.city-preview-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.city-preview-features span {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  background: #edf1ff;
  font-size: 13px;
  font-weight: 950;
}

.city-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 122px;
  border: 3px solid var(--ink);
  box-shadow: 5px 6px 0 var(--ink);
}

.city-preview-postcards {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  border-right: 3px solid var(--ink);
  border-radius: 0;
  background: var(--mint);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.city-preview-postcards img {
  width: 72px;
  height: 62px;
  object-fit: contain;
  image-rendering: pixelated;
}

.city-preview-postcards span {
  display: grid;
  gap: 7px;
}

.city-preview-postcards strong,
.city-preview-postcards small {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.city-preview-postcards small {
  font-size: 15px;
}

.city-map-primary {
  width: 100%;
  min-height: 116px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--cobalt);
  color: #fff;
  font-size: clamp(20px, 1.75vw, 28px);
  font-weight: 950;
  cursor: pointer;
}

.city-preview-postcards:hover,
.city-preview-postcards:focus-visible,
.city-map-primary:hover,
.city-map-primary:focus-visible {
  outline: 4px solid var(--coral);
  outline-offset: -6px;
}

.city-preview-postcards:active,
.city-map-primary:active {
  transform: translate(2px, 2px);
}

.city-map-primary:disabled {
  background: #9aa6b7;
  color: #e4e9ef;
  cursor: not-allowed;
}

#citySelectionNotice {
  min-height: 16px;
  margin: -5px 0 0;
  color: #a5382d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
}

#citySelectionNotice:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .city-map-node,
  .city-map-primary {
    transition: none;
  }
}

.game-world-return {
  position: fixed;
  z-index: 10;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 188px;
  min-height: 46px;
  justify-content: center;
  padding: 0 20px;
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.85);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
}

.game-world-return:hover,
.game-world-return:focus-visible {
  color: var(--ink);
  background: var(--mint);
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

@media (min-width: 901px) {
  .island-layers {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .island-layers {
    z-index: -2;
    display: block;
    pointer-events: none;
  }

  .island-layer {
    position: absolute;
    isolation: isolate;
    opacity: 1;
    transition: filter 160ms ease;
    will-change: transform, filter;
  }

  .island-layer > .island-base {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: auto;
  }

  .island-motion {
    position: absolute;
    z-index: 2;
    display: block;
    pointer-events: none;
  }

  .motion-fountain {
    top: 35%;
    left: 52%;
    width: 17%;
    height: 18%;
    border-radius: 50%;
    filter: drop-shadow(0 0 5px rgba(112, 229, 255, 0.72));
  }

  .motion-fountain::before {
    position: absolute;
    top: 3%;
    left: 44%;
    width: 12%;
    height: 52%;
    border-radius: 60% 60% 35% 35%;
    background: repeating-linear-gradient(
      180deg,
      rgba(240, 255, 255, 0.95) 0 3px,
      rgba(80, 204, 255, 0.86) 3px 7px,
      rgba(240, 255, 255, 0.45) 7px 10px
    );
    content: "";
    transform-origin: 50% 100%;
    animation: fountain-stream 1.35s linear infinite;
    mix-blend-mode: screen;
  }

  .motion-fountain::after {
    position: absolute;
    right: 12%;
    bottom: 12%;
    left: 12%;
    height: 28%;
    border: 2px solid rgba(214, 250, 255, 0.82);
    border-radius: 50%;
    box-shadow: inset 0 0 7px rgba(63, 191, 255, 0.72), 0 0 5px rgba(255, 255, 255, 0.72);
    content: "";
    animation: fountain-ripple 2.1s ease-out infinite;
    mix-blend-mode: screen;
  }

  .motion-portal {
    top: 30.6%;
    left: 56.5%;
    width: 11.5%;
    height: 21%;
    border-radius: 48%;
    background: radial-gradient(ellipse, rgba(232, 255, 255, 0.72), rgba(69, 220, 255, 0.28) 42%, transparent 72%);
    animation: portal-flow 2.45s ease-in-out infinite;
    filter: blur(0.5px) drop-shadow(0 0 7px rgba(67, 218, 255, 0.72));
    mix-blend-mode: screen;
  }

  .motion-train {
    top: 49%;
    left: 69%;
    width: 19%;
    height: auto;
    opacity: 0;
    image-rendering: auto;
    transform-origin: 50% 50%;
    animation: train-route 13.2s linear -1.8s infinite;
    filter: drop-shadow(0 3px 2px rgba(7, 20, 46, 0.3));
    will-change: left, top, transform, opacity;
  }

  .motion-walker {
    width: 8.8%;
    aspect-ratio: 4 / 5;
    background: transparent;
    image-rendering: pixelated;
    transform-origin: 50% 100%;
    transform: translate(-50%, -100%);
    will-change: transform, opacity;
  }

  .walker-sprite {
    display: block;
    width: 100%;
    height: 100%;
    background-position: 0 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: 600% 100%;
    image-rendering: pixelated;
    animation: none;
    filter: drop-shadow(0 2px 1px rgba(7, 20, 46, 0.34));
  }

  .motion-walker[data-motion="walk"] .walker-sprite {
    animation: walker-frames 720ms steps(6, jump-none) infinite;
  }

  .motion-walker[data-direction="left"] .walker-sprite {
    transform: scaleX(-1);
  }

  .motion-walker[data-direction="right"] .walker-sprite {
    transform: scaleX(1);
  }

  .walker-blue {
    background-image: url("./assets/traveler-walk-blue.png");
  }

  .walker-coral {
    background-image: url("./assets/traveler-walk-coral.png");
    animation-delay: -240ms;
  }

  .motion-walker-one {
    top: 56%;
    left: 38%;
  }

  .motion-walker-two {
    top: 57%;
    left: 64%;
  }

  .hall-island-greeting {
    position: absolute;
    z-index: 4;
    left: 52%;
    top: 44%;
    display: flex;
    min-width: 70px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 9px 5px;
    border: 3px solid #0a1838;
    background: #fff7dd;
    box-shadow: 3px 3px 0 rgba(10, 24, 56, 0.42);
    color: #0a1838;
    font-family: "Courier New", monospace;
    font-size: clamp(14px, 1.1vw, 18px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    transform: translate(-50%, -100%);
    animation: hall-island-greeting-pop 320ms steps(2, end) both;
  }

  .hall-island-greeting[hidden] {
    display: none;
  }

  .hall-island-greeting-icon {
    font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-size: 1.2em;
  }

  .motion-bus {
    top: 25%;
    left: 14%;
    width: 30%;
    height: auto;
    opacity: 0;
    image-rendering: auto;
    transform-origin: 50% 85%;
    animation: bus-route 9.6s cubic-bezier(0.42, 0, 0.32, 1) -3.1s infinite;
    filter: drop-shadow(0 4px 3px rgba(7, 20, 46, 0.32));
    will-change: transform, opacity;
  }

  .island-layer-personality {
    left: 2.4%;
    top: 27%;
    width: 22%;
    animation: island-float-personality 3.8s ease-in-out -0.6s infinite;
  }

  .island-layer-game {
    left: 21.5%;
    top: 20%;
    width: 49%;
    animation: island-float-game 4.6s ease-in-out -1.4s infinite;
  }

  .island-layer-hall {
    left: 69%;
    top: 24.5%;
    width: 30%;
    animation: island-float-hall 4.1s ease-in-out -2.1s infinite;
  }

  .island-layer-workbench {
    left: 74%;
    top: 61.5%;
    width: 23.5%;
    animation: island-float-workbench 4.3s ease-in-out -3s infinite;
  }

  @keyframes fountain-stream {
    0% {
      background-position: 0 0;
      transform: scaleY(0.9);
    }
    50% {
      transform: scaleY(1.05);
    }
    100% {
      background-position: 0 20px;
      transform: scaleY(0.9);
    }
  }

  @keyframes fountain-ripple {
    0% {
      opacity: 0.9;
      transform: scale(0.72);
    }
    82%,
    100% {
      opacity: 0;
      transform: scale(1.18);
    }
  }

  @keyframes portal-flow {
    0%,
    100% {
      opacity: 0.44;
      transform: scale(0.94, 0.98);
    }
    50% {
      opacity: 0.92;
      transform: scale(1.06, 1.03);
    }
  }

  @keyframes train-route {
    0% {
      opacity: 0;
      left: 69.5%;
      top: 48.3%;
      transform: rotate(-5deg) scale(0.94);
    }
    6% {
      opacity: 1;
      left: 68.5%;
      top: 49.1%;
      transform: rotate(-4deg) scale(0.945);
    }
    12% {
      opacity: 1;
      left: 67.3%;
      top: 50%;
      transform: rotate(-3deg) scale(0.95);
    }
    18% {
      opacity: 1;
      left: 65.9%;
      top: 51%;
      transform: rotate(-2deg) scale(0.955);
    }
    25% {
      opacity: 1;
      left: 64.1%;
      top: 52.2%;
      transform: rotate(-0.5deg) scale(0.96);
    }
    32% {
      opacity: 1;
      left: 62%;
      top: 53.6%;
      transform: rotate(1.5deg) scale(0.965);
    }
    39% {
      opacity: 1;
      left: 59.6%;
      top: 55.1%;
      transform: rotate(3.5deg) scale(0.97);
    }
    46% {
      opacity: 1;
      left: 57%;
      top: 56.6%;
      transform: rotate(5.5deg) scale(0.975);
    }
    53% {
      opacity: 1;
      left: 54.3%;
      top: 58.2%;
      transform: rotate(7.5deg) scale(0.98);
    }
    60% {
      opacity: 1;
      left: 51.7%;
      top: 59.8%;
      transform: rotate(9.5deg) scale(0.985);
    }
    67% {
      opacity: 1;
      left: 49.1%;
      top: 61.3%;
      transform: rotate(11.5deg) scale(0.99);
    }
    74% {
      opacity: 1;
      left: 46.7%;
      top: 62.6%;
      transform: rotate(13deg) scale(0.993);
    }
    81% {
      opacity: 1;
      left: 44.5%;
      top: 63.7%;
      transform: rotate(14.5deg) scale(0.996);
    }
    88% {
      opacity: 1;
      left: 42.6%;
      top: 64.6%;
      transform: rotate(16deg) scale(0.998);
    }
    94% {
      opacity: 1;
      left: 41.1%;
      top: 65.2%;
      transform: rotate(17deg) scale(1);
    }
    100% {
      opacity: 0;
      left: 39.8%;
      top: 65.7%;
      transform: rotate(18deg) scale(1);
    }
  }

  @keyframes walker-frames {
    from { background-position: 0 0; }
    to { background-position: 100% 0; }
  }

  @keyframes hall-island-greeting-pop {
    from { opacity: 0; transform: translate(-50%, -88%) scale(0.88); }
    to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
  }

  @keyframes bus-route {
    0%,
    4% {
      opacity: 0;
      transform: translate3d(0, 0, 0) rotate(-0.5deg) scale(0.97);
    }
    8% {
      opacity: 1;
    }
    48% {
      opacity: 1;
      transform: translate3d(20%, 5%, 0) rotate(0.3deg) scale(0.99);
    }
    88% {
      opacity: 1;
      transform: translate3d(42%, 10%, 0) rotate(0.8deg) scale(1);
    }
    95%,
    100% {
      opacity: 0;
      transform: translate3d(46%, 12%, 0) rotate(1deg) scale(1);
    }
  }

  .world-map:has(.island-personality:hover) .island-layer-personality,
  .world-map:has(.island-game:hover) .island-layer-game,
  .world-map:has(.island-hall:hover) .island-layer-hall,
  .world-map:has(.island-workbench:hover) .island-layer-workbench,
  .world-map:has(.island-personality:focus-visible) .island-layer-personality,
  .world-map:has(.island-game:focus-visible) .island-layer-game,
  .world-map:has(.island-hall:focus-visible) .island-layer-hall,
  .world-map:has(.island-workbench:focus-visible) .island-layer-workbench {
    z-index: 1;
    filter:
      brightness(1.07)
      saturate(1.05)
      drop-shadow(0 0 7px rgba(255, 223, 127, 0.62))
      drop-shadow(0 5px 5px rgba(7, 20, 46, 0.18));
  }

  .world-brand {
    opacity: 0;
    pointer-events: none;
  }

  .world-vignette,
  .world-status {
    display: none;
  }

  .world-hud {
    top: 5.8vh;
    right: auto;
    left: calc(50% + 38.36vh);
    width: 47.9vh;
    height: 4.6vh;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5vh;
  }

  .world-hud button {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: transparent;
    font-size: 0;
  }

  .world-hud button:hover {
    background: rgba(255, 209, 102, 0.18);
    box-shadow: inset 0 0 0 3px var(--gold), 0 5px 0 rgba(7, 20, 46, 0.42);
    transform: translateY(-4px);
  }

  .world-hud button:active {
    background: rgba(255, 209, 102, 0.28);
    box-shadow: inset 0 0 0 3px var(--ink);
    transform: translate(2px, 2px);
  }

  .island-entry {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: transparent;
    overflow: hidden;
  }

  .island-entry > * {
    opacity: 0;
    pointer-events: none;
  }

  .desktop-entry-state {
    display: none;
  }

  .island-personality .desktop-entry-state,
  .island-workbench .desktop-entry-state {
    left: 18%;
    width: 64%;
    height: 36%;
  }

  .island-game .desktop-entry-state {
    background: #315ea5;
  }

  .island-personality .desktop-entry-state {
    bottom: 12%;
  }

  .island-workbench .desktop-entry-state {
    bottom: 5%;
  }

  .island-entry:hover:not(:disabled) {
    filter: none;
    box-shadow: none;
    transform: none;
  }

  .island-entry.is-disabled {
    opacity: 1;
  }

  .island-game {
    left: 21.5%;
    top: 20%;
    width: 49%;
    height: 63%;
    transform: none;
  }

  .island-game:hover,
  .island-game:active {
    transform: none !important;
  }

  .island-hall {
    left: 69%;
    right: auto;
    top: 24.5%;
    width: 30%;
    height: 39%;
  }

  .island-personality {
    left: 2.4%;
    top: 27%;
    width: 22%;
    height: 30%;
  }

  .island-workbench {
    left: 74%;
    right: auto;
    top: 61.5%;
    bottom: auto;
    width: 23.5%;
    height: 27%;
  }

}

@keyframes island-float-personality {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-3px); }
}

@keyframes island-float-game {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes island-float-hall {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(-4px); }
}

@keyframes island-float-workbench {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-2px); }
}

.hud-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.hud-dialog[data-panel="bag"] {
  width: min(900px, calc(100vw - 28px));
}

.hud-dialog::backdrop {
  background: rgba(7, 20, 46, 0.64);
}

.hud-dialog-shell {
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 7px 8px 0 rgba(7, 20, 46, 0.7);
}

.hud-dialog-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 3px solid var(--ink);
  background: var(--paper-raised);
}

.hud-dialog h2 {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 950;
}

.dialog-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--coral);
  box-shadow: var(--shadow-s);
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  cursor: pointer;
}

.hud-dialog-shell > p,
#feedbackFields {
  margin: 0;
  padding: 18px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.empty-note {
  border-top: 2px dashed rgba(7, 20, 46, 0.34);
  color: var(--muted);
  font-size: 12px !important;
}

.task-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.task-list[hidden] {
  display: none;
}

.bag-postcard-list {
  display: grid;
  max-height: min(66vh, 640px);
  gap: 16px;
  padding: 0 18px 20px;
  overflow-y: auto;
}

.bag-postcard-list[hidden] {
  display: none;
}

.bag-empty-state {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 32px 24px 40px;
  border: 2px dashed rgba(7, 20, 46, 0.38);
  background: var(--paper-raised);
  text-align: center;
}

.bag-empty-state img {
  width: 152px;
  height: auto;
  image-rendering: pixelated;
}

.bag-empty-state h3,
.bag-empty-state p {
  margin: 0;
}

.bag-empty-state h3 {
  font-size: 22px;
  font-weight: 950;
}

.bag-empty-state p {
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
}

.bag-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}

.bag-album-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 4px 5px 0 var(--ink);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.bag-album-card:hover,
.bag-album-card:focus-visible,
.bag-postcard-slot:focus-visible,
.bag-back-button:focus-visible {
  outline: 4px solid var(--cobalt);
  outline-offset: 3px;
}

.bag-album-card:active,
.bag-back-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.bag-album-card > img {
  width: 168px;
  height: 112px;
  border-right: 3px solid var(--ink);
  object-fit: cover;
  image-rendering: pixelated;
}

.bag-album-card > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 7px;
  padding: 14px;
}

.bag-album-card small {
  padding: 4px 7px;
  background: var(--mint);
  color: var(--ink);
  font: 950 10px/1 "Courier New", monospace;
}

.bag-album-card strong {
  font-size: 18px;
  font-weight: 950;
}

.bag-album-card > span > span {
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 900;
}

.bag-back-button {
  justify-self: start;
  min-height: 44px;
  padding: 9px 13px;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.bag-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.bag-postcard-slot {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 0 0 10px;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.bag-postcard-slot[data-state="collected"] {
  box-shadow: 3px 4px 0 var(--ink);
}

.bag-postcard-slot:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.bag-postcard-slot-visual {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(135deg, #d5d8de 0 8px, #c6cad2 8px 16px);
}

.bag-postcard-slot-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.bag-postcard-slot-visual > span {
  position: absolute;
  left: 7px;
  top: 7px;
  padding: 4px 5px;
  border: 2px solid var(--ink);
  background: var(--coral);
  font: 950 9px/1 "Courier New", monospace;
}

.bag-postcard-slot strong,
.bag-postcard-slot > small {
  padding-inline: 9px;
}

.bag-postcard-slot strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-postcard-slot > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.bag-postcard-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 18px;
  padding: 16px;
  border: 3px solid var(--ink);
  background: #f4e5c4;
  box-shadow: 5px 6px 0 var(--ink);
}

.bag-postcard-detail-image {
  width: 100%;
  min-height: 320px;
  height: 100%;
  border: 3px solid var(--ink);
  object-fit: cover;
  image-rendering: pixelated;
}

.bag-postcard-detail-copy {
  min-width: 0;
}

.bag-postcard-detail-copy h3 {
  margin: 9px 0 6px;
  font-size: 26px;
}

.bag-postcard-detail-copy p,
.bag-postcard-detail-copy blockquote {
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.bag-postcard-detail-copy blockquote {
  margin: 12px 0;
  padding: 9px 0;
  border-block: 2px dashed #b39063;
  color: #76502f;
}

.bag-full-album-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 900;
}

.task-item {
  padding: 14px;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: var(--shadow-s);
}

.task-item > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-item h3,
.task-item p {
  margin: 0;
}

.task-item h3 {
  font-size: 17px;
}

.task-item header span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 2px solid var(--ink);
  background: var(--gold);
  font: 950 10px/1 "Courier New", monospace;
}

.task-item-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.task-item-media {
  width: 116px;
  height: 116px;
  border: 2px solid var(--ink);
  background: #fff;
  object-fit: contain;
  image-rendering: pixelated;
}

.task-item-copy {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.task-item p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.task-item-copy > strong {
  color: #08785f;
  font-size: 12px;
}

.task-action {
  min-height: 44px;
  padding: 11px 18px;
  border: 2px solid var(--ink);
  background: var(--cobalt);
  box-shadow: var(--shadow-s);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
}

.task-action:not(:disabled):hover,
.task-action:not(:disabled):focus-visible {
  outline: 4px solid var(--cobalt);
  outline-offset: 3px;
}

.task-action:not(:disabled):active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.task-action[aria-disabled="true"],
.task-action:disabled {
  background: #9aa5b7;
  box-shadow: none;
  color: #eef1f5;
  cursor: not-allowed;
  pointer-events: none;
}

.task-item[data-kind="completed"] header span {
  background: var(--mint);
}

.task-item[data-kind="unavailable"] {
  box-shadow: none;
  opacity: 0.78;
}

.task-item[data-kind="unavailable"] header span {
  background: #e3e7ee;
}

#feedbackFields label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
}

#feedbackFields textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  line-height: 1.5;
}

.primary-action {
  min-height: 48px;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--cobalt);
  box-shadow: var(--shadow-m);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

.form-message {
  min-height: 34px;
  padding: 8px 0 !important;
  color: var(--muted);
  font-size: 12px !important;
}

.form-message[data-status="error"] {
  color: #bd3427;
}

.form-message[data-status="success"] {
  color: #08785f;
}

/* Companion hall */

.hall-page {
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
}

.hall-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 10px;
  gap: 10px;
  background:
    linear-gradient(rgba(255, 247, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 247, 232, 0.035) 1px, transparent 1px),
    var(--ink);
  background-size: 12px 12px;
}

.hall-header {
  display: grid;
  grid-template-columns: 48px auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 9px 14px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 3px 0 #31415e;
}

.back-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  background: var(--cobalt);
  box-shadow: var(--shadow-s);
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  text-decoration: none;
}

.hall-header h1 {
  margin: 2px 0 0;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1;
}

.hall-header p {
  justify-self: end;
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.hall-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 10px;
}

.hall-stage {
  position: relative;
  min-width: 0;
  min-height: 500px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: #58c8ed;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.26);
}

.hall-world {
  --camera-x: 0px;
  --camera-y: 0px;
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 180%;
  height: 150%;
  background: #58c8ed url("./assets/hall-map-shenzhen-large.png") center / cover no-repeat;
  transform: translate3d(var(--camera-x), var(--camera-y), 0);
  transition: transform 150ms steps(4);
  will-change: transform;
}

.hall-stage-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 20, 46, 0.08), transparent 48%, rgba(7, 20, 46, 0.45));
  pointer-events: none;
}

.hall-zone {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border: 2px solid var(--ink);
  background: rgba(255, 247, 232, 0.94);
  box-shadow: var(--shadow-s);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.hall-zone::before {
  content: "";
}

.hall-zone.is-discovered {
  background: rgba(168, 230, 207, 0.96);
}

.hall-zone.is-discovered::before {
  content: "✓ ";
}

.hall-zone.is-nearby {
  border-color: var(--ink);
  background: rgba(255, 107, 87, 0.96);
  color: #fff;
  transform: translateY(-2px);
}

.zone-cafe { left: 13%; top: 23%; }
.zone-portal { left: 47%; top: 31%; }
.zone-garden { left: 18%; top: 68%; }
.zone-camp { left: 76%; top: 40%; }

.camp-label {
  position: absolute;
  z-index: 6;
  left: 12px;
  top: 12px;
  padding: 7px 9px;
  border: 2px solid var(--ink);
  background: var(--gold);
  box-shadow: var(--shadow-s);
  font: 950 10px/1 "Courier New", monospace;
}

.hall-world-return {
  color: var(--ink);
  text-decoration: none;
  transition: transform 140ms steps(3), filter 140ms ease, box-shadow 140ms ease;
}

.hall-world-return:hover,
.hall-world-return:focus-visible {
  transform: translateY(-4px);
  filter: brightness(1.08);
  box-shadow: inset 0 0 0 2px #fff3b7, 0 6px 0 var(--ink);
}

.hall-world-return:active {
  transform: translateY(2px);
  filter: brightness(0.98);
  box-shadow: 0 1px 0 var(--ink);
}

.local-player {
  position: absolute;
  z-index: 4;
  width: 82px;
  height: 104px;
  transform: translate(-50%, -70%);
  transition: left 140ms linear, top 140ms linear, transform 140ms ease;
  pointer-events: none;
}

.local-player .hall-avatar {
  width: 82px;
  height: 96px;
  filter: drop-shadow(3px 4px 0 rgba(7, 20, 46, 0.65));
}

.local-player b {
  position: absolute;
  left: 50%;
  bottom: -2px;
  padding: 3px 7px;
  transform: translateX(-50%);
  border: 2px solid var(--ink);
  background: var(--cobalt);
  color: #fff;
  font: 950 10px/1 "Courier New", monospace;
}

.local-player[data-action="wave"] {
  transform: translate(-50%, -70%) rotate(-5deg);
}

.local-player[data-action="cheer"] {
  transform: translate(-50%, -78%);
}

.local-player[data-action="rest"] {
  transform: translate(-50%, -62%) scaleY(0.88);
}

.explore-hud {
  position: absolute;
  z-index: 6;
  top: 14px;
  left: 50%;
  width: min(620px, calc(100% - 36px));
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 6px 12px;
  padding: 9px 12px 8px;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  background: rgba(255, 247, 232, 0.96);
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.78);
  pointer-events: none;
}

.explore-hud > strong {
  font-size: 15px;
  font-weight: 950;
}

.explore-progress,
.explore-help {
  padding: 4px 7px;
  border: 2px solid var(--ink);
  background: #edf1ff;
  font: 950 10px/1 "Courier New", monospace;
  white-space: nowrap;
}

.explore-progress.is-complete {
  background: var(--mint);
}

.explore-help {
  background: var(--paper-raised);
}

.explore-hud p {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #3f4d63;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explore-prompt {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 22px;
  min-width: 300px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 8px 8px 16px;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  background: rgba(255, 247, 232, 0.98);
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.8);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.explore-prompt[hidden] {
  display: none;
}

.explore-prompt kbd {
  min-width: 62px;
  padding: 10px 9px;
  border: 2px solid var(--ink);
  background: var(--cobalt);
  color: #fff;
  font: 950 11px/1 "Courier New", monospace;
}

.explore-prompt:hover,
.explore-prompt:focus-visible {
  background: #fff0bc;
  transform: translate(-50%, -2px);
}

.explore-prompt:active {
  transform: translate(-50%, 2px);
  box-shadow: 1px 2px 0 rgba(7, 20, 46, 0.8);
}

.traveler-marker {
  position: absolute;
  z-index: 3;
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(18, 59, 238, 0.1);
  box-shadow: 0 0 0 3px var(--cobalt), 3px 4px 0 var(--ink);
  cursor: pointer;
  overflow: visible;
}

.marker-character {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 72px;
  height: 86px;
  transform: translateX(-50%);
  filter: drop-shadow(2px 3px 0 rgba(7, 20, 46, 0.55));
  pointer-events: none;
}

.traveler-marker::after {
  content: "人物卡";
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  width: max-content;
  padding: 3px 5px;
  transform: translateX(-50%);
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 950 8px/1 "Courier New", monospace;
}

.marker-ajie { left: 25%; top: 31%; }
.marker-xiaochuan { left: 79%; top: 48%; }
.marker-xia { left: 29%; top: 73%; }
.marker-guide { left: 68%; top: 71%; }

.traveler-card {
  position: absolute;
  z-index: 7;
  left: 14px;
  top: 54px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  width: min(360px, calc(100% - 28px));
  min-height: 116px;
  padding: 13px;
  gap: 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-l);
}

.traveler-card[hidden] {
  display: none;
}

.traveler-card > button {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--coral);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  cursor: pointer;
}

.card-portrait {
  width: 72px;
  height: 82px;
  border: 2px solid var(--ink);
  background-color: #d9e1ff;
}

.traveler-card h2 {
  margin: 4px 38px 5px 0;
  font-size: 24px;
}

.traveler-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.hall-controls {
  position: absolute;
  z-index: 6;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: 136px auto 1fr;
  align-items: end;
  gap: 12px;
  pointer-events: none;
}

.move-pad,
.action-pad,
.hall-controls > p {
  pointer-events: auto;
}

.move-pad {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(2, 42px);
  gap: 4px;
  padding: 6px;
  border: 2px solid var(--ink);
  background: rgba(7, 20, 46, 0.84);
  box-shadow: var(--shadow-s);
}

.move-pad button,
.action-pad button {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 950;
  cursor: pointer;
}

.move-pad button[data-move="up"] { grid-column: 2; }
.move-pad button[data-move="left"] { grid-column: 1; grid-row: 2; }
.move-pad button[data-move="down"] { grid-column: 2; grid-row: 2; }
.move-pad button[data-move="right"] { grid-column: 3; grid-row: 2; }

.action-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
  gap: 6px;
  padding: 7px;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: var(--shadow-s);
}

.action-pad button:first-child { background: #d9e1ff; }
.action-pad button:nth-child(2) { background: var(--coral); color: #fff; }
.action-pad button:last-child { background: var(--mint); }

.hall-controls > p {
  justify-self: end;
  max-width: 330px;
  margin: 0;
  padding: 9px 11px;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 241, 0.93);
  box-shadow: var(--shadow-s);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.chat-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 3px solid var(--ink);
  background: var(--paper);
}

.chat-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 2px solid var(--ink);
}

.chat-panel h2 {
  margin: 3px 0 0;
  font-size: 23px;
}

.local-only {
  padding: 5px 7px;
  border: 2px solid var(--ink);
  background: var(--mint);
  font: 950 9px/1 "Courier New", monospace;
}

.chat-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 2px solid var(--ink);
}

.chat-tabs button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: var(--paper-raised);
  font-weight: 900;
  cursor: pointer;
}

.chat-tabs button:last-child {
  border-right: 0;
}

.chat-tabs button[aria-selected="true"] {
  background: var(--cobalt);
  color: #fff;
}

.chat-messages {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 14px;
  list-style: none;
}

.chat-messages li {
  align-self: flex-start;
  max-width: 88%;
  padding: 9px 10px;
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
}

.chat-messages li.is-mine {
  align-self: flex-end;
  background: #d9e1ff;
}

.chat-messages b {
  display: block;
  margin-bottom: 4px;
  color: var(--cobalt);
  font-size: 11px;
}

.chat-messages p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  gap: 7px;
  padding: 10px;
  border-top: 2px solid var(--ink);
}

.chat-compose input,
.chat-compose button {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 0;
}

.chat-compose input {
  min-width: 0;
  padding: 8px;
  background: #fff;
}

.chat-compose button {
  background: var(--cobalt);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

/* Game wrapper */

.play-page {
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  background: #050c1c;
}

.play-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 5px 10px;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}

.play-bar > a {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  background: var(--cobalt);
  box-shadow: 2px 2px 0 var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.play-bar p {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin: 0;
}

.play-bar p span {
  color: var(--cobalt);
  font: 950 10px/1 "Courier New", monospace;
}

.game-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #050c1c;
}

/* B-Lite city camera: country map -> illustrated five-stage route board -> battle. */
.city-route-board[hidden] {
  display: none;
}

.game-page.route-board-open .game-world-return {
  display: none;
}

.city-route-board {
  width: 100vw;
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px 20px 20px;
  background:
    radial-gradient(circle at 34% 22%, rgba(29, 105, 178, 0.34), transparent 34%),
    linear-gradient(rgba(255, 247, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 247, 232, 0.035) 1px, transparent 1px),
    #07142e;
  background-size: auto, 16px 16px, 16px 16px, auto;
  color: var(--paper);
  animation: city-route-camera-in 720ms steps(8, end) both;
}

@keyframes city-route-camera-in {
  0% { opacity: 0; transform: scale(0.9); filter: brightness(1.35); }
  62% { opacity: 1; transform: scale(1.012); filter: brightness(1.08); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

.city-route-board-header {
  min-height: 62px;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 8px 14px;
  border: 3px solid #020b19;
  background: var(--paper-raised);
  box-shadow: 6px 7px 0 #020b19;
  color: var(--ink);
}

.city-route-back {
  min-height: 44px;
  padding: 0 14px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-weight: 950;
  cursor: pointer;
}

.city-route-back span {
  margin-right: 7px;
  color: var(--cobalt);
  font-size: 20px;
}

.city-route-board-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.city-route-board-header h1 {
  flex: 0 0 auto;
  margin: 0;
  font-size: clamp(28px, 2.5vw, 40px);
  line-height: 1;
}

#routeBoardThesis {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #536177;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-route-board-progress {
  min-width: 154px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  background: var(--mint);
  text-align: center;
  font: 950 11px/1.25 "Courier New", monospace;
}

.city-route-board-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.city-route-collection-open {
  min-height: 44px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.city-route-collection-open:hover,
.city-route-collection-open:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.city-route-board-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 2.45fr) minmax(430px, 0.95fr);
  gap: 16px;
}

.city-route-stage-map,
.city-route-dossier {
  min-width: 0;
  min-height: 0;
  border: 3px solid #020b19;
  box-shadow: 6px 7px 0 #020b19;
}

.city-route-stage-map {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 18px;
  background:
    linear-gradient(rgba(9, 36, 74, 0.22), rgba(5, 20, 47, 0.78)),
    url("./assets/world-map-ocean-gutter.png") center / cover,
    #0b4f88;
}

.city-route-stage-map::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 57%;
  height: 8px;
  border: 2px solid var(--ink);
  background: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(255, 247, 232, 0.86);
  transform: rotate(-2deg);
}

.city-route-stage-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  color: var(--paper);
  text-shadow: 2px 2px 0 var(--ink);
}

.city-route-stage-heading span {
  color: var(--mint);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.city-route-stage-heading strong {
  font-size: 14px;
}

.city-route-stages {
  position: relative;
  z-index: 2;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 46px 0 24px;
  list-style: none;
}

.city-route-stages > li:nth-child(2),
.city-route-stages > li:nth-child(4) {
  transform: translateY(38px);
}

.city-route-stage-card {
  width: 100%;
  min-height: 238px;
  display: grid;
  grid-template-rows: 126px minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper-raised);
  box-shadow: 5px 6px 0 rgba(2, 11, 25, 0.9);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.city-route-stage-card:hover,
.city-route-stage-card:focus-visible,
.city-route-stage-card.is-selected {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
  transform: translateY(-5px);
}

.city-route-stage-card[data-state="locked"] {
  filter: saturate(0.45) brightness(0.8);
}

.city-route-stage-card[data-state="preview"] {
  filter: saturate(0.62);
}

.city-route-stage-art {
  position: relative;
  min-height: 0;
  background: linear-gradient(145deg, #82b8e8, #e8c58d);
  border-bottom: 3px solid var(--ink);
}

.city-route-stage-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.city-route-stage-number,
.city-route-stage-state {
  position: absolute;
  top: 8px;
  padding: 5px 7px;
  border: 2px solid var(--ink);
  font: 950 9px/1 "Courier New", monospace;
}

.city-route-stage-number {
  left: 8px;
  background: var(--coral);
}

.city-route-stage-state {
  right: 8px;
  background: #d8e0eb;
}

.city-route-stage-card[data-state="current"] .city-route-stage-state {
  background: var(--gold);
}

.city-route-stage-card[data-state="completed"] .city-route-stage-state {
  background: var(--mint);
}

.city-route-stage-card[data-state="replay"] .city-route-stage-state {
  background: var(--cobalt);
  color: #fff;
}

.city-route-stage-copy {
  padding: 10px;
}

.city-route-stage-copy strong,
.city-route-stage-copy small,
.city-route-stage-copy span {
  display: block;
}

.city-route-stage-copy strong {
  font-size: 12px;
  line-height: 1.2;
}

.city-route-stage-copy small {
  margin-top: 5px;
  color: #55637a;
  font-size: 10px;
  font-weight: 800;
}

.city-route-stage-copy span {
  margin-top: 8px;
  color: var(--cobalt);
  font: 950 9px/1.25 "Courier New", monospace;
}

.city-route-dossier {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  overflow: hidden;
  padding: 14px;
  background: var(--paper-raised);
  color: var(--ink);
}

.city-route-dossier-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: var(--ink) var(--paper);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.city-route-dossier-scroll:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: -3px;
}

.city-route-summary {
  margin: 14px 0 0;
  color: #425169;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.58;
}

.city-route-stage-hero {
  position: relative;
  flex: 0 0 auto;
  height: clamp(166px, 22vh, 210px);
  overflow: hidden;
  margin: 0;
  border: 3px solid var(--ink);
  background: #a8cae9;
  box-shadow: 4px 4px 0 var(--ink);
}

.city-route-stage-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.city-route-stage-hero figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 9px;
  font-weight: 950;
}

.city-route-stage-detail {
  min-height: 0;
  display: block;
  overflow: visible;
  margin-top: 18px;
}

.city-route-stage-detail h2 {
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(7, 20, 46, 0.24);
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.05;
}

.city-route-guide-block {
  min-width: 0;
  margin: 0;
  padding: 18px 0 20px;
  border-bottom: 1px dashed rgba(7, 20, 46, 0.22);
  background: transparent;
}

.city-route-guide-block:last-child {
  border-bottom: 0;
}

.city-route-guide-block:nth-of-type(1) span {
  color: var(--coral);
}

.city-route-guide-block:nth-of-type(2) span {
  color: #21856f;
}

.city-route-guide-block:nth-of-type(3) span {
  color: var(--cobalt);
}

.city-route-guide-block span {
  font-size: 15px;
  font-weight: 950;
  line-height: 1.3;
}

.city-route-guide-block p {
  margin: 8px 0 0;
  color: #36445c;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.65;
}

.city-route-enter {
  min-height: 52px;
  margin-top: 10px;
  padding: 0 14px;
  border: 3px solid var(--ink);
  background: var(--cobalt);
  box-shadow: 5px 6px 0 var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.city-route-enter:disabled {
  background: #8b96a8;
  color: #e4e8ee;
  cursor: not-allowed;
}

.city-route-notice {
  margin: 8px 0 0;
  color: #a5382d;
  font-size: 10px;
  font-weight: 900;
}

.city-route-notice:empty {
  display: none;
}

.postcard-collection[hidden] {
  display: none;
}

.postcard-collection {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(2, 11, 25, 0.86);
}

.postcard-collection-panel {
  width: min(1180px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  border: 4px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 10px 12px 0 #020b19;
  color: var(--ink);
}

.postcard-collection-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--ink);
}

.postcard-collection-panel h2 {
  margin: 6px 0 3px;
  font-size: clamp(26px, 3vw, 42px);
}

.postcard-collection-panel header p {
  margin: 0;
  color: #536177;
  font-size: 12px;
  font-weight: 850;
}

#closePostcardCollection {
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 28px;
  font-weight: 950;
  cursor: pointer;
}

.postcard-collection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
}

#postcardCollectionCards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.postcard-collection-card {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 0 0 10px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 5px 0 var(--ink);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.postcard-collection-card.is-selected {
  outline: 4px solid var(--coral);
  outline-offset: 2px;
}

.postcard-collection-card:disabled {
  cursor: not-allowed;
}

.postcard-collection-card-visual {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 3px solid var(--ink);
  background:
    repeating-linear-gradient(135deg, #d5d8de 0 8px, #c6cad2 8px 16px);
}

.postcard-collection-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.postcard-collection-card-visual > span {
  position: absolute;
  left: 7px;
  top: 7px;
  padding: 5px 6px;
  border: 2px solid var(--ink);
  background: var(--coral);
  font: 950 9px/1 "Courier New", monospace;
}

.postcard-collection-card[data-state="locked"] .postcard-collection-card-visual::after {
  content: "未解锁";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #657288;
  font: 950 12px/1 "Courier New", monospace;
}

.postcard-collection-card strong {
  padding: 0 10px;
  font-size: 12px;
}

.postcard-collection-detail {
  min-height: 245px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px 18px;
  padding: 16px;
  border: 3px solid var(--ink);
  background: #f4e5c4;
  box-shadow: 5px 6px 0 var(--ink);
}

#postcardCollectionState {
  grid-column: 1 / -1;
  color: var(--cobalt);
  font: 950 10px/1 "Courier New", monospace;
}

#postcardCollectionImage {
  width: 100%;
  height: 220px;
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
  border: 3px solid var(--ink);
  object-fit: cover;
  image-rendering: pixelated;
}

.postcard-collection-detail > div {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
}

.postcard-collection-detail.is-locked {
  display: block;
  min-height: 180px;
}

.postcard-collection-detail h3 {
  margin: 16px 0 7px;
  font-size: 24px;
}

.postcard-collection-detail p,
.postcard-collection-detail blockquote {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
}

.postcard-collection-detail blockquote {
  margin: 12px 0;
  padding: 10px 0;
  border-block: 2px dashed #b39063;
  color: #76502f;
}

.postcard-composer {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed #b39063;
}

.postcard-composer[hidden] {
  display: none;
}

.postcard-composer-title {
  font-size: 14px;
  font-weight: 950;
}

.postcard-composer label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.postcard-composer label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.postcard-composer label > span small {
  color: var(--muted);
  font: 850 9px/1 "Courier New", monospace;
}

.postcard-composer input,
.postcard-composer textarea {
  width: 100%;
  padding: 9px 10px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 750 12px/1.45 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.postcard-composer input {
  min-height: 44px;
}

.postcard-composer textarea {
  min-height: 72px;
  resize: vertical;
}

.postcard-composer input:focus,
.postcard-composer textarea:focus {
  outline: 4px solid var(--cobalt);
  outline-offset: 2px;
}

.postcard-composer input[aria-invalid="true"],
.postcard-composer textarea[aria-invalid="true"] {
  border-color: #bd3427;
}

.postcard-field-error {
  min-height: 14px;
  color: #bd3427;
  font-size: 9px;
  font-weight: 850;
}

.postcard-share-status {
  min-height: 18px;
  margin: 0 !important;
  color: var(--muted);
  font-size: 10px !important;
  font-weight: 850 !important;
}

.postcard-share-status[data-status="shared"],
.postcard-share-status[data-status="copied"] {
  color: #08785f;
}

.postcard-manual-copy[hidden] {
  display: none;
}

.postcard-manual-copy {
  min-height: 92px !important;
  background: #edf1ff !important;
  font-size: 10px !important;
}

.postcard-composer-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.postcard-save-action,
.postcard-share-submit {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 9px 12px;
  border: 3px solid var(--ink);
  box-shadow: 3px 4px 0 var(--ink);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.postcard-save-action {
  background: var(--paper-raised);
  color: var(--ink);
}

.postcard-share-submit {
  background: var(--cobalt);
  color: #fff;
}

.postcard-share-submit:hover,
.postcard-share-submit:focus-visible,
.postcard-save-action:hover,
.postcard-save-action:focus-visible {
  outline: 4px solid var(--cobalt);
  outline-offset: 2px;
}

.postcard-share-submit:active,
.postcard-save-action:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 2px 0 var(--ink);
}

.postcard-share-submit:disabled {
  background: #8793a8;
  cursor: wait;
}

#postcardCollectionSave[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .city-route-board {
    animation: none;
  }

  .city-route-stage-card {
    transition: none;
  }
}

@media (max-width: 900px) {
  .world-map {
    min-height: 100svh;
  }

  .world-map-art {
    object-position: 51% center;
  }

  .world-brand {
    left: 50%;
    top: 12px;
    width: min(66vw, 420px);
  }

  .world-hud {
    top: 118px;
    right: 12px;
    grid-template-columns: repeat(2, auto);
  }

  .world-hud button {
    min-width: 116px;
  }

  .island-entry {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .island-entry strong,
  .island-entry-kicker {
    display: none;
  }

  .island-entry small {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-width: 3px;
    box-shadow: var(--shadow-s);
    font-size: 13px;
  }

  .island-game {
    left: 48%;
    top: 61%;
  }

  .island-hall {
    right: 4%;
    top: 31%;
  }

  .island-personality {
    left: 4%;
    top: 39%;
  }

  .island-workbench {
    right: 5%;
    bottom: 7%;
  }

  .hall-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .hall-controls {
    grid-template-columns: 136px auto;
  }

  .hall-controls > p {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .world-page {
    overflow: auto;
  }

  .world-map {
    min-height: 844px;
  }

  .world-map-art {
    object-position: 52% center;
  }

  .world-brand {
    top: 10px;
    width: calc(100vw - 82px);
    padding-inline: 12px;
  }

  .world-brand::before,
  .world-brand::after {
    width: 32px;
  }

  .world-brand h1 {
    font-size: 38px;
  }

  .world-brand p {
    margin-inline: -12px;
  }

  .world-hud {
    left: 12px;
    right: 12px;
    top: 112px;
    grid-template-columns: repeat(2, 1fr);
  }

  .world-hud button {
    min-width: 0;
    padding-inline: 6px;
  }

  .island-entry {
    min-height: 62px;
    padding: 7px 10px;
  }

  .island-entry strong {
    font-size: 18px;
  }

  .island-game {
    left: 50%;
    top: 53%;
    width: min(82vw, 330px);
  }

  .island-game strong {
    font-size: 30px;
  }

  .island-hall {
    left: 50%;
    right: auto;
    top: 68%;
    width: min(72vw, 280px);
    transform: translateX(-50%);
  }

  .island-hall:hover {
    transform: translate(-50%, -3px) !important;
  }

  .island-personality {
    left: 14px;
    top: auto;
    bottom: 92px;
    width: calc(50% - 21px);
  }

  .island-workbench {
    right: 14px;
    bottom: 92px;
    width: calc(50% - 21px);
  }

  .world-status {
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .hall-page {
    overflow: auto;
  }

  .hall-shell {
    display: block;
    padding: 7px;
  }

  .hall-header {
    grid-template-columns: 46px 1fr;
    margin-bottom: 7px;
  }

  .hall-header p {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }

  .hall-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hall-stage {
    min-height: 520px;
    background-position: 73% 34%;
  }

  .marker-ajie { left: 60%; top: 44%; }
  .marker-xiaochuan { left: 76%; top: 40%; }
  .marker-xia { left: 88%; top: 52%; }
  .marker-guide { left: 67%; top: 57%; }

  .hall-controls {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: 118px 1fr;
    gap: 7px;
  }

  .move-pad {
    grid-template-columns: repeat(3, 34px);
    grid-template-rows: repeat(2, 34px);
    gap: 3px;
  }

  .move-pad button {
    min-width: 34px;
    min-height: 34px;
  }

  .action-pad {
    grid-template-columns: repeat(3, 1fr);
  }

  .action-pad button {
    min-width: 0;
    min-height: 38px;
    font-size: 12px;
  }

  .hall-controls > p {
    width: 100%;
    max-width: none;
  }

  .chat-panel {
    min-height: 410px;
  }

  .play-page {
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .play-bar {
    grid-template-columns: auto 1fr;
  }

  .play-bar > .mono-label {
    display: none;
  }

  .play-bar p {
    display: grid;
    gap: 1px;
    justify-content: end;
    text-align: right;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .world-brand {
    top: 9px;
    transform: translateX(-50%) scale(0.82);
    transform-origin: top center;
  }

  .world-hud {
    top: 10px;
  }

  .island-game {
    top: 68%;
    transform: translate(-50%, -50%) scale(0.84);
  }

  .island-hall,
  .island-personality,
  .island-workbench {
    transform: scale(0.82);
  }

  .hall-header {
    min-height: 58px;
  }

  .hall-stage {
    min-height: 390px;
  }
}

:where(
  .world-hud button,
  .back-link,
  .move-pad button,
  .action-pad button,
  .chat-tabs button,
  .chat-compose button,
  .primary-action,
  .dialog-close,
  .traveler-card > button
):not(:disabled) {
  transition: transform 140ms steps(3), filter 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

:where(
  .world-hud button,
  .back-link,
  .move-pad button,
  .action-pad button,
  .chat-tabs button,
  .chat-compose button,
  .primary-action,
  .dialog-close,
  .traveler-card > button
):not(:disabled):hover,
:where(
  .world-hud button,
  .back-link,
  .move-pad button,
  .action-pad button,
  .chat-tabs button,
  .chat-compose button,
  .primary-action,
  .dialog-close,
  .traveler-card > button
):not(:disabled):focus-visible {
  z-index: 2;
  transform: translateY(-4px);
  filter: brightness(1.08);
  box-shadow: inset 0 0 0 3px var(--gold), 0 6px 0 var(--ink);
}

:where(
  .world-hud button,
  .back-link,
  .move-pad button,
  .action-pad button,
  .chat-tabs button,
  .chat-compose button,
  .primary-action,
  .dialog-close,
  .traveler-card > button
):not(:disabled):active {
  transform: translateY(2px);
  filter: brightness(0.98);
  box-shadow: inset 0 0 0 2px var(--gold), 0 1px 0 var(--ink);
}

.traveler-marker {
  transition: transform 140ms steps(3), filter 140ms ease, box-shadow 140ms ease;
}

.traveler-marker:hover,
.traveler-marker:focus-visible {
  z-index: 6;
  transform: translateY(-5px);
  filter: brightness(1.1);
  box-shadow: 0 0 0 4px var(--gold), 4px 8px 0 rgba(7, 20, 46, 0.78);
}

.traveler-marker.is-nearby::after {
  content: "Enter · 人物卡";
  opacity: 1;
  transform: translate(-50%, 2px);
}

.traveler-marker.is-nearby {
  filter: brightness(1.08) drop-shadow(0 0 5px rgba(255, 214, 91, 0.9));
}

/* Immersive companion hall */

.hall-shell-immersive {
  display: block;
  min-height: 100svh;
  padding: 0;
  background: var(--ink);
}

.hall-stage-immersive {
  width: 100%;
  min-height: 100svh;
  border: 0;
  box-shadow: none;
}

.hall-map-back {
  position: absolute;
  z-index: 12;
  left: 18px;
  top: 18px;
}

.hall-stage-immersive .camp-label {
  left: 78px;
  top: 22px;
}

.hall-actions {
  left: auto;
  right: 18px;
  bottom: 18px;
  width: auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.hall-actions .action-pad {
  grid-template-columns: repeat(3, minmax(66px, 1fr));
}

.chat-ticker {
  position: absolute;
  z-index: 9;
  left: 18px;
  bottom: 18px;
  width: min(440px, calc(100% - 36px));
  overflow: hidden;
  border: 3px solid var(--ink);
  background: rgba(255, 250, 241, 0.96);
  box-shadow: 5px 6px 0 rgba(7, 20, 46, 0.78);
}

.chat-ticker > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding-left: 11px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  font: 900 11px/1 "Courier New", monospace;
}

.chat-ticker > header button {
  align-self: stretch;
  min-width: 64px;
  border: 0;
  border-left: 2px solid var(--ink);
  background: var(--mint);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.ticker-message {
  min-height: 78px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
}

.ticker-message > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
}

.ticker-message b {
  color: var(--cobalt);
  font-size: 12px;
}

.ticker-message p {
  grid-column: 2;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-message img {
  grid-row: 1 / span 2;
  width: 64px;
  height: 50px;
  border: 2px solid var(--ink);
  object-fit: cover;
  image-rendering: auto;
}

.open-chat {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 2px solid var(--ink);
  background: var(--cobalt);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

.chat-dialog {
  width: min(560px, calc(100vw - 36px));
  max-height: calc(100svh - 36px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.chat-dialog::backdrop {
  background: rgba(7, 20, 46, 0.62);
}

.chat-dialog-shell {
  height: min(720px, calc(100svh - 36px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 7px 0 rgba(7, 20, 46, 0.75);
}

.chat-dialog-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 2px solid var(--ink);
}

.chat-dialog-shell h2 {
  margin: 3px 0 0;
  font-size: 26px;
}

.chat-dialog .chat-messages img {
  display: block;
  width: min(280px, 100%);
  max-height: 210px;
  margin: 6px 0;
  border: 2px solid var(--ink);
  object-fit: cover;
  image-rendering: auto;
}

.chat-dialog .chat-compose {
  grid-template-columns: minmax(0, 1fr) 70px 70px;
}

.image-picker {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 2px solid var(--ink);
  background: var(--mint);
  font-weight: 950;
  cursor: pointer;
}

.chat-hint {
  margin: 0;
  padding: 0 10px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

:where(.chat-ticker button, .image-picker):hover,
:where(.chat-ticker button, .image-picker):focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: inset 0 0 0 3px var(--gold), 0 4px 0 var(--ink);
}

@media (max-width: 900px) {
  .chat-ticker {
    width: min(380px, calc(100% - 36px));
  }
}

@media (min-width: 901px) {
  .world-map {
    background: #57c5ed;
  }

  .world-scene {
    aspect-ratio: auto;
    width: 100vw;
    min-width: 0;
    height: 100svh;
    flex: none;
  }

  .world-map-art img {
    object-fit: fill;
  }

  .island-layer > .island-base {
    height: 100%;
    object-fit: fill;
  }

  .island-layer-personality {
    height: 30%;
  }

  .island-layer-game {
    height: 70%;
  }

  .island-layer-hall {
    height: 35.5%;
  }

  .island-layer-workbench {
    height: 32%;
  }

  .world-hud {
    top: 5.8%;
    left: 71.6%;
    width: 26.95%;
    height: 4.6%;
    gap: 0.84%;
  }

  .island-entry {
    overflow: visible;
  }

  .island-entry > .island-module-copy {
    position: absolute;
    z-index: 8;
    display: grid;
    width: 62%;
    aspect-ratio: 1600 / 643;
    grid-template-rows: 61% 39%;
    align-items: center;
    padding: 4.5% 7% 4%;
    justify-items: center;
    opacity: 1;
    background-image: url("./assets/island-module-sign-v2.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: var(--ink);
    pointer-events: none;
    transition: filter 170ms ease, transform 170ms ease;
  }

  .island-module-copy strong {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 0 6%;
    place-items: center;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    font-size: clamp(16px, 1.55vw, 26px);
    font-weight: 950;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
  }

  .island-module-copy small {
    display: grid;
    width: 82%;
    height: 100%;
    margin: 0;
    padding: 0 5% 1%;
    place-items: center;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: clamp(12px, 1vw, 17px);
    font-weight: 950;
    letter-spacing: 0.015em;
    line-height: 1;
    text-shadow: 0 1px 0 #155335;
    white-space: nowrap;
  }

  .island-game .island-module-copy {
    left: 50%;
    top: 63%;
    width: 42%;
    transform: translateX(-50%);
  }

  .island-game .island-module-copy small {
    color: #fff;
  }

  .island-personality .island-module-copy {
    left: 50%;
    top: 56%;
    width: 72%;
    transform: translateX(-50%);
  }

  .island-hall .island-module-copy {
    left: 50%;
    top: -4%;
    width: 66%;
    transform: translateX(-50%);
  }

  .island-workbench .island-module-copy {
    left: 50%;
    top: 56%;
    width: 66%;
    transform: translateX(-50%);
  }

  .world-map:has(.island-personality:hover) .island-personality .island-module-copy,
  .world-map:has(.island-game:hover) .island-game .island-module-copy,
  .world-map:has(.island-hall:hover) .island-hall .island-module-copy,
  .world-map:has(.island-workbench:hover) .island-workbench .island-module-copy,
  .world-map:has(.island-personality:focus-visible) .island-personality .island-module-copy,
  .world-map:has(.island-game:focus-visible) .island-game .island-module-copy,
  .world-map:has(.island-hall:focus-visible) .island-hall .island-module-copy,
  .world-map:has(.island-workbench:focus-visible) .island-workbench .island-module-copy {
    filter: brightness(1.1) saturate(1.04) drop-shadow(0 0 8px rgba(255, 226, 128, 0.8));
  }

  .world-hud button {
    position: relative;
    overflow: visible;
    border-radius: 3px;
    font-size: clamp(10px, 0.72vw, 13px);
    font-weight: 950;
    line-height: 1;
    transition: background-color 150ms ease, box-shadow 150ms ease, color 120ms ease;
  }

  .world-hud button:hover,
  .world-hud button:focus-visible {
    outline: 0;
    background: rgba(255, 247, 205, 0.96);
    box-shadow:
      inset 0 0 0 2px #6a4a22,
      0 4px 0 rgba(7, 20, 46, 0.58);
    color: #07142e;
    filter: none;
    transform: none;
  }

  .world-hud button:active {
    background: rgba(255, 239, 169, 0.98);
    box-shadow:
      inset 0 0 0 2px rgba(255, 214, 91, 0.98),
      0 2px 0 rgba(7, 20, 46, 0.58);
    color: #07142e;
    filter: none;
    transform: translateY(2px);
  }
}

/* Refined Shenzhen companion hall */

.hall-stage-immersive {
  background: #58c8ed;
}

.hall-stage-immersive .hall-world {
  width: 150%;
  height: 150%;
  background-position: center;
  background-size: cover;
  transition: transform 180ms cubic-bezier(0.22, 0.7, 0.28, 1);
}

.hall-stage-immersive .hall-stage-shade {
  background: linear-gradient(180deg, rgba(7, 20, 46, 0.03), transparent 56%, rgba(7, 20, 46, 0.2));
}

.hall-map-back {
  top: 18px;
  left: 18px;
  display: flex;
  width: auto;
  height: 58px;
  min-width: 260px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.8), inset 0 0 0 2px rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.hall-back-arrow {
  display: grid;
  width: 56px;
  height: 100%;
  place-items: center;
  border-right: 3px solid var(--ink);
  background: var(--cobalt);
  color: #fff;
  font-size: 27px;
  line-height: 1;
}

.hall-location-title {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  white-space: nowrap;
}

.hall-location-title strong {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.hall-location-title small {
  color: #1f774b;
  font: 950 12px/1 "Courier New", monospace;
}

.hall-zone {
  padding: 5px 8px;
  border-color: rgba(7, 20, 46, 0.82);
  background: rgba(255, 247, 232, 0.9);
  box-shadow: 2px 3px 0 rgba(7, 20, 46, 0.72);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.traveler-marker {
  width: 80px;
  height: 104px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -70%);
  transition: filter 140ms ease;
  will-change: left, top;
}

.traveler-marker .marker-character {
  bottom: 8px;
  width: 80px;
  height: 96px;
  border-radius: 0;
  background-color: transparent;
  mix-blend-mode: normal;
}

.local-player {
  width: 80px;
  height: 104px;
}

.local-player .hall-avatar {
  width: 80px;
  height: 96px;
}

.hall-avatar {
  display: block;
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 600% 100%;
  image-rendering: pixelated;
}

.avatar-player {
  background-image: url("./assets/traveler-walk-player-directional.png");
  background-size: 600% 400%;
  animation: none;
}

.local-player[data-direction="down"] .avatar-player {
  background-position-y: 0%;
}

.local-player[data-direction="left"] .avatar-player {
  background-position-y: 33.333%;
}

.local-player[data-direction="right"] .avatar-player {
  background-position-y: 66.667%;
}

.local-player[data-direction="up"] .avatar-player {
  background-position-y: 100%;
}

.local-player[data-action="walk"] .avatar-player {
  animation: hall-player-walk 660ms steps(6) infinite;
}

@keyframes hall-player-walk {
  from { background-position-x: 0%; }
  to { background-position-x: 120%; }
}

@media (prefers-reduced-motion: reduce) {
  .local-player[data-action="walk"] .avatar-player {
    animation: none;
  }
}

.avatar-blue {
  background-image: url("./assets/traveler-walk-blue.png");
  animation: none;
}

.avatar-coral {
  background-image: url("./assets/traveler-walk-coral.png");
  animation: none;
}

.avatar-mint {
  background-image: url("./assets/traveler-walk-mint.png");
  animation: none;
}

.avatar-guide {
  background-image: url("./assets/old-town-guide.png");
  background-position: center bottom;
  background-size: contain;
  filter: drop-shadow(2px 3px 0 rgba(7, 20, 46, 0.55));
}

.traveler-marker .avatar-guide {
  background-position: center bottom 8px;
  background-size: auto 80px;
}

.traveler-marker[data-direction="left"] .marker-character {
  transform: translateX(-50%) scaleX(-1);
}

.traveler-marker[data-direction="right"] .marker-character {
  transform: translateX(-50%) scaleX(1);
}

.traveler-marker[data-motion="walk"] :is(.avatar-blue, .avatar-coral, .avatar-mint) {
  animation: hall-companion-walk 650ms steps(6) infinite;
}

.traveler-marker[data-motion="walk"] .avatar-guide {
  animation: hall-guide-step 650ms steps(2, end) infinite;
}

@keyframes hall-companion-walk {
  from { background-position-x: 0%; }
  to { background-position-x: 120%; }
}

@keyframes hall-guide-step {
  0%, 100% { background-position-y: calc(100% - 8px); }
  50% { background-position-y: calc(100% - 10px); }
}

.traveler-marker::after {
  top: calc(100% + 2px);
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}

.traveler-marker:hover::after,
.traveler-marker:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 2px);
}

.traveler-marker:hover,
.traveler-marker:focus-visible {
  box-shadow: none;
  filter: brightness(1.08) drop-shadow(0 0 5px rgba(255, 214, 91, 0.9));
  transform: translate(-50%, calc(-70% - 4px));
}

.marker-ajie { left: 25%; top: 31%; }
.marker-xiaochuan { left: 79%; top: 48%; }
.marker-xia {
  left: 33%;
  top: 60%;
}

.marker-guide {
  left: 68%;
  top: 59%;
}

.hall-social-moment {
  position: absolute;
  z-index: 9;
  display: flex;
  min-width: 76px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  transform: translate(-50%, -390%);
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.72), inset 0 0 0 2px rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 18px;
  pointer-events: none;
}

.hall-social-moment::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}

.hall-social-moment strong {
  color: var(--cobalt);
  font: 950 15px/1 "Courier New", monospace;
  letter-spacing: 0.04em;
}

.hall-social-moment[hidden] {
  display: none;
}

.hall-social-moment.is-visible {
  animation: hall-social-pop 1.8s steps(4, end) both;
}

@keyframes hall-social-pop {
  0% { opacity: 0; transform: translate(-50%, -340%) scale(0.82); }
  14%, 76% { opacity: 1; transform: translate(-50%, -390%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -415%) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .traveler-marker[data-motion="walk"] .marker-character,
  .hall-social-moment.is-visible {
    animation: none;
  }
}

.traveler-card {
  top: 96px;
  right: 18px;
  left: auto;
  grid-template-columns: 66px minmax(0, 1fr);
  width: min(330px, calc(100% - 36px));
  min-height: 360px;
  padding: 16px;
  gap: 12px;
  border: 3px solid var(--ink);
  background: rgba(255, 247, 232, 0.97);
  box-shadow: 5px 6px 0 rgba(7, 20, 46, 0.78), inset 0 0 0 2px rgba(255, 255, 255, 0.54);
}

.traveler-card-content {
  min-width: 0;
}

.card-portrait {
  width: 64px;
  height: 72px;
  border: 2px solid var(--ink);
  background-color: #edf1ff;
}

.traveler-card h2 {
  margin: 4px 34px 4px 0;
  font-size: 23px;
}

.traveler-card #cardTrait {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(7, 20, 46, 0.26);
  color: #3f4d63;
}

.traveler-stats {
  grid-column: 1 / -1;
  margin: 14px -78px 0;
  padding-top: 2px;
}

.traveler-stats > div {
  padding: 9px 0;
  border-top: 1px solid rgba(7, 20, 46, 0.22);
}

.traveler-stats dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.traveler-stats dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.traveler-match {
  margin: 10px -78px 0 !important;
  color: #1f774b !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  text-align: center;
}

.invite-traveler {
  width: calc(100% + 78px);
  min-height: 46px;
  margin: 10px 0 0 -78px;
  border: 3px solid var(--ink);
  background: var(--cobalt);
  box-shadow: 3px 4px 0 var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}

.invite-traveler:disabled {
  background: var(--mint);
  color: var(--ink);
  cursor: default;
}

.hall-actions {
  right: 18px;
  bottom: 18px;
}

.hall-actions .action-pad {
  gap: 8px;
  padding: 8px;
  border: 3px solid var(--ink);
  background: rgba(255, 247, 232, 0.96);
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.78);
}

.hall-actions .action-pad button {
  min-width: 72px;
  min-height: 54px;
  font-size: 14px;
}

.chat-ticker {
  width: min(430px, calc(100% - 36px));
  background: rgba(255, 247, 232, 0.97);
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.78);
}

.ticker-message {
  min-height: 72px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .island-layer {
    animation: none !important;
    transform: none;
  }

  .island-motion,
  .island-motion::before,
  .island-motion::after {
    animation: none !important;
  }

  .motion-train {
    opacity: 1;
    transform: translate3d(-17%, 8%, 0) rotate(-2deg) scale(0.98);
  }

  .motion-bus {
    opacity: 1;
    transform: translate3d(20%, 5%, 0) rotate(0.3deg) scale(0.99);
  }

  .motion-fountain,
  .motion-portal {
    opacity: 0.58;
  }
}

/* Companion hall 1.0 social MVP */

.hall-social-page {
  min-width: 1024px;
  overflow: hidden;
  background: var(--ink);
}

.hall-social-page button,
.hall-social-page input,
.hall-social-page textarea {
  font: inherit;
}

.hall-social-page button {
  cursor: pointer;
}

.hall-social-shell {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 78px minmax(0, 1fr);
  background: #69cdee;
}

.hall-social-header {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 190px 155px minmax(390px, 1fr) 150px;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  border-bottom: 3px solid var(--ink);
  background: rgba(255, 247, 232, 0.98);
  box-shadow: 0 4px 0 rgba(7, 20, 46, 0.32);
}

.hall-social-header .hall-map-back {
  position: static;
  width: 190px;
  min-width: 0;
  height: 52px;
  border-width: 2px;
  box-shadow: 3px 4px 0 var(--ink);
}

.hall-social-header .hall-back-arrow {
  width: 50px;
  border-right-width: 2px;
}

.hall-return-copy {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 950;
}

.hall-social-header .hall-location-title {
  min-width: 0;
  justify-content: flex-start;
  padding: 0;
}

.hall-social-header .hall-location-title strong {
  font-size: 24px;
}

.hall-social-tabs {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(126px, 158px));
  gap: 7px;
  padding: 5px;
  border: 2px solid var(--ink);
  background: #dbeaf1;
  box-shadow: 3px 4px 0 var(--ink);
}

.hall-social-tabs button {
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.hall-social-tabs button:hover,
.hall-social-tabs button:focus-visible {
  border-color: var(--ink);
  background: #fff4c4;
  box-shadow: 2px 3px 0 var(--ink);
  outline: 0;
}

.hall-social-tabs button[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--cobalt);
  box-shadow: 2px 3px 0 var(--ink);
  color: #fff;
}

.hall-local-status {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.hall-local-status span {
  padding: 4px 7px;
  border: 2px solid var(--ink);
  background: var(--mint);
  font: 950 9px/1 "Courier New", monospace;
}

.hall-local-status b {
  max-width: 150px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-feedback {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 88px;
  max-width: 560px;
  margin: 0;
  padding: 11px 16px;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  background: var(--mint);
  box-shadow: 4px 5px 0 rgba(7, 20, 46, 0.78);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.hall-feedback:empty,
.hall-feedback[hidden] {
  display: none;
}

.hall-feedback[data-kind="error"] {
  background: #ffd3cb;
}

.hall-social-panel {
  min-height: 0;
  overflow: auto;
}

.hall-social-panel[hidden] {
  display: none;
}

.hall-square-panel {
  position: relative;
  padding: 34px 32px 60px;
  background:
    linear-gradient(180deg, rgba(71, 190, 233, 0.1), rgba(7, 20, 46, 0.2)),
    url("./assets/hall-map-shenzhen-large.png") center 36% / cover fixed no-repeat;
}

.hall-square-panel::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 78px 0 0;
  background: linear-gradient(90deg, rgba(7, 20, 46, 0.25), transparent 24%, transparent 76%, rgba(7, 20, 46, 0.25));
  pointer-events: none;
}

.hall-square-layout {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 22px;
  margin: 0 auto;
}

.hall-square-main {
  display: grid;
  gap: 20px;
}

.post-composer,
.post-feed-section,
.identity-panel,
.social-chat-sidebar,
.social-chat-room {
  border: 3px solid var(--ink);
  background: rgba(255, 247, 232, 0.97);
  box-shadow: 6px 7px 0 rgba(7, 20, 46, 0.76), inset 0 0 0 2px rgba(255, 255, 255, 0.62);
}

.post-composer > header,
.post-feed-header,
.identity-panel > header,
.social-chat-sidebar > header,
.social-chat-room > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 3px solid var(--ink);
  background: linear-gradient(180deg, #fffaf0, #f3e2bd);
}

.hall-social-page h1,
.hall-social-page h2,
.hall-social-page h3 {
  color: var(--ink);
}

.post-composer h1,
.post-feed-header h2,
.identity-panel h2,
.social-chat-sidebar h2,
.social-chat-room h2 {
  margin: 4px 0 0;
  font-size: 25px;
  line-height: 1;
}

.mono-label {
  color: var(--cobalt);
  font: 950 9px/1 "Courier New", monospace;
  letter-spacing: 0.12em;
}

.local-only-label,
.post-feed-header > span,
.social-chat-room > header > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.post-composer form {
  padding: 18px 20px 20px;
}

.post-categories {
  display: flex;
  gap: 9px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.post-categories input {
  position: absolute;
  opacity: 0;
}

.post-categories span {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 0 14px;
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: 2px 3px 0 var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.post-categories input:checked + span {
  background: var(--gold);
}

.post-categories input:focus-visible + span {
  outline: 3px solid var(--cobalt);
  outline-offset: 2px;
}

.post-compose-fields {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
}

.post-compose-fields label,
.nickname-form {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.post-compose-fields input,
.post-compose-fields textarea,
.nickname-form input,
.social-chat-form input,
.comments-dialog input,
.identity-dialog input,
.chat-compose input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.post-compose-fields input,
.nickname-form input,
.social-chat-form input,
.comments-dialog input,
.identity-dialog input {
  min-height: 44px;
  padding: 0 12px;
}

.post-compose-fields textarea {
  min-height: 88px;
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.5;
}

.post-compose-fields :is(input, textarea):focus,
.nickname-form input:focus,
.social-chat-form input:focus,
.comments-dialog input:focus,
.identity-dialog input:focus {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.post-composer form > footer {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 142px;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.post-composer .image-picker {
  min-height: 42px;
  font-size: 11px;
}

#postImageName {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-action {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--cobalt);
  box-shadow: 3px 4px 0 var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.primary-action:hover,
.primary-action:focus-visible {
  transform: translateY(-2px);
  background: #3158ff;
  box-shadow: 3px 6px 0 var(--ink);
  outline: 0;
}

.post-feed-section {
  overflow: hidden;
}

.post-feed {
  display: grid;
}

.travel-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 18px;
  padding: 20px;
  border-bottom: 3px solid var(--ink);
  background: rgba(255, 252, 246, 0.96);
}

.travel-post.has-image {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 34%);
}

.travel-post:last-child {
  border-bottom: 0;
}

.travel-post > header,
.travel-post > .post-copy,
.travel-post > .post-actions {
  grid-column: 1;
}

.travel-post > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.post-author {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.post-avatar {
  flex: none;
  width: 48px;
  height: 56px;
  filter: drop-shadow(2px 3px 0 rgba(7, 20, 46, 0.45));
}

.post-author span:not(.hall-avatar) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.post-author b {
  font-size: 14px;
}

.post-author small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-author:hover b,
.post-author:focus-visible b {
  color: var(--cobalt);
}

.post-category {
  flex: none;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  background: var(--mint);
  font-size: 9px;
  font-weight: 950;
}

.category-story { background: var(--gold); }
.category-game { background: #ffd0c7; }

.post-copy {
  margin: 14px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.post-image {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 100%;
  height: 148px;
  align-self: center;
  border: 3px solid var(--ink);
  object-fit: cover;
  image-rendering: auto;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-actions button {
  min-height: 38px;
  padding: 0 11px;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.post-actions button:hover,
.post-actions button:focus-visible,
.post-actions button.is-active {
  background: var(--gold);
  box-shadow: 2px 3px 0 var(--ink);
  outline: 0;
}

.post-actions .post-invite {
  margin-left: auto;
  background: var(--cobalt);
  color: #fff;
}

.post-actions .post-invite:disabled {
  background: var(--mint);
  color: var(--ink);
  cursor: default;
}

.post-actions .post-delete {
  margin-left: auto;
  color: #ad2d2d;
}

.identity-panel {
  position: sticky;
  top: 0;
  overflow: hidden;
}

.identity-panel > header {
  display: block;
}

.identity-profile {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 2px solid var(--ink);
  background: #e9f7ef;
}

.identity-avatar {
  width: 72px;
  height: 84px;
  filter: drop-shadow(2px 3px 0 rgba(7, 20, 46, 0.55));
}

.identity-profile div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.identity-profile strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-profile span:not(.hall-avatar) {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
}

.identity-panel dl {
  margin: 0;
  padding: 7px 18px;
}

.identity-panel dl > div {
  display: grid;
  gap: 5px;
  padding: 10px 0;
  border-bottom: 1px solid #bdaf97;
}

.identity-panel dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.identity-panel dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  font-weight: 900;
}

.identity-panel code {
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-panel dd button {
  min-height: 30px;
  border: 2px solid var(--ink);
  background: #fff;
  font-size: 9px;
  font-weight: 900;
}

.nickname-form {
  padding: 10px 18px;
}

.nickname-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
}

.nickname-form button {
  border: 2px solid var(--ink);
  border-left: 0;
  background: var(--gold);
  font-size: 10px;
  font-weight: 950;
}

.identity-compose-focus {
  width: calc(100% - 36px);
  margin: 8px 18px 12px;
}

.identity-panel > p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.5;
}

.hall-chat-panel {
  padding: 30px;
  background:
    linear-gradient(rgba(7, 20, 46, 0.18), rgba(7, 20, 46, 0.28)),
    url("./assets/hall-map-shenzhen-large.png") center / cover no-repeat;
}

.social-chat-layout {
  width: min(1180px, calc(100% - 24px));
  height: min(720px, calc(100svh - 138px));
  min-height: 560px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  margin: 0 auto;
}

.social-chat-sidebar,
.social-chat-room {
  min-height: 0;
  overflow: hidden;
}

.social-chat-sidebar > header {
  display: block;
}

.social-chat-sidebar nav,
.social-chat-sidebar > section {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.social-chat-sidebar nav {
  border-bottom: 2px solid var(--ink);
}

.social-chat-sidebar button {
  min-height: 58px;
  display: grid;
  align-items: center;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.social-chat-sidebar nav button {
  gap: 3px;
}

.social-chat-sidebar button[aria-pressed="true"],
.social-chat-sidebar button:hover,
.social-chat-sidebar button:focus-visible {
  background: #fff0ad;
  box-shadow: 2px 3px 0 var(--ink);
  outline: 0;
}

.social-chat-sidebar button span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.social-chat-sidebar h3 {
  margin: 2px 0 5px;
  font-size: 14px;
}

.social-chat-sidebar > section button {
  grid-template-columns: 50px 1fr;
  gap: 8px;
}

.social-chat-sidebar .hall-avatar {
  width: 46px;
  height: 54px;
}

.social-chat-sidebar > section button span:last-child {
  display: grid;
  gap: 3px;
}

.social-chat-sidebar small {
  color: var(--muted);
  font-size: 9px;
}

.social-chat-room {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.social-chat-messages {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  margin: 0;
  padding: 22px;
  overflow: auto;
  list-style: none;
  background: rgba(234, 246, 248, 0.78);
}

.social-chat-messages li {
  width: min(72%, 560px);
  padding: 11px 13px;
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: 3px 4px 0 rgba(7, 20, 46, 0.65);
}

.social-chat-messages li.is-mine {
  justify-self: end;
  background: #dff7e9;
}

.social-chat-messages b {
  color: var(--cobalt);
  font-size: 10px;
}

.social-chat-messages p {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.social-chat-messages img {
  display: block;
  max-width: 280px;
  max-height: 190px;
  margin-top: 8px;
  border: 2px solid var(--ink);
  object-fit: cover;
}

.social-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 86px;
  gap: 9px;
  padding: 14px;
  border-top: 3px solid var(--ink);
  background: var(--paper);
}

.social-chat-form .image-picker {
  font-size: 11px;
}

.hall-explore-panel,
.hall-explore-panel .hall-stage {
  height: calc(100svh - 78px);
  min-height: 560px;
}

.hall-explore-panel .hall-stage {
  border: 0;
  outline: 0;
}

.hall-explore-panel .hall-stage:focus-visible {
  box-shadow: inset 0 0 0 4px var(--gold);
}

.hall-social-traveler-card {
  position: fixed;
  z-index: 70;
  top: 92px;
  right: 22px;
}

.identity-dialog,
.comments-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.identity-dialog::backdrop,
.comments-dialog::backdrop {
  background: rgba(7, 20, 46, 0.68);
}

.identity-dialog-shell {
  width: min(620px, calc(100vw - 50px));
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 26px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 7px 8px 0 rgba(7, 20, 46, 0.75);
}

.identity-dialog-avatar {
  width: 144px;
  height: 168px;
  filter: drop-shadow(4px 5px 0 rgba(7, 20, 46, 0.56));
}

.identity-dialog h2 {
  margin: 5px 0 10px;
  font-size: 28px;
}

.identity-dialog p,
.identity-dialog small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
}

.identity-dialog label {
  display: block;
  margin: 14px 0 6px;
  font-size: 10px;
  font-weight: 900;
}

.identity-dialog .primary-action {
  width: 100%;
  margin: 12px 0;
}

.comments-dialog-shell {
  width: min(620px, calc(100vw - 50px));
  max-height: min(700px, calc(100svh - 50px));
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 7px 8px 0 rgba(7, 20, 46, 0.75);
}

.comments-dialog-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 3px solid var(--ink);
}

.comments-dialog h2 {
  margin: 4px 0 0;
}

#closeComments {
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  background: var(--coral);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

#commentsList {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  list-style: none;
  background: #eaf5f3;
}

#commentsList li {
  padding: 11px;
  border: 2px solid var(--ink);
  background: #fff;
}

#commentsList p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

#commentForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 9px;
  padding: 14px;
  border-top: 3px solid var(--ink);
}

@media (max-width: 1180px) {
  .hall-social-header {
    grid-template-columns: 166px 135px minmax(370px, 1fr) 110px;
    gap: 9px;
    padding-inline: 12px;
  }

  .hall-social-header .hall-map-back {
    width: 166px;
  }

  .hall-social-tabs {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
  }

  .hall-square-panel,
  .hall-chat-panel {
    padding-inline: 18px;
  }

  .hall-square-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

/* Travel square proportion pass — match the approved 1672 × 941 composition */

.hall-social-shell {
  grid-template-rows: 92px minmax(0, 1fr);
}

.hall-social-header {
  grid-template-columns: 220px 330px minmax(560px, 1fr) 110px;
  gap: 0;
  padding: 10px 14px;
}

.hall-social-header .hall-map-back {
  width: 220px;
  height: 58px;
  box-shadow: none;
}

.hall-social-header .hall-location-title {
  min-height: 58px;
  padding: 0 34px;
  border: 2px solid var(--ink);
  border-left: 0;
  background: #fffaf0;
}

.hall-social-header .hall-location-title strong {
  font-size: 25px;
}

.hall-social-tabs {
  width: min(650px, calc(100% - 24px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hall-local-status {
  visibility: hidden;
}

.hall-square-panel {
  padding: 118px 24px 36px;
  background-position: center 42%;
}

.hall-square-panel::before {
  inset-block-start: 92px;
}

.hall-square-layout {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.post-composer .mono-label,
.identity-panel > header .mono-label {
  display: none;
}

.post-composer > header,
.identity-panel > header {
  min-height: 52px;
  padding: 11px 18px;
}

.post-composer h1,
.identity-panel h2 {
  margin: 0;
  font-size: 23px;
}

.post-composer form {
  padding: 10px 18px 12px;
}

.post-categories {
  margin-bottom: 7px;
}

.post-categories span {
  min-height: 32px;
}

.post-compose-fields textarea {
  min-height: 56px;
}

.post-composer form > footer {
  margin-top: 7px;
}

.post-composer .image-picker,
.post-composer .primary-action {
  min-height: 36px;
}

.travel-post,
.travel-post.has-image {
  min-height: 156px;
  grid-template-columns: minmax(0, 1fr) 232px;
  padding-block: 12px;
}

.post-avatar {
  width: 62px;
  height: 74px;
}

.post-copy,
.post-actions {
  margin-left: 71px;
}

.post-copy {
  font-size: 12px;
}

.post-image {
  height: 130px;
}

.identity-profile {
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px 10px;
}

.identity-avatar {
  width: 116px;
  height: 142px;
}

.identity-field-label {
  font-size: 10px;
}

.identity-id-row code,
.identity-id-row button {
  font-size: 9px;
}

.identity-profile strong {
  font-size: 18px;
}

.nickname-form {
  padding: 0 18px 14px 150px;
}

.identity-personality-section {
  margin-inline: 18px;
  padding-block: 15px;
}

.identity-personality-section strong {
  font-size: 14px;
}

.identity-personality-section p {
  font-size: 11px;
}

.identity-scene-image {
  width: calc(100% - 36px);
  height: 202px;
  margin-inline: 18px;
  object-position: center 72%;
}

.identity-compose-focus {
  width: calc(100% - 36px);
  min-height: 54px;
  margin: 14px 18px 10px;
}

.identity-panel > .identity-local-note {
  padding: 0 18px 16px;
  font-size: 9px;
}

.post-compose-fields textarea {
  min-height: 48px;
}

.post-composer form > footer {
  margin-top: 5px;
}

.post-composer .image-picker,
.post-composer .primary-action {
  min-height: 34px;
}

@media (min-width: 1500px) {
  .hall-square-layout {
    left: 56px;
  }
}

@media (max-width: 1320px) {
  .hall-social-header {
    grid-template-columns: 190px 230px minmax(500px, 1fr) 90px;
  }

  .hall-social-header .hall-map-back {
    width: 190px;
  }

  .hall-social-header .hall-location-title {
    padding-inline: 24px;
  }

  .hall-square-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .identity-profile {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .identity-avatar {
    width: 104px;
    height: 128px;
  }

  .nickname-form {
    padding-left: 140px;
  }
}

/* Last-mile visual ratios for the approved collapsed-square mock. */
.hall-social-header .hall-location-title {
  min-height: 52px;
  padding-inline: 18px;
  border: 2px solid var(--ink);
  border-left: 0;
  background: #fffaf0;
}

.hall-square-panel {
  padding: 190px 28px 70px;
}

.hall-square-layout {
  width: min(1510px, calc(100% - 56px));
}

.hall-square-panel .travel-post:not(.has-image) {
  min-height: 156px;
}

/* World startup and arrival */
.world-entry {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  min-width: 320px;
  min-height: 580px;
  overflow: hidden;
  place-items: center;
  background: transparent;
  isolation: isolate;
}

.world-entry[hidden] {
  display: none;
}

.world-entry-art,
.world-entry-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.world-entry-art {
  z-index: -1;
  overflow: hidden;
  background: #54c4ef;
  opacity: 0;
  transition: opacity 480ms ease, filter 480ms ease;
  will-change: opacity, filter, transform;
}

.world-entry-art > img {
  display: block;
  object-fit: cover;
  object-position: center;
}

.world-entry[data-phase="loading"] .world-entry-art-loading,
.world-entry[data-phase="gate"] .world-entry-art-gate,
.world-entry[data-phase="flight"] .world-entry-art-gate {
  opacity: 1;
}

.world-entry-loading {
  position: absolute;
  z-index: 2;
  left: clamp(26px, 4vw, 78px);
  right: clamp(26px, 4vw, 78px);
  bottom: clamp(22px, 4vh, 46px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(16px, 2vw, 30px);
  align-items: center;
  padding: 14px 18px;
  border: 3px solid rgba(7, 20, 46, 0.95);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 7px 8px 0 rgba(7, 20, 46, 0.88);
  opacity: 0;
  transform: translateY(18px);
  visibility: hidden;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

.world-entry[data-phase="loading"] .world-entry-loading {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.world-entry-loading strong {
  color: var(--ink);
  font-size: clamp(17px, 1.35vw, 22px);
  font-weight: 950;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.world-entry-progress {
  height: 18px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: rgba(7, 20, 46, 0.28);
  box-shadow: inset 0 3px 0 rgba(7, 20, 46, 0.13);
}

.world-entry-progress span {
  display: block;
  width: 8%;
  height: 100%;
  background: repeating-linear-gradient(90deg, #ffd237 0 24px, #ffae2b 24px 28px);
  animation: world-entry-load 1050ms steps(8, end) forwards;
}

.world-entry-gate {
  position: absolute;
  z-index: 3;
  right: clamp(28px, 4vw, 76px);
  bottom: clamp(28px, 5vh, 62px);
  width: clamp(340px, 29vw, 500px);
  padding: clamp(20px, 2.1vw, 32px);
  border: 4px solid var(--ink);
  background: rgba(255, 249, 236, 0.96);
  box-shadow: 9px 10px 0 rgba(7, 20, 46, 0.9), inset 0 0 0 2px rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  transition: opacity 260ms ease, transform 260ms ease, visibility 260ms;
}

.world-entry[data-phase="gate"] .world-entry-gate {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.world-entry-gate h2 {
  margin: 0 0 clamp(18px, 2vw, 26px);
  font-size: clamp(30px, 2.6vw, 44px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.world-entry-start {
  width: 100%;
  min-height: clamp(58px, 5.5vw, 76px);
  border: 4px solid var(--ink);
  border-radius: 0;
  background: var(--cobalt);
  box-shadow: 6px 7px 0 rgba(7, 20, 46, 0.92);
  color: #fff;
  font-size: clamp(20px, 1.8vw, 29px);
  font-weight: 950;
  cursor: pointer;
}

.world-entry-start:hover,
.world-entry-start:focus-visible {
  background: #244cff;
}

.world-entry-start:active {
  transform: translate(3px, 4px);
  box-shadow: none;
}

.world-entry[data-phase="flight"] {
  pointer-events: none;
}

.world-entry[data-phase="flight"] .world-entry-art-gate {
  animation: world-entry-scene-reveal 900ms ease-in-out forwards;
}

.world-entry[data-phase="flight"] + .world-map .world-scene {
  animation: world-home-crossfade 900ms ease-in-out both;
}

.world-entry[data-phase="flight"] + .world-map .world-atmosphere {
  animation: world-atmosphere-arrive 900ms ease-out both;
}

.world-entry[data-phase="world"] {
  opacity: 0;
  transition: opacity 240ms ease;
}

@keyframes world-entry-load {
  to { width: 100%; }
}

@keyframes world-entry-scene-reveal {
  0% { opacity: 1; filter: brightness(1) saturate(1); }
  100% { opacity: 0; filter: brightness(0.96) saturate(0.94); }
}

@keyframes world-home-crossfade {
  0% { opacity: 0; filter: brightness(0.94) saturate(0.9); }
  100% { opacity: 1; filter: brightness(1) saturate(1); }
}

@keyframes world-atmosphere-arrive {
  0% { opacity: 0.26; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .world-entry *,
  .world-entry *::before,
  .world-entry *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .world-atmosphere,
  .world-atmosphere * {
    animation: none !important;
    transition: none !important;
  }
}

/* Approved desktop world composition — calibrated to the confirmed 1672 × 941 UI. */
@media (min-width: 901px) {
  .world-approved-chrome {
    position: absolute;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .world-approved-chrome img {
    position: absolute;
    display: block;
    image-rendering: auto;
    user-select: none;
  }

  .world-approved-logo {
    left: 28.71%;
    top: 0;
    width: 33.19%;
    height: 23.38%;
  }

  .world-approved-hud {
    left: 61.9%;
    top: 0;
    width: 38.1%;
    height: 18.6%;
  }

  .world-approved-camp {
    left: 0;
    top: 61.1%;
    width: 34.39%;
    height: 38.9%;
  }

  .island-layer-personality {
    left: 2.4%;
    top: 27%;
    width: 22%;
  }

  .island-layer-game {
    left: 21.5%;
    top: 20%;
    width: 49%;
  }

  .island-layer-hall {
    left: 69%;
    top: 24.5%;
    width: 30%;
  }

  .island-layer-workbench {
    left: 74%;
    top: 61.5%;
    width: 23.5%;
  }

  .island-personality {
    left: 2.4%;
    top: 27%;
    width: 22%;
    height: 30%;
  }

  .island-game {
    left: 21.5%;
    top: 20%;
    width: 49%;
    height: 63%;
  }

  .island-hall {
    left: 69%;
    top: 24.5%;
    width: 30%;
    height: 39%;
  }

  .island-workbench {
    left: 74%;
    top: 61.5%;
    width: 23.5%;
    height: 27%;
  }

  .island-game .island-module-copy {
    top: 63.5%;
    width: 42%;
  }

  .island-personality .island-module-copy {
    top: 55.5%;
    width: 65%;
  }

  .island-hall .island-module-copy {
    top: -2.5%;
    width: 55%;
  }

  .island-workbench .island-module-copy {
    top: 55%;
    width: 65%;
  }

  .world-hud {
    z-index: 10;
    left: 62.15%;
    top: 3.1%;
    width: 37.4%;
    height: 13.2%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.7%;
  }

  .world-hud button,
  .world-hud button:hover,
  .world-hud button:focus-visible,
  .world-hud button:active {
    color: transparent;
    font-size: 0;
  }

  .world-hud button:hover,
  .world-hud button:focus-visible {
    background: rgba(255, 240, 174, 0.22);
    box-shadow:
      inset 0 0 0 3px rgba(255, 222, 115, 0.96),
      0 0 14px rgba(255, 232, 153, 0.82);
    filter: brightness(1.04);
  }

  .world-hud button:active {
    background: rgba(255, 218, 96, 0.28);
    box-shadow: inset 0 0 0 3px #6a4a22;
    transform: translateY(2px);
  }

}

.hall-square-panel::before {
  background:
    linear-gradient(180deg, transparent 0 118px, rgba(7, 20, 46, 0.08) 118px 100%),
    linear-gradient(90deg, rgba(7, 20, 46, 0.08), transparent 24%, transparent 76%, rgba(7, 20, 46, 0.08));
}

.hall-profile-trigger {
  border-radius: 50%;
  background: #fffaf0;
}

.hall-square-panel .post-copy {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Travel square v1.0 — collapsed publishing, strong imagery, compact identity */

.hall-social-page {
  overflow-y: auto;
}

.hall-social-shell {
  grid-template-rows: 76px minmax(calc(100svh - 76px), auto);
}

.hall-social-header {
  position: sticky;
  top: 0;
  grid-template-columns: 56px 220px minmax(560px, 1fr) 64px;
  gap: 0;
  min-height: 76px;
  padding: 8px 18px;
}

.hall-social-header .hall-map-back {
  width: 56px;
  height: 52px;
  border-width: 2px;
  box-shadow: 3px 4px 0 var(--ink);
}

.hall-social-header .hall-back-arrow {
  width: 100%;
  border-right: 0;
  font-size: 25px;
}

.hall-social-header .hall-location-title {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.hall-social-header .hall-location-title strong {
  font-size: 22px;
}

.hall-social-header .hall-location-title small {
  margin-left: 9px;
  color: #20845f;
  font-size: 10px;
  font-weight: 950;
}

.hall-social-tabs {
  width: min(620px, calc(100% - 20px));
  padding: 4px;
  box-shadow: 3px 4px 0 var(--ink);
}

.hall-social-tabs button {
  min-height: 42px;
}

.hall-profile-trigger {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  justify-self: end;
  padding: 3px;
  border: 2px solid var(--ink);
  background: #fff7e8;
  box-shadow: 3px 4px 0 var(--ink);
}

.hall-profile-trigger:hover,
.hall-profile-trigger:focus-visible {
  transform: translateY(-2px);
  background: var(--gold);
  box-shadow: 3px 6px 0 var(--ink);
  outline: 0;
}

.hall-profile-trigger .hall-avatar {
  width: 40px;
  height: 44px;
}

.hall-square-panel {
  min-height: calc(100svh - 76px);
  overflow: visible;
  padding: 150px 28px 70px;
  background-position: center 38%;
  background-attachment: fixed;
}

.hall-square-panel::before {
  inset-block-start: 76px;
  background:
    linear-gradient(180deg, rgba(7, 20, 46, 0.02) 0 118px, rgba(7, 20, 46, 0.26) 118px 100%),
    linear-gradient(90deg, rgba(7, 20, 46, 0.22), transparent 24%, transparent 76%, rgba(7, 20, 46, 0.22));
}

.hall-square-layout {
  left: auto;
  width: min(1260px, calc(100% - 24px));
  display: block;
  margin: 0 auto;
}

.hall-square-board {
  border: 3px solid var(--ink);
  background: rgba(255, 248, 235, 0.97);
  box-shadow: 7px 8px 0 rgba(7, 20, 46, 0.76);
}

.hall-square-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 3px solid var(--ink);
  background: linear-gradient(180deg, #fffaf0, #f0dfb8);
}

.post-category-switch {
  display: flex;
  gap: 8px;
}

.post-category-switch button,
.composer-cancel,
.composer-close {
  min-height: 40px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: 2px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.post-category-switch button:hover,
.post-category-switch button:focus-visible {
  background: #fff3bf;
  outline: 0;
}

.post-category-switch button[aria-selected="true"] {
  background: var(--gold);
}

.open-post-composer {
  min-width: 172px;
}

.post-composer[hidden] {
  display: none;
}

.hall-square-panel .post-composer {
  scroll-margin-top: 88px;
  border: 0;
  border-bottom: 3px solid var(--ink);
  box-shadow: none;
  background: rgba(255, 252, 246, 0.99);
}

.hall-square-panel .post-composer > header {
  min-height: 54px;
  padding: 11px 18px;
}

.hall-square-panel .post-composer h1 {
  margin: 0;
  font-size: 22px;
}

.composer-close {
  width: 38px;
  min-height: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.hall-square-panel .post-composer form {
  padding: 14px 18px 16px;
}

.hall-square-panel .post-composer form > footer {
  grid-template-columns: 108px minmax(0, 1fr) 74px 150px;
  margin-top: 10px;
}

.composer-cancel {
  min-height: 38px;
  padding: 0 12px;
  box-shadow: none;
}

.hall-square-panel .post-feed-section {
  overflow: hidden;
  border: 0;
  box-shadow: none;
}

.hall-square-panel .travel-post,
.hall-square-panel .travel-post.has-image {
  min-height: 228px;
  display: grid;
  grid-template-columns: minmax(300px, 38%) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border-bottom: 3px solid var(--ink);
  background: rgba(255, 252, 246, 0.98);
}

.hall-square-panel .travel-post:last-child {
  border-bottom: 0;
}

.hall-square-panel .travel-post:not(.has-image) {
  grid-template-columns: 1fr;
}

.hall-square-panel .post-image {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 228px;
  align-self: stretch;
  border: 0;
  border-right: 3px solid var(--ink);
  border-radius: 0;
  object-fit: cover;
}

.hall-square-panel .post-body {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 20px 22px 18px;
}

.hall-square-panel .post-body > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hall-square-panel .post-author {
  gap: 7px;
  opacity: 0.76;
}

.hall-square-panel .post-avatar {
  width: 38px;
  height: 44px;
  filter: drop-shadow(1px 2px 0 rgba(7, 20, 46, 0.3));
}

.hall-square-panel .post-author b {
  color: #455266;
  font-size: 11px;
}

.hall-square-panel .post-author small {
  font-size: 8px;
}

.hall-square-panel .post-category {
  margin: 0;
  border-width: 1px;
}

.hall-square-panel .post-copy {
  display: -webkit-box;
  max-width: 720px;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 21px;
  font-weight: 950;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hall-square-panel .post-actions {
  margin: 0;
}

.hall-square-panel .post-actions .post-delete {
  margin-left: auto;
}

.identity-summary-dialog {
  width: min(440px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  background: transparent;
}

.identity-summary-dialog::backdrop {
  background: rgba(7, 20, 46, 0.58);
}

.identity-summary-shell {
  border: 3px solid var(--ink);
  background: #fff8eb;
  box-shadow: 7px 8px 0 rgba(7, 20, 46, 0.82);
}

.identity-summary-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 3px solid var(--ink);
  background: linear-gradient(180deg, #fffaf0, #f0dfb8);
}

.identity-summary-shell h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.identity-summary-shell > header button {
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  background: #fff;
  font-size: 20px;
  font-weight: 950;
}

.identity-summary-content {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
}

.identity-summary-avatar {
  width: 96px;
  height: 116px;
}

.identity-summary-content > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
}

.identity-summary-content strong {
  font-size: 21px;
}

.identity-summary-content > div > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.identity-summary-content dl {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.identity-summary-content dl > div {
  display: grid;
  gap: 4px;
}

.identity-summary-content dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.identity-summary-content dd {
  margin: 0;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.5;
}

/* Travel square fidelity pass — approved compact reference */

.hall-square-panel {
  padding: 18px 24px 32px;
  background-position: center 45%;
}

.hall-square-layout {
  width: min(1320px, calc(100% - 12px));
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.hall-square-main {
  gap: 10px;
}

.hall-square-panel :is(.post-composer, .post-feed-section, .identity-panel) {
  box-shadow: 3px 4px 0 rgba(7, 20, 46, 0.82);
}

.post-composer > header,
.identity-panel > header {
  padding: 12px 16px;
}

.post-composer h1,
.identity-panel h2 {
  margin-top: 3px;
  font-size: 22px;
}

.post-composer form {
  padding: 11px 16px 13px;
}

.post-categories {
  gap: 7px;
  margin-bottom: 9px;
}

.post-categories span {
  min-height: 34px;
  padding: 0 13px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 10px;
}

.post-compose-fields {
  display: block;
}

.post-text-field {
  display: block;
}

.post-compose-fields textarea {
  min-height: 64px;
  padding: 9px 11px;
  resize: none;
  font-size: 11px;
}

.post-composer form > footer {
  grid-template-columns: 102px minmax(0, 1fr) 138px;
  margin-top: 9px;
}

.post-composer .image-picker,
.post-composer .primary-action {
  min-height: 38px;
}

.post-feed-section {
  background: rgba(255, 250, 241, 0.98);
}

.travel-post,
.travel-post.has-image {
  min-height: 142px;
  grid-template-columns: minmax(0, 1fr) 222px;
  column-gap: 15px;
  padding: 11px 14px;
  background: rgba(255, 250, 241, 0.98);
}

.travel-post:not(.has-image) {
  grid-template-columns: minmax(0, 1fr);
}

.travel-post > header {
  justify-content: flex-start;
  gap: 9px;
}

.post-author {
  gap: 9px;
}

.post-avatar {
  width: 58px;
  height: 68px;
}

.post-author span:not(.hall-avatar) {
  gap: 3px;
}

.post-author b {
  font-size: 13px;
}

.post-author small {
  font-size: 8px;
}

.post-category {
  margin-top: 5px;
  padding: 4px 7px;
  border-width: 1px;
  font-size: 8px;
}

.post-copy {
  display: -webkit-box;
  margin: 2px 0 7px 67px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-image {
  height: 116px;
  border-width: 2px;
  border-radius: 2px;
}

.post-actions {
  margin-left: 67px;
  gap: 7px;
}

.post-actions button {
  min-height: 32px;
  padding: 0 10px;
  border-width: 2px;
  font-size: 9px;
}

.post-actions .post-invite {
  background: var(--coral);
  color: #fff;
}

.identity-panel {
  top: 0;
}

.identity-profile {
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 14px 16px 8px;
  border-bottom: 0;
  background: rgba(255, 250, 241, 0.98);
}

.identity-avatar {
  width: 104px;
  height: 124px;
  border: 2px solid var(--ink);
  background-color: #edf1ff;
  filter: drop-shadow(2px 3px 0 rgba(7, 20, 46, 0.45));
}

.identity-primary-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding-top: 2px;
}

.identity-field-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.identity-id-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: stretch;
  margin-bottom: 8px;
  border: 2px solid var(--ink);
  background: #fff;
}

.identity-id-row code {
  align-self: center;
  overflow: hidden;
  padding: 0 7px;
  font-size: 8px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-id-row button {
  min-height: 34px;
  padding: 0;
  border: 0;
  border-left: 2px solid var(--ink);
  background: #fff;
  font-size: 8px;
  font-weight: 950;
}

.identity-profile strong {
  font-size: 15px;
}

.nickname-form {
  padding: 0 16px 12px 134px;
}

.nickname-form > div {
  grid-template-columns: minmax(0, 1fr) 76px;
}

.nickname-form input {
  min-height: 36px;
  font-size: 10px;
}

.nickname-form button {
  font-size: 9px;
}

.identity-personality-section {
  margin: 0 16px;
  padding: 13px 0 12px;
  border-top: 1px dashed rgba(7, 20, 46, 0.6);
}

.identity-personality-section > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.identity-personality-section strong {
  font-size: 12px;
}

#identityPersonality {
  padding: 4px 8px;
  background: var(--mint);
  color: #286749;
  font-size: 9px;
  font-weight: 950;
}

.identity-personality-section p {
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.55;
}

.identity-scene-image {
  display: block;
  width: calc(100% - 32px);
  height: 148px;
  margin: 0 16px;
  border: 2px solid var(--ink);
  object-fit: cover;
  object-position: center 68%;
  image-rendering: auto;
}

.identity-compose-focus {
  width: calc(100% - 32px);
  min-height: 48px;
  margin: 13px 16px 9px;
  font-size: 14px;
}

.identity-panel > .identity-local-note {
  margin: 0;
  padding: 0 16px 13px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .hall-square-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .travel-post,
  .travel-post.has-image {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .identity-profile {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .identity-avatar {
    width: 88px;
    height: 108px;
  }

  .nickname-form {
    padding-left: 118px;
  }
}

/* Final travel-square ratios: keep this after the compact component rules. */

.hall-square-panel {
  padding: 118px 24px 36px;
  background-position: center 42%;
}

.hall-square-layout {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.travel-post,
.travel-post.has-image {
  min-height: 156px;
  grid-template-columns: minmax(0, 1fr) 232px;
  padding-block: 12px;
}

.post-avatar {
  width: 62px;
  height: 74px;
}

.post-copy,
.post-actions {
  margin-left: 71px;
}

.post-copy {
  font-size: 12px;
}

.post-image {
  height: 130px;
}

.identity-profile {
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px 10px;
}

.identity-avatar {
  width: 116px;
  height: 142px;
}

.identity-field-label {
  font-size: 10px;
}

.identity-id-row code,
.identity-id-row button {
  font-size: 9px;
}

.identity-profile strong {
  font-size: 18px;
}

.nickname-form {
  padding: 0 18px 14px 150px;
}

.identity-personality-section {
  margin-inline: 18px;
  padding-block: 15px;
}

.identity-personality-section strong {
  font-size: 14px;
}

.identity-personality-section p {
  font-size: 11px;
}

.identity-scene-image {
  width: calc(100% - 36px);
  height: 202px;
  margin-inline: 18px;
  object-position: center 72%;
}

.identity-compose-focus {
  width: calc(100% - 36px);
  min-height: 54px;
  margin: 14px 18px 10px;
}

.identity-panel > .identity-local-note {
  padding: 0 18px 16px;
  font-size: 9px;
}

@media (max-width: 1320px) {
  .hall-square-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .identity-profile {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .identity-avatar {
    width: 104px;
    height: 128px;
  }

  .nickname-form {
    padding-left: 140px;
  }
}

/* Final proportional desktop world stage */
@media (min-width: 901px) {
  .world-scene {
    --world-stage-width: min(100vw, calc(100svh * 1672 / 941));
    --world-stage-height: min(100svh, calc(100vw * 941 / 1672));
  }

  .island-layers,
  .island-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--world-stage-width);
    height: var(--world-stage-height);
    transform: translate(-50%, -50%);
  }

  .island-layers {
    inset: auto;
    left: 50%;
    top: 50%;
  }

  .island-layer > .island-base {
    object-fit: contain;
  }

  .island-entry > .island-module-copy {
    grid-template-rows: 61% 39%;
    padding: 0;
  }

  .island-module-copy strong,
  .island-module-copy small {
    display: grid;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    place-items: center;
    line-height: 1;
    text-align: center;
  }

  .island-game .island-module-copy {
    top: 64%;
    width: 32%;
    background-image: url("./assets/island-module-sign-game-blue-v3.png");
  }

  .island-game .island-module-copy strong {
    font-size: clamp(26px, 2.15vw, 36px);
  }

  .island-game .island-module-copy small {
    font-size: clamp(14px, 1.1vw, 18px);
    text-shadow: 0 1px 0 #173f78;
  }

  .island-hall .island-module-copy {
    top: -5%;
    width: 42%;
  }

  .island-personality .island-module-copy {
    top: 58%;
    width: 49%;
  }

  .island-workbench .island-module-copy {
    top: 76%;
    width: 50%;
  }

  .island-hall .island-module-copy strong,
  .island-personality .island-module-copy strong,
  .island-workbench .island-module-copy strong {
    font-size: clamp(20px, 1.7vw, 30px);
  }

  .island-hall .island-module-copy small,
  .island-personality .island-module-copy small,
  .island-workbench .island-module-copy small {
    font-size: calc(clamp(12px, 1vw, 17px) - 2px);
  }

  .world-hud {
    position: absolute;
    left: 71.6%;
    top: 5.8%;
    width: 26.95%;
    height: 4.6%;
    gap: 0.84%;
  }

  .world-hud button {
    overflow: hidden;
    border: 0;
    border-radius: 2px;
    outline: 0;
    background-color: transparent;
    box-shadow: none;
    filter: none;
    transform: translateY(0);
    transition:
      background-color 140ms ease,
      box-shadow 140ms ease;
  }

  .world-hud button:hover,
  .world-hud button:focus-visible {
    background-color: rgba(255, 219, 123, 0.14);
    box-shadow:
      inset 0 0 0 2px rgba(86, 57, 29, 0.58),
      inset 0 2px 0 rgba(255, 255, 255, 0.26),
      inset 0 -3px 0 rgba(143, 91, 28, 0.18);
    outline: 0;
    filter: none;
    transform: none;
  }

  .world-hud button:focus-visible {
    box-shadow:
      inset 0 0 0 2px rgba(9, 38, 83, 0.88),
      inset 0 0 0 4px rgba(255, 225, 136, 0.56);
  }

  .world-hud button:active {
    background-color: rgba(255, 202, 76, 0.18);
    box-shadow:
      inset 0 0 0 2px rgba(86, 57, 29, 0.72),
      inset 0 3px 0 rgba(69, 42, 17, 0.26);
    filter: none;
    transform: none;
  }

  .world-map:has(.island-workbench:hover) .island-layer-workbench,
  .world-map:has(.island-workbench:focus-visible) .island-layer-workbench {
    filter: brightness(1.035) saturate(1.02);
  }

  .world-map:has(.island-workbench:hover) .island-workbench .island-module-copy,
  .world-map:has(.island-workbench:focus-visible) .island-workbench .island-module-copy {
    filter: brightness(1.06) saturate(1.02);
  }
}

/* Final approved travel-square ratios. */
.hall-social-header .hall-location-title {
  min-height: 52px;
  padding-inline: 18px;
  border: 2px solid var(--ink);
  border-left: 0;
  background: #fffaf0;
}

.hall-square-panel {
  padding: 20px 28px 70px;
}

.hall-square-layout {
  width: min(1510px, calc(100% - 56px));
}

.hall-square-panel .travel-post:not(.has-image) {
  min-height: 156px;
}
