﻿.thirsty-page {
  max-width: min(1400px, calc(90vh * 4 / 3 + 40px));
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.thirsty-head {
  text-align: center;
  margin-bottom: 18px;
}

.thirsty-head .eyebrow {
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted, #777);
  margin-bottom: 6px;
}

.thirsty-head h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 6px;
}

.thirsty-head p {
  color: var(--muted, #666);
  margin: 0;
}

/* 4399-style game panel — height-first (screenshot scale), width = height × 4/3 */
.game-frame {
  border-radius: 12px;
  overflow: hidden;
  background: #1a1814;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.08);
  /* Target ~90vh tall; width follows 4:3 */
  width: min(100%, calc(90vh * 4 / 3));
  margin-inline: auto;
}

/* Let drink bottle poke out of the frame for a break-out feel.
   iOS Safari clips overflow:visible under border-radius — drop radius while drinking. */
.game-frame.is-drinking {
  overflow: visible !important;
  border-radius: 0;
}

.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 360px;
  overflow: hidden;
  background: #2a241c;
  cursor: url("/thirsty/ui/cursor-glove.png?v=11") 4 2, pointer;
}

.scene:has(.harvest-btn:not([hidden])),
.scene:has(.level-up-fx:not([hidden])),
.scene.is-drinking {
  overflow: visible !important;
}

.room-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scene-home .room-bg {
  /* Full diorama visible — floor + cardboard lip included */
  object-fit: contain;
  object-position: center center;
  background: #c4ae8e;
}

.scene-town .room-bg {
  object-fit: contain;
  object-position: center center;
  background: #8cc3e6;
}

.pet-stage {
  position: absolute;
  left: 50%;
  top: 68%;
  transform: translate(-50%, -70%);
  width: 120px;
  height: 140px;
  display: grid;
  place-items: end center;
  z-index: 2;
  pointer-events: none;
  transition: none;
  overflow: visible;
}

.pet-hop {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: end center;
  overflow: visible;
}

.pet-stage.is-hopping .pet-hop {
  animation: hop-squash 0.32s ease;
}

.buddy {
  width: 112px;
  height: 148px;
  object-fit: contain;
  object-position: bottom center;
  image-rendering: auto;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.gold-flower,
.gold-fruit {
  position: absolute;
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.gold-flower {
  /* lower onto crown / left-eye intersection */
  left: 38%;
  top: 44%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.gold-fruit {
  left: 50%;
  top: 38%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
}

.gold-flower[hidden],
.gold-fruit[hidden] {
  display: none !important;
}

/* Drink bottle — tip anchored to mouth via top + translateY(-7.5%)
   (straw tip sits ~7.5% down the bottle sprite)
   Fallback before JS mouth-lock; straw tip ~6.6% down bottle sprite */
.drink-bottle {
  position: absolute;
  left: 28%;
  top: 83%;
  bottom: auto;
  width: 42px;
  height: auto;
  aspect-ratio: 560 / 1060;
  object-fit: contain;
  object-position: left top;
  pointer-events: none;
  z-index: 12;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.28));
  transform: translate(0, -6.6%);
  transform-origin: top left;
  overflow: visible;
}

.drink-bottle.is-entering {
  animation: drink-bob 0.28s ease;
}

.drink-bottle[hidden] {
  display: none !important;
}

@keyframes drink-bob {
  0% {
    transform: translate(8px, calc(-6.6% + 12px)) scale(0.92);
    opacity: 0;
  }
  100% {
    transform: translate(0, -6.6%) scale(1);
    opacity: 1;
  }
}

/* Give the bottle room below the buddy while drinking */
.scene.is-drinking .pet-stage {
  top: 58%;
}

@keyframes hop-squash {
  0% {
    transform: scale(1, 1);
  }
  40% {
    transform: scale(1.05, 0.9) translateY(-10px);
  }
  100% {
    transform: scale(1, 1) translateY(0);
  }
}

.water-jug {
  /* chunky icon-style jug, top-right, mouth down-left */
  position: absolute;
  left: 70%;
  top: -8px;
  width: 62px;
  height: auto;
  transform: translate(-18%, -70%);
  transform-origin: 25% 75%;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 7;
  filter: drop-shadow(0 3px 0 rgba(42, 28, 22, 0.28));
  opacity: 0;
}

.water-jug.is-on {
  opacity: 1;
  animation: jug-tip 0.9s ease-in-out infinite alternate;
}

.water-jug[hidden] {
  display: none !important;
}

.water-stream {
  /* Sea-of-Stars ribbon pour from jug mouth onto leaf */
  position: absolute;
  left: 50%;
  top: -2px;
  width: 26px;
  height: 52px;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: top center;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
}

.water-stream.is-on {
  opacity: 1;
  animation: stream-fall 0.24s steps(2) infinite;
}

.water-stream[hidden] {
  display: none !important;
}

.splash {
  /* foam crown on leaf / crown */
  position: absolute;
  left: 48%;
  top: 18px;
  width: 42px;
  height: auto;
  transform: translateX(-50%);
  image-rendering: pixelated;
  pointer-events: none;
  display: none;
  z-index: 6;
  animation: splash-pop 0.55s ease-out;
}

.splash.is-on,
.splash:not([hidden]) {
  display: block;
}

.splash[hidden] {
  display: none !important;
}

@keyframes jug-tip {
  0% {
    transform: translate(-18%, -70%) rotate(3deg);
  }
  100% {
    transform: translate(-16%, -72%) rotate(-5deg);
  }
}

@keyframes stream-fall {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.88;
  }
  100% {
    transform: translateX(-49%) translateY(3px);
    opacity: 1;
  }
}

