:root {
  --sky: #70d8ff;
  --sky-soft: #ddf8ff;
  --teal: #16d7c3;
  --teal-deep: #087d91;
  --coral: #ff716a;
  --coral-deep: #c84755;
  --yellow: #ffd84a;
  --gold: #d99013;
  --grass: #63cf72;
  --purple: #9367f5;
  --navy: #21435c;
  --white: #fff;
  --ink: #18364c;
  --paper: #fffef3;
  --line: rgba(33, 67, 92, .18);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --outline-game: 0 0 0 3px var(--white), 0 0 0 6px var(--teal-deep);
  --shadow-game: 0 9px 0 #087d91, 0 16px 28px rgba(32, 77, 100, .22);
  --shadow-coral: 0 7px 0 #9d3041, 0 13px 24px rgba(48, 77, 103, .25);
  --ease-pop: cubic-bezier(.2, .9, .25, 1.2);
  --z-base: 1;
  --z-scene: 10;
  --z-hud: 20;
  --z-menu: 30;
  --z-drawer: 60;
  --z-overlay: 80;
  --z-toast: 100;
  font-family: ui-rounded, "Arial Rounded MT Bold", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--sky-soft);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, .9) 0 2px, transparent 3px),
    linear-gradient(180deg, #a7edff 0%, #eafcff 36%, #fff9d5 100%);
  color: var(--ink);
}

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

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

button {
  color: inherit;
}

button:not(:disabled),
a {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  left: 1rem;
  top: -5rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

.game-shell {
  min-height: 100dvh;
}

.hero-scene {
  position: relative;
  min-height: clamp(780px, 96dvh, 980px);
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, .92) 0 3%, rgba(255, 255, 255, .2) 24%, transparent 48%),
    linear-gradient(180deg, #59c9fa 0%, #8ee8ff 48%, #dffaff 100%);
}

.hero-scene::after {
  content: "";
  position: absolute;
  z-index: 15;
  left: 0;
  right: 0;
  bottom: 0;
  height: 112px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .88));
  clip-path: polygon(0 50%, 7% 68%, 15% 54%, 24% 76%, 33% 56%, 42% 80%, 52% 58%, 61% 75%, 71% 54%, 81% 76%, 91% 56%, 100% 72%, 100% 100%, 0 100%);
  pointer-events: none;
}

.sky-light {
  position: absolute;
  z-index: 0;
  inset: -25% -20% 25%;
  opacity: .34;
  background: repeating-conic-gradient(from -8deg at 50% 34%, rgba(255, 255, 255, .45) 0 6deg, transparent 6deg 16deg);
  mask-image: radial-gradient(circle at 50% 35%, #000 0 35%, transparent 69%);
}

.hero-world {
  position: absolute;
  z-index: 2;
  inset: 0;
  filter: saturate(1.1);
}

.hero-world::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 159, 222, .05) 0%, rgba(16, 126, 145, .08) 74%, rgba(8, 91, 90, .26) 100%);
}

.hero-world img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

.cloud {
  position: absolute;
  z-index: 3;
  width: 210px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  filter: drop-shadow(0 10px 16px rgba(41, 128, 170, .15));
  animation: cloud-drift 18s ease-in-out infinite alternate;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 8px;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 38px;
  width: 82px;
  height: 82px;
}

.cloud::after {
  right: 24px;
  width: 112px;
  height: 112px;
}

.cloud-a { left: -4%; top: 17%; transform: scale(.72); }
.cloud-b { right: -2%; top: 24%; transform: scale(.58); animation-delay: -6s; }
.cloud-c { left: 29%; top: 8%; transform: scale(.42); animation-delay: -11s; }

.top-hud {
  position: absolute;
  z-index: var(--z-hud);
  top: max(18px, env(safe-area-inset-top));
  left: clamp(18px, 3vw, 54px);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.round-chip,
.player-panel {
  border: 3px solid #fff;
  outline: 3px solid var(--teal-deep);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, .55) 0 2px, transparent 3px),
    linear-gradient(180deg, rgba(37, 233, 211, .97), rgba(12, 169, 169, .98));
  color: #fff;
  box-shadow: 0 7px 0 #087d91, 0 14px 24px rgba(20, 83, 106, .25), inset 0 2px 0 rgba(255, 255, 255, .5);
}

.round-chip {
  min-width: 355px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .72rem 1rem;
  border-radius: 20px;
}

.round-chip small,
.player-panel small {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: .88;
}

.round-chip strong {
  display: block;
  font-size: .95rem;
}

.calendar-icon {
  position: relative;
  width: 39px;
  height: 38px;
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: inset 0 9px 0 var(--coral);
}

.calendar-icon::after {
  content: "9";
  position: absolute;
  inset: 10px 0 0;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.online-state {
  display: flex;
  align-items: center;
  gap: .42rem;
  padding-left: .75rem;
  border-left: 1px solid rgba(255, 255, 255, .4);
  font-size: .74rem;
}

.online-state i,
.player-name span i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dfff62;
  box-shadow: 0 0 0 4px rgba(223, 255, 98, .2);
}

