:root {
  /* 标头位置只改这里：
     x 控制左右，数值小往左，数值大往右。
     y 控制上下，数值小往上，数值大往下。 */
  --hud-title-y: 11.3%;
  --hud-stats-y: 49%;
  --hud-stats-h: 24%;
  --hud-value-y: 0%;
  --hud-money-x: 36%;
  --hud-money-w: 8%;
  --hud-shovel-x: 58%;
  --hud-shovel-w: 12.4%;
  --hud-bag-x: 85%;
  --hud-bag-w: 10.2%;
  --hud-number-size: 16px;
  --hud-level-lv-size: 12px;
  --hud-level-num-size: 30px;

  color-scheme: light;
  --ink: #17202a;
  --muted: #5f6872;
  --paper: #fbf7ec;
  --panel: #fffdf6;
  --line: rgba(23, 32, 42, 0.14);
  --accent: #0d8f8b;
  --accent-strong: #076b68;
  --gold: #d99618;
  --danger: #c84630;
  --shadow: 0 24px 70px rgba(19, 30, 38, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(137, 207, 205, 0.24), transparent 38%),
    #efe7d4;
}

button {
  min-height: 38px;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

button:hover:not(:disabled) {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
}

.play-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #e9d9b2;
}

.topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  background: rgba(255, 253, 246, 0.74);
  box-shadow: 0 14px 40px rgba(19, 30, 38, 0.16);
  pointer-events: none;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stats span,
.dig-status,
.tag {
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.stats span {
  padding: 8px 10px;
}

#game {
  width: 100%;
  height: 100%;
  display: block;
  background: #ead49b;
  cursor: crosshair;
}

.floating-hints {
  position: absolute;
  top: 126px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(760px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.hint-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.hint-strip span {
  padding: 7px 10px;
  color: var(--muted);
}

.side-panel {
  position: absolute;
  left: auto;
  right: 16px;
  top: 132px;
  z-index: 4;
  display: grid;
  gap: 10px;
  width: max-content;
  pointer-events: none;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  pointer-events: auto;
}

.quick-actions button {
  min-width: 74px;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(13, 143, 139, 0.9);
  box-shadow: 0 10px 26px rgba(19, 30, 38, 0.16);
  backdrop-filter: blur(12px);
}

.quick-actions button.is-active {
  color: var(--ink);
  background: rgba(255, 211, 94, 0.94);
}

.panel-section {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 100;
  display: none;
  width: min(520px, calc(100vw - 32px));
  max-height: min(70vh, 620px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 12px;
  background: rgba(255, 253, 246, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.panel-section.is-active {
  display: block;
}

.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(23, 32, 42, 0.18);
  pointer-events: auto;
}

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

.inventory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.inventory-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.objective {
  flex: 1;
  min-height: 0;
  margin: 0;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 999px;
  padding: 9px 13px;
  color: #24313a;
  background: rgba(255, 253, 246, 0.8);
  box-shadow: 0 12px 30px rgba(19, 30, 38, 0.12);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(12px);
}

.dig-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef8f5;
  color: #10605e;
  box-shadow: 0 12px 30px rgba(19, 30, 38, 0.12);
}

.inventory,
.upgrades,
.areas,
.merchant,
.storage {
  display: grid;
  gap: 9px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.52);
}

.row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
  font-weight: 900;
}

.row-meta {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: var(--accent-strong);
  background: #e7f5f2;
}

.loot-modal,
.rare-show {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 90;
}

.loot-modal {
  background: rgba(10, 18, 22, 0.56);
}

.hidden {
  display: none;
}

.loot-card {
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  background: #fffdf6;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}

.loot-rarity {
  margin-bottom: 8px;
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}

.loot-card h2 {
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.loot-card p {
  color: var(--muted);
}

.loot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

#keepLootBtn {
  color: var(--ink);
  background: #f1d36a;
}

.rare-show {
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 248, 185, 0.84), rgba(14, 23, 28, 0.72));
  animation: rareFade 2.4s ease forwards;
}

.rare-rays {
  position: absolute;
  width: 160vmax;
  height: 160vmax;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.9),
      transparent 9deg,
      rgba(255, 213, 79, 0.8) 18deg,
      transparent 28deg
    );
  animation: spin 2.4s linear infinite;
}

.rare-core {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 34px 44px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  color: #fff;
  background: rgba(18, 35, 45, 0.86);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  transform: scale(0.9);
  animation: pop 700ms cubic-bezier(0.2, 1.3, 0.3, 1) forwards;
}

.rare-core span {
  font-size: 1rem;
  font-weight: 900;
}

.rare-core strong {
  font-size: clamp(2rem, 6vw, 5rem);
  letter-spacing: 0;
}