@keyframes splash-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(6px) scale(0.6);
  }
  40% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.05);
  }
  100% {
    opacity: 0.9;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.scene-drink {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  pointer-events: auto;
  cursor: inherit;
}

.level-hud {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  pointer-events: none;
}

.sip-meter {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 4px;
  width: 108px;
}

.sip-meter .level-label,
.sip-meter .ml {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: Sora, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff8eb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  line-height: 1;
  white-space: nowrap;
}

.sip-meter .bar {
  width: 108px;
  height: 14px;
  border-radius: 999px;
  background: rgba(20, 14, 10, 0.55);
  box-shadow: inset 0 0 0 2px rgba(42, 28, 22, 0.65);
  overflow: hidden;
}

.sip-meter .bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5bb8e8, #8fd6f5);
  transition: width 0.25s ease;
}


.level-up-fx {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translate(-50%, -100%);
  z-index: 7;
  pointer-events: none;
  font-family: "Press Start 2P", Sora, monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: #ffe566;
  text-shadow:
    0 0 8px rgba(255, 200, 40, 0.85),
    0 0 18px rgba(255, 160, 0, 0.55),
    0 2px 0 #8a4a00,
    1px 0 0 #8a4a00,
    -1px 0 0 #8a4a00,
    0 -1px 0 #8a4a00,
    2px 2px 0 #3a2208;
}

.level-up-fx.is-pop {
  animation: level-up-pop 1.6s ease-out forwards;
}

.level-up-fx[hidden] {
  display: none !important;
}

@keyframes level-up-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(0.45);
    filter: brightness(1.8);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -115%) scale(1.18);
    filter: brightness(1.35);
  }
  38% {
    transform: translate(-50%, -125%) scale(1);
    filter: brightness(1.1);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -140%) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -165%) scale(1.08);
    filter: brightness(1.4);
  }
}

.drink {
  border: 0;
  border-radius: 999px;
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1a1a;
  background: #e0a45a;
  box-shadow: 0 3px 0 rgba(42, 28, 22, 0.35);
  cursor: pointer;
}

.drink:hover {
  background: #c98b3d;
}

.drink:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(42, 28, 22, 0.35);
}

.drink:disabled {
  opacity: 0.55;
  cursor: default;
}

.scene[hidden],
.scene:not(.is-active) {
  display: none !important;
}

.scene-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  gap: 6px;
}

.scene-tools-left {
  right: auto;
  left: 10px;
}

.town-hotspot {
  position: absolute;
  z-index: 6;
}

.town-enter {
  left: 63%;
  top: 2.5%;
  transform: translateX(-50%);
}

.town-enter:active {
  transform: translateX(-50%) translateY(2px);
}

.town-home {
  right: 10px;
  bottom: 10px;
}

.hall-body {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 8px;
  align-items: center;
  min-height: 0;
}

.hall-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hall-nav {
  width: 36px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 3px solid #3a2418;
  border-radius: 2px;
  background: #d8b888;
  box-shadow: inset 2px 2px 0 #f0e0c0, inset -2px -2px 0 #8a5a38;
  color: #2a1c16;
  font-size: 16px;
  line-height: 1;
  cursor: inherit;
  display: grid;
  place-items: center;
}

.hall-nav:active {
  transform: translateY(1px);
  box-shadow: inset 1px 1px 0 #8a5a38;
}

.hall-nav:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.hall-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 18px 12px;
  margin: 0;
  min-height: 280px;
  align-content: center;
}

