/* Meadow polish 01: presentation only. Sprite bounds and editor collision geometry
   are maintained together in scene-layout.js and placement-policy.js. */
:root {
  --meadow-cream: #fff2d9;
  --meadow-outline: #b67c43;
  --meadow-ink: #60371b;
}

/* Preserve existing gameplay navigation: these are the real, wired buttons. */
.game .bottom-nav {
  position: absolute;
  z-index: 25;
  left: 50%;
  right: auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(1350px, calc(100% - 26px));
  display: flex;
  align-items: stretch;
  gap: clamp(4px, .55vw, 10px);
  padding: 0;
  border: 0;
  background: none !important;
  box-shadow: none;
}
.game .bottom-nav > .nav-item,
.game .bottom-nav > .v3-access,
.game .bottom-nav > .meadow-stock-shortcut {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 80px;
  min-height: 0;
  margin: 0;
  padding: 6px 4px 5px;
  border: 3px solid #b78352;
  border-radius: 17px;
  color: var(--meadow-ink);
  font: 700 clamp(10px, .82vw, 13px)/1.15 Georgia, serif;
  text-align: center;
  text-shadow: 0 1px #fff7e7;
  background: linear-gradient(170deg, #fff9ed, #f4d8ac 72%, #e4b978) !important;
  box-shadow: inset 0 2px 0 #fff9df, inset 0 -2px 0 #bb8b57, 0 4px 9px #171c2880;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.game .bottom-nav > .v3-access,
.game .bottom-nav > .meadow-stock-shortcut {
  flex: .85 1 0;
}
.game .bottom-nav > .nav-item.active {
  border-color: #e7b761;
  background: linear-gradient(175deg, #fffbed, #f9e2ac 68%, #eab86c) !important;
  box-shadow: inset 0 2px #ffffff, 0 0 0 2px #fff1c9a8, 0 4px 12px #4b220c85;
}
.game .bottom-nav > .nav-item:hover,
.game .bottom-nav > .v3-access:hover,
.game .bottom-nav > .meadow-stock-shortcut:hover {
  filter: brightness(1.055);
  transform: translateY(-2px);
}
.game .bottom-nav > .nav-item:active,
.game .bottom-nav > .v3-access:active,
.game .bottom-nav > .meadow-stock-shortcut:active {
  transform: translateY(1px);
}
.game .bottom-nav > .nav-item:focus-visible,
.game .bottom-nav > .v3-access:focus-visible,
.game .bottom-nav > .meadow-stock-shortcut:focus-visible,
.game .topbar > .icon-button:focus-visible {
  outline: 3px solid #fff6bf;
  outline-offset: 3px;
}
.game .bottom-nav > .nav-item .nav-art,
.game .bottom-nav .shortcut-art {
  display: block;
  flex: 0 0 43px;
  width: 54px;
  height: 43px;
  background: center / contain no-repeat;
  filter: drop-shadow(0 2px 1px #9d724260);
}
.game .bottom-nav .shortcut-shop {
  background-image: url('assets/winter26/building-0.png');
}
.game .bottom-nav .shortcut-stock {
  background-image: url('assets/stage2/decor-gift.png');
}
.game .bottom-nav .nav-home { background-image: url('assets/winter26/tree-7.png'); }
.game .bottom-nav .nav-collection { background-image: url('assets/audit31/ui-book.svg'); }
.game .bottom-nav .nav-achievements { background-image: url('assets/audit31/ui-trophy.svg'); }
.game .bottom-nav .nav-tasks { background-image: url('assets/audit31/ui-tasks.svg'); }
.game .bottom-nav > .nav-item b { font: inherit; }

/* Give the top controls the same material finish as the icon dock. */
.game .topbar > .icon-button {
  border-radius: 14px;
  border-color: #d7a367;
  color: #fff0c5;
  background: linear-gradient(#ae7141, #70401e 48%, #4f280e);
  box-shadow: inset 0 2px #ffe5aa, inset 0 -2px #2f170b, 0 4px 6px #1918278a;
}
.game .topbar > .icon-button:hover { filter: brightness(1.1); }
.game .topbar .resources { max-width: min(800px, 66vw); }
.game .topbar .resource-icon { flex-shrink: 0; }

/* Small status labels must not compete with the buildings and the tree. */
.game .scene .building-status,
.game .scene .world-state-label {
  font: 700 10px/1.2 Georgia, serif;
  border-radius: 9px;
  box-shadow: 0 2px 5px #1b1b2940;
}
.game .scene .building-sign,
.game .scene .object-tag { transition: filter .18s ease; }
.game .scene .world-object:hover .building-sign,
.game .scene .world-object:hover .object-tag { filter: brightness(1.1); }

@media (max-width: 1100px) {
  .game .bottom-nav { width: calc(100% - 16px); gap: 5px; bottom: calc(6px + env(safe-area-inset-bottom)); }
  .game .bottom-nav > .nav-item,
  .game .bottom-nav > .v3-access,
  .game .bottom-nav > .meadow-stock-shortcut { height: 65px; border-width: 2px; border-radius: 13px; padding: 5px 2px; font-size: 10px; }
  .game .bottom-nav > .nav-item .nav-art,
  .game .bottom-nav .shortcut-art { width: 37px; height: 33px; flex-basis: 33px; }
}
@media (max-width: 700px), (max-height: 460px) {
  .game .bottom-nav { gap: 4px; bottom: calc(4px + env(safe-area-inset-bottom)); }
  .game .bottom-nav > .nav-item,
  .game .bottom-nav > .v3-access,
  .game .bottom-nav > .meadow-stock-shortcut { height: 46px; padding: 2px 1px; border-radius: 10px; font: 700 9px/1.1 Georgia, serif; }
  .game .bottom-nav > .nav-item .nav-art,
  .game .bottom-nav .shortcut-art { width: 25px; height: 26px; flex-basis: 26px; }
  .game .topbar > .icon-button { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .game .bottom-nav > .nav-item,
  .game .bottom-nav > .v3-access,
  .game .bottom-nav > .meadow-stock-shortcut { transition: none; }
}
/* Cancel the old floating store button offsets when it joins the dock. */
.game .bottom-nav > .v3-access,
.game .bottom-nav > .meadow-stock-shortcut {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
}

/* Diamonds retain the existing server field `rubies`; only the HUD art/name changes. */
.game .topbar .resource:nth-child(3) .resource-icon {
  background: linear-gradient(155deg, #f0ffff 0%, #a8ebff 26%, #4ca7f4 45%, #2755bc 75%);
  clip-path: polygon(21% 0, 79% 0, 100% 35%, 50% 100%, 0 35%);
  color: #e6f9ff;
  border-color: #b4efff;
  box-shadow: 0 2px 5px #06193588, inset 0 2px #f1feff;
}
/* Compact quest card on a physical phone in landscape: buttons stay operable. */
@media (max-height: 460px) and (max-width: 960px) {
  .game .scene .quest-card {
    box-sizing: border-box; top: 55px; left: 6px; right: auto;
    width: 151px; max-height: calc(100dvh - 114px);
    padding: 8px 7px 6px; border-width: 3px; border-radius: 14px;
    overflow-y: auto;
  }
  .game .scene .quest-card .quest-eyebrow { font-size: 16px; padding: 3px 18px 4px 0; }
  .game .scene .quest-card #sidebar-tasks { max-height: 58px; overflow-y: auto; }
  .game .scene .quest-card .sidebar-task { grid-template-columns: 20px 1fr; gap: 3px; padding: 2px 0; }
  .game .scene .quest-card .sidebar-task b { font-size: 9px; margin: 0; }
  .game .scene .quest-card .sidebar-task small { font-size: 8px; }
  .game .scene .quest-card .sidebar-task .painted-icon { width: 19px; height: 22px; }
  .game .scene .quest-card .task-book-button { margin-top: 5px; min-height: 27px; font-size: 10px; }
  .game .scene .quest-card .sidebar-story { font-size: 9px; padding: 3px; }
}
.game .bottom-nav .nav-home { background-image: url('assets/winter26/tree-7.png') !important; }