@keyframes rareFade {
  0%,
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes pop {
  to {
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .topbar {
    right: auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }

  .topbar > div:first-child {
    display: none;
  }

  .stats {
    justify-content: flex-end;
  }

  .floating-hints {
    top: 112px;
    align-items: center;
    flex-direction: column;
  }

.dig-status {
  align-self: center;
  }
}

.mobile-controls {
  position: absolute;
  inset: auto 0 0;
  z-index: 5;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.mobile-controls.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.move-stick {
  position: absolute;
  left: 18px;
  bottom: 92px;
  width: 116px;
  height: 116px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.34);
  box-shadow: 0 16px 40px rgba(19, 30, 38, 0.18);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  touch-action: none;
}

.move-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(13, 143, 139, 0.88);
  box-shadow: 0 8px 18px rgba(19, 30, 38, 0.22);
  transform: translate(-50%, -50%);
}

.mobile-interact,
.mobile-dash {
  position: absolute;
  right: 18px;
  width: 82px;
  height: 82px;
  min-height: 82px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 0;
  background: rgba(216, 150, 26, 0.94);
  box-shadow: 0 16px 40px rgba(19, 30, 38, 0.22);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  touch-action: manipulation;
}

.mobile-interact {
  bottom: 124px;
}

.mobile-dash {
  bottom: 214px;
  background: rgba(91, 170, 78, 0.94);
}

@media (max-width: 980px), (pointer: coarse) {
  .side-panel {
    left: auto;
    right: 12px;
    top: 132px;
  }

  .quick-actions button {
    min-width: 64px;
    min-height: 38px;
    padding: 0 10px;
  }

  .mobile-controls {
    display: block;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .topbar {
    top: 8px;
    left: 8px;
    padding: 8px 10px;
  }

  .floating-hints {
    top: 76px;
    width: min(620px, calc(100vw - 180px));
  }

  .objective,
  .dig-status {
    font-size: 0.78rem;
    min-height: 32px;
    padding: 7px 10px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .inventory-actions {
    justify-content: flex-start;
  }

  .side-panel {
    left: auto;
    top: 100px;
    right: 10px;
  }
}

/* Panda sticker UI theme, matched to the user's red panda reference art. */
:root {
  --panda-ink: #3f2b12;
  --panda-line: #3b270f;
  --panda-gold: #ffd63d;
  --panda-orange: #f2a018;
  --panda-brown: #b9621d;
  --panda-cream: #fff3cf;
  --panda-mint: #90b326;
}

body {
  color: var(--panda-ink);
  background: #f4cd72;
}

button {
  border: 3px solid var(--panda-line);
  border-radius: 14px;
  color: var(--panda-line);
  background: linear-gradient(180deg, #ffe279 0%, #f1a51d 100%);
  box-shadow: 0 5px 0 #7a4416, 0 12px 24px rgba(61, 38, 14, 0.18);
  text-shadow: 0 1px rgba(255, 255, 255, 0.34);
}

button:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff0a1 0%, #ffb52a 100%);
  transform: translateY(-2px);
}

button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #7a4416, 0 8px 18px rgba(61, 38, 14, 0.18);
}

.topbar {
  top: 14px;
  left: 14px;
  right: 14px;
  border: 4px solid var(--panda-line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 246, 203, 0.96), rgba(255, 209, 62, 0.92));
  box-shadow: 0 7px 0 rgba(122, 68, 22, 0.8), 0 18px 34px rgba(62, 39, 15, 0.18);
}

.topbar::before {
  content: "";
  width: 38px;
  height: 38px;
  border: 3px solid var(--panda-line);
  border-radius: 999px;
  background: radial-gradient(circle at 48% 42%, #fff3cf 0 18%, #3b270f 19% 38%, #b9621d 39% 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.audio-mute {
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.74rem;
  pointer-events: auto;
}

.audio-mute.is-muted {
  background: linear-gradient(180deg, #fff3cf, #b9b2a1);
}

.special-idle-gif {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
  transform-origin: center center;
  will-change: left, top, width, height, transform;
}

.special-idle-gif.hidden {
  display: none !important;
}

.eyebrow {
  color: #7d4d14;
}

h1,
h2 {
  color: var(--panda-line);
  text-shadow: 0 2px rgba(255, 255, 255, 0.55);
}

.stats span,
.dig-status,
.tag {
  border: 3px solid var(--panda-line);
  color: var(--panda-line);
  background: var(--panda-cream);
  box-shadow: 0 3px 0 rgba(122, 68, 22, 0.55);
}

.stats span:nth-child(1) {
  background: var(--panda-gold);
}

.stats span:nth-child(2) {
  background: #a5c736;
}

.floating-hints {
  top: 128px;
}

.objective {
  max-width: 680px;
  border: 4px solid var(--panda-line);
  border-radius: 8px;
  color: var(--panda-line);
  background: linear-gradient(180deg, rgba(255, 251, 223, 0.96), rgba(255, 225, 129, 0.94));
  box-shadow: 0 6px 0 rgba(122, 68, 22, 0.7), 0 14px 28px rgba(62, 39, 15, 0.16);
}

.dig-status {
  background: linear-gradient(180deg, #e9f7c0, #9fbe28);
}

.quick-actions button {
  min-width: 82px;
  border-color: var(--panda-line);
  background: linear-gradient(180deg, #ffe279, #f2a018);
  box-shadow: 0 5px 0 #7a4416, 0 12px 24px rgba(62, 39, 15, 0.18);
}

.quick-actions button.is-active {
  background: linear-gradient(180deg, #fff3cf, #ffcf3d);
}

.panel-section {
  border: 5px solid var(--panda-line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 244, 196, 0.98), rgba(255, 220, 105, 0.96));
  box-shadow: 0 9px 0 rgba(122, 68, 22, 0.85), 0 30px 80px rgba(45, 28, 10, 0.26);
}

.panel-section h2,
.section-title h2 {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 12px;
  border: 3px solid var(--panda-line);
  border-radius: 8px;
  padding: 4px 12px;
  background: var(--panda-orange);
  box-shadow: 0 4px 0 #7a4416;
}

.panel-backdrop {
  background: rgba(63, 43, 18, 0.32);
}

.row {
  border: 3px solid var(--panda-line);
  border-radius: 8px;
  background: rgba(255, 243, 207, 0.92);
  box-shadow: 0 4px 0 rgba(122, 68, 22, 0.45);
}

.row-title {
  color: var(--panda-line);
  font-weight: 950;
}

.row-meta {
  color: #7a4416;
  font-weight: 750;
}

.tag {
  min-height: 24px;
  padding: 2px 8px;
  background: #a5c736;
}

.loot-modal {
  background: rgba(63, 43, 18, 0.46);
}

.loot-card {
  border: 5px solid var(--panda-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff3cf, #ffd63d);
  box-shadow: 0 9px 0 rgba(122, 68, 22, 0.85), 0 32px 90px rgba(45, 28, 10, 0.34);
}

.rare-core {
  border: 5px solid var(--panda-line);
  border-radius: 8px;
  color: var(--panda-line);
  background: linear-gradient(180deg, #fff3cf, #ffd63d);
  text-shadow: 0 2px rgba(255, 255, 255, 0.55);
  box-shadow: 0 9px 0 rgba(122, 68, 22, 0.85);
}

.move-stick {
  border: 5px solid var(--panda-line);
  background: rgba(255, 243, 207, 0.72);
  box-shadow: 0 7px 0 rgba(122, 68, 22, 0.7), 0 18px 34px rgba(62, 39, 15, 0.18);
}

.move-knob {
  border: 4px solid var(--panda-line);
  background: linear-gradient(180deg, #ffe279, #f2a018);
}

.mobile-interact,
.mobile-dash {
  border: 5px solid var(--panda-line);
  color: var(--panda-line);
  background: linear-gradient(180deg, #ffdf62, #d96b1a);
  box-shadow: 0 7px 0 #7a4416, 0 18px 34px rgba(62, 39, 15, 0.2);
}

.mobile-dash {
  background: linear-gradient(180deg, #dff1a0, #6dbf55);
}

@media (max-width: 980px), (pointer: coarse) {
  .topbar {
    top: 10px;
    left: 10px;
    right: auto;
    max-width: calc(100vw - 112px);
  }

  .floating-hints {
    top: 116px;
    width: min(620px, calc(100vw - 28px));
  }

  .objective {
    border-width: 3px;
    font-size: 0.82rem;
  }
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    top: env(safe-area-inset-top, 0);
    left: 8px;
    right: 86px;
    width: auto;
    max-width: none;
    min-height: 44px;
    padding: 7px 8px;
    border-width: 3px;
    box-shadow: 0 4px 0 rgba(122, 68, 22, 0.78), 0 12px 22px rgba(62, 39, 15, 0.14);
  }

  .topbar::before {
    width: 28px;
    height: 28px;
    border-width: 2px;
    flex: 0 0 auto;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
  }

  .stats span {
    min-width: 0;
    padding: 5px 6px;
    overflow: hidden;
    font-size: clamp(0.58rem, 2.6vw, 0.72rem);
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-width: 2px;
    box-shadow: 0 2px 0 rgba(122, 68, 22, 0.55);
  }

  .side-panel {
    top: max(8px, env(safe-area-inset-top, 0px));
    right: 8px;
    z-index: 6;
  }

  .quick-actions {
    gap: 6px;
  }

  .quick-actions button {
    min-width: 64px;
    min-height: 34px;
    padding: 0 8px;
    border-width: 3px;
    border-radius: 12px;
    font-size: 0.78rem;
    box-shadow: 0 3px 0 #7a4416, 0 8px 16px rgba(62, 39, 15, 0.16);
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + 58px);
    left: 8px;
    right: 8px;
    width: auto;
    gap: 5px;
    align-items: center;
    transform: none;
  }

  .objective {
    width: min(100%, 520px);
    max-width: calc(100vw - 16px);
    padding: 6px 9px;
    border-width: 3px;
    font-size: clamp(0.66rem, 2.8vw, 0.78rem);
    line-height: 1.22;
    box-shadow: 0 4px 0 rgba(122, 68, 22, 0.65), 0 10px 20px rgba(62, 39, 15, 0.13);
  }

  .dig-status {
    min-height: 28px;
    padding: 4px 9px;
    border-width: 2px;
    font-size: clamp(0.62rem, 2.7vw, 0.76rem);
    line-height: 1.1;
    box-shadow: 0 2px 0 rgba(122, 68, 22, 0.48);
  }

  .panel-section {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 72px);
    padding: 10px;
    border-width: 4px;
  }

  .panel-section h2,
  .section-title h2 {
    min-height: 32px;
    margin-bottom: 8px;
    padding: 3px 9px;
    border-width: 2px;
    font-size: 0.92rem;
  }

  .section-title {
    gap: 8px;
    align-items: flex-start;
    flex-direction: column;
  }

  .inventory-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 5px;
  }

  .inventory-actions button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
    padding: 8px;
    border-width: 2px;
  }

  .row > button {
    justify-self: end;
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .row-title {
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .row-meta {
    font-size: 0.74rem;
  }

  .tag {
    min-height: 20px;
    padding: 2px 6px;
    font-size: 0.64rem;
    border-width: 2px;
  }

  .loot-card {
    width: calc(100vw - 28px);
    padding: 18px;
    border-width: 4px;
  }

  .loot-actions {
    gap: 8px;
  }

  .move-stick {
    left: max(14px, env(safe-area-inset-left, 0px));
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: 104px;
    height: 104px;
    border-width: 4px;
  }

  .move-knob {
    width: 42px;
    height: 42px;
  }

  .mobile-interact {
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    width: 74px;
    height: 74px;
    min-height: 74px;
    border-width: 4px;
    font-size: 0.82rem;
  }
}

.home-screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: #e8c391 url("assets/home-bg.png") center center / cover no-repeat;
  backdrop-filter: none;
  pointer-events: auto;
}

.home-card {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  padding: calc(env(safe-area-inset-top, 0px) + 86px) max(18px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}

.is-home .home-card {
  display: none !important;
}

.is-home .mobile-controls {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.is-home .special-idle-gif {
  display: none !important;
}

body:not(.is-home) [data-panel="areaPanel"] {
  display: none !important;
}

.map-loading {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: block;
  background: #000;
  pointer-events: auto;
  clip-path: circle(160% at 50% 54%);
}

.map-loading.hidden {
  display: none !important;
}

.map-loading.enter-map {
  clip-path: circle(0 at 50% 58%);
  transition: clip-path 520ms cubic-bezier(0.68, 0.02, 0.19, 1);
}

.map-loading.enter-map.is-covered {
  clip-path: circle(160% at 50% 58%);
}

.map-loading.enter-map.is-revealing {
  clip-path: circle(0 at 50% 58%);
  transition: clip-path 680ms cubic-bezier(0.72, 0.02, 0.18, 1);
}

.map-loading.return-home {
  clip-path: circle(0 at 50% 56%);
  transition: clip-path 520ms cubic-bezier(0.68, 0.02, 0.19, 1);
}

.map-loading.return-home.is-covered {
  clip-path: circle(160% at 50% 56%);
}

.map-loading.return-home.is-shrinking {
  clip-path: circle(0 at 50% 56%);
  transition: clip-path 720ms cubic-bezier(0.72, 0.02, 0.18, 1);
}

.map-loading.enter-map .loading-runner {
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  animation: enterRunnerPop 720ms ease 260ms forwards;
}

.return-home-icon {
  display: none;
}

.map-loading.return-home .loading-runner {
  display: none;
}

.map-loading.return-home .return-home-icon {
  display: block;
  position: absolute;
  left: 50%;
  top: 56%;
  width: clamp(118px, 23vw, 230px);
  height: auto;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.36));
}

.map-loading.return-home.is-shrinking .return-home-icon {
  opacity: 1;
  animation: returnIconShrink 720ms cubic-bezier(0.72, 0.02, 0.18, 1) forwards;
}

@keyframes enterRunnerPop {
  0% { opacity: 0; transform: translateY(8px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes returnIconShrink {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
}

.topbar {
  z-index: 90 !important;
}

.side-panel {
  z-index: 91 !important;
}

.floating-hints,
.quest-float {
  z-index: 70 !important;
}

.dig-status {
  display: none !important;
}

.home-title h2 {
  margin: 0 0 6px;
  color: #fff8dc;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  text-align: right;
  text-shadow: -2px -2px 0 #4a3118, 2px -2px 0 #4a3118, -2px 2px 0 #4a3118, 2px 2px 0 #4a3118, 0 4px 0 rgba(74, 49, 24, 0.48);
}

.home-title p {
  margin: 0 0 14px;
  color: #fff4c8;
  font-weight: 900;
  text-align: right;
  text-shadow: -1px -1px 0 #4a3118, 1px -1px 0 #4a3118, -1px 1px 0 #4a3118, 1px 1px 0 #4a3118;
}

.home-title {
  position: absolute;
  right: max(22px, env(safe-area-inset-right, 0px));
  top: calc(env(safe-area-inset-top, 0px) + 84px);
  width: min(420px, 48vw);
}

.home-actions {
  position: absolute;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100vw - 36px));
  max-height: min(58vh, 560px);
  overflow: auto;
  padding: 14px;
  border: 4px solid rgba(74, 49, 24, 0.86);
  border-radius: 18px;
  background: rgba(255, 241, 200, 0.64);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 8px 0 rgba(122, 68, 22, 0.46), 0 20px 44px rgba(45, 28, 10, 0.28);
  backdrop-filter: blur(8px);
}

.home-npcs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.home-map-title {
  margin: 4px 0 10px;
  color: #3a2621;
  font-size: 1.05rem;
  font-weight: 950;
}

.home-map-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-map-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
}

.home-map-card strong {
  color: #3a2621;
  font-size: 1.08rem;
}

.home-map-card span,
.home-map-card small {
  color: #67451f;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.3;
}

.home-map-card em {
  align-self: end;
  justify-self: end;
  color: #fff7d8;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(74, 49, 24, 0.5);
}

.quest-float {
  position: absolute;
  left: max(14px, env(safe-area-inset-left, 0px));
  top: calc(env(safe-area-inset-top, 0px) + min(31vw, 310px));
  z-index: 6;
  display: grid;
  gap: 10px;
  width: min(286px, calc(100vw - 28px));
  min-height: 72px;
  padding: 12px;
  border: 3px solid rgba(74, 49, 24, 0.64);
  border-radius: 16px;
  background: rgba(255, 246, 210, 0.62);
  box-shadow: 0 6px 0 rgba(122, 68, 22, 0.38), 0 18px 34px rgba(62, 39, 15, 0.16);
  color: #3a2621;
  font-weight: 950;
  text-align: left;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.quest-guide-text {
  min-width: 0;
  display: grid;
  gap: 4px;
  overflow: visible;
  font-size: clamp(0.72rem, 2.4vw, 0.95rem);
  line-height: 1.25;
  white-space: normal;
}

.quest-guide-text strong {
  display: block;
  color: #3a2621;
  font-size: 1rem;
}

.quest-guide-text span {
  display: block;
  color: #6c4b25;
  font-size: 0.82rem;
}

#questClaimBtn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  justify-self: stretch;
  pointer-events: auto;
}

@media (max-width: 760px), (pointer: coarse) {
  .home-screen {
    background-position: center center;
  }

  .home-title {
    top: calc(env(safe-area-inset-top, 0px) + 74px);
    right: 14px;
    width: min(320px, 70vw);
  }

  .home-title h2 {
    font-size: clamp(1.25rem, 7vw, 1.8rem);
  }

  .home-title p {
    font-size: 0.78rem;
  }

  .home-actions {
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    width: min(320px, calc(100vw - 20px));
    max-height: 48vh;
    padding: 11px;
    border-width: 3px;
  }

  .home-map-card {
    min-height: 76px;
  }

  .quest-float {
    top: calc(env(safe-area-inset-top, 0px) + 162px);
    left: 10px;
    width: min(250px, calc(100vw - 118px));
    border-width: 2px;
    border-radius: 13px;
  }

  .quest-guide-text {
    white-space: normal;
  }
}

/* High-fidelity HUD alignment: liquid XP fill and numeric-only slots. */
.level-medal {
  overflow: hidden;
  background: radial-gradient(circle at 34% 24%, #fff8dc 0 10%, #efdba8 11% 100%);
}

.level-fill {
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #9fe024 0%, #7ec433 100%);
  transform: translateY(calc(100% - var(--xp-progress, 0%)));
  transform-origin: bottom center;
  transition: transform 420ms ease;
}

.level-inner {
  inset: 0;
  border: 0;
  background: transparent;
  color: #3a2711;
  font-size: clamp(1rem, 3.2vw, 2.45rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  text-shadow: none;
}

.level-inner span {
  transform: translateY(4%);
}

.stats span {
  color: #000;
  font-size: clamp(1rem, 3vw, 2.45rem);
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nav-map-title {
  color: #f9e6b9;
  font-size: clamp(1.2rem, 4vw, 3.2rem);
  font-weight: 950;
}

@media (max-width: 760px), (pointer: coarse) {
  .level-inner {
    font-size: clamp(0.82rem, 5.8vw, 1.55rem);
  }

  .stats span {
    font-size: clamp(0.8rem, 4.8vw, 1.45rem);
  }

  .nav-map-title {
    font-size: clamp(0.9rem, 5.4vw, 1.7rem);
  }
}

/* Preserve the navigation art ratio exactly; no stretching. */
.topbar {
  width: min(980px, calc(100vw - 8px));
  height: auto;
  aspect-ratio: 1600 / 479;
  padding: 0;
  background: url("assets/nav-bar.png") center top / contain no-repeat;
}

.level-medal {
  left: 1.2%;
  width: 21.5%;
  height: auto;
  aspect-ratio: 1;
}

.nav-content {
  position: absolute;
  left: 25.5%;
  right: 12.5%;
  top: 8%;
  bottom: 24%;
  padding: 0;
}

.nav-map-title {
  align-self: center;
  height: 38%;
  padding-inline: 8%;
}

.stats {
  align-self: end;
  height: 36%;
  padding-left: 7%;
}

.language-select {
  right: 5.4%;
  top: 8%;
}

.topbar .audio-mute {
  right: 1.6%;
  top: 8%;
}

.floating-hints {
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + min(30vw, 286px));
}

.side-panel {
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + min(42vw, 370px));
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    width: calc(100vw - 4px);
    height: auto;
    padding: 0;
  }

  .nav-content {
    left: 25.5%;
    right: 12.5%;
    top: 8%;
    bottom: 24%;
    padding: 0;
  }

  .stats span {
    height: auto;
    padding: 0 2px;
    font-size: clamp(0.48rem, 2vw, 0.66rem);
  }

  .nav-map-title {
    font-size: clamp(0.62rem, 2.7vw, 0.86rem);
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + min(30vw, 220px));
  }

  .side-panel {
    top: calc(env(safe-area-inset-top, 0px) + min(42vw, 300px));
  }
}

/* Navigation artwork HUD with level ring. */
.topbar {
  top: max(8px, env(safe-area-inset-top, 0px));
  left: 50%;
  right: auto;
  width: min(1024px, calc(100vw - 14px));
  height: clamp(82px, 12.4vw, 132px);
  min-height: 0;
  padding: 0 clamp(52px, 7vw, 78px) 0 clamp(118px, 15vw, 168px);
  border: 0;
  border-radius: 0;
  background: url("assets/nav-bar.png") center / 100% 100% no-repeat;
  box-shadow: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.nav-content {
  position: relative;
  display: grid;
  grid-template-rows: 45% 55%;
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
  padding: clamp(8px, 1.2vw, 14px) clamp(84px, 13vw, 160px) clamp(12px, 1.7vw, 20px) clamp(34px, 5.5vw, 70px);
}

.nav-map-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  color: #f8e2ad;
  font-size: clamp(0.82rem, 1.65vw, 1.24rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: -1px -1px 0 #3a2711, 1px -1px 0 #3a2711, -1px 1px 0 #3a2711, 1px 1px 0 #3a2711;
}

.level-medal {
  position: absolute;
  left: clamp(13px, 2.4vw, 26px);
  top: 50%;
  z-index: 2;
  width: clamp(70px, 10.4vw, 116px);
  height: clamp(70px, 10.4vw, 116px);
  border: clamp(4px, 0.65vw, 7px) solid #3a2711;
  border-radius: 999px;
  background: #3a2711;
  box-shadow: inset 0 0 0 5px rgba(255, 245, 200, 0.14);
  transform: translateY(-50%);
}

.level-fill {
  position: absolute;
  inset: 7%;
  border-radius: inherit;
  background: conic-gradient(#ffd63d var(--xp-progress, 0%), #5c4630 var(--xp-progress, 0%));
}

.level-inner {
  position: absolute;
  inset: 18%;
  display: grid;
  place-items: center;
  border: 4px solid #3a2711;
  border-radius: inherit;
  color: #3a2711;
  background: radial-gradient(circle at 30% 25%, #fff8dc 0 12%, #efdba8 13% 100%);
  font-size: clamp(1.05rem, 2.4vw, 2rem);
  font-weight: 950;
}

.stats {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, 1.1vw, 14px);
  width: 100%;
  min-width: 0;
}

.stats span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: clamp(24px, 3.7vw, 42px);
  padding: 0 clamp(6px, 1.4vw, 18px);
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: #3a2711;
  background: transparent;
  box-shadow: none;
  font-size: clamp(0.62rem, 1.25vw, 0.95rem);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-select {
  position: absolute;
  right: clamp(54px, 6.4vw, 76px);
  top: clamp(7px, 1vw, 12px);
  width: clamp(38px, 4vw, 48px);
  height: clamp(26px, 3vw, 34px);
}

.topbar .audio-mute {
  position: absolute;
  right: clamp(14px, 2vw, 22px);
  top: clamp(7px, 1vw, 12px);
  width: clamp(28px, 3.2vw, 38px);
  height: clamp(28px, 3.2vw, 38px);
  min-width: 0;
  min-height: 0;
}

.floating-hints {
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + clamp(84px, 12vw, 128px));
}

.side-panel {
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + clamp(150px, 18vw, 196px));
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    width: calc(100vw - 8px);
    height: clamp(70px, 18vw, 92px);
    padding-left: clamp(88px, 22vw, 116px);
    padding-right: clamp(42px, 11vw, 64px);
  }

  .nav-content {
    padding: 6px clamp(44px, 12vw, 72px) 9px clamp(10px, 4vw, 28px);
  }

  .stats {
    gap: 4px;
  }

  .stats span {
    height: clamp(19px, 5vw, 27px);
    padding: 0 3px;
    font-size: clamp(0.52rem, 2.3vw, 0.7rem);
  }

  .nav-map-title {
    font-size: clamp(0.7rem, 3vw, 0.9rem);
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + 82px);
  }

  .side-panel {
    top: calc(env(safe-area-inset-top, 0px) + 150px);
  }
}

@media (max-width: 760px) and (orientation: landscape), (max-height: 520px) and (orientation: landscape) {
  .topbar {
    right: 160px;
    min-height: 34px;
    padding: 5px 7px;
  }

  .stats span {
    padding: 4px 5px;
    font-size: 0.6rem;
  }

  .side-panel {
    top: max(6px, env(safe-area-inset-top, 0px));
    right: 8px;
  }

  .quick-actions {
    flex-direction: row;
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + 44px);
    left: 8px;
    right: 160px;
    align-items: flex-start;
  }

  .objective {
    max-width: min(520px, calc(100vw - 176px));
    font-size: 0.66rem;
  }

  .dig-status {
    align-self: flex-start;
    min-height: 26px;
    font-size: 0.64rem;
  }

  .panel-section {
    max-height: calc(100dvh - 26px);
  }

  .move-stick {
    bottom: calc(34px + env(safe-area-inset-bottom, 0px));
    width: 96px;
    height: 96px;
  }

  .mobile-interact {
    bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    width: 68px;
    height: 68px;
    min-height: 68px;
  }
}

/* Mobile-first HUD placement for phone previews and 16:9 recordings. */
@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 8px;
    right: 92px;
    max-width: none;
    min-height: 42px;
    gap: 6px;
    padding: 6px 8px;
    border-width: 3px;
  }

  .topbar::before {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-width: 2px;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18);
  }

  .stats {
    flex: 1;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
  }

  .stats span {
    min-width: 0;
    min-height: 26px;
    padding: 3px 6px;
    overflow: hidden;
    border-width: 2px;
    font-size: 0.68rem;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 2px 0 rgba(122, 68, 22, 0.55);
  }

  #durability {
    flex-basis: 100%;
    max-width: 100%;
  }

  .side-panel {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 8px;
    z-index: 6;
  }

  .quick-actions {
    flex-direction: row;
    gap: 6px;
  }

  .quick-actions button {
    min-width: 42px;
    min-height: 34px;
    padding: 0 6px;
    border-width: 3px;
    border-radius: 12px;
    font-size: 0.72rem;
    box-shadow: 0 3px 0 #7a4416, 0 8px 16px rgba(62, 39, 15, 0.16);
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + 86px);
    left: 50%;
    right: auto;
    width: calc(100vw - 20px);
    gap: 6px;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
  }

  .objective {
    width: 100%;
    max-width: none;
    max-height: 46px;
    overflow: hidden;
    padding: 6px 9px;
    border-width: 3px;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .dig-status {
    align-self: center;
    min-height: 30px;
    padding: 5px 9px;
    border-width: 3px;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .panel-section {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 84px);
    padding: 10px;
    border-width: 4px;
  }

  .panel-section h2,
  .section-title h2 {
    min-height: 32px;
    margin-bottom: 8px;
    padding: 3px 9px;
    border-width: 2px;
    font-size: 0.92rem;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .inventory-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .inventory-actions button {
    min-height: 30px;
    padding: 0 7px;
    font-size: 0.7rem;
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    padding: 8px;
    border-width: 2px;
  }

  .row button {
    justify-self: end;
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .row-title {
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .row-meta {
    font-size: 0.74rem;
  }

  .move-stick {
    left: max(14px, env(safe-area-inset-left, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 58px);
    width: 104px;
    height: 104px;
    border-width: 4px;
  }

  .move-knob {
    width: 42px;
    height: 42px;
  }

    .mobile-interact,
    .mobile-dash {
      right: max(14px, env(safe-area-inset-right, 0px));
      width: 74px;
      height: 74px;
      min-height: 74px;
      border-width: 4px;
      font-size: 0.82rem;
    }

    .mobile-interact {
      bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
    }

    .mobile-dash {
      bottom: calc(env(safe-area-inset-bottom, 0px) + 158px);
    }
}

@media (max-height: 520px) and (orientation: landscape) {
  .topbar {
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    left: 8px;
    right: auto;
    width: min(430px, calc(100vw - 120px));
    min-height: 34px;
    padding: 5px 7px;
  }

  .topbar::before {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
  }

  .stats span {
    min-height: 24px;
    padding: 2px 5px;
    font-size: 0.64rem;
  }

  .side-panel {
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    right: 8px;
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    width: min(520px, calc(100vw - 180px));
  }

  .objective {
    max-height: 36px;
    font-size: 0.68rem;
  }

  .dig-status {
    min-height: 28px;
    font-size: 0.68rem;
  }

  .panel-section {
    width: min(560px, calc(100vw - 26px));
    max-height: calc(100dvh - 28px);
  }

  .move-stick {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
    width: 92px;
    height: 92px;
  }

    .mobile-interact,
    .mobile-dash {
      width: 66px;
      height: 66px;
      min-height: 66px;
    }

    .mobile-interact {
      bottom: calc(env(safe-area-inset-bottom, 0px) + 40px);
    }

    .mobile-dash {
      bottom: calc(env(safe-area-inset-bottom, 0px) + 112px);
    }
}

/* HUD cleanup: right menu under hint text, compact stats, fading hints. */
.topbar::before {
  display: none;
}

.objective,
.dig-status {
  transition: opacity 520ms ease, transform 520ms ease;
}

.objective.is-faded,
.dig-status.is-faded {
  opacity: 0;
  transform: translateY(-4px);
}

.side-panel {
  top: 188px;
  right: 14px;
  z-index: 7;
}

.quick-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.quick-actions button,
.audio-mute {
  min-width: 74px;
  min-height: 36px;
  padding: 0 10px;
  border-width: 3px;
  font-size: 0.78rem;
  pointer-events: auto;
}

.quick-actions .icon-btn {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  padding: 3px;
  overflow: hidden;
}

.quick-actions .icon-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.audio-mute.is-muted {
  background: linear-gradient(180deg, #fff3cf, #b9b2a1);
}

.topbar {
  right: 14px;
  padding-right: 10px;
}

.stats {
  justify-content: flex-start;
  gap: 6px;
}

.stats span {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    right: 8px;
    min-height: 48px;
  }

  .stats span {
    flex: 0 1 auto;
    min-height: 25px;
    padding: 3px 5px;
    font-size: 0.62rem;
  }

  #durability {
    flex-basis: auto;
    max-width: none;
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + 76px);
    width: calc(100vw - 18px);
  }

  .side-panel {
    top: calc(env(safe-area-inset-top, 0px) + 166px);
    right: 8px;
  }

  .quick-actions {
    flex-direction: column;
    gap: 7px;
  }

  .quick-actions button,
  .audio-mute {
    min-width: 54px;
    min-height: 32px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .quick-actions .icon-btn {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 3px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .side-panel {
    top: calc(env(safe-area-inset-top, 0px) + 96px);
    right: 8px;
  }

  .floating-hints {
    right: 92px;
    width: min(520px, calc(100vw - 150px));
  }

  .quick-actions button,
  .audio-mute {
    min-width: 52px;
    min-height: 30px;
    font-size: 0.64rem;
  }

  .quick-actions .icon-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}

/* Final icon-button art pass. */
.quick-actions .icon-btn,
.topbar .audio-mute {
  border: 3px solid var(--panda-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 0 rgba(122, 68, 22, 0.72), 0 10px 18px rgba(62, 39, 15, 0.14);
}

.quick-actions .icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 78px;
  min-width: 68px;
  min-height: 78px;
  gap: 1px;
  padding: 4px;
}

.quick-actions .icon-btn img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.quick-actions .icon-btn span {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: -1px -1px 0 var(--panda-line), 1px -1px 0 var(--panda-line), -1px 1px 0 var(--panda-line), 1px 1px 0 var(--panda-line), 0 2px 0 rgba(62, 39, 15, 0.45);
}

.topbar .audio-mute {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  margin-left: auto;
  padding: 3px;
  pointer-events: auto;
}

.topbar .audio-mute img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.topbar .audio-mute.is-muted img {
  filter: grayscale(1) contrast(0.92);
  opacity: 0.72;
}

.language-select {
  flex: 0 0 auto;
  width: 48px;
  height: 34px;
  border: 3px solid var(--island-line, var(--panda-line));
  border-radius: 999px;
  padding: 0 5px;
  color: var(--island-line, var(--panda-line));
  background: linear-gradient(180deg, #fff9e5, #ffd67a);
  box-shadow: 0 4px 0 rgba(122, 68, 22, 0.72), 0 10px 18px rgba(62, 39, 15, 0.14);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  pointer-events: auto;
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    padding-right: 8px;
  }

  .topbar .audio-mute {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 2px;
  }

  .language-select {
    width: 42px;
    height: 30px;
    border-width: 2px;
    font-size: 0.66rem;
  }

  .quick-actions .icon-btn {
    width: 58px;
    height: 68px;
    min-width: 58px;
    min-height: 68px;
  }

  .quick-actions .icon-btn img {
    width: 42px;
    height: 42px;
  }

  .quick-actions .icon-btn span {
    font-size: 0.66rem;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .topbar .audio-mute {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }

  .language-select {
    width: 40px;
    height: 28px;
    font-size: 0.62rem;
  }

  .quick-actions .icon-btn {
    width: 52px;
    height: 60px;
    min-width: 52px;
    min-height: 60px;
  }

  .quick-actions .icon-btn img {
    width: 38px;
    height: 38px;
  }
}

/* Island notebook UI pass inspired by cozy animal-life menus. */
:root {
  --island-ink: #4a3318;
  --island-line: #3a2711;
  --island-paper: #fff4cf;
  --island-paper-2: #ffe7a3;
  --island-mint: #a7c957;
  --island-mint-deep: #65883b;
  --island-orange: #f2a33a;
  --island-shadow: #9b6328;
  --island-blue: #89d7df;
}

button {
  border: 3px solid var(--island-line);
  border-radius: 999px;
  color: var(--island-line);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.72) 0 18%, transparent 19%),
    linear-gradient(180deg, #fff1a8 0%, #ffc34a 58%, #e58d29 100%);
  box-shadow: 0 5px 0 var(--island-shadow), 0 13px 22px rgba(69, 43, 15, 0.18);
}

.topbar {
  align-items: center;
  border: 4px solid var(--island-line);
  border-radius: 24px 18px 24px 18px / 18px 24px 18px 24px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at 4% 0%, rgba(255, 255, 255, 0.78) 0 14%, transparent 15%),
    linear-gradient(180deg, rgba(255, 247, 210, 0.98), rgba(255, 224, 137, 0.96));
  box-shadow: 0 7px 0 var(--island-shadow), 0 19px 34px rgba(66, 43, 18, 0.18);
}

.eyebrow {
  color: var(--island-mint-deep);
  letter-spacing: 0.04em;
}

h1,
h2 {
  color: var(--island-line);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
}

.stats span {
  min-height: 31px;
  border: 3px solid var(--island-line);
  border-radius: 999px 16px 999px 16px / 16px 999px 16px 999px;
  background: linear-gradient(180deg, #fff8dc, #ffd97b);
  box-shadow: 0 3px 0 rgba(155, 99, 40, 0.66), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--island-line);
}

.stats span:nth-child(1) {
  background: linear-gradient(180deg, #fff2a1, #ffc33c);
}

.stats span:nth-child(2) {
  background: linear-gradient(180deg, #dff1a0, #a7c957);
}

.stats span:nth-child(4) {
  background: linear-gradient(180deg, #caf4f8, #89d7df);
}

.floating-hints {
  top: 118px;
  gap: 9px;
}

.objective,
.dig-status {
  border: 4px solid var(--island-line);
  border-radius: 24px 18px 24px 18px / 18px 24px 18px 24px;
  color: var(--island-line);
  box-shadow: 0 3px 0 var(--island-shadow), 0 14px 26px rgba(66, 43, 18, 0.15);
}

.objective {
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 255, 255, 0.7) 0 8%, transparent 9%),
    linear-gradient(180deg, rgba(255, 249, 224, 0.98), rgba(255, 226, 144, 0.96));
}

.dig-status {
  background: linear-gradient(180deg, #edf7bd, #a7c957);
}

.quick-actions .icon-btn,
.topbar .audio-mute {
  border: 3px solid var(--island-line);
  border-radius: 20px 16px 20px 16px / 16px 20px 16px 20px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.76) 0 15%, transparent 16%),
    linear-gradient(180deg, #fff9e5, #ffd67a);
  box-shadow: 0 5px 0 var(--island-shadow), 0 12px 22px rgba(66, 43, 18, 0.16);
}

.quick-actions .icon-btn.is-active,
.topbar .audio-mute:hover {
  background: linear-gradient(180deg, #f0ffd7, #a7c957);
}

.quick-actions .icon-btn span {
  color: #fffdf2;
  letter-spacing: 0;
  text-shadow: -1px -1px 0 var(--island-line), 1px -1px 0 var(--island-line), -1px 1px 0 var(--island-line), 1px 1px 0 var(--island-line), 0 2px 0 rgba(66, 43, 18, 0.55);
}

.panel-section {
  border: 5px solid var(--island-line);
  border-radius: 28px 22px 28px 22px / 22px 28px 22px 28px;
  background:
    radial-gradient(circle at 8% 7%, rgba(255, 255, 255, 0.68) 0 8%, transparent 9%),
    linear-gradient(180deg, rgba(255, 247, 216, 0.99), rgba(255, 224, 137, 0.98));
  box-shadow: 0 9px 0 var(--island-shadow), 0 32px 80px rgba(53, 33, 13, 0.3);
}

.panel-section h2,
.section-title h2 {
  border: 3px solid var(--island-line);
  border-radius: 999px;
  background: linear-gradient(180deg, #e7f5b3, #a7c957);
  box-shadow: 0 4px 0 var(--island-shadow);
}

.row {
  border: 3px solid var(--island-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 4% 10%, rgba(255, 255, 255, 0.62) 0 8%, transparent 9%),
    linear-gradient(180deg, rgba(255, 250, 228, 0.96), rgba(255, 235, 169, 0.94));
  box-shadow: 0 4px 0 rgba(155, 99, 40, 0.58);
}

.tag {
  border-radius: 999px;
  background: linear-gradient(180deg, #dff1a0, #a7c957);
  color: var(--island-line);
}

.inventory-actions button {
  border-radius: 999px;
  background: linear-gradient(180deg, #fff1a8, #f2a33a);
}

.loot-card,
.rare-core {
  border-radius: 30px 22px 30px 22px / 22px 30px 22px 30px;
  background: linear-gradient(180deg, #fff8dc, #ffd97b);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: block;
  background: #000;
  clip-path: circle(155% at calc(100% - 92px) calc(100% - 92px));
  opacity: 1;
  pointer-events: auto;
  transition: clip-path 880ms cubic-bezier(0.72, 0.02, 0.18, 1), opacity 220ms ease 780ms;
}

.loading-screen.is-leaving {
  clip-path: circle(0 at calc(100% - 92px) calc(100% - 92px));
  opacity: 0;
  pointer-events: none;
}

.loading-runner {
  position: absolute;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  width: clamp(96px, 18vw, 168px);
  aspect-ratio: 1;
  border: 4px solid #fff4cf;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 51, 24, 0.95), 0 16px 42px rgba(0, 0, 0, 0.56);
}

.loading-runner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    border-radius: 18px;
    padding: 7px 8px;
  }

  .floating-hints {
    top: calc(env(safe-area-inset-top, 0px) + 80px);
  }

  .objective,
  .dig-status {
    border-width: 3px;
    border-radius: 18px;
  }

  .side-panel {
    top: calc(env(safe-area-inset-top, 0px) + 158px);
  }

  .panel-section {
    border-radius: 22px;
  }

  .loading-screen {
    clip-path: circle(155% at calc(100% - 70px) calc(100% - 70px));
  }

  .loading-screen.is-leaving {
    clip-path: circle(0 at calc(100% - 70px) calc(100% - 70px));
    pointer-events: none;
  }

  .loading-runner {
    width: 112px;
  }
}

/* Final navigation ratio lock: keep 1600x479 art unwarped. */
.topbar {
  width: min(980px, calc(100vw - 8px));
  height: auto;
  aspect-ratio: 1600 / 479;
  padding: 0;
  background: url("assets/nav-bar.png") center top / contain no-repeat;
}

.level-medal {
  left: 1.2%;
  width: 21.5%;
  height: auto;
  aspect-ratio: 1;
}

.nav-content {
  position: absolute;
  left: 25.5%;
  right: 12.5%;
  top: 8%;
  bottom: 24%;
  padding: 0;
}

.nav-map-title {
  align-self: center;
  height: 38%;
  padding-inline: 8%;
}

.stats {
  align-self: end;
  height: 36%;
  padding-left: 7%;
}

.language-select {
  right: 5.4%;
  top: 8%;
}

.topbar .audio-mute {
  right: 1.6%;
  top: 8%;
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    width: calc(100vw - 4px);
    height: auto;
    padding: 0;
  }

  .nav-content {
    left: 25.5%;
    right: 12.5%;
    top: 8%;
    bottom: 24%;
    padding: 0;
  }
}

/* Header art overlay: use the provided asset as-is and place data over it. */
.topbar {
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  width: 100vw !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1600 / 479 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  overflow: visible !important;
  pointer-events: none !important;
}

.topbar::before {
  display: none !important;
}

.nav-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  object-position: left top;
  pointer-events: none;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.level-medal {
  position: absolute !important;
  left: 4.05% !important;
  top: 14.2% !important;
  z-index: 2 !important;
  width: 17.25% !important;
  height: auto !important;
  aspect-ratio: 1 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #efdba8 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  transform: none !important;
}

.level-fill {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  height: var(--xp-progress, 0%) !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, #a8e23a 0%, #76bd31 100%) !important;
  transform: none !important;
  transition: height 420ms ease !important;
}

.level-inner {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #3a2711 !important;
  font-size: clamp(1.2rem, 7.8vw, 6rem) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

.level-inner span {
  transform: translateY(5%) !important;
}

.level-number-label {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 0.06em !important;
  transform: translateY(5%) !important;
}

.level-prefix {
  font-size: var(--hud-level-lv-size, 18px) !important;
  line-height: 1 !important;
}

.level-value {
  font-size: var(--hud-level-num-size, 42px) !important;
  line-height: 0.9 !important;
}

.nav-content {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
}

.nav-map-title {
  position: absolute !important;
  left: 26.2% !important;
  top: var(--hud-title-y, 11.3%) !important;
  width: 34.1% !important;
  height: 21.8% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: #f9e6b9 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: clamp(1rem, 5vw, 4.5rem) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  text-shadow: 0 2px 0 rgba(58, 39, 17, 0.45) !important;
}

.stats {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: var(--hud-stats-y, 59.7%) !important;
  height: var(--hud-stats-h, 24%) !important;
  display: block !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.stats span {
  position: absolute !important;
  top: var(--hud-value-y, 0%) !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #3a2621 !important;
  font-size: var(--hud-number-size, 22px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.42) !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
}

.stats span:nth-child(1) {
  left: var(--hud-money-x, 34%) !important;
  width: var(--hud-money-w, 8%) !important;
}

.stats span:nth-child(2) {
  left: var(--hud-shovel-x, 20%) !important;
  width: var(--hud-shovel-w, 12.4%) !important;
}

.stats span:nth-child(3) {
  left: var(--hud-bag-x, 40%) !important;
  width: var(--hud-bag-w, 10.2%) !important;
}

.language-select {
  position: absolute !important;
  right: 4.6% !important;
  top: 3.2% !important;
  z-index: 4 !important;
  width: clamp(34px, 5vw, 54px) !important;
  height: clamp(24px, 3.5vw, 36px) !important;
  pointer-events: auto !important;
}

.topbar .audio-mute {
  position: absolute !important;
  right: 1.2% !important;
  top: 3.2% !important;
  z-index: 4 !important;
  width: clamp(28px, 4.2vw, 46px) !important;
  height: clamp(28px, 4.2vw, 46px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 2px !important;
  pointer-events: auto !important;
}

.floating-hints {
  top: calc(env(safe-area-inset-top, 0px) + min(31vw, 310px)) !important;
}

.side-panel {
  top: calc(env(safe-area-inset-top, 0px) + min(42vw, 390px)) !important;
}

@media (max-width: 760px), (pointer: coarse) {
  .topbar {
    width: 100vw !important;
  }

  .level-inner {
    font-size: clamp(1rem, 7.2vw, 1.95rem) !important;
  }

  .nav-map-title {
    font-size: clamp(0.95rem, 5.2vw, 1.6rem) !important;
  }

  .stats span {
    font-size: var(--hud-number-size, 22px) !important;
  }
}

.quest-icon {
  display: grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 auto 3px !important;
  border: 3px solid #4a3118 !important;
  border-radius: 999px !important;
  color: #fff7d8 !important;
  background: linear-gradient(#ffce4e, #eb7f25) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.46), 0 3px 0 #4a3118 !important;
  font-size: 1.05rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-shadow: 0 2px 0 rgba(74, 49, 24, 0.45) !important;
}

.quests {
  display: grid;
  gap: 10px;
}

.quest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 11px;
  border: 2px solid rgba(74, 49, 24, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 249, 229, 0.95), rgba(245, 220, 164, 0.92));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 8px 0 rgba(74, 49, 24, 0.08);
}

.quest-row.is-ready {
  border-color: rgba(226, 128, 34, 0.72);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.62), 0 0 0 4px rgba(255, 205, 79, 0.18), 0 8px 0 rgba(74, 49, 24, 0.1);
}

.quest-row.is-claimed {
  opacity: 0.72;
}

.quest-main {
  min-width: 0;
}

.quest-progress {
  height: 10px;
  margin: 8px 0 5px;
  overflow: hidden;
  border: 2px solid rgba(74, 49, 24, 0.42);
  border-radius: 999px;
  background: rgba(80, 55, 24, 0.18);
}

.quest-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8ed43e, #ffd15e);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.44);
}

.quest-reward {
  color: #76522a;
  font-size: 0.82rem;
  font-weight: 900;
}

.quest-row button,
#tutorialBtn,
#tutorialCloseBtn {
  border: 3px solid #4a3118 !important;
  border-radius: 999px !important;
  color: #fff6d1 !important;
  background: linear-gradient(#f0a94b, #b85e25) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.42), 0 4px 0 #4a3118 !important;
  font-weight: 950 !important;
}

.quest-row button:disabled {
  color: #7a6548 !important;
  background: linear-gradient(#e4d8bc, #c9b58e) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.32), 0 3px 0 rgba(74, 49, 24, 0.72) !important;
}

.tutorial-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) 16px max(18px, env(safe-area-inset-bottom, 0px));
  background: rgba(18, 12, 8, 0.52);
}

.tutorial-modal.hidden {
  display: none !important;
}

.tutorial-card {
  width: min(520px, calc(100vw - 28px));
  max-height: min(76vh, 640px);
  overflow: auto;
  padding: 18px;
  border: 4px solid #4a3118;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff4cd, #f2c979);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), 0 20px 60px rgba(0, 0, 0, 0.35);
}

.tutorial-card h2 {
  margin: 0 0 12px;
  color: #4a3118;
  font-size: clamp(1.25rem, 5.2vw, 1.85rem);
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.58);
}

.tutorial-steps {
  display: grid;
  gap: 10px;
}

.tutorial-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 2px solid rgba(74, 49, 24, 0.24);
  border-radius: 12px;
  background: rgba(255, 252, 237, 0.76);
}

.tutorial-step > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #4a3118;
  border-radius: 999px;
  color: #fff7d8;
  background: #8fc63d;
  font-weight: 950;
}

.tutorial-step strong {
  display: block;
  margin-bottom: 3px;
  color: #3a2621;
  font-size: 1rem;
}

.tutorial-step p {
  margin: 0;
  color: #6c4b25;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

#tutorialCloseBtn {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 760px), (pointer: coarse) {
  .quest-row {
    grid-template-columns: 1fr;
  }

  .quest-row button {
    width: 100%;
  }

  .tutorial-card {
    max-height: 72vh;
    padding: 15px;
  }
}