.hall-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #2a1c16;
  cursor: inherit;
  min-width: 0;
}

.hall-game img {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(42, 28, 22, 0.28));
}

.hall-game span {
  font-family: "Press Start 2P", Sora, monospace;
  font-size: 9px;
  line-height: 1.25;
  text-align: center;
  letter-spacing: -0.02em;
}

.hall-game:active img {
  transform: translateY(2px);
  filter: drop-shadow(0 1px 0 rgba(42, 28, 22, 0.28));
}

.hall-slot.is-empty {
  min-height: 120px;
  border: 0;
  background: transparent;
}

.hall-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 0;
}

.hall-dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  border: 2px solid #3a2418;
  background: #8a5a38;
  box-shadow: inset 1px 1px 0 #c9a878;
}

.hall-dot.is-active {
  background: #f0e0c0;
}

.tool-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  cursor: inherit;
  padding: 0;
  filter: drop-shadow(0 2px 0 rgba(42, 28, 22, 0.35));
}

.tool-btn img {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  object-fit: contain;
  pointer-events: none;
}

.tool-btn:active {
  transform: translateY(2px);
  filter: drop-shadow(0 1px 0 rgba(42, 28, 22, 0.35));
}

.harvest-btn {
  position: absolute;
  left: 46%;
  bottom: -22px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  background: #8ecf7a;
  color: #1a1a1a;
  box-shadow: 0 3px 0 rgba(42, 28, 22, 0.35);
  pointer-events: auto;
  cursor: inherit;
  white-space: nowrap;
  z-index: 4;
}

.wulu-panel {
  position: absolute;
  inset: 10% 8%;
  z-index: 10;
  background: linear-gradient(180deg, #fff8eb, #f3e6d2);
  border: 3px solid #2a1c16;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  padding: 14px 16px 16px;
  overflow: auto;
  color: #2a1c16;
}

.wulu-panel.pixel-panel {
  inset: auto;
  top: 62px;
  right: 10px;
  left: auto;
  bottom: auto;
  width: min(292px, calc(100% - 20px));
  max-height: calc(100% - 74px);
  background: #c9a878;
  border: 4px solid #3a2418;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 3px #e8d2a8,
    inset 0 0 0 6px #8a5a38,
    0 12px 28px rgba(0, 0, 0, 0.4);
  padding: 10px 10px 12px;
  image-rendering: pixelated;
}

.wulu-panel.pixel-panel.hall-panel {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(780px, 94%);
  height: calc(100% - 28px);
  max-height: none;
  padding: 16px 18px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wulu-panel.pixel-panel.hall-panel .panel-head {
  flex: 0 0 auto;
}

.wulu-panel.pixel-panel.hall-panel .hall-body {
  flex: 1 1 auto;
  min-height: 0;
}

.wulu-panel[hidden] {
  display: none !important;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.pixel-panel .panel-head {
  background: #b08958;
  border: 3px solid #3a2418;
  box-shadow: inset 2px 2px 0 #e8d2a8, inset -2px -2px 0 #6e4428;
  padding: 6px 8px;
  margin: 0 0 10px;
}

.panel-head h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
}

.pixel-panel .panel-head h2 {
  font-family: "Press Start 2P", Sora, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #2a1c16;
  text-shadow: 1px 0 0 #e8d2a8;
}

.panel-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #2a1c16;
  color: #fff8eb;
  font-size: 18px;
  line-height: 1;
  cursor: inherit;
}

.pixel-panel .panel-close {
  width: 26px;
  height: 26px;
  border-radius: 2px;
  border: 2px solid #3a2418;
  background: #8a5a38;
  color: #fff4dc;
  box-shadow: inset 1px 1px 0 #c9a878;
}

.panel-note,
.panel-foot {
  margin: 0 0 12px;
  font-size: 12px;
  color: #5a4a3a;
}

.pixel-panel .panel-note {
  color: #4a3220;
  font-size: 11px;
  margin-bottom: 8px;
}

.panel-foot {
  margin: 12px 0 0;
}

.pixel-panel .panel-foot {
  margin: 8px 0 0;
  color: #4a3220;
  font-size: 11px;
}

.bag-coin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin: 0 0 10px;
  padding: 6px 12px;
  background: #d8b888;
  border: 3px solid #3a2418;
  box-shadow:
    inset 2px 2px 0 #f0e0c0,
    inset -2px -2px 0 #8a5a38;
  color: #2a1c16;
}

.bag-coin-bar img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  object-fit: contain;
}