.hud-toggle {
  border: 3px solid #fff;
  border-radius: 15px;
  padding: .68rem .95rem;
  background: linear-gradient(#ffe771, #f5b91b);
  color: #704400;
  font-weight: 900;
  box-shadow: 0 5px 0 var(--gold);
}

.player-panel {
  position: absolute;
  z-index: var(--z-hud);
  top: max(18px, env(safe-area-inset-top));
  right: clamp(18px, 3vw, 54px);
  width: min(480px, 42vw);
  min-height: 104px;
  display: grid;
  grid-template-columns: 78px 108px 1fr;
  grid-template-rows: auto auto;
  gap: .45rem .8rem;
  padding: .65rem .9rem .72rem .65rem;
  border-radius: 25px;
}

.player-avatar {
  grid-row: 1 / 3;
  align-self: stretch;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 19px;
  background: linear-gradient(#d9fbff, #85e0ef);
  box-shadow: inset 0 -5px 0 rgba(8, 125, 145, .24);
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 18%;
  transform: scale(1.38) translateY(8%);
}

.player-name {
  align-self: center;
}

.player-name strong {
  display: block;
  font-size: 1.32rem;
  text-shadow: 0 2px 0 var(--teal-deep);
}

.player-name span {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .67rem;
  font-weight: 800;
}

.player-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .35rem;
}

.player-stats span {
  padding: .35rem .2rem;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 11px;
  background: rgba(5, 97, 121, .22);
  text-align: center;
}

.player-stats b {
  display: block;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.intel-progress {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .5rem;
  font-size: .65rem;
  font-weight: 800;
}

.intel-progress > div {
  height: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 999px;
  background: rgba(7, 85, 111, .32);
}

.intel-progress i {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), #efff83);
  transition: width .65s ease;
}

.character-layer {
  position: absolute;
  z-index: 9;
  inset: 15% 0 55px;
  pointer-events: none;
}

.character {
  position: absolute;
  bottom: 0;
  filter: drop-shadow(0 19px 10px rgba(34, 76, 96, .32));
}

.character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.character.shark-boss {
  z-index: 4;
  left: 50%;
  width: clamp(310px, 28vw, 500px);
  height: 76%;
  transform: translateX(-50%);
  animation: hero-enter .85s var(--ease-pop) both;
}

.character.yunbao {
  z-index: 3;
  left: clamp(2%, 9vw, 12%);
  width: clamp(230px, 22vw, 390px);
  height: 66%;
  animation: side-enter-left .9s .16s var(--ease-pop) both;
}

.character.jiajia {
  z-index: 3;
  right: clamp(2%, 8vw, 11%);
  width: clamp(220px, 21vw, 370px);
  height: 66%;
  animation: side-enter-right .9s .2s var(--ease-pop) both;
}

.hero-center {
  position: absolute;
  z-index: 13;
  top: clamp(126px, 14vh, 156px);
  left: 50%;
  width: min(630px, 48vw);
  transform: translateX(-50%);
  text-align: center;
}

.game-logo {
  position: relative;
  display: inline-grid;
  justify-items: center;
  animation: logo-drop .8s var(--ease-pop) both;
  filter: drop-shadow(0 9px 0 rgba(33, 67, 92, .28));
}

.logo-ribbon {
  position: relative;
  z-index: 3;
  padding: .42rem 1.45rem;
  border: 3px solid #fff;
  border-radius: 999px;
  background: linear-gradient(#25e8d3, #10a8b4);
  color: #fff;
  font-size: clamp(.58rem, .8vw, .78rem);
  font-weight: 900;
  letter-spacing: .15em;
  box-shadow: 0 4px 0 var(--teal-deep);
}

.game-logo h1 {
  position: relative;
  z-index: 2;
  margin: -.12rem 0 0;
  line-height: .88;
  transform: rotate(-1.5deg);
  text-wrap: balance;
}

.game-logo h1 span,
.game-logo h1 strong {
  display: block;
  -webkit-text-stroke: 3px #fff;
  paint-order: stroke fill;
  text-shadow:
    0 4px 0 #fff,
    0 8px 0 var(--navy),
    0 13px 0 var(--gold),
    0 17px 18px rgba(33, 67, 92, .28);
}

.game-logo h1 span {
  color: var(--yellow);
  font-size: clamp(2.45rem, 5vw, 4.9rem);
  letter-spacing: .12em;
}

.game-logo h1 strong {
  color: var(--coral);
  font-size: clamp(3.35rem, 6.8vw, 6.4rem);
  letter-spacing: -.08em;
}

.logo-roof {
  position: absolute;
  z-index: 5;
  right: 4%;
  top: 17%;
  width: 76px;
  height: 54px;
  transform: rotate(8deg);
  border: 5px solid #fff;
  border-radius: 9px;
  background: var(--purple);
  box-shadow: 0 5px 0 #6040b6;
  clip-path: polygon(50% 0, 100% 40%, 87% 40%, 87% 100%, 13% 100%, 13% 40%, 0 40%);
}

.logo-coin {
  position: absolute;
  z-index: 6;
  left: 1%;
  bottom: 8%;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 5px solid #fff0a3;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff46e, #ffc928 55%, #e69a00);
  color: #9a6000;
  box-shadow: 0 5px 0 var(--gold);
  font-size: 1.8rem;
}

.hero-center > p {
  margin: 1.55rem auto .7rem;
  max-width: 520px;
  padding: .45rem .9rem;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  background: rgba(33, 67, 92, .72);
  color: #fff;
  font-size: clamp(.82rem, 1.25vw, 1.1rem);
  font-weight: 800;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .9rem;
}

.start-button,
.new-deed-button,
.game-button {
  border: 3px solid #fff;
  font-weight: 900;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.start-button {
  min-width: 240px;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  border-radius: 22px;
  outline: 3px solid #b83c4b;
  background: linear-gradient(180deg, #ff9a87 0%, #ff6f69 55%, #e94e5d 100%);
  box-shadow: var(--shadow-coral), inset 0 3px 0 rgba(255, 255, 255, .42);
  color: #fff;
  font-size: 1.17rem;
  text-shadow: 0 2px 0 #a32f43;
  animation: cta-bounce .72s 1.05s var(--ease-pop) both;
}

.play-triangle {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid #fff;
  filter: drop-shadow(0 2px 0 #a32f43);
}

.new-deed-button {
  min-height: 52px;
  padding: 0 1.15rem;
  border-radius: 18px;
  outline: 3px solid var(--gold);
  background: linear-gradient(#fff272, #ffc92d);
  color: #7e4b00;
  box-shadow: 0 6px 0 var(--gold), 0 11px 18px rgba(56, 92, 110, .2);
}

.start-button:hover,
.new-deed-button:hover,
.game-button:hover {
  transform: translateY(-3px);
  filter: saturate(1.08) brightness(1.03);
}

.start-button:active,
.new-deed-button:active,
.game-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #9d3041;
}

.loading-quest {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: .9rem auto 0;
  padding: .45rem .75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 5px 15px rgba(33, 67, 92, .15);
  color: var(--navy);
  text-align: left;
}

.loading-quest strong,
.loading-quest small {
  display: block;
}

.loading-quest strong { font-size: .76rem; }
.loading-quest small { font-size: .62rem; opacity: .78; }

.loading-dice,
.floating-token.token-die {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 3px solid var(--navy);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 0 rgba(33, 67, 92, .32);
}

.loading-dice i,
.token-die i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.loading-dice i:nth-child(1),
.token-die i:nth-child(1) { left: 6px; top: 6px; }
.loading-dice i:nth-child(2),
.token-die i:nth-child(2) { right: 6px; top: 6px; }
.loading-dice i:nth-child(3),
.token-die i:nth-child(3) { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.loading-dice i:nth-child(4),
.token-die i:nth-child(4) { left: 6px; bottom: 6px; }
.loading-dice i:nth-child(5),
.token-die i:nth-child(5) { right: 6px; bottom: 6px; }
.loading-dice.rolling { animation: dice-roll .72s var(--ease-pop); }

.floating-token {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}

.token-die {
  left: 19%;
  top: 23%;
  transform: rotate(18deg) scale(1.55);
  animation: token-float 4.5s ease-in-out infinite;
}

.token-coin {
  right: 18%;
  top: 34%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 6px solid #fff2a4;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff46e, #ffc724);
  color: #aa6a00;
  box-shadow: 0 5px 0 #d99013;
  font-weight: 900;
  animation: coin-spin 4.8s ease-in-out infinite;
}

.token-deed {
  left: 26%;
  top: 46%;
  width: 55px;
  height: 70px;
  transform: rotate(-12deg);
  border: 5px solid #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffce7, #ffe18a);
  box-shadow: 0 5px 0 var(--gold);
  animation: token-float 5s -2s ease-in-out infinite;
}

.token-deed::after {
  content: "";
  position: absolute;
  inset: 17px 10px;
  border-top: 4px solid var(--coral);
  border-bottom: 4px solid var(--teal);
}

.main-game-menu {
  position: absolute;
  z-index: var(--z-menu);
  left: 50%;
  bottom: 28px;
  width: min(1240px, calc(100% - 48px));
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  transform: translateX(-50%);
  border: 3px solid #fff;
  outline: 3px solid #b83c4b;
  border-radius: 22px;
  background: linear-gradient(180deg, #ff9987, #ff6f69 58%, #e94e5d);
  box-shadow: 0 8px 0 #9d3041, 0 17px 28px rgba(32, 77, 100, .28), inset 0 2px 0 rgba(255, 255, 255, .5);
  overflow: hidden;
}

.main-game-menu button {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: .4rem;
  padding: .72rem .75rem;
  border: 0;
  border-right: 2px solid rgba(163, 47, 67, .35);
  background: transparent;
  color: #fff;
  font-size: .86rem;
  font-weight: 900;
  text-shadow: 0 2px 0 #a32f43;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.main-game-menu button:last-child { border-right: 0; }

.main-game-menu button:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .13);
}

.main-game-menu button.active {
  background: linear-gradient(#fff47d, #ffc62e);
  color: #704400;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

.main-game-menu button i,
.mobile-game-nav i {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 9px;
}

.main-game-menu button i::after,
.mobile-game-nav i::after {
  font-style: normal;
  font-size: .75rem;
}

.menu-map::after { content: "圖"; }
.menu-land::after { content: "地"; }
.menu-store::after { content: "店"; }
.menu-new::after { content: "新"; }
.menu-price::after { content: "↘"; }
.menu-review::after { content: "?"; }
.menu-signal::after { content: "訊"; }
.menu-bag::after { content: "箱"; }

.main-game-menu em {
  min-width: 24px;
  padding: .12rem .35rem;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(132, 38, 56, .28);
  color: inherit;
  font-size: .66rem;
  font-style: normal;
  text-align: center;
}

.sr-menu {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.round-status {
  position: relative;
  z-index: 35;
  width: min(1260px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 1.3fr repeat(6, 1fr);
  gap: .65rem;
  margin: -4px auto 0;
  padding: .9rem;
  border: 3px solid #fff;
  outline: 3px solid var(--teal-deep);
  border-radius: 0 0 28px 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .46) 0 2px, transparent 3px),
    linear-gradient(180deg, #26e3d1, #0aa4af);
  box-shadow: var(--shadow-game);
  color: #fff;
  transition: max-height .3s ease, padding .3s ease, opacity .3s ease;
}

.round-status.collapsed {
  max-height: 0;
  margin-top: 0;
  padding-block: 0;
  overflow: hidden;
  opacity: 0;
  border-width: 0;
  outline-width: 0;
}

.round-title {
  align-self: center;
  padding: .4rem .7rem;
}

.round-title span,
.round-title strong,
.round-title small {
  display: block;
}

.round-title span {
  color: #dcff78;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.round-title strong {
  font-size: 1.15rem;
  text-shadow: 0 2px 0 var(--teal-deep);
}

.round-title small { font-size: .63rem; opacity: .85; }

.round-status article {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: .55rem .6rem;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 16px;
  background: rgba(3, 91, 118, .22);
}

.round-status article i {
  grid-row: 1 / 4;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
}

.round-status article i::after {
  font-style: normal;
  font-size: .7rem;
}

.metric-raw::after { content: "原"; }
.metric-match::after { content: "✓"; }
.metric-land::after { content: "地"; }
.metric-store::after { content: "店"; }
.metric-question::after { content: "?"; }
.metric-signal::after { content: "訊"; }

.round-status article > span { font-size: .7rem; font-weight: 800; opacity: .88; }
.round-status article > b { font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.round-status article > small { font-size: .59rem; opacity: .76; }

main {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 118px) 24px 0;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, .84) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 26%, rgba(255, 216, 74, .32), transparent 22%),
    linear-gradient(180deg, #d9faff 0%, #f6fdff 32%, #fff8d6 68%, #e5fbf1 100%);
  background-size: 38px 38px, auto, auto;
}

main::before,
main::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  border: 34px solid rgba(112, 216, 255, .16);
  border-radius: 50%;
  pointer-events: none;
}

main::before { left: -150px; top: 360px; }
main::after { right: -180px; top: 1220px; border-color: rgba(147, 103, 245, .12); }

.world-section,
.mission-section,
.deed-drawer,
.rules-section {
  position: relative;
  z-index: 2;
  width: min(1440px, 100%);
  margin-inline: auto;
}

.game-section-title {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 auto 2rem;
  color: var(--navy);
  text-align: center;
}

.game-section-title small {
  display: block;
  color: var(--teal-deep);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.game-section-title h2 {
  margin: .15rem 0 0;
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: .02em;
  -webkit-text-stroke: 2px #fff;
  paint-order: stroke fill;
  text-shadow:
    0 0 0 var(--teal-deep),
    0 3px 0 var(--teal-deep),
    0 7px 0 var(--gold),
    0 11px 14px rgba(33, 67, 92, .24);
}

.game-section-title > span {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 15px;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 5px 0 var(--coral-deep);
  font-weight: 900;
}

.title-flag::before {
  content: "";
  width: 24px;
  height: 27px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 14%, 78% 51%, 100% 88%, 0 76%);
}

.title-key::before {
  content: "";
  width: 28px;
  height: 12px;
  border: 5px solid var(--yellow);
  border-radius: 999px;
  box-shadow: 16px 0 0 -2px var(--yellow);
}

.title-scroll::before {
  content: "";
  width: 28px;
  height: 34px;
  border-radius: 6px;
  background: #fff3b2;
  box-shadow: inset 0 0 0 3px var(--gold);
}

.map-stage {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border: 4px solid #fff;
  outline: 4px solid var(--teal-deep);
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(111, 217, 255, .1), rgba(67, 191, 112, .34)),
    image-set(url("/game-ui/yun-chi-world.webp") type("image/webp"), url("/game-ui/yun-chi-world.jpg") type("image/jpeg"));
  background-position: 50% 50%;
  background-size: cover;
  box-shadow: 0 12px 0 var(--teal-deep), 0 25px 45px rgba(30, 82, 106, .24), inset 0 0 0 8px rgba(255, 255, 255, .25);
}

.map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(70, 190, 95, .2) 0 58%, rgba(111, 108, 231, .18) 58% 100%),
    linear-gradient(180deg, transparent 40%, rgba(15, 74, 84, .2));
  pointer-events: none;
}

.map-scenery span {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.map-cloud {
  width: 130px;
  height: 35px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  filter: blur(.2px);
}

.map-cloud.one { left: 6%; top: 9%; }
.map-cloud.two { right: 18%; top: 14%; transform: scale(.7); }

.county-label {
  position: absolute;
  z-index: 5;
  top: 24px;
  display: grid;
  padding: .55rem 1rem;
  border: 3px solid #fff;
  border-radius: 16px;
  color: #fff;
  text-align: center;
}

.county-label b { font-size: 1rem; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.county-label small { font-size: .65rem; font-weight: 800; }
.yunlin-label { left: 4%; background: linear-gradient(#7ee789, #35b557); box-shadow: 0 5px 0 #25823f; }
.chiayi-label { right: 4%; background: linear-gradient(#af8bfa, #7b52db); box-shadow: 0 5px 0 #5737a4; }

.township-route {
  position: absolute;
  z-index: 6;
  inset: 96px 6% 88px;
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.15rem 1.7rem;
  align-items: center;
}

.township-route::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10% 2%;
  border: 14px solid rgba(255, 216, 74, .78);
  border-left-color: var(--coral);
  border-right-color: var(--purple);
  border-radius: 38% 54% 44% 51%;
  filter: drop-shadow(0 5px 0 rgba(33, 67, 92, .18));
}

.township-tile {
  position: relative;
  min-height: 120px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .15rem;
  padding: .7rem .45rem .55rem;
  border: 4px solid #fff;
  outline: 4px solid var(--district-deep);
  border-radius: 29px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, .55) 0 3px, transparent 4px),
    linear-gradient(145deg, #fff, var(--district-soft));
  box-shadow: 0 8px 0 var(--district-deep), 0 14px 21px rgba(25, 67, 87, .2);
  color: var(--district-deep);
  transform: translateY(calc((var(--route-index) % 2) * 18px));
  transition: transform .22s var(--ease-pop), filter .22s ease;
}

.township-tile:nth-child(n+7):nth-child(-n+12) {
  transform: translateY(calc(((var(--route-index) + 1) % 2) * 18px));
}

.township-tile:hover {
  z-index: 12;
  transform: translateY(-6px) scale(1.055);
}

.township-tile.active {
  z-index: 13;
  outline-color: var(--yellow);
  box-shadow: 0 8px 0 var(--gold), 0 0 0 10px rgba(255, 216, 74, .28), 0 18px 28px rgba(25, 67, 87, .25);
  animation: town-select .52s var(--ease-pop);
}

.township-building {
  position: relative;
  width: 46px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 7px 7px 10px 10px;
  background: var(--district-color);
  color: #fff;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12);
}

.township-building::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 48px;
  height: 25px;
  transform: translateX(-50%);
  background: var(--district-deep);
  clip-path: polygon(50% 0, 100% 60%, 88% 60%, 88% 100%, 12% 100%, 12% 60%, 0 60%);
}

.township-building b { position: relative; z-index: 2; font-size: .72rem; }
.township-building i { position: absolute; bottom: 0; width: 11px; height: 18px; background: rgba(255,255,255,.78); }
.township-building i:first-child { left: 6px; height: 10px; bottom: 19px; }
.township-building i:nth-child(2) { right: 6px; height: 10px; bottom: 19px; }

.township-tile strong { font-size: 1rem; }
.township-tile small { font-size: .65rem; font-weight: 700; }
.township-tile small b { font-size: .85rem; }

.route-number {
  position: absolute;
  left: 7px;
  top: 6px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--district-color);
  color: #fff;
  font-size: .58rem;
  font-weight: 900;
}

.new-flag {
  position: absolute;
  right: -9px;
  top: -13px;
  padding: .22rem .45rem;
  border: 2px solid #fff;
  border-radius: 8px 8px 8px 2px;
  background: var(--coral);
  color: #fff;
  font-size: .58rem;
  font-weight: 900;
  box-shadow: 0 3px 0 var(--coral-deep);
  animation: flag-pop 1.6s ease-in-out infinite;
}

.player-pawn {
  position: absolute;
  z-index: 5;
  right: -20px;
  bottom: -17px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 4px 0 var(--gold);
  font-size: 1.25rem;
}

.map-legend {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 19px;
  display: flex;
  gap: 1rem;
  transform: translateX(-50%);
  padding: .55rem .9rem;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(33, 67, 92, .75);
  color: #fff;
  font-size: .69rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.map-legend span { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.map-legend i { width: 12px; height: 12px; border: 2px solid #fff; border-radius: 3px; }
.land-flag { background: var(--grass); }
.store-flag { background: var(--purple); }
.new-mark { background: var(--coral); }
.pawn-mark { background: var(--yellow); border-radius: 50% !important; }

.map-selection {
  position: relative;
  z-index: 12;
  width: min(1120px, calc(100% - 64px));
  min-height: 112px;
  display: grid;
  grid-template-columns: 94px 1.25fr 3fr auto;
  align-items: center;
  gap: 1.2rem;
  margin: -24px auto 0;
  padding: .6rem 1rem .6rem .65rem;
  border: 3px solid #fff;
  outline: 3px solid var(--teal-deep);
  border-radius: 25px;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, .5) 0 2px, transparent 3px),
    linear-gradient(180deg, #23e1cf, #0da3ae);
  box-shadow: var(--shadow-game);
  color: #fff;
}

.map-selection picture {
  height: 96px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 20px;
  background: #bdf7ff;
}

.map-selection picture img {
  width: 100%;
  height: 130%;
  object-fit: contain;
  object-position: 50% 2%;
  transform: translateY(7%) scale(1.25);
}

.selection-copy small,
.selection-copy strong { display: block; }
.selection-copy small { font-size: .7rem; font-weight: 800; opacity: .86; }
.selection-copy strong { font-size: 1.55rem; text-shadow: 0 2px 0 var(--teal-deep); }

.map-selection dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
  margin: 0;
}

.map-selection dl div {
  padding: .58rem .7rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 13px;
  background: rgba(2, 83, 111, .18);
}

.map-selection dt { font-size: .62rem; font-weight: 700; opacity: .8; }
.map-selection dd { margin: .15rem 0 0; font-size: .88rem; font-weight: 900; }

.map-selection > button {
  min-height: 48px;
  padding: 0 1rem;
  border: 3px solid #fff;
  border-radius: 15px;
  background: linear-gradient(#fff27a, #ffc52c);
  color: #754700;
  box-shadow: 0 5px 0 var(--gold);
  font-weight: 900;
}

.mission-section {
  padding-top: clamp(100px, 12vw, 160px);
}

.mission-window {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(220px, 28%) 1fr;
  align-items: end;
  padding: 2rem 2.2rem 2.2rem;
  border: 4px solid #fff;
  outline: 4px solid var(--teal-deep);
  border-radius: 36px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, .55) 0 2px, transparent 3px),
    linear-gradient(145deg, #28e4d1 0 29%, #dffbff 29% 100%);
  box-shadow: 0 12px 0 var(--teal-deep), 0 24px 42px rgba(30, 82, 106, .22);
}

.mission-guide {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 0;
  width: 31%;
  height: 93%;
}

.mission-guide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 8px rgba(33, 67, 92, .2));
}

.mission-dialogue {
  position: absolute;
  z-index: 5;
  left: 19%;
  top: 28px;
  max-width: 330px;
  padding: .8rem 1.1rem;
  border: 3px solid #fff;
  outline: 3px solid var(--teal-deep);
  border-radius: 18px 18px 18px 4px;
  background: #fffdeb;
  color: var(--navy);
  box-shadow: 0 6px 0 rgba(8, 125, 145, .25);
}

.mission-dialogue strong,
.mission-dialogue span { display: block; }
.mission-dialogue strong { font-size: 1.02rem; }
.mission-dialogue span { margin-top: .2rem; font-size: .72rem; }

.mission-cards {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}

.mission-card {
  position: relative;
  min-height: 370px;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: 1.1rem;
  border: 4px solid #fff;
  outline: 4px solid var(--mission-deep);
  border-radius: 30px;
  background:
    radial-gradient(circle at 24% 15%, rgba(255, 255, 255, .46) 0 3px, transparent 4px),
    linear-gradient(145deg, var(--mission-top), var(--mission-bottom));
  box-shadow: 0 10px 0 var(--mission-deep), 0 18px 28px rgba(33, 67, 92, .18);
  color: #fff;
  text-align: left;
  transition: transform .23s var(--ease-pop), filter .2s ease, box-shadow .2s ease;
}

.mission-buy {
  --mission-top: #83e98d;
  --mission-bottom: #32b85a;
  --mission-deep: #217f3d;
}

.mission-rent {
  --mission-top: #b28af9;
  --mission-bottom: #7450dd;
  --mission-deep: #4e339e;
}

.mission-card:hover,
.mission-card.active {
  transform: translateY(-5px) scale(1.025);
  filter: saturate(1.08);
  box-shadow: 0 10px 0 var(--mission-deep), 0 0 0 10px color-mix(in srgb, var(--mission-top) 28%, transparent), 0 23px 33px rgba(33, 67, 92, .22);
}

.mission-card picture {
  position: absolute;
  z-index: 1;
  right: -2%;
  top: 0;
  width: 55%;
  height: 62%;
  pointer-events: none;
}

.mission-card picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 10px 7px rgba(23, 68, 85, .22));
}

.mission-badge {
  position: absolute;
  z-index: 3;
  left: 1rem;
  top: 1rem;
  padding: .35rem .65rem;
  border: 2px solid #fff;
  border-radius: 9px;
  background: rgba(33, 67, 92, .35);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.mission-copy {
  position: relative;
  z-index: 3;
  display: grid;
  gap: .18rem;
  padding: .9rem;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 18px;
  background: rgba(22, 68, 86, .3);
  backdrop-filter: blur(6px);
}

.mission-copy small { font-size: .68rem; font-weight: 800; opacity: .9; }
.mission-copy strong { font-size: 1.28rem; text-shadow: 0 2px 0 rgba(0, 0, 0, .22); }
.mission-copy em { font-size: .78rem; font-style: normal; font-weight: 800; }
.mission-copy b { margin-top: .25rem; font-size: .63rem; opacity: .86; }

.mission-result {
  position: absolute;
  z-index: 4;
  right: 1rem;
  top: 44%;
  min-width: 74px;
  padding: .45rem .6rem;
  border: 3px solid #fff;
  border-radius: 16px;
  background: linear-gradient(#fff079, #ffc52c);
  color: #744600;
  box-shadow: 0 5px 0 var(--gold);
  text-align: center;
}

.mission-result b,
.mission-result small { display: block; }
.mission-result b { font-size: 1.45rem; line-height: 1; }
.mission-result small { font-size: .56rem; }

.mission-latest {
  position: absolute;
  z-index: 4;
  left: 1.8rem;
  bottom: .35rem;
  font-size: .58rem;
  font-weight: 800;
  opacity: .84;
}

.deed-drawer {
  margin-top: clamp(105px, 13vw, 175px);
  padding: 1rem 1.2rem 2rem;
  border: 4px solid #fff;
  outline: 4px solid var(--teal-deep);
  border-radius: 38px 38px 24px 24px;
  background:
    radial-gradient(circle at 10% 4%, rgba(255, 255, 255, .75) 0 3px, transparent 4px),
    linear-gradient(180deg, #d9fbff 0 84px, #f8feff 84px 100%);
  box-shadow: 0 12px 0 var(--teal-deep), 0 26px 48px rgba(30, 82, 106, .23);
  transition: transform .42s var(--ease-pop);
}

.deed-drawer.drawer-active {
  animation: drawer-rise .55s var(--ease-pop);
}

.drawer-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -.45rem 0 .2rem;
}

.drawer-handle > span {
  width: 92px;
  height: 8px;
  border-radius: 999px;
  background: rgba(8, 125, 145, .28);
}

.drawer-handle button {
  position: absolute;
  right: 1.25rem;
  top: .7rem;
  border: 0;
  background: transparent;
  color: var(--teal-deep);
  font-size: .72rem;
  font-weight: 900;
}

.deed-toolbar {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(180px, auto) auto;
  align-items: center;
  gap: 1rem;
  padding: .4rem .5rem 1rem;
  border-bottom: 2px dashed rgba(8, 125, 145, .25);
}

.deed-toolbar p {
  margin: 0;
  color: var(--teal-deep);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.deed-toolbar h2 {
  margin: .12rem 0 0;
  font-size: clamp(1.45rem, 2.5vw, 2.35rem);
  line-height: 1.1;
  text-wrap: balance;
}

.township-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
}

.township-legend span,
.active-inventory .filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .28rem .5rem;
  border: 2px solid var(--district-deep, var(--teal-deep));
  border-radius: 999px;
  background: var(--district-soft, #fff);
  color: var(--district-deep, var(--teal-deep));
  font-size: .63rem;
  font-weight: 800;
}

.township-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--district-color);
}

.deed-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}

.deed-toolbar-actions > span {
  width: 100%;
  color: var(--teal-deep);
  font-size: .72rem;
  font-weight: 900;
  text-align: right;
}

.inventory-button,
.export-button,
.layout-toggle button {
  min-height: 40px;
  border: 2px solid var(--teal-deep);
  border-radius: 12px;
  background: #fff;
  color: var(--teal-deep);
  font-size: .7rem;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(8, 125, 145, .22);
}

.inventory-button { padding: 0 .7rem; }
.export-button { padding: 0 .65rem; background: var(--navy); color: #fff; border-color: #fff; }
.layout-toggle { display: flex; }
.layout-toggle button { border-radius: 0; box-shadow: none; }
.layout-toggle button:first-child { border-radius: 11px 0 0 11px; }
.layout-toggle button:last-child { margin-left: -2px; border-radius: 0 11px 11px 0; }
.layout-toggle button.active { background: var(--teal); color: #fff; }

.active-inventory {
  min-height: 46px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .6rem .5rem;
}

.active-inventory em { color: #6b8292; font-size: .7rem; }
.active-inventory .filter-chip { --district-deep: var(--coral-deep); --district-soft: #fff0ed; }
.filter-chip button { border: 0; background: transparent; color: inherit; font-weight: 900; }

.deed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  padding: .75rem .35rem .25rem;
}

.property-deed {
  --deed-accent: var(--grass);
  --deed-deep: #287e40;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 3px solid #fff;
  outline: 3px solid var(--deed-deep);
  border-radius: 28px;
  background: #fffef6;
  box-shadow: 0 9px 0 var(--deed-deep), 0 16px 25px rgba(33, 67, 92, .18);
}

.property-deed.rent_store {
  --deed-accent: var(--purple);
  --deed-deep: #5d3bb5;
}

.deed-ribbon {
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, .42) 0 2px, transparent 3px),
    linear-gradient(180deg, color-mix(in srgb, var(--deed-accent) 78%, #fff), var(--deed-accent));
  color: #fff;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .1);
}

.deed-ribbon > span {
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.deed-ribbon > div {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.deed-ribbon em {
  font-size: .65rem;
  font-style: normal;
  font-weight: 900;
}

.status-flag {
  padding: .2rem .42rem;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .2);
}

.status-flag.new { background: var(--coral); }
.status-flag.down { background: var(--yellow); color: #785000; }

.deed-picture {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, #e0f6ff 0 16px, #f2fbff 16px 32px);
}

.deed-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.property-deed:hover .deed-photo { transform: scale(1.025); }

.image-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .25rem;
  background: linear-gradient(155deg, #e8fbff, #fff8d8);
  text-align: center;
}

.image-fallback img {
  width: 34%;
  height: 52%;
  object-fit: contain;
  filter: drop-shadow(0 8px 6px rgba(33, 67, 92, .18));
}

.image-fallback strong { color: var(--navy); }
.image-fallback span { font-size: .7rem; color: #627b8d; }
.deed-picture.image-failed .deed-photo { display: none; }
.deed-picture.image-failed .image-fallback { display: flex; }

.district-badge,
.source-badge,
.photo-count {
  position: absolute;
  z-index: 4;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(33, 67, 92, .28);
  backdrop-filter: blur(5px);
}

.district-badge {
  left: .7rem;
  top: .7rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .34rem .58rem;
  border-radius: 12px;
  background: var(--district-color);
  font-size: .73rem;
}

.district-badge i { width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; }
.source-badge { right: .7rem; top: .7rem; padding: .3rem .5rem; border-radius: 9px; background: rgba(33, 67, 92, .78); font-size: .61rem; }
.photo-count { right: .7rem; bottom: .65rem; padding: .22rem .42rem; border-radius: 8px; background: rgba(33, 67, 92, .75); font-size: .6rem; }

.photo-credit {
  position: absolute;
  z-index: 3;
  left: .65rem;
  bottom: .55rem;
  max-width: 68%;
  overflow: hidden;
  padding: .2rem .4rem;
  border-radius: 6px;
  background: rgba(14, 42, 59, .66);
  color: #fff;
  font-size: .54rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(33, 67, 92, .72);
  color: #fff;
  font-size: 1.45rem;
}

.photo-prev { left: .6rem; }
.photo-next { right: .6rem; }

.deed-body { padding: 1rem 1.05rem 1.1rem; }

.deed-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .8rem;
  align-items: start;
}

.deed-title-row p {
  margin: 0 0 .2rem;
  color: var(--district-deep);
  font-size: .65rem;
  font-weight: 800;
}

.deed-title-row h3 {
  min-height: 2.7em;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  text-wrap: pretty;
}

.deed-stamp {
  min-width: 70px;
  padding: .35rem .45rem;
  transform: rotate(-6deg);
  border: 3px solid var(--coral);
  border-radius: 7px;
  color: var(--coral-deep);
  font-size: .69rem;
  font-weight: 900;
  text-align: center;
}

.deed-stamp.review { border-color: #758ba2; color: #50667a; }

.price-console {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.2fr;
  margin-top: .8rem;
  overflow: hidden;
  border: 2px solid rgba(33, 67, 92, .16);
  border-radius: 18px;
  background: #fff;
}

.price-console > div {
  min-width: 0;
  padding: .72rem .7rem;
  border-right: 1px solid rgba(33, 67, 92, .13);
}

.price-console > div:last-child { border-right: 0; }
.price-console small { display: block; color: #687f90; font-size: .6rem; font-weight: 800; }
.price-console strong,
.price-console b { display: block; color: var(--navy); font-size: 1.18rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-console .primary-price strong { color: var(--coral-deep); font-size: 1.6rem; }
.price-console em { margin-left: .16rem; font-size: .58em; font-style: normal; }
.price-console .advantage { background: linear-gradient(145deg, #fff8c6, #ffe98c); }
.price-console .advantage b { color: #a86a00; }

.intel-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  align-items: center;
  margin-top: .72rem;
  padding: .65rem .7rem;
  border-radius: 15px;
  background: #edf7fa;
}

.intel-panel span { display: flex; justify-content: space-between; font-size: .65rem; font-weight: 800; }
.intel-meter { height: 10px; margin-top: .35rem; overflow: hidden; border: 2px solid #fff; border-radius: 999px; background: #c8dde4; box-shadow: inset 0 1px 2px rgba(33,67,92,.2); }
.intel-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--yellow)); }

.price-rank {
  min-width: 62px;
  padding: .3rem .55rem;
  border: 2px solid #fff;
  border-radius: 12px;
  background: linear-gradient(#ffef79, #ffca2e);
  color: #805000;
  box-shadow: 0 3px 0 var(--gold);
  text-align: center;
}

.price-rank small,
.price-rank b { display: block; }
.price-rank small { font-size: .52rem; font-weight: 800; }
.price-rank b { font-size: 1.25rem; line-height: 1; }

.mission-proof {
  margin: .72rem 0;
  padding: .55rem .65rem;
  border-left: 5px solid var(--deed-accent);
  background: color-mix(in srgb, var(--deed-accent) 12%, #fff);
  font-size: .66rem;
  font-weight: 800;
}

.deed-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem .8rem;
  margin: 0;
}

.deed-meta dt { color: #7b8f9d; font-size: .57rem; font-weight: 700; }
.deed-meta dd { margin: .1rem 0 0; font-size: .68rem; font-weight: 800; overflow-wrap: anywhere; }

.deed-actions {
  display: grid;
  grid-template-columns: 1fr auto 44px 54px;
  gap: .45rem;
  margin-top: .9rem;
}

.game-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .7rem;
  border-radius: 14px;
  text-decoration: none;
  font-size: .72rem;
}

.game-button.primary {
  outline: 2px solid #b83c4b;
  background: linear-gradient(#ff9987, #ff6f69 55%, #e94e5d);
  color: #fff;
  box-shadow: 0 5px 0 #9d3041;
  text-shadow: 0 1px 0 #9d3041;
}

.game-button.secondary {
  outline: 2px solid var(--teal-deep);
  background: linear-gradient(#42ead9, #10b7b8);
  color: #fff;
  box-shadow: 0 5px 0 var(--teal-deep);
}

.icon-action {
  min-height: 44px;
  border: 2px solid var(--teal-deep);
  border-radius: 13px;
  background: #fff;
  color: var(--teal-deep);
  font-size: .66rem;
  font-weight: 900;
}

.icon-action.saved { background: var(--yellow); color: #885500; }

.deed-utility {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .7rem;
}

.deed-utility button {
  padding: .28rem .52rem;
  border: 0;
  border-radius: 999px;
  background: #edf2f4;
  color: var(--navy);
  font-size: .61rem;
  font-weight: 800;
}

.deed-utility span { margin-left: auto; color: #9b6900; font-size: .6rem; font-weight: 900; }

.table-wrap {
  overflow: auto;
  padding: .5rem;
  border-radius: 18px;
  background: #fff;
}

table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .75rem; }
th, td { padding: .75rem .65rem; border-bottom: 1px solid #dbe8ed; text-align: left; }
th { position: sticky; top: 0; background: var(--teal-deep); color: #fff; }
td a { color: var(--teal-deep); font-weight: 900; }
.table-location { display: inline-block; padding: .25rem .45rem; border-radius: 8px; background: var(--district-soft); color: var(--district-deep); font-weight: 900; }

.source-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem .4rem;
}

.source-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: .65rem;
  padding: 1rem;
  border: 3px solid #fff;
  outline: 3px solid var(--teal-deep);
  border-radius: 19px;
  background: linear-gradient(145deg, #fff, #eafaff);
  box-shadow: 0 6px 0 var(--teal-deep);
}

.source-orb { width: 16px; height: 16px; margin-top: .2rem; border: 3px solid #fff; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px var(--gold); }
.source-card.success .source-orb { background: var(--grass); box-shadow: 0 0 0 2px #27883f; }
.source-card.blocked .source-orb,
.source-card.error .source-orb { background: var(--coral); box-shadow: 0 0 0 2px var(--coral-deep); }
.source-card b { font-size: .9rem; }
.source-status { float: right; padding: .18rem .35rem; border-radius: 7px; background: var(--navy); color: #fff; font-size: .56rem; font-weight: 900; }
.source-card p { min-height: 2.6em; margin: .5rem 0; font-size: .68rem; }
.source-card small { display: block; color: #718896; font-size: .58rem; }

.game-state {
  grid-column: 1 / -1;
  min-height: 290px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.3rem;
  padding: 2rem;
  border: 3px dashed var(--teal-deep);
  border-radius: 26px;
  background: linear-gradient(145deg, #e7fbff, #fff8d6);
}

.game-state img { width: 180px; height: 210px; object-fit: contain; filter: drop-shadow(0 10px 6px rgba(33,67,92,.18)); }
.game-state strong,
.game-state span { display: block; }
.game-state strong { font-size: 1.25rem; }
.game-state span { max-width: 500px; margin-top: .35rem; font-size: .78rem; }
.error-state { --teal-deep: var(--coral-deep); }

.loading-card {
  min-height: 430px;
  display: grid;
  align-content: start;
  gap: .75rem;
  padding: 1rem;
  border-radius: 24px;
  background: linear-gradient(110deg, #e5f2f5 8%, #f7fbfc 18%, #e5f2f5 33%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s linear infinite;
}

.loading-card i { height: 36px; border-radius: 10px; background: rgba(255,255,255,.7); }
.loading-card i:first-child { height: 250px; }
.loading-card strong { align-self: center; text-align: center; }

.rules-section {
  padding: clamp(100px, 12vw, 150px) 0 130px;
}

.game-section-title.compact { margin-bottom: 1.7rem; }

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 1.2rem;
}

.rule-scroll,
.schedule-scroll {
  position: relative;
  padding: 1.4rem 1.5rem 1.6rem;
  border: 3px solid #fff;
  border-radius: 18px 18px 28px 28px;
  background: linear-gradient(#fffef1, #fff6cd);
  box-shadow: 0 8px 0 var(--gold), 0 15px 24px rgba(33,67,92,.16);
}

.rule-scroll::before,
.schedule-scroll::before {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: -10px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--scroll-color, var(--teal));
  box-shadow: 0 4px 0 var(--scroll-deep, var(--teal-deep));
}

.buy-rule { --scroll-color: var(--grass); --scroll-deep: #2d8d42; }
.rent-rule { --scroll-color: var(--purple); --scroll-deep: #5c3aae; }
.rule-scroll > span,
.schedule-scroll > span { color: var(--scroll-deep, var(--teal-deep)); font-size: .65rem; font-weight: 900; letter-spacing: .1em; }
.rule-scroll h3,
.schedule-scroll h3 { margin: .25rem 0 .65rem; font-size: 1.14rem; }
.rule-scroll ul { margin: 0; padding-left: 1.15rem; }
.rule-scroll li,
.schedule-scroll p { margin: .28rem 0; font-size: .72rem; line-height: 1.7; }
.schedule-scroll button { min-height: 42px; margin-top: .6rem; padding: 0 .8rem; border: 2px solid var(--teal-deep); border-radius: 12px; background: var(--teal); color: #fff; font-weight: 900; }

.game-footer {
  min-height: 138px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem max(24px, calc((100% - 1320px) / 2));
  border-top: 5px solid #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.35) 0 2px, transparent 3px),
    linear-gradient(180deg, #18b9bb, #087d91);
  color: #fff;
}

.game-footer picture { height: 120px; overflow: hidden; }
.game-footer picture img { width: 100%; height: 145%; object-fit: contain; transform: translateY(6%); }
.game-footer strong,
.game-footer span { display: block; }
.game-footer strong { font-size: 1.1rem; }
.game-footer span { font-size: .68rem; opacity: .82; }
.game-footer a { padding: .55rem .8rem; border: 2px solid #fff; border-radius: 12px; font-size: .7rem; font-weight: 900; text-decoration: none; }

.filter-inventory {
  position: fixed;
  z-index: var(--z-overlay);
  top: 0;
  right: 0;
  width: min(520px, 94vw);
  height: 100dvh;
  overflow: auto;
  padding: 1.2rem 1.2rem calc(2rem + env(safe-area-inset-bottom));
  transform: translateX(calc(100% + 20px));
  border-left: 4px solid #fff;
  outline: 4px solid var(--teal-deep);
  background:
    radial-gradient(circle at 20% 5%, rgba(255,255,255,.5) 0 2px, transparent 3px),
    linear-gradient(145deg, #31e5d2, #0fa7b2 32%, #eaffff 32%);
  box-shadow: -20px 0 40px rgba(33,67,92,.25);
  transition: transform .32s var(--ease-pop);
}

.filter-inventory.open { transform: translateX(0); }
.inventory-top { display: flex; justify-content: space-between; align-items: center; color: #fff; }
.inventory-title { display: flex; align-items: center; gap: .8rem; }
.inventory-title small { font-size: .62rem; font-weight: 900; letter-spacing: .13em; }
.inventory-title h2 { margin: 0; font-size: 1.6rem; text-shadow: 0 3px 0 var(--teal-deep); }
.inventory-case { width: 54px; height: 42px; border: 4px solid #fff; border-radius: 12px; background: var(--coral); box-shadow: 0 5px 0 var(--coral-deep); }
.inventory-case::before { content: ""; display: block; width: 24px; height: 9px; margin: -13px auto 0; border: 4px solid #fff; border-bottom: 0; border-radius: 8px 8px 0 0; }
.drawer-close { width: 42px; height: 42px; border: 3px solid #fff; border-radius: 50%; background: var(--coral); color: #fff; box-shadow: 0 4px 0 var(--coral-deep); font-size: 1.3rem; font-weight: 900; }
.filter-inventory > p { margin: 2.4rem 0 .9rem; color: var(--navy); font-size: .7rem; font-weight: 700; }

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  padding: 1rem;
  border: 3px solid #fff;
  outline: 3px solid var(--teal-deep);
  border-radius: 23px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 0 rgba(8,125,145,.32);
}

.filter-grid label { display: grid; gap: .3rem; color: var(--navy); font-size: .65rem; font-weight: 800; }
.filter-grid select,
.filter-grid input {
  width: 100%;
  min-height: 44px;
  border: 2px solid #aacbd6;
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  padding: .5rem .65rem;
}
.checkbox-label { grid-column: 1 / -1; grid-template-columns: 26px 1fr !important; align-items: center; }
.checkbox-label input { min-height: 24px; }
.inventory-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: .7rem; margin-top: 1rem; }

.filter-backdrop {
  position: fixed;
  z-index: calc(var(--z-overlay) - 1);
  inset: 0;
  visibility: hidden;
  opacity: 0;
  background: rgba(18, 55, 74, .56);
  backdrop-filter: blur(4px);
  transition: opacity .25s ease, visibility .25s ease;
}

.filter-backdrop.open { visibility: visible; opacity: 1; }
body.drawer-open { overflow: hidden; }

.mobile-game-nav { display: none; }

dialog {
  width: min(620px, calc(100% - 32px));
  max-height: 82dvh;
  overflow: auto;
  padding: 1.5rem;
  border: 4px solid #fff;
  outline: 4px solid var(--teal-deep);
  border-radius: 26px;
  background: linear-gradient(145deg, #effcff, #fff9da);
  color: var(--navy);
  box-shadow: 0 12px 0 var(--teal-deep), 0 30px 70px rgba(12,53,72,.35);
}

dialog::backdrop { background: rgba(20, 57, 74, .58); backdrop-filter: blur(4px); }
.modal-close { position: absolute; right: .75rem; top: .75rem; width: 38px; height: 38px; border: 2px solid #fff; border-radius: 50%; background: var(--coral); color: #fff; box-shadow: 0 3px 0 var(--coral-deep); font-size: 1.2rem; }
dialog textarea { width: 100%; min-height: 180px; padding: .75rem; border: 2px solid #9fc4cf; border-radius: 14px; resize: vertical; }
.save-note { min-height: 46px; margin-top: .7rem; padding: 0 1rem; border: 3px solid #fff; border-radius: 14px; outline: 2px solid var(--teal-deep); background: var(--teal); color: #fff; box-shadow: 0 5px 0 var(--teal-deep); font-weight: 900; }
.history-list { margin: 1rem 0 0; padding: 0; list-style: none; }
.history-list li { display: flex; justify-content: space-between; padding: .7rem 0; border-bottom: 1px solid var(--line); }

.game-toast {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: 28px;
  max-width: min(460px, calc(100% - 32px));
  transform: translate(-50%, 130%);
  padding: .8rem 1.15rem;
  border: 3px solid #fff;
  outline: 3px solid var(--teal-deep);
  border-radius: 16px;
  background: linear-gradient(#33e5d2, #0aa4af);
  color: #fff;
  box-shadow: 0 7px 0 var(--teal-deep), 0 15px 26px rgba(20,70,88,.25);
  font-size: .76rem;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  transition: transform .3s var(--ease-pop), opacity .3s ease;
}

.game-toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes cloud-drift {
  to { transform: translateX(46px) scale(var(--cloud-scale, 1)); }
}

@keyframes logo-drop {
  from { opacity: 0; transform: translateY(-60px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hero-enter {
  from { opacity: 0; transform: translate(-50%, 45px) scale(.86); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes side-enter-left {
  from { opacity: 0; transform: translateX(-80px) rotate(-5deg); }
  to { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes side-enter-right {
  from { opacity: 0; transform: translateX(80px) rotate(5deg); }
  to { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes cta-bounce {
  0% { opacity: 0; transform: translateY(18px) scale(.92); }
  72% { opacity: 1; transform: translateY(-7px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes token-float {
  50% { transform: translateY(-13px) rotate(7deg); }
}

@keyframes coin-spin {
  0%, 100% { transform: rotateY(0) translateY(0); }
  50% { transform: rotateY(180deg) translateY(-12px); }
}

@keyframes dice-roll {
  0% { transform: rotate(0) scale(1); }
  55% { transform: rotate(225deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes town-select {
  0% { transform: scale(.85); }
  65% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes flag-pop {
  50% { transform: translateY(-3px) rotate(2deg); }
}

@keyframes drawer-rise {
  from { opacity: .35; transform: translateY(90px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes skeleton-shimmer {
  to { background-position-x: -200%; }
}

@media (min-width: 1760px) {
  .hero-center { top: 145px; }
  .character-layer { top: 14%; }
  .deed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .township-route { grid-template-columns: repeat(7, minmax(110px, 1fr)); }
}

@media (max-width: 1180px) {
  .hero-scene { min-height: 820px; }
  .player-panel { width: 410px; }
  .player-stats { grid-template-columns: repeat(2, 1fr); }
  .player-panel { grid-template-columns: 72px 96px 1fr; }
  .hero-center { top: 145px; }
  .character.yunbao { left: 1%; }
  .character.jiajia { right: 1%; }
  .main-game-menu { width: calc(100% - 28px); }
  .main-game-menu button { grid-template-columns: 1fr; justify-items: center; padding-inline: .25rem; }
  .main-game-menu button i { width: 24px; height: 24px; }
  .main-game-menu button em { position: absolute; right: 7px; top: 7px; }
  .round-status { grid-template-columns: repeat(3, 1fr); }
  .round-title { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .township-route { grid-template-columns: repeat(5, minmax(105px, 1fr)); inset-inline: 4%; }
  .map-stage { min-height: 760px; }
  .map-selection { grid-template-columns: 80px 1fr 2.3fr; }
  .map-selection > button { grid-column: 2 / 4; justify-self: end; margin-top: -8px; }
  .mission-window { grid-template-columns: 22% 1fr; }
  .mission-guide { width: 26%; }
  .mission-dialogue { left: 13%; }
  .mission-cards { gap: .9rem; }
  .deed-toolbar { grid-template-columns: 1fr auto; }
  .township-legend { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .source-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 1rem; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .hero-scene { min-height: 710px; }
  .top-hud { left: 12px; top: 12px; }
  .round-chip { min-width: 0; width: 235px; grid-template-columns: 36px 1fr; padding: .5rem .65rem; }
  .round-chip .online-state { grid-column: 1 / 3; padding: .3rem 0 0; border: 0; border-top: 1px solid rgba(255,255,255,.35); }
  .calendar-icon { width: 33px; height: 32px; }
  .hud-toggle { padding: .55rem .7rem; font-size: .7rem; }
  .player-panel { top: 12px; right: 12px; width: 195px; min-height: 78px; grid-template-columns: 55px 1fr; grid-template-rows: 1fr; padding: .5rem; }
  .player-avatar { grid-row: 1; }
  .player-name { display: block; }
  .player-name strong { font-size: 1rem; }
  .player-name span { font-size: .55rem; }
  .player-stats,
  .intel-progress { display: none; }
  .hero-center { top: 112px; width: min(600px, 82vw); }
  .game-logo h1 span { font-size: 2.7rem; }
  .game-logo h1 strong { font-size: 3.8rem; }
  .character-layer { inset: 24% 0 72px; }
  .character.shark-boss { width: 310px; height: 69%; }
  .character.yunbao { width: 210px; height: 54%; left: -3%; }
  .character.jiajia { width: 200px; height: 54%; right: -3%; }
  .token-die { left: 7%; top: 30%; }
  .token-coin { right: 8%; top: 41%; }
  .token-deed { display: none; }
  .hero-center > p { margin-top: 1.25rem; }
  .loading-quest { display: none; }
  .main-game-menu { bottom: 20px; display: flex; overflow-x: auto; justify-content: flex-start; scroll-snap-type: x mandatory; }
  .main-game-menu button { flex: 0 0 116px; min-height: 64px; scroll-snap-align: start; }
  .round-status { width: calc(100% - 24px); grid-template-columns: repeat(3, 1fr); padding: .6rem; }
  .round-status article { min-height: 64px; grid-template-columns: 25px 1fr; }
  .round-status article i { width: 24px; height: 24px; }
  .round-status article > b { font-size: 1.22rem; }
  main { padding: 80px 14px 0; }
  .map-stage { min-height: 700px; overflow-x: auto; }
  .township-route { width: 1040px; grid-template-columns: repeat(6, 140px); inset: 96px auto 85px 38px; }
  .map-stage::after { width: 1120px; }
  .map-legend { position: sticky; left: 16px; transform: none; width: max-content; }
  .chiayi-label { right: auto; left: 890px; width: 140px; }
  .map-selection { width: calc(100% - 28px); grid-template-columns: 70px 1fr; gap: .7rem; }
  .map-selection picture { height: 76px; }
  .map-selection dl { grid-column: 1 / 3; grid-template-columns: repeat(2, 1fr); }
  .map-selection > button { grid-column: 1 / 3; width: 100%; margin: 0; }
  .mission-window { min-height: auto; display: block; padding: 1rem; background: linear-gradient(145deg, #25dfcc, #dffbff 28%); }
  .mission-guide,
  .mission-dialogue { display: none; }
  .mission-cards { grid-template-columns: 1fr; }
  .mission-card { min-height: 330px; }
  .deed-grid { grid-template-columns: 1fr; }
  .deed-toolbar { grid-template-columns: 1fr; }
  .township-legend { grid-row: auto; }
  .deed-toolbar-actions { justify-content: flex-start; }
  .deed-toolbar-actions > span { width: auto; margin-right: auto; text-align: left; }
  .rules-grid { grid-template-columns: 1fr; }
  .game-footer { grid-template-columns: 70px 1fr; }
  .game-footer a { grid-column: 2; width: fit-content; }
  .mobile-game-nav {
    position: fixed;
    z-index: 70;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    min-height: 66px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 3px solid #fff;
    outline: 3px solid var(--teal-deep);
    border-radius: 21px;
    background: linear-gradient(#22dbc9, #0ba4af);
    box-shadow: 0 7px 0 var(--teal-deep), 0 14px 25px rgba(20,61,80,.28);
  }
  .mobile-game-nav button { position: relative; display: grid; justify-items: center; align-content: center; gap: .12rem; border: 0; background: transparent; color: #fff; font-size: .57rem; font-weight: 900; }
  .mobile-game-nav button.active { color: var(--yellow); transform: translateY(-5px); }
  .mobile-game-nav i { width: 27px; height: 27px; }
  .mobile-game-nav em { position: absolute; right: 10px; top: 6px; min-width: 18px; padding: .08rem .2rem; border: 2px solid #fff; border-radius: 999px; background: var(--coral); color: #fff; font-size: .5rem; font-style: normal; }
  .game-toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  .hero-scene { min-height: 680px; }
  .top-hud { right: 10px; }
  .round-chip { width: 176px; grid-template-columns: 31px 1fr; gap: .4rem; }
  .round-chip strong { font-size: .7rem; }
  .round-chip small,
  .online-state { font-size: .55rem; }
  .calendar-icon { width: 29px; height: 29px; border-width: 2px; }
  .hud-toggle { display: none; }
  .player-panel { width: 151px; min-height: 64px; grid-template-columns: 48px 1fr; border-width: 2px; outline-width: 2px; }
  .player-name small { font-size: .5rem; }
  .player-name strong { font-size: .85rem; }
  .player-name span { font-size: .48rem; }
  .hero-center { top: 120px; width: 95vw; }
  .logo-ribbon { font-size: .48rem; padding: .32rem .8rem; }
  .game-logo h1 span { font-size: 2.05rem; -webkit-text-stroke-width: 2px; }
  .game-logo h1 strong { font-size: 3.05rem; -webkit-text-stroke-width: 2px; }
  .logo-roof { width: 48px; height: 38px; border-width: 3px; right: 0; }
  .logo-coin { width: 42px; height: 42px; border-width: 3px; font-size: 1.2rem; }
  .hero-center > p { width: 88%; margin-top: 1.05rem; font-size: .72rem; }
  .hero-actions { gap: .55rem; }
  .start-button { min-width: 190px; min-height: 52px; font-size: .91rem; border-width: 2px; outline-width: 2px; }
  .new-deed-button { min-height: 46px; padding-inline: .7rem; border-width: 2px; outline-width: 2px; font-size: .68rem; }
  .character-layer { inset: 27% 0 70px; }
  .character.shark-boss { width: 220px; height: 62%; }
  .character.yunbao { width: 140px; height: 46%; left: -5%; }
  .character.jiajia { width: 135px; height: 46%; right: -5%; }
  .token-die { left: 5%; top: 32%; transform: scale(.85) rotate(14deg); }
  .token-coin { right: 6%; top: 43%; transform: scale(.8); }
  .main-game-menu { display: none; }
  .round-status { margin-top: 0; grid-template-columns: repeat(2, 1fr); border-radius: 0 0 24px 24px; }
  .round-title { grid-column: 1 / -1; display: block; }
  .round-title small { margin-top: .2rem; }
  .round-status article { min-height: 58px; }
  main { padding-top: 72px; }
  .game-section-title { gap: .5rem; margin-bottom: 1.4rem; }
  .game-section-title h2 { font-size: 1.55rem; -webkit-text-stroke-width: 1px; text-shadow: 0 2px 0 var(--teal-deep), 0 5px 0 var(--gold); }
  .game-section-title > span { width: 40px; height: 40px; border-width: 2px; border-radius: 12px; }
  .map-stage { min-height: 580px; border-width: 3px; outline-width: 3px; border-radius: 26px; }
  .township-route { width: 940px; grid-template-columns: repeat(6, 125px); grid-auto-rows: 120px; inset: 82px auto 70px 25px; gap: .8rem 1rem; }
  .township-tile { min-height: 104px; border-width: 3px; outline-width: 3px; border-radius: 24px; }
  .township-building { width: 40px; height: 34px; }
  .county-label { top: 17px; font-size: .8rem; }
  .map-legend { bottom: 12px; gap: .6rem; font-size: .57rem; }
  .map-selection { grid-template-columns: 62px 1fr; width: calc(100% - 18px); border-width: 2px; outline-width: 2px; padding: .5rem; }
  .map-selection picture { height: 62px; border-width: 2px; }
  .selection-copy strong { font-size: 1.18rem; }
  .map-selection dl { gap: .35rem; }
  .map-selection dl div { padding: .45rem .5rem; }
  .map-selection dd { font-size: .73rem; }
  .mission-section { padding-top: 95px; }
  .mission-window { border-width: 3px; outline-width: 3px; border-radius: 28px; }
  .mission-card { min-height: 315px; border-width: 3px; outline-width: 3px; }
  .mission-card picture { width: 51%; height: 56%; }
  .mission-copy strong { font-size: 1.03rem; }
  .mission-result { top: 39%; }
  .deed-drawer { margin-top: 105px; padding: .8rem .65rem 1.2rem; border-width: 3px; outline-width: 3px; border-radius: 28px 28px 18px 18px; }
  .deed-toolbar { padding-inline: .15rem; }
  .deed-toolbar-actions { gap: .35rem; }
  .inventory-button { order: 2; width: 100%; }
  .layout-toggle { order: 3; }
  .export-button { order: 4; }
  .deed-grid { padding-inline: .15rem; gap: 1.25rem; }
  .property-deed { border-width: 2px; outline-width: 2px; border-radius: 22px; }
  .deed-ribbon { min-height: 44px; }
  .deed-picture { aspect-ratio: 4 / 3; }
  .deed-body { padding: .85rem; }
  .deed-title-row h3 { font-size: .98rem; }
  .deed-stamp { min-width: 60px; font-size: .58rem; }
  .price-console { grid-template-columns: 1fr 1fr; }
  .price-console .primary-price { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid rgba(33,67,92,.13); }
  .price-console .primary-price strong { font-size: 1.45rem; }
  .deed-meta { grid-template-columns: 1fr; }
  .deed-actions { grid-template-columns: 1fr 1fr 44px; }
  .deed-actions .copy-deed { grid-column: 1 / -1; min-height: 40px; }
  .source-list { grid-template-columns: 1fr; }
  .game-state { min-height: 260px; flex-direction: column; text-align: center; }
  .game-state img { width: 130px; height: 150px; }
  .rules-section { padding-top: 95px; }
  .game-footer { grid-template-columns: 58px 1fr; padding-inline: 14px; }
  .game-footer picture { height: 90px; }
  .filter-inventory { width: 100%; padding-inline: .85rem; }
  .filter-grid { grid-template-columns: 1fr; }
  .checkbox-label { grid-column: auto; }
  .inventory-actions { grid-template-columns: 1fr; }
  dialog { padding: 1rem; }
}

@media (max-width: 370px) {
  .round-chip { width: 165px; }
  .player-panel { width: 140px; }
  .game-logo h1 strong { font-size: 2.75rem; }
  .start-button { min-width: 174px; }
  .new-deed-button { padding-inline: .55rem; }
  .mobile-game-nav { left: 6px; right: 6px; }
  .mobile-game-nav span { font-size: .5rem; }
}

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