.bag-coin-bar strong {
  font-family: "Press Start 2P", Sora, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.cal-nav {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 4px 6px;
  background: #d8b888;
  border: 3px solid #3a2418;
  box-shadow: inset 2px 2px 0 #f0e0c0, inset -2px -2px 0 #8a5a38;
}

.cal-nav-btn {
  width: 28px;
  height: 28px;
  border: 2px solid #3a2418;
  border-radius: 2px;
  background: #b08958;
  color: #2a1c16;
  box-shadow: inset 1px 1px 0 #e8d2a8;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: inherit;
}

.cal-nav-btn:disabled {
  opacity: 0.35;
}

.cal-nav-btn:not(:disabled):active {
  transform: translateY(1px);
}

.cal-nav-label {
  text-align: center;
  font-family: "Press Start 2P", Sora, monospace;
  font-size: 9px;
  font-weight: 400;
  color: #2a1c16;
  letter-spacing: 0.02em;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 6px;
  background: #8a5a38;
  border: 3px solid #3a2418;
  box-shadow: inset 2px 2px 0 #6e4428, inset -2px -2px 0 #c9a878;
}

.inv-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 252px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #6e4428 #c9a878;
}

.inv-scroll::-webkit-scrollbar {
  width: 10px;
}

.inv-scroll::-webkit-scrollbar-track {
  background: #b08958;
  border: 2px solid #3a2418;
}

.inv-scroll::-webkit-scrollbar-thumb {
  background: #6e4428;
  border: 2px solid #3a2418;
  box-shadow: inset 1px 1px 0 #c9a878;
}

.cal-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #6e4428;
  border: 2px solid #3a2418;
  box-shadow: inset 1px 1px 0 #4a2e1c, inset -1px -1px 0 #c9a878;
  display: grid;
  place-items: center;
  font-size: 9px;
  position: relative;
  color: #fff4dc;
}

.cal-cell.is-pad {
  visibility: hidden;
  pointer-events: none;
}

.cal-cell.is-today {
  box-shadow: inset 0 0 0 2px #e0a45a, inset 1px 1px 0 #4a2e1c;
}

.cal-cell.is-goal img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  image-rendering: pixelated;
}

.cal-cell.is-goal span {
  display: none;
}

.shop-grid,
.bag-list {
  display: grid;
  gap: 10px;
}

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

.inv-grid {
  gap: 6px;
  padding: 6px;
  background: #8a5a38;
  border: 3px solid #3a2418;
  box-shadow: inset 2px 2px 0 #6e4428, inset -2px -2px 0 #c9a878;
}

.shop-grid.inv-grid,
.bag-list.inv-grid {
  grid-template-columns: repeat(3, 1fr);
}

.shop-card,
.bag-row {
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid #2a1c16;
  border-radius: 12px;
  padding: 10px;
}

.inv-grid .shop-card,
.inv-grid .bag-slot {
  background: #6e4428;
  border: 3px solid #3a2418;
  border-radius: 2px;
  box-shadow: inset 2px 2px 0 #4a2e1c, inset -2px -2px 0 #c9a878;
  padding: 5px 4px 4px;
  aspect-ratio: 1 / 1.08;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  gap: 2px;
  align-content: center;
  justify-items: center;
}

.shop-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.inv-grid .bag-slot.is-empty {
  aspect-ratio: 1;
}

.shop-card img,
.bag-row img,
.bag-slot img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}

.shop-card h3,
.bag-row strong,
.bag-slot strong {
  margin: 0;
  font-size: 13px;
}

.inv-grid .shop-card h3,
.inv-grid .bag-slot strong {
  font-size: 10px;
  color: #fff4dc;
  line-height: 1.2;
}

.shop-card p {
  margin: 0;
  font-size: 11px;
  color: #5a4a3a;
}

.inv-grid .shop-card p {
  display: none;
}

.shop-card .buy,
.bag-row .sell,
.bag-slot .sell {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  background: #e0a45a;
  color: #1a1a1a;
  cursor: inherit;
}

.inv-grid .shop-card .buy,
.inv-grid .bag-slot .sell {
  border-radius: 2px;
  border: 2px solid #3a2418;
  background: #e0a45a;
  box-shadow: inset 1px 1px 0 #ffe2a8;
  padding: 4px 6px;
  font-size: 9px;
  width: 100%;
}

.shop-card .buy.is-cash {
  background: #7eb8e8;
}

.shop-card .buy:disabled,
.bag-row .sell:disabled,
.bag-slot .sell:disabled {
  opacity: 0.5;
}

.bag-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bag-slot {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  text-align: center;
  position: relative;
}

.bag-slot .qty {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-size: 10px;
  color: #fff4dc;
  text-shadow: 1px 1px 0 #2a1c16;
}

.bag-slot.is-empty {
  min-height: 0;
}

.bag-row .bag-meta {
  flex: 1;
  font-size: 12px;
}

.bag-empty {
  margin: 0;
  font-size: 13px;
  color: #5a4a3a;
  grid-column: 1 / -1;
  padding: 12px 6px;
  text-align: center;
}

.inv-grid .bag-empty {
  color: #e8d2a8;
  font-size: 11px;
}

@media (max-width: 640px) {
  /* Tall game below titles: open page shows both title lines,
     scroll down for the full long screen. Clip top bleed so
     zoomed room never covers the head. */
  .thirsty-page {
    padding: 10px 4px 28px;
  }
  .thirsty-head {
    position: relative;
    z-index: 3;
    margin-bottom: 14px;
  }
  .thirsty-head h1 {
    font-size: 1.55rem;
  }
  .thirsty-head p {
    font-size: 0.88rem;
  }
  .game-frame {
    position: relative;
    z-index: 1;
    border-radius: 10px;
    overflow: hidden;
  }
  .game-frame.is-drinking {
    border-radius: 10px;
    /* bottle may poke below; never above into titles */
    overflow: visible !important;
    clip-path: inset(0 -24px -140px -24px);
  }
  .game-frame {
    width: min(100%, calc(70vh * 4 / 3));
  }
  .scene {
    aspect-ratio: 4 / 3;
    min-height: min(68vw, 360px);
    overflow: hidden;
  }
  .scene.is-drinking {
    overflow: visible !important;
    clip-path: inset(0 -24px -140px -24px);
  }
  .room-bg {
    object-fit: contain;
    object-position: center center;
    transform: none;
  }
  .scene-home .room-bg {
    background: #c4ae8e;
  }
  /* Match desktop Wulu:rug scale; bottle ~37.5% of buddy width */
  .pet-stage {
    width: 96px;
    height: 112px;
    top: 68%;
  }
  .scene.is-drinking .pet-stage {
    top: 68%;
  }
  .buddy {
    width: 90px;
    height: 118px;
  }
  .drink-bottle {
    left: 28%;
    top: 83%;
    width: 34px;
  }
  .level-hud {
    left: 10px;
    bottom: 10px;
  }
  .sip-meter {
    width: 92px;
  }
  .sip-meter .level-label,
  .sip-meter .ml {
    font-size: 10px;
  }
  .sip-meter .bar {
    width: 92px;
    height: 12px;
  }
  .gold-flower {
    width: 42px;
    height: 42px;
    left: 38%;
    top: 44%;
  }
  .gold-fruit {
    width: 22px;
    height: 22px;
    top: 38%;
  }
  .harvest-btn {
    left: 46%;
    bottom: -20px;
  }
  .level-up-fx {
    font-size: 12px;
  }
  .scene-drink {
    right: 10px;
    bottom: 10px;
    padding: 8px 20px;
    font-size: 12px;
  }
  .tool-btn {
    width: 40px;
    height: 40px;
  }
  .tool-btn img {
    width: 36px;
    height: 36px;
  }
  .wulu-panel:not(.pixel-panel) {
    inset: 6% 4%;
  }
  .wulu-panel.pixel-panel {
    top: 56px;
    width: min(260px, calc(100% - 16px));
    max-height: calc(100% - 66px);
  }
  .wulu-panel.pixel-panel.hall-panel {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(96%, calc(100% - 8px));
    height: calc(100% - 16px);
    max-height: none;
    padding: 10px 8px 12px;
  }
  .hall-body {
    grid-template-columns: 28px 1fr 28px;
    gap: 4px;
  }
  .hall-nav {
    width: 28px;
    height: 48px;
    font-size: 12px;
  }
  .hall-grid {
    gap: 12px 6px;
    min-height: 0;
  }
  .hall-game img {
    width: 68px;
    height: 68px;
  }
  .hall-game span {
    font-size: 7px;
  }
  .hall-slot.is-empty {
    min-height: 88px;
  }
  .inv-scroll {
    max-height: 220px;
  }
  .cal-nav-label {
    font-size: 8px;
  }
  .inv-grid .shop-card h3,
  .inv-grid .bag-slot strong {
    font-size: 8px;
  }
  .shop-card img,
  .bag-slot img {
    width: 28px;
    height: 28px;
  }
}
