/* GUI pixel: Cute Fantasy UI (9-slice panel/nút/thanh + icon 16px).
   Scale nguyên + image-rendering: pixelated — không nội suy.
   Chữ GUI: Be Vietnam Pro để dễ đọc và hiển thị đủ dấu tiếng Việt. */
:root {
  --ui-font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --cursor-default: url("../cute-ui/cut/cursor.png") 8 4, auto;
  --cursor-pointer: url("../cute-ui/cut/cursor-pointer.png") 12 4, pointer;
  --ui-wood-btn: url("../generated/ui-kit/button-wide.png");
}

.ui-wood-btn,
.fishing-categories button,
.fishing-switch {
  border: 0;
  background: var(--ui-wood-btn) center / 100% 100% no-repeat;
  image-rendering: pixelated;
}

html, body, .auth-root, .fx-root, .ab-root, .life-root, .linv-root, .ui-load {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: var(--cursor-default);
}

button, a, [role="button"], summary, label,
.auth-tab, .auth-submit, .auth-link, .auth-lang, .auth-check,
.fx-close, .fx-tab, .fx-btn, .fx-row, .wmap-card,
.path-choices button, .ab-btn, .inv-slot {
  cursor: var(--cursor-pointer);
}

input, textarea, select {
  cursor: text;
}

button:disabled, .auth-submit:disabled, .wmap-card.here, .fx-btn:disabled {
  cursor: var(--cursor-default);
}

.ui-pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.ui-load {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(8, 10, 16, 0.72);
  pointer-events: auto;
  font-family: var(--ui-font);
}
.ui-load.hidden { display: none; }
.ui-load.bare { background: #0f1620; }

.ui-load-plaque {
  width: 288px;
  height: 84px;
  background: url("../cute-ui/cut/ribbon-wide.png") center / 288px 84px no-repeat;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff8dc;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 1px;
  text-align: center;
  padding: 0 18px;
  box-sizing: border-box;
  text-shadow: 0 1px 0 #1a1008, 0 -1px 0 #1a1008, 1px 0 0 #1a1008, -1px 0 0 #1a1008;
}

.ui-spinner {
  width: 32px;
  height: 32px;
  background: url("../cute-ui/cut/spinner.png") 0 0 / 512px 32px no-repeat;
  image-rendering: pixelated;
  transform: scale(2);
  transform-origin: center;
  animation: ui-spin 0.8s steps(16) infinite;
}
@keyframes ui-spin {
  to { background-position: -512px 0; }
}

.ui-dragon {
  width: 48px;
  height: 16px;
  background: url("../cute-ui/cut/load-bar.png") 0 0 / 384px 16px no-repeat;
  image-rendering: pixelated;
  transform: scale(3);
  transform-origin: center;
}
.ui-dragon[data-f="0"] { background-position: 0 0; }
.ui-dragon[data-f="1"] { background-position: -48px 0; }
.ui-dragon[data-f="2"] { background-position: -96px 0; }
.ui-dragon[data-f="3"] { background-position: -144px 0; }
.ui-dragon[data-f="4"] { background-position: -192px 0; }
.ui-dragon[data-f="5"] { background-position: -240px 0; }
.ui-dragon[data-f="6"] { background-position: -288px 0; }
.ui-dragon[data-f="7"] { background-position: -336px 0; }

.ui-load-label {
  color: #ffe7a8;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 #1a1008;
}
.ui-load-pct {
  color: #fff0c4;
  font-size: 20px;
  font-weight: 400;
}

.auth-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ui-font);
  z-index: 60;
  pointer-events: none;
}
.auth-root::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(8, 10, 14, 0.48) 0%, rgba(6, 8, 12, 0.72) 58%, rgba(4, 5, 8, 0.88) 100%);
  pointer-events: none;
}
.auth-root.hidden { display: none; }

.auth-stage {
  pointer-events: auto;
  position: relative;
  width: min(400px, 84vw, 70vh * 0.715);
}

.auth-candle {
  display: none;
}

.auth-card {
  width: 100%;
  aspect-ratio: 986 / 1379;
  height: auto;
  min-height: 0;
  background-color: transparent;
  background-image: url("../ui/login-board.png?v=2");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
  border: none;
  padding: 0;
  box-sizing: border-box;
  color: #4a2e22;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  --ink: 0 1px 0 #f7ead0, 0 -1px 0 #f7ead0, 1px 0 0 #f7ead0, -1px 0 0 #f7ead0;
}

.auth-title {
  position: absolute;
  top: 2.2%;
  left: 22%;
  right: 22%;
  height: 7.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.4px;
  color: #f6e2b4;
  text-align: center;
  text-shadow: 0 1px 0 #2a1408, 1px 0 0 #2a1408, -1px 0 0 #2a1408, 0 -1px 0 #2a1408;
  pointer-events: none;
}

.auth-sheet {
  position: absolute;
  top: 13.8%;
  left: 17.6%;
  right: 17.6%;
  bottom: 13.4%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.auth-sheet form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.auth-sub {
  font-size: 14px;
  color: #6b4a2a;
  text-align: center;
  margin: 0 0 10px;
  flex: none;
  text-shadow: var(--ink);
}
.auth-sub::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 6px auto 0;
  background: #c9a045;
}

.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex: none; }
.auth-tab {
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px 0;
  border: 0;
  background: url("../generated/ui-kit/login-btn.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  color: #4a2e22;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  text-shadow: var(--ink);
}
.auth-tab.active {
  color: #5c3a1e;
  background-image: url("../generated/ui-kit/login-btn-on.png");
}
.auth-tab:not(.active) { filter: brightness(0.92); }

.auth-field { margin-bottom: 12px; }
.auth-label {
  display: block;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: #8a4e18;
  margin-bottom: 7px;
  text-shadow: var(--ink);
}
.auth-input-wrap {
  position: relative;
  display: block;
}
.auth-input {
  width: 100%;
  box-sizing: border-box;
  height: 34px;
  border: 3px solid #6b3e22;
  background-color: #f3ddb4;
  image-rendering: pixelated;
  color: #3a2214;
  padding: 0 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  box-shadow: inset 0 2px 0 #e2c48a;
}
.auth-input:focus {
  outline: none;
  border-color: #c9a045;
  background-color: #f3ddb4;
}
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #3a2214;
  caret-color: #3a2214;
  box-shadow: 0 0 0 40px #f3ddb4 inset;
  border-color: #6b3e22;
  transition: background-color 99999s ease-out 0s;
}
.auth-hint {
  font-size: 12px;
  color: #7a5530;
  margin-top: 3px;
  min-height: 0;
  text-shadow: var(--ink);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 14px;
  flex: none;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4a2e22;
  white-space: nowrap;
  text-shadow: var(--ink);
}
.auth-check input { width: 14px; height: 14px; accent-color: #8a6018; flex: none; }
.auth-lang {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: #8a4e18;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  padding: 0;
  text-shadow: var(--ink);
}

.auth-submit {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px 0;
  border: 0;
  background: url("../generated/ui-kit/login-btn-on.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  color: #3a2214;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-shadow: 0 1px 0 #f3e0b0;
  flex: none;
}
.auth-submit-label { white-space: nowrap; }
.auth-submit:hover { filter: brightness(1.08); }
.auth-submit:disabled {
  color: #7a6040;
  cursor: var(--cursor-default);
  filter: grayscale(0.35);
  box-shadow: none;
}

.auth-error {
  min-height: 18px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #c45a3a;
  text-align: center;
  text-shadow: var(--ink);
}
.auth-resume { margin-top: 6px; text-align: center; flex: none; }
.auth-link {
  background: none;
  border: none;
  color: #b86a20;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-shadow: var(--ink);
}

.auth-busy {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(247, 234, 208, 0.9);
  z-index: 2;
}
.auth-busy.on { display: flex; }
.auth-busy .ui-spinner { transform: scale(1.4); }
.auth-busy .ui-dragon { transform: scale(1.15); }
.auth-busy-label { color: #5c3a1e; font-size: 16px; font-weight: 400; }

/* ——— Fantasy panels: 2 bảng đứng (board-tall 5× = 355×560), như login ——— */
.fx-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  background: rgba(18, 10, 8, 0.55);
  font-family: var(--ui-font);
  --ink: 0 1px 0 #fff4e4, 0 -1px 0 #fff4e4, 1px 0 0 #fff4e4, -1px 0 0 #fff4e4;
  color: #4a2e22;
  pointer-events: auto;
  padding: 12px;
  box-sizing: border-box;
}
.fx-root.open { display: flex; }

.fx-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 100%;
}

.fx-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: -18px;
}

.fx-plaque {
  width: 288px;
  height: 84px;
  background: url("../cute-ui/cut/ribbon-wide.png") center / 288px 84px no-repeat;
  image-rendering: pixelated;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 16px 14px;
  box-sizing: border-box;
  text-align: center;
}
.fx-title {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #4a2e22;
  text-shadow: var(--ink);
  line-height: 1.1;
}
.fx-gold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 400;
  color: #ffe27a;
  text-shadow: var(--ink);
}
.fx-gold::before {
  content: "";
  width: 14px;
  height: 14px;
  background: url("../cute-ui/cut/coin.png") center / 14px 14px no-repeat;
  image-rendering: pixelated;
}
.fx-msg {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 4px;
  font-size: 10px;
  font-weight: 400;
  color: #ffe7a8;
  text-shadow: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}
.fx-close {
  width: 36px;
  height: 36px;
  flex: none;
  border: none;
  padding: 0;
  cursor: var(--cursor-pointer);
  background: url("../cute-ui/cut/close.png") center / 28px 28px no-repeat;
  image-rendering: pixelated;
  filter: none;
  align-self: flex-start;
  margin-top: 8px;
}
.fx-close:hover { filter: brightness(1.45); }

.fx-boards {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fx-candle {
  display: none;
}
.fx-candle.left {
  left: -36px;
  background-image: url("../cute-ui/cut/slot.png");
}
.fx-candle.right {
  right: -36px;
  background-image: url("../cute-ui/cut/slot.png");
}

.fx-board {
  width: 360px;
  height: 460px;
  background-color: #163a44;
  border: 18px solid transparent;
  border-image: url("../cute-ui/cut/panel-gold.png") 8 / 18px;
  image-rendering: pixelated;
  padding: 36px 22px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: #f4e6b0;
  --ink: 0 1px 0 #0a181c, 0 -1px 0 #0a181c, 1px 0 0 #0a181c, -1px 0 0 #0a181c;
}
.fx-board.menu {
  background-image: none;
}

.fx-section {
  font-size: 20px;
  font-weight: 400;
  color: #f4e6b0;
  text-shadow: var(--ink);
  margin-bottom: 8px;
  text-align: center;
}

.fx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  justify-content: center;
}
.fx-tab {
  height: 28px;
  padding: 0 8px;
  border: 4px solid transparent;
  border-image: url("../cute-ui/cut/btn.png") 4 fill / 4px;
  background: transparent;
  image-rendering: pixelated;
  color: #e8d4a8;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  text-shadow: var(--ink);
}
.fx-tab.active {
  color: #fffdf2;
  filter: brightness(1.25);
}

.fx-filter {
  width: 100%;
  box-sizing: border-box;
  height: 34px;
  margin-bottom: 8px;
  border: 5px solid transparent;
  border-image: url("../cute-ui/cut/btn.png") 5 fill / 5px;
  background-color: #120c08;
  image-rendering: pixelated;
  color: #fffdf2;
  padding: 0 10px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
}
.fx-filter:focus { outline: none; filter: brightness(1.2); }
.fx-filter::placeholder { color: #a89068; }

.fx-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}
.fx-list::-webkit-scrollbar { width: 6px; }
.fx-list::-webkit-scrollbar-thumb {
  background: #6b4424;
  border: 1px solid #2a180c;
}

.fx-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border: 4px solid transparent;
  border-image: url("../cute-ui/cut/btn.png") 4 fill / 4px;
  image-rendering: pixelated;
  background: transparent;
  box-sizing: border-box;
}
.fx-row.selected { filter: brightness(1.2); }

.fx-icon {
  width: 36px;
  height: 36px;
  flex: none;
  image-rendering: pixelated;
  /* Sheet 512×2048, ô 64×64 → scale theo ô 36px */
  background-size: 288px 1152px;
  background-position: 0 0;
  background-repeat: no-repeat;
  background-color: #0c0804;
  box-shadow: inset 0 0 0 1px #3a2814;
}

.fx-grow { flex: 1; min-width: 0; }
.fx-name {
  font-size: 10px;
  font-weight: 400;
  text-shadow: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-meta {
  font-size: 10px;
  color: #f0d9a0;
  text-shadow: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-price {
  font-size: 10px;
  font-weight: 400;
  color: #ffe27a;
  white-space: nowrap;
  text-shadow: var(--ink);
  min-width: 2.5em;
  text-align: right;
}

.fx-btn {
  height: 28px;
  padding: 0 10px;
  border: 4px solid transparent;
  border-image: url("../cute-ui/cut/btn.png") 4 fill / 4px;
  background: transparent;
  image-rendering: pixelated;
  color: #fffdf2;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  text-shadow: var(--ink);
  flex: none;
}
.fx-btn.secondary { filter: brightness(0.92); color: #e8dcc0; }
.fx-btn:disabled {
  color: #9a8460;
  cursor: var(--cursor-default);
  filter: grayscale(0.4);
}
.fx-btn:not(:disabled):hover { filter: brightness(1.2); }

.fx-empty {
  font-size: 10px;
  font-weight: 600;
  color: #f0d9a0;
  text-shadow: var(--ink);
  text-align: center;
  padding: 12px 4px;
}
.fx-hint {
  margin-top: auto;
  padding-top: 10px;
  font-size: 10px;
  font-weight: 400;
  color: #ffe7a8;
  text-shadow: var(--ink);
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .fx-board {
    width: 284px;
    height: 368px;
    background-size: 284px 368px;
    padding: 48px 20px 16px;
  }
  .fx-candle { display: none; }
  .fx-plaque {
    width: 216px;
    height: 63px;
    background-size: 216px 63px;
  }
  .fx-title { font-size: 20px; }
}

/* Inventory paper-doll */
.inv-doll {
  display: grid;
  grid-template-columns: 56px 64px 56px;
  grid-template-rows: 56px 64px 56px;
  gap: 6px;
  justify-content: center;
  align-content: center;
  margin: 0 0 10px;
}
.inv-slot {
  width: 56px;
  height: 56px;
  border: none;
  padding: 0;
  cursor: var(--cursor-pointer);
  background: url("../cute-ui/cut/slot.png") center / 48px 48px no-repeat;
  image-rendering: pixelated;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: brightness(1.08);
}
.inv-slot:hover { filter: brightness(1.3); }
.inv-slot.filled { background-image: url("../cute-ui/cut/slot-ornate.png"); }
.inv-slot .fx-icon {
  width: 36px;
  height: 36px;
  box-shadow: none;
  background-color: transparent;
  background-size: 288px 1152px;
}
.inv-slot-label {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  font-size: 11px;
  font-weight: 400;
  color: #ffe7a8;
  text-align: center;
  text-shadow: var(--ink);
  pointer-events: none;
  line-height: 1;
}
.inv-center {
  width: 64px;
  height: 64px;
  background: url("../cute-ui/cut/sword.png") center / 28px 64px no-repeat;
  image-rendering: pixelated;
  justify-self: center;
  align-self: center;
}
.inv-doll .pos-helmet { grid-column: 2; grid-row: 1; justify-self: center; }
.inv-doll .pos-cape { grid-column: 1; grid-row: 2; }
.inv-doll .pos-weapon { grid-column: 3; grid-row: 2; }
.inv-doll .pos-armor { grid-column: 1; grid-row: 3; }
.inv-doll .pos-shield { grid-column: 3; grid-row: 3; }
.inv-doll .pos-bracers { grid-column: 2; grid-row: 3; justify-self: center; }
.inv-doll .pos-orb { grid-column: 2; grid-row: 2; }
.inv-doll .pos-shirt { grid-column: 1; grid-row: 2; }
.inv-doll .pos-pants { grid-column: 3; grid-row: 3; }

.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, 56px);
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
  justify-content: center;
}
.inv-cell {
  width: 56px;
  height: 56px;
  border: none;
  padding: 0;
  cursor: var(--cursor-pointer);
  background: url("../cute-ui/cut/slot.png") center / 52px 52px no-repeat;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.inv-cell:hover { filter: brightness(1.25); }
.inv-cell.selected { filter: brightness(1.4); outline: 2px solid #ffe27a; outline-offset: 0; }
.inv-cell.equipped::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border: 1px solid #14532d;
}
.inv-cell .fx-icon {
  width: 36px;
  height: 36px;
  box-shadow: none;
  background-color: transparent;
  background-size: 288px 1152px;
}
.inv-pixel-icon {
  display: block;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  transform: scale(2);
  transform-origin: center;
}
.inv-qty {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 10px;
  color: #fef3c7;
  text-shadow: 0 1px 0 #1c1917;
}
.inv-detail {
  margin-top: 4px;
  padding: 8px 6px;
  min-height: 88px;
  border: 4px solid transparent;
  border-image: url("../cute-ui/cut/btn.png") 4 fill / 4px;
  image-rendering: pixelated;
}
.inv-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
}
.inv-hint {
  font-size: 10px;
  font-weight: 600;
  color: #f0d9a0;
  text-shadow: var(--ink);
  margin-top: 8px;
  text-align: center;
}

/* ——— Action bar (nút shop / túi / auto / đánh) ——— */
.ab-root {
  position: fixed;
  inset: 0;
  z-index: 51;
  font-family: var(--ui-font);
  --ink: 0 1px 0 #3a2018, 0 -1px 0 #3a2018, 1px 0 0 #3a2018, -1px 0 0 #3a2018;
  pointer-events: none;
}
.ab-root.hidden { display: none; }

.ab-tools {
  position: absolute;
  right: 14px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ab-status {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  height: auto;
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: none;
  image-rendering: pixelated;
}

.ab-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
}

.ab-avatar-frame {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 3px solid #2a2118;
  border-radius: 50%;
  background: #cbb089;
  box-shadow: none;
  overflow: hidden;
  image-rendering: pixelated;
}

.ab-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  image-rendering: pixelated;
}

.ab-vitals {
  position: static;
  width: 118px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ab-vital-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ab-ico {
  width: 12px;
  height: 12px;
  flex: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
  image-rendering: pixelated;
}

.ab-meter {
  position: relative;
  flex: 1;
  height: 11px;
  overflow: hidden;
  border: 2px solid #2a2118;
  border-radius: 6px;
  background: #2a2a2e;
}
.ab-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  max-width: 100%;
  border-radius: 0;
  transition: width 140ms ease-out;
}
.ab-meter-hp .ab-meter-fill {
  background: #e85a4a;
  box-shadow: none;
}
.ab-meter-mp .ab-meter-fill {
  background: #4aa8e8;
  box-shadow: none;
}
.ab-meter-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 8px;
  line-height: 11px;
  text-shadow: var(--ink);
}
.ab-level {
  position: absolute;
  bottom: -8px;
  left: 50%;
  min-width: 34px;
  height: 16px;
  padding: 2px 6px 0;
  border: 0;
  border-radius: 0;
  background: url("../generated/ui-kit/hud-level.png") center / 100% 100% no-repeat;
  color: #fff8e8;
  font-size: 8px;
  line-height: 14px;
  text-align: center;
  text-shadow: none;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.ab-bar {
  width: 148px;
  height: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
  border: none;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}

.ab-bar-ico {
  width: 16px;
  height: 16px;
  flex: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  image-rendering: pixelated;
}
.ab-ico-hp { background-image: url("../cute-ui/cut/heart.png"); }
.ab-ico-mp { background-image: url("../cute-ui/cut/bolt.png"); }

.ab-bar-track {
  flex: 1;
  height: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  border-image: url("../cute-ui/cut/bar-empty.png") 2 fill / 2px;
  background: #2a1810;
  box-shadow: none;
  box-sizing: border-box;
  image-rendering: pixelated;
}

.ab-bar-fill {
  width: 0;
  height: 100%;
}

.ab-bar-hp .ab-bar-fill {
  background: #e85a4a;
}

.ab-bar-mp {
  width: 140px;
}

.ab-bar-mp .ab-bar-fill {
  background: #4aa8e8;
}

.ab-gold {
  position: fixed;
  top: 10px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 0;
  border-radius: 0;
  background: url("../generated/ui-kit/hud-gold-chip.png") center / 100% 100% no-repeat;
  box-sizing: border-box;
  image-rendering: pixelated;
  box-shadow: none;
}

.ab-gold::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: url("../generated/ui-kit/gold-coin.png") center / contain no-repeat;
  box-shadow: none;
  transform: translateY(-50%);
  image-rendering: pixelated;
}

.ab-gold-value {
  color: #3a2a18;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
}

.ab-skills {
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  height: auto;
  padding: 0;
  box-sizing: border-box;
  background: none;
  image-rendering: pixelated;
  transform: translateX(-50%);
  pointer-events: auto;
}
.ab-btn-skill .inv-pixel-icon {
  position: relative;
  z-index: 2;
  transform: scale(2.4);
  pointer-events: none;
}
.farm-menu {
  position: fixed;
  z-index: 80;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 2px;
  max-width: calc(100vw - 16px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  image-rendering: pixelated;
  pointer-events: auto;
}
.farm-menu[hidden] {
  display: none !important;
}
.farm-menu-btn {
  position: relative;
  pointer-events: auto;
  display: flex;
  flex: 0 0 50px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 50px;
  min-width: 50px;
  height: 65px;
  padding: 6px 5px 5px;
  border: 0;
  border-radius: 0;
  background: url("../generated/pixel-fantasy-ui-kit/farm-action-card.png") center / 100% 100% no-repeat;
  color: #32180e;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 10px;
  text-align: center;
  text-shadow:
    0 1px 0 #fff1c8,
    1px 0 0 #fff1c8,
    -1px 0 0 #fff1c8;
  box-shadow: none;
}
.farm-menu-btn:hover:not(:disabled),
.farm-menu-btn:focus:not(:disabled),
.farm-menu-btn.is-selected:not(:disabled) {
  outline: none;
  filter: brightness(1.14) drop-shadow(0 0 3px #49f58a);
}
.farm-menu-btn.is-selected:not(:disabled)::before {
  position: absolute;
  top: -13px;
  left: 50%;
  content: "▼";
  color: #7dffa8;
  font-size: 11px;
  line-height: 11px;
  text-shadow:
    0 1px 0 #08331e,
    0 0 5px #31ff79;
  transform: translateX(-50%);
}
.farm-menu-btn:disabled {
  opacity: 0.46;
  filter: grayscale(0.65);
  cursor: default;
}
.farm-menu-btn .inv-pixel-icon {
  flex: 0 0 auto;
  transform: scale(2.4);
  transform-origin: center;
  margin: 0;
}
.farm-menu-btn.has-label {
  justify-content: flex-end;
  gap: 2px;
}
.farm-menu-btn.has-label .inv-pixel-icon {
  transform: scale(1.55);
  margin: auto 0 2px;
}
.farm-menu-label {
  display: -webkit-box;
  width: 100%;
  min-height: 20px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-wrap: balance;
}

.ab-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 110px;
  min-width: 110px;
  height: 54px;
  padding: 0 8px;
  border: 0;
  background: url("../generated/pixel-fantasy-ui-kit/menu-wide.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  color: #fff4cf;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  text-shadow: var(--ink);
  box-sizing: border-box;
}
.ab-btn:hover { filter: brightness(1.18); }
.ab-btn:active { filter: brightness(0.92); transform: translateY(1px); }
.ab-btn.on {
  filter: brightness(1.25);
  color: #b8f5c8;
}
.ab-btn.ab-btn-skill {
  position: relative;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-image: none;
  border-radius: 0;
  background: url("../generated/ui-kit/hud-slot.png") center / 100% 100% no-repeat;
  box-shadow: none;
  color: #4a2e22;
}
.ab-btn.ab-btn-skill:hover {
  filter: brightness(1.12);
  transform: none;
}
.ab-btn.ab-btn-skill:active { filter: none; transform: none; }
.ab-btn.ab-btn-skill.on {
  background-image: url("../generated/ui-kit/hud-slot-on.png");
  filter: none;
  color: #4a2e22;
  outline: none;
  transform: none;
}
.ab-btn-skill .ab-label { display: none; }
.ab-btn-skill .ab-key {
  position: absolute !important;
  top: 1px;
  left: 3px;
  z-index: 4 !important;
  min-width: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: #efe6c8;
  font-size: 9px;
  line-height: 10px;
}
.ab-skill-icon {
  z-index: 2;
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.ab-btn-skill > :not(.ab-cd-shade) {
  position: relative;
  z-index: 2;
}
.ab-btn-skill.cooling {
  filter: saturate(0.65);
}
.ab-cd-shade {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  z-index: 1;
  height: 0;
  background: rgba(7, 11, 20, 0.72);
  pointer-events: none;
}
.ab-cd-time {
  position: absolute !important;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 20px;
  text-shadow: var(--ink);
  pointer-events: none;
}
.ab-btn-skill::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 10;
  box-sizing: border-box;
  width: max-content;
  max-width: 190px;
  min-height: 0;
  padding: 7px 10px;
  border: 1px solid rgb(216 177 94 / 88%);
  border-radius: 7px;
  background: rgb(20 38 39 / 94%);
  box-shadow:
    inset 0 0 0 1px rgb(255 239 185 / 12%),
    0 2px 4px rgb(8 13 13 / 48%);
  color: #fff1c2;
  font-family: var(--ui-font);
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: 0.15px;
  text-align: center;
  text-shadow: 0 1px 0 #160d08, 1px 0 0 #160d08, -1px 0 0 #160d08;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 90ms linear, transform 90ms linear;
}
.ab-btn-skill:hover::after,
.ab-btn-skill:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ab-icon {
  width: 28px;
  height: 28px;
  flex: none;
  image-rendering: pixelated;
  background-size: 28px 28px;
  background-repeat: no-repeat;
  background-position: center;
}
.ab-icon-shop { background-image: url("../cute-ui/cut/bag.png"); }
.ab-icon-bag { background-image: url("../cute-ui/cut/bag.png"); }
.ab-icon-map { background-image: url("../cute-ui/cut/book.png"); }
.ab-icon-atk { background-image: url("../cute-ui/cut/sword.png"); }

.wmap-stage { width: min(920px, 96vw); }
.wmap-board {
  width: 100%;
  max-height: min(72vh, 620px);
  overflow: auto;
  padding: 28px 18px 16px;
  box-sizing: border-box;
  background-color: #163a44;
  border: 16px solid transparent;
  border-image: url("../cute-ui/cut/panel-gold.png") 8 / 16px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 3px #3a2410;
  --ink: 0 1px 0 #0a181c, 0 -1px 0 #0a181c, 1px 0 0 #0a181c, -1px 0 0 #0a181c;
  color: #f4e6b0;
}
.wmap-hint {
  text-align: center;
  font-size: 16px;
  color: #dce8e4;
  text-shadow: var(--ink);
  margin-bottom: 12px;
}
.wmap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wmap-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: 3px solid #3d4a52;
  background: #1a2430;
  color: #f4e6b0;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  text-shadow: var(--ink);
}
.wmap-card:hover { filter: brightness(1.12); }
.wmap-card.here {
  border-color: #e8c04a;
  background: #243840;
  cursor: var(--cursor-default);
}
.wmap-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0c0806 center / cover no-repeat;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px #2a180f;
}
.wmap-name {
  font-size: 16px;
  text-align: center;
}
.wmap-here {
  font-size: 14px;
  text-align: center;
  color: #ffe27a;
}
@media (max-width: 720px) {
  .wmap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.path-stage { width: min(880px, 96vw); }
.path-board {
  width: 100%;
  max-height: min(76vh, 640px);
  overflow: auto;
  padding: 28px 18px 18px;
  box-sizing: border-box;
  background-color: #163a44;
  border: 16px solid transparent;
  border-image: url("../cute-ui/cut/panel-gold.png") 8 / 16px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 3px #3a2410;
  --ink: 0 1px 0 #0a181c, 0 -1px 0 #0a181c, 1px 0 0 #0a181c, -1px 0 0 #0a181c;
  color: #f4e6b0;
}
.path-hint {
  text-align: center;
  font-size: 16px;
  color: #dce8e4;
  text-shadow: var(--ink);
  margin-bottom: 14px;
}
.path-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.path-row h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 400;
  color: #ffe27a;
  text-shadow: var(--ink);
}
.path-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.path-icon-wrap {
  display: block;
  width: 48px;
  height: 48px;
  flex: none;
  align-self: center;
  overflow: hidden;
  background: #0c0806;
  box-shadow: inset 0 0 0 2px #2a180f;
}
.path-choices img,
.path-icon {
  display: block;
  width: 48px !important;
  height: 48px !important;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}
.path-icon-wrap:has(.path-icon[hidden]) { display: none; }
.path-icon[hidden] { display: none; }
.path-choices button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  overflow: hidden;
  min-height: 0;
  padding: 10px 12px;
  border: 3px solid #3d4a52;
  background: #1a2430;
  color: #f4e6b0;
  cursor: var(--cursor-pointer);
  font-family: inherit;
  text-align: left;
  text-shadow: var(--ink);
}
.path-choices button:hover { filter: brightness(1.12); }
.path-choices button.on {
  border-color: #e8c04a;
  background: #243840;
}
.path-choices button strong {
  font-size: 16px;
  font-weight: 400;
}
.path-choices button span {
  font-size: 13px;
  line-height: 1.35;
  color: #dce8e4;
}
@media (max-width: 720px) {
  .path-choices { grid-template-columns: 1fr; }
}

.ab-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
}
.ab-key {
  font-size: 10px;
  font-weight: 400;
  color: #ffe27a;
  opacity: 0.9;
  min-width: 1.2em;
  text-align: center;
}

@media (max-width: 520px) {
  .ab-tools { right: 8px; bottom: 78px; }
  .ab-status { top: 8px; left: 8px; bottom: auto; width: auto; height: auto; }
  .ab-skills {
    bottom: 8px;
    height: 50px;
    padding: 5px 14px;
    transform: translateX(-50%) scale(0.92);
    transform-origin: center bottom;
  }
  .ab-avatar-wrap, .ab-avatar-frame { width: 44px; height: 44px; }
  .ab-avatar { width: 100%; height: 100%; }
  .ab-vitals { width: 96px; gap: 4px; }
  .ab-meter { height: 10px; }
  .ab-meter-fill { inset: 0 auto 0 0; max-width: 100%; }
  .ab-meter-value { font-size: 7px; line-height: 10px; }
  .ab-level { bottom: -6px; font-size: 7px; }
  .ab-gold { top: 8px; right: 8px; width: 100px; height: 32px; padding-left: 32px; }
  .ab-gold::before { left: 6px; width: 18px; height: 18px; }
  .ab-gold-value { font-size: 10px; }
  .ab-bar { width: 118px; }
  .ab-bar-mp { width: 110px; }
  .ab-btn.ab-btn-skill { width: 36px; min-width: 36px; height: 36px; }
  .ab-skill-icon { width: 28px; height: 28px; }
  .ab-btn {
    min-width: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }
  .ab-tools .ab-label, .ab-tools .ab-key { display: none; }
}

/* Farm warehouses */
.warehouse-root {
  z-index: 58;
  align-items: center;
  justify-content: center;
  background: rgb(10 18 17 / 68%);
  backdrop-filter: blur(2px);
}

.warehouse-stage {
  position: relative;
  width: min(720px, 94vw);
  aspect-ratio: 4 / 3;
  background: url("../generated/warehouse-ui/warehouse-panel.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 16px 18px rgb(8 4 2 / 55%));
}

.warehouse-head {
  position: absolute;
  top: 5.2%;
  right: 18%;
  left: 18%;
  height: 11%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff1bc;
  text-align: center;
  text-shadow: 0 2px 0 #402416, 1px 0 0 #402416, -1px 0 0 #402416;
}

.warehouse-title {
  margin: 0;
  font-family: var(--ui-font);
  font-size: clamp(15px, 2.7vw, 24px);
  letter-spacing: 0.5px;
}

.warehouse-subtitle {
  margin: 4px 0 0;
  color: #ffe6a4;
  font-family: var(--ui-font);
  font-size: clamp(8px, 1.35vw, 12px);
  line-height: 1.35;
}

.warehouse-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  background: center / contain no-repeat;
  image-rendering: pixelated;
}

.warehouse-root[data-warehouse="crop"] .warehouse-mark {
  background-image: url("../cute-fantasy/Crops/Crops.png");
  background-size: 192px 160px;
  background-position: -64px -4px;
}

.warehouse-root[data-warehouse="animal"] .warehouse-mark {
  background-image: url("../cute-fantasy/Icons/Outline/Food_Icons_Outline.png");
  background-size: 256px 256px;
  background-position: -160px -32px;
}

.warehouse-close {
  position: absolute;
  top: 8.5%;
  right: 3.1%;
  z-index: 2;
  width: clamp(24px, 4.5vw, 36px);
  height: clamp(24px, 4.5vw, 36px);
  border: 0;
  background: url("../cute-ui/cut/close.png") center / contain no-repeat;
  cursor: var(--cursor-pointer);
  image-rendering: pixelated;
}

.warehouse-close:hover,
.warehouse-close:focus-visible {
  filter: brightness(1.2) drop-shadow(0 0 3px #ffe49a);
}

.warehouse-tabs {
  display: none;
  position: absolute;
  top: 18.5%;
  right: 8%;
  left: 8%;
  z-index: 2;
  justify-content: center;
  gap: 12px;
  height: 8.4%;
}

.warehouse-tabs button {
  display: flex;
  min-width: 160px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 14px 0;
  color: #fff3d0;
  cursor: var(--cursor-pointer);
  font-family: var(--ui-font);
  font-size: clamp(11px, 1.5vw, 15px);
  text-shadow: 0 1px 0 #2d160c;
}

.warehouse-tabs button.active {
  color: #fff0b0;
  filter: brightness(1.18);
}

.warehouse-content {
  position: absolute;
  inset: 28% 8.5% 18%;
  display: grid;
  align-content: start;
  justify-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 4px 12px;
  scrollbar-color: #b8793f rgb(54 30 18 / 55%);
  scrollbar-width: thin;
}

.warehouse-content::-webkit-scrollbar {
  width: 11px;
}

.warehouse-content::-webkit-scrollbar-track {
  border: 2px solid #6f3f27;
  border-radius: 6px;
  background: #352016;
}

.warehouse-content::-webkit-scrollbar-thumb {
  border: 2px solid #6f3f27;
  border-radius: 6px;
  background: linear-gradient(#e3b45d, #a86632);
}

.warehouse-root[data-warehouse="animal"] .warehouse-content {
  align-content: center;
}

.warehouse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: clamp(8px, 1.3vw, 12px);
  width: min(540px, 88%);
}

.warehouse-root[data-warehouse="animal"] .warehouse-grid {
  grid-template-columns: repeat(2, minmax(100px, 150px));
  justify-content: center;
}

.warehouse-grid.is-shop {
  grid-template-columns: repeat(4, minmax(90px, 1fr));
}

.warehouse-root[data-warehouse="animal"] .warehouse-grid.is-shop {
  grid-template-columns: repeat(3, minmax(100px, 145px));
}

.warehouse-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 104px;
  padding: 10px 7px 28px;
  border: 2px solid #b8793f;
  border-radius: 5px;
  background:
    linear-gradient(rgb(35 20 13 / 20%), rgb(35 20 13 / 20%)),
    url("../cute-ui/cut/slot.png") center / 100% 100% no-repeat;
  box-shadow: inset 0 0 0 2px rgb(255 224 157 / 16%), 0 3px 0 rgb(42 20 11 / 45%);
  color: #ffe9b0;
  image-rendering: pixelated;
}

.warehouse-slot.is-empty {
  opacity: 0.47;
  filter: saturate(0.45);
}

.warehouse-slot .inv-pixel-icon {
  transform: scale(3.1);
  transform-origin: center;
}

.warehouse-item-name {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  padding: 3px 2px;
  border: 1px solid #9b6335;
  border-radius: 3px;
  background: #3b2318;
  overflow: hidden;
  font-family: var(--ui-font);
  color: #fff2bd;
  font-size: clamp(8px, 1.2vw, 11px);
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 #000, 1px 0 0 #000;
  white-space: nowrap;
}

.warehouse-qty {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 25px;
  padding: 2px 4px;
  border: 1px solid #e6bd63;
  border-radius: 7px;
  background: #372017;
  color: #fff0a8;
  font-family: var(--ui-font);
  font-size: 10px;
  text-align: center;
  text-shadow: 0 1px 0 #000;
}

.warehouse-empty {
  min-height: 16px;
  margin: 16px 0 0;
  color: #d8bc8c;
  font-family: var(--ui-font);
  font-size: 10px;
  text-shadow: 0 1px 0 #24120b;
}

.warehouse-offer {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 108px;
  place-items: center;
  padding: 10px 7px 39px;
  border: 2px solid #b8793f;
  border-radius: 5px;
  background: url("../cute-ui/cut/slot.png") center / 100% 100% no-repeat;
  color: #ffe9b0;
  box-shadow: inset 0 0 0 2px rgb(255 224 157 / 16%), 0 3px 0 rgb(42 20 11 / 45%);
  image-rendering: pixelated;
}

.warehouse-offer .inv-pixel-icon {
  transform: scale(3);
}

.warehouse-offer-name {
  position: absolute;
  right: 5px;
  bottom: 29px;
  left: 5px;
  padding: 2px;
  border: 1px solid #9b6335;
  border-radius: 3px;
  background: #3b2318;
  overflow: hidden;
  font-family: var(--ui-font);
  color: #fff2bd;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 #000, 1px 0 0 #000;
  white-space: nowrap;
}

.warehouse-owned {
  position: absolute;
  top: 6px;
  right: 5px;
  color: #f5d890;
  font-family: var(--ui-font);
  font-size: 7px;
  text-shadow: 0 1px 0 #2a150c;
}

.warehouse-buy {
  position: absolute;
  right: 6px;
  bottom: 5px;
  left: 6px;
  min-height: 21px;
  border: 1px solid #efca6e;
  border-radius: 3px;
  background: #32682f;
  color: #fff2b1;
  cursor: var(--cursor-pointer);
  font-family: var(--ui-font);
  font-size: 10px;
  text-shadow: 0 1px 0 #173015;
}

.warehouse-buy:hover:not(:disabled) {
  background: #43853e;
  filter: brightness(1.1);
}

.warehouse-buy:disabled {
  cursor: var(--cursor-default);
  filter: grayscale(0.7);
  opacity: 0.48;
}

.warehouse-animal-icon {
  width: 32px;
  height: 32px;
  background-position: 0 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transform: scale(1.65);
  animation: warehouse-animal-idle 900ms steps(1) infinite;
}

.warehouse-animal-icon.chicken {
  background-image: url("../cute-fantasy/Animals/Chicken/Chicken_01.png");
}

.warehouse-animal-icon.cow {
  background-image: url("../cute-fantasy/Animals/Cow/Cow_07.png");
}

@keyframes warehouse-animal-idle {
  0%,
  49% {
    background-position: 0 0;
  }

  50%,
  100% {
    background-position: -32px 0;
  }
}

@media (max-width: 620px) {
  .warehouse-stage {
    width: min(96vw, 600px);
  }

  .warehouse-head {
    top: 4.7%;
  }

  .warehouse-subtitle {
    display: none;
  }

  .warehouse-tabs {
    top: 16.2%;
    gap: 8px;
  }

  .warehouse-tabs button {
    min-width: 0;
    width: 46%;
    padding: 2px 8px 0;
    font-size: 9px;
  }

  .warehouse-content {
    top: 29%;
  }

  .warehouse-grid {
    grid-template-columns: repeat(4, minmax(55px, 1fr));
    gap: 7px;
    width: 90%;
  }

  .warehouse-slot {
    padding: 7px 4px 17px;
  }

  .warehouse-slot .inv-pixel-icon {
    transform: scale(1.65);
  }

  .warehouse-item-name {
    bottom: 3px;
    font-size: 7px;
    line-height: 9px;
  }

  .warehouse-qty {
    top: 3px;
    right: 3px;
    min-width: 20px;
    font-size: 8px;
  }

  .warehouse-empty {
    margin-top: 8px;
    font-size: 8px;
  }

  .warehouse-footer {
    right: 14%;
    left: 14%;
    padding: 0 3%;
  }

  .warehouse-grid.is-shop {
    grid-template-columns: repeat(4, minmax(55px, 1fr));
  }

  .warehouse-root[data-warehouse="animal"] .warehouse-grid.is-shop {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
  }

  .warehouse-offer {
    min-height: 79px;
    padding: 6px 3px 29px;
  }

  .warehouse-offer .inv-pixel-icon {
    transform: scale(1.3);
  }

  .warehouse-animal-icon {
    transform: scale(1.05);
  }

  .warehouse-offer-name {
    bottom: 20px;
    font-size: 8px;
  }

  .warehouse-owned {
    top: 3px;
    right: 3px;
    font-size: 5px;
  }

  .warehouse-buy {
    right: 3px;
    bottom: 3px;
    left: 3px;
    min-height: 15px;
    font-size: 7px;
  }
}

/* Fish reward reveal shown after the final successful tug. */
.fish-catch-root {
  z-index: 110;
  background: rgb(7 13 20 / 68%);
}

.fish-catch-root.play {
  animation: fish-catch-dim 280ms ease-out;
}

.fish-catch-stage {
  position: relative;
  isolation: isolate;
  width: min(530px, 92vw, calc(94vh * 864 / 1130));
  aspect-ratio: 864 / 1130;
  background: url("../generated/fishing-ui/fish-catch-popup-frame.png") center / 100% 100% no-repeat;
  color: #fff0cf;
  font-family: var(--ui-font);
  image-rendering: pixelated;
  --glow: #f4d060;
}

.fish-catch-root.play .fish-catch-stage {
  animation: fish-catch-pop 480ms cubic-bezier(0.2, 1.28, 0.32, 1);
}

.fish-catch-root.play .fish-catch-stage h2 {
  animation: fish-catch-rise 360ms ease-out 60ms both;
}

.fish-catch-root.play .fish-catch-icon {
  transform-origin: 50% 60%;
  animation:
    fish-catch-reveal 720ms cubic-bezier(0.16, 1.2, 0.32, 1) 80ms both,
    fish-catch-swim 2.4s ease-in-out 820ms infinite;
}

.fish-catch-root.play .fish-catch-icon.is-swim {
  animation:
    fish-catch-reveal 720ms cubic-bezier(0.16, 1.2, 0.32, 1) 80ms both,
    fish-sheet-swim 0.56s steps(1) infinite,
    fish-catch-swim 2.4s ease-in-out 820ms infinite;
}

.fish-catch-root.play .fish-catch-name {
  animation: fish-catch-rise 360ms ease-out 160ms both;
}

.fish-catch-root.play .fish-catch-stars {
  animation: fish-catch-stars 420ms ease-out 220ms both;
}

.fish-catch-root.play .fish-catch-stat,
.fish-catch-root.play .fish-catch-description,
.fish-catch-root.play .fish-catch-sell,
.fish-catch-root.play .fish-catch-keep {
  animation: fish-catch-rise 360ms ease-out 280ms both;
}

.fish-catch-stage h2 {
  position: absolute;
  top: 10.6%;
  left: 50%;
  z-index: 5;
  display: grid;
  width: 72%;
  height: 8.6%;
  margin: 0 0 0 -36%;
  place-items: center;
  padding-top: 12px;
  color: #fff4d8;
  font-size: clamp(22px, 4vw, 36px);
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 0 #32180f, 2px 0 0 #32180f, -2px 0 0 #32180f;
}

.fish-catch-close {
  position: absolute;
  top: 3.4%;
  right: 3.8%;
  z-index: 6;
  display: grid;
  width: 7%;
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid #6f271d;
  border-radius: 7px;
  background: #d74437;
  box-shadow: inset 0 0 0 2px #ff8a64, 0 3px 0 #3f1b15;
  color: #fff4d2;
  font-family: var(--ui-font);
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1;
  text-shadow: 0 2px 0 #711d18;
}

.fish-catch-glow {
  position: absolute;
  top: 24%;
  left: 16%;
  z-index: 1;
  width: 68%;
  height: 26%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, var(--glow) 0 12%, transparent 56%),
    repeating-conic-gradient(from 0deg at 50% 46%, var(--glow) 0 3deg, transparent 3deg 18deg);
  mask-image: radial-gradient(circle at 50% 46%, #000 0 28%, transparent 62%);
  opacity: 0.55;
}

.fish-catch-glow::after {
  content: "";
  position: absolute;
  inset: 6%;
  background: radial-gradient(circle at 50% 46%, var(--glow) 0 14%, transparent 58%);
  opacity: 0.85;
}

.fish-catch-stage[data-stars="1"] { --glow: #d7e4ee; }
.fish-catch-stage[data-stars="2"] { --glow: #f4d060; }
.fish-catch-stage[data-stars="3"] { --glow: #7ecbff; }
.fish-catch-stage[data-stars="4"] { --glow: #c084fc; }
.fish-catch-stage[data-stars="5"] { --glow: #ffe566; }

.fish-catch-root.play .fish-catch-glow {
  animation: fish-catch-glow-pulse 1.8s ease-in-out 200ms infinite;
}

.fish-catch-stage[data-stars="5"] .fish-catch-glow {
  filter: saturate(1.25);
}

.fish-catch-icon {
  position: absolute;
  top: 27%;
  left: 31%;
  z-index: 2;
  width: 38%;
  height: 20%;
  background-image: url("../generated/fishing-ui/fish-species.png");
  background-position: calc(var(--fish-col) * 33.333%) calc(var(--fish-row) * 50%);
  background-size: 400% 300%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 4px 0 rgb(45 25 14 / 45%));
  image-rendering: pixelated;
}

.fish-catch-icon.is-swim {
  background-position: 0 0;
  background-size: 200% 200%;
}

.fish-catch-name {
  position: absolute;
  top: 51.8%;
  left: 50%;
  display: grid;
  width: 58%;
  height: 7.4%;
  margin-left: -29%;
  place-items: center;
  padding: 10px 18px 4px;
  box-sizing: border-box;
  overflow: hidden;
  background: url("../generated/fishing-ui/fish-name-plate.png") center / 100% 100% no-repeat;
  color: #5c321e;
  font-size: clamp(15px, 2.8vw, 24px);
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  image-rendering: pixelated;
  text-shadow: 0 1px 0 #fff1c6;
}

.fish-catch-stars {
  position: absolute;
  top: 60.4%;
  left: 50%;
  z-index: 3;
  display: flex;
  width: 42%;
  height: 5.2%;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: -21%;
  padding: 0;
  background: none;
}

.fish-catch-stars img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.fish-catch-stat {
  position: absolute;
  top: 65%;
  display: flex;
  width: 28%;
  align-items: center;
  flex-direction: column;
  color: #e9d7be;
  font-size: clamp(8px, 1.45vw, 12px);
  line-height: 1.2;
}

.fish-catch-stat.length {
  left: 22%;
}

.fish-catch-stat.value {
  right: 22%;
}

.fish-catch-stat b {
  margin-top: 3px;
  color: #fff4d6;
  font-size: clamp(12px, 2vw, 18px);
}

.fish-catch-description {
  position: absolute;
  top: 74.2%;
  left: 50%;
  display: grid;
  width: 60%;
  height: 7%;
  margin: 0 0 0 -30%;
  place-items: center;
  padding-top: 4px;
  overflow: hidden;
  color: #dec8ad;
  font-size: clamp(7px, 1.25vw, 11px);
  line-height: 1.45;
  text-align: center;
}

.fish-catch-sell,
.fish-catch-keep {
  position: absolute;
  bottom: 6.8%;
  display: grid;
  width: 32%;
  height: 7.6%;
  place-items: center;
  padding-top: 3px;
  border: 0;
  background: var(--ui-wood-btn) center / 100% 100% no-repeat;
  color: #fff5d0;
  font-family: var(--ui-font);
  font-size: clamp(11px, 2vw, 17px);
  line-height: 1;
  image-rendering: pixelated;
  text-shadow: 0 2px 0 #3a1d10;
}

.fish-catch-sell {
  left: 20.2%;
}

.fish-catch-keep {
  right: 19.2%;
}

.fish-catch-sell:hover,
.fish-catch-keep:hover {
  filter: brightness(1.2);
}

.fish-catch-root[data-mode="detail"] .fish-catch-sell,
.fish-catch-root[data-mode="detail"] .fish-catch-keep {
  display: none;
}

@keyframes fish-catch-dim {
  from { background: rgb(7 13 20 / 0%); }
  to { background: rgb(7 13 20 / 68%); }
}

@keyframes fish-catch-pop {
  from { transform: scale(0.72) translateY(18px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes fish-catch-reveal {
  from {
    transform: translateX(-42%) scale(0.35) rotate(-28deg);
    opacity: 0;
    filter: drop-shadow(0 4px 0 rgb(45 25 14 / 45%)) brightness(1.8);
  }
  55% {
    transform: translateX(8%) scale(1.08) rotate(10deg);
    opacity: 1;
  }
  to {
    transform: translateX(0) scale(1) rotate(0);
    opacity: 1;
    filter: drop-shadow(0 4px 0 rgb(45 25 14 / 45%));
  }
}

@keyframes fish-catch-swim {
  0% { transform: translate(0, 0) rotate(0) scale(1); }
  20% { transform: translate(6px, -8px) rotate(-7deg) scale(1.04); }
  40% { transform: translate(-4px, -3px) rotate(6deg) scale(0.98); }
  60% { transform: translate(5px, -10px) rotate(-5deg) scale(1.05); }
  80% { transform: translate(-6px, -2px) rotate(8deg) scale(0.99); }
  100% { transform: translate(0, 0) rotate(0) scale(1); }
}

@keyframes fish-sheet-swim {
  0% { background-position: 0 0; }
  25% { background-position: 100% 0; }
  50% { background-position: 0 100%; }
  75% { background-position: 100% 100%; }
  100% { background-position: 0 0; }
}

@keyframes fish-catch-stars {
  from { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.18); }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fish-catch-rise {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fish-catch-glow-pulse {
  0%, 100% { opacity: 0.78; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* Menu tiện ích nông trại bên phải. */
.ab-side-menu {
  position: fixed;
  top: 50%;
  right: 14px;
  z-index: 41;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 196px;
  padding: 0;
  background: none;
  transform: translateY(-50%);
  pointer-events: auto;
  image-rendering: pixelated;
}

.ab-side-menu button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 196px;
  height: 52px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 0;
  background: url("../generated/ui-kit/hud-menu-row.png") center / 100% 100% no-repeat;
  box-shadow: none;
  color: #3a2a18;
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.1;
  text-shadow: none;
  image-rendering: pixelated;
}

.ab-side-menu img {
  width: 32px;
  height: 32px;
  margin: 0 10px 0 0;
  flex: 0 0 32px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.ab-side-menu b {
  display: block;
  width: auto;
  max-width: 128px;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  color: #3a2a18;
  pointer-events: none;
}

.ab-side-menu button:hover {
  filter: brightness(1.18);
  transform: none;
}

.fishing-root {
  z-index: 90;
  background: rgb(9 16 24 / 72%);
}

.fishing-stage {
  position: relative;
  width: min(790px, 95vw, 92vh);
  aspect-ratio: 1;
  background: url("../generated/fishing-ui/fishing-shop-frame.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  color: #f8ebc5;
}

.fishing-root[data-tab="shop"] .fishing-stage {
  width: min(790px, 95vw, 92vh);
}

.fishing-close {
  position: absolute;
  top: 3.6%;
  right: 3.2%;
  z-index: 6;
  display: grid;
  width: 6.4%;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #6f271d;
  border-radius: 8px;
  background: #d74437;
  box-shadow: inset 0 0 0 2px #ff8a64, 0 2px 0 #3f1b15;
  color: #fff4d2;
  font-family: var(--ui-font);
  font-size: clamp(16px, 2.6vw, 24px);
  line-height: 1;
  text-shadow: 0 2px 0 #711d18;
}

.fishing-close::before {
  content: "×";
}

.fishing-root[data-tab="shop"] .fishing-close {
  top: 3.6%;
  right: 3.2%;
  width: 6.4%;
}

.fishing-title {
  position: absolute;
  top: 3.8%;
  left: 18%;
  z-index: 4;
  display: grid;
  width: 64%;
  height: 8.2%;
  margin: 0;
  place-items: center;
  padding-top: 3px;
  color: #fff3d0;
  font-size: clamp(19px, 3.3vw, 31px);
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 0 #32180f, 2px 0 0 #32180f, -2px 0 0 #32180f;
}

.fishing-root[data-tab="shop"] .fishing-title {
  top: 3.8%;
}

.fishing-subtitle {
  position: absolute;
  top: 16.1%;
  left: 20%;
  width: 60%;
  margin: 0;
  overflow: hidden;
  color: #e7c99d;
  font-size: clamp(8px, 1.35vw, 13px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  display: none;
}

.fishing-categories {
  position: absolute;
  top: 13.4%;
  right: 7%;
  left: 7%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  height: 8.4%;
}

.fishing-root[data-tab="shop"] .fishing-categories {
  display: grid;
}

.ui-tab-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.fishing-categories button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 8px 0;
  color: #fff3d0;
  font-family: var(--ui-font);
  font-size: clamp(8px, 1.25vw, 12px);
  line-height: 1;
  text-shadow: 0 1px 0 #1d0d09;
}

.fishing-categories button.active {
  color: #ffe890;
  filter: brightness(1.18);
}

.fishing-categories button:disabled {
  opacity: 0.42;
}

.fishing-content {
  position: absolute;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: thin;
}

.fishing-collection-grid {
  inset: 22.2% 7% 11%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 2%;
  overflow: auto;
  scrollbar-color: #456b8f #ead2a8;
}

.fish-card.discovered {
  cursor: var(--cursor-pointer);
}

.fish-card.discovered:hover {
  filter: brightness(1.12);
}

.fish-card {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4% 4% 7%;
  border: 3px solid #315c80;
  border-radius: 7px;
  box-sizing: border-box;
  overflow: hidden;
  background: #102b43;
  box-shadow: inset 0 0 0 2px #071827, 0 3px 0 rgb(74 40 22 / 22%);
  color: #f8ebc5;
  text-align: center;
  text-shadow: 0 1px 0 #020812;
}

.fish-card strong {
  z-index: 2;
  width: 100%;
  overflow: hidden;
  font-size: clamp(7px, 1.35vw, 12px);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fish-card small {
  z-index: 2;
  color: #bcd6df;
  font-size: clamp(6px, 0.95vw, 9px);
}

.fish-species-icon {
  position: absolute;
  top: 3%;
  right: 7%;
  left: 7%;
  height: 58%;
  background-image: url("../generated/fishing-ui/fish-species.png");
  background-position: calc(var(--fish-col) * 33.333%) calc(var(--fish-row) * 50%);
  background-size: 400% 300%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.fish-stars {
  z-index: 2;
  color: #ffd43b;
  font-size: clamp(6px, 1.05vw, 10px);
  letter-spacing: -1px;
}

.fish-card.locked {
  justify-content: center;
  color: #869db4;
}

.fish-card.locked strong {
  margin-top: 4px;
}

.fish-shadow {
  color: #1b2d42;
  font-size: clamp(23px, 4vw, 42px);
  font-weight: 900;
  text-shadow: 0 2px 0 #07111c;
}

.fish-stars.muted {
  color: #526a82;
}

.fishing-shop-grid {
  inset: 22.2% 7% 11%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  padding: 2%;
  scrollbar-color: #9e653b #ead2a8;
}

.fishing-offer {
  position: relative;
  display: flex;
  min-height: 265px;
  align-items: center;
  flex-direction: column;
  padding: 16px 9px 48px;
  border: 3px solid #9f6b3c;
  border-radius: 8px;
  box-sizing: border-box;
  background: rgb(255 247 221 / 68%);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 50%), 0 4px 0 rgb(78 41 23 / 22%);
  color: #43291a;
  text-align: center;
}

.fishing-rod-icon {
  width: 82px;
  height: 82px;
  margin: 5px auto 9px;
  background-image: url("../generated/fishing-ui/fishing-rods.png");
  background-position: calc(var(--rod-index) * -82px) center;
  background-size: 328px 82px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.fishing-extra-icon {
  width: 82px;
  height: 82px;
  margin: 5px auto 9px;
  background-image: url("../generated/fishing-ui/fishing-extras.png");
  background-position: calc(var(--extra-index) * -82px) center;
  background-size: 984px 82px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.fishing-offer-owned {
  position: absolute;
  top: 7px;
  right: 8px;
  color: #745039;
  font-size: clamp(7px, 1vw, 10px);
  font-style: normal;
}

.fishing-offer strong {
  min-height: 34px;
  color: #4c2d1d;
  font-size: clamp(10px, 1.7vw, 16px);
  line-height: 1.15;
}

.fishing-offer small {
  margin-top: 7px;
  color: #674735;
  font-size: clamp(7px, 1.05vw, 10px);
  line-height: 1.45;
}

.fishing-offer button {
  position: absolute;
  right: 8px;
  bottom: 9px;
  left: 8px;
  display: grid;
  min-height: 34px;
  place-items: center;
  padding-top: 2px;
  border: 2px solid #1d5a2c;
  border-radius: 6px;
  background: #36a556;
  color: #fff6c8;
  font-family: var(--ui-font);
  font-size: clamp(10px, 1.45vw, 14px);
  line-height: 1;
  text-shadow: 0 1px 0 #16371f;
  box-shadow: inset 0 2px 0 rgb(178 244 163 / 48%), 0 2px 0 #153c20;
}

.fishing-offer button:disabled {
  border-color: #78614c;
  background: #9c8b72;
  color: #e2d4bb;
}

.fishing-wallet {
  position: absolute;
  bottom: 4.4%;
  left: 8%;
  display: none;
  width: 20%;
  align-items: center;
  gap: 8px;
  color: #6a3f22;
  font-size: clamp(10px, 1.6vw, 15px);
  text-shadow: 0 1px 0 #fff3d4;
}

.fishing-root[data-tab="shop"] .fishing-wallet {
  display: flex;
}

.fishing-wallet span {
  width: 18px;
  height: 18px;
  background: url("../cute-ui/cut/coin.png") center / contain no-repeat;
  image-rendering: pixelated;
}

.fishing-message {
  position: absolute;
  bottom: 4.2%;
  left: 8%;
  display: grid;
  width: 52%;
  height: 6.4%;
  place-items: center start;
  margin: 0;
  overflow: hidden;
  padding-top: 2px;
  color: #6a3f22;
  font-size: clamp(7px, 1.15vw, 11px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fishing-root[data-tab="shop"] .fishing-message {
  bottom: 4.2%;
  left: 28%;
  width: 38%;
  text-align: center;
}

.fishing-switch {
  position: absolute;
  right: 7.2%;
  bottom: 4.2%;
  display: flex;
  width: 24%;
  height: 6.4%;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 8px 0;
  color: #fff5c4;
  font-family: var(--ui-font);
  font-size: clamp(8px, 1.35vw, 13px);
  line-height: 1;
  text-shadow: 0 2px 0 #3a1d10;
}

.fishing-root[data-tab="shop"] .fishing-switch {
  right: 6.5%;
  bottom: 5%;
  width: 22%;
}

@media (max-width: 620px) {
  .ab-side-menu {
    top: auto;
    right: 8px;
    bottom: 72px;
    width: 156px;
    padding: 0;
    gap: 8px;
    transform: none;
  }

  .ab-side-menu button {
    width: 156px;
    height: 44px;
    padding: 0 12px 0 10px;
    justify-content: flex-start;
  }

  .ab-side-menu img {
    width: 26px;
    height: 26px;
    margin: 0 8px 0 0;
  }

  .ab-side-menu b {
    display: block;
    max-width: 100px;
    font-size: 12px;
  }

  .fishing-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .fishing-offer {
    min-height: 150px;
    padding: 5px 4px 31px;
  }

  .fishing-rod-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 3px;
    background-position: calc(var(--rod-index) * -48px) center;
    background-size: 192px 48px;
  }

  .fishing-extra-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 3px;
    background-position: calc(var(--extra-index) * -48px) center;
    background-size: 576px 48px;
  }

  .fishing-offer button {
    min-height: 23px;
    font-size: 8px;
  }
}

/* Overlay DEV đổi hình nhân vật (phím P) */
.dbg-look-root {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--ui-font);
  pointer-events: auto;
  color: #fff6d8;
}
.dbg-look-toggle {
  border: 2px solid #8b5a2b;
  background: rgba(18, 14, 10, 0.88);
  color: #ffe27a;
  font: inherit;
  font-size: 12px;
  padding: 4px 8px;
  cursor: var(--cursor-pointer);
  image-rendering: pixelated;
}
.dbg-look-toggle:hover { color: #fff8dc; }
.dbg-look-panel {
  display: none;
  width: 228px;
  padding: 10px;
  box-sizing: border-box;
  background: rgba(12, 14, 22, 0.94);
  border: 2px solid #8b5a2b;
}
.dbg-look-root.open .dbg-look-panel { display: block; }
.dbg-look-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.dbg-look-head strong {
  font-size: 13px;
  font-weight: 400;
  color: #ffe27a;
}
.dbg-look-head span {
  font-size: 10px;
  color: #9aa3b5;
}
.dbg-look-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 7px;
  font-size: 11px;
  color: #fff6d8;
}
.dbg-look-field select {
  width: 100%;
  font: inherit;
  font-size: 12px;
  color: #fff6d8;
  background: #1a1520;
  border: 1px solid #5a4030;
  padding: 3px 4px;
}

/* Generated warehouse + shop frames (reference-matched, text stays live HTML). */
.warehouse-stage {
  width: min(880px, 96vw, calc(92vh * 1151 / 834));
  aspect-ratio: 1151 / 834;
  background: url("../generated/warehouse-ui/warehouse-shop-frame.png") center / 100% 100% no-repeat;
}

.warehouse-root[data-tab="shop"] .warehouse-stage {
  width: min(880px, 96vw, calc(92vh * 1151 / 834));
  aspect-ratio: 1151 / 834;
}

.warehouse-head {
  top: 5.2%;
  right: auto;
  left: 9%;
  width: 32%;
  height: 8%;
  justify-content: center;
}

.warehouse-root[data-tab="shop"] .warehouse-head {
  top: 5.2%;
  left: 9%;
  width: 32%;
  height: 8%;
}

.warehouse-title {
  color: #fff4d0;
  font-size: clamp(15px, 2.4vw, 23px);
  text-shadow: 0 2px 0 #27120b, 2px 0 0 #27120b, -2px 0 0 #27120b;
}

.warehouse-subtitle,
.warehouse-mark {
  display: none;
}

.warehouse-close {
  top: 3.8%;
  right: 3.4%;
  display: grid;
  width: 5.6%;
  height: auto;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #6f271d;
  border-radius: 8px;
  background: #d74437;
  box-shadow: inset 0 0 0 2px #ff8a64, 0 2px 0 #3f1b15;
  color: #fff4d2;
  font-size: clamp(16px, 2.4vw, 22px);
  line-height: 1;
}

.warehouse-close::before {
  content: "×";
}

.warehouse-root[data-tab="shop"] .warehouse-close {
  top: 3.8%;
  right: 3.4%;
  width: 5.6%;
  background: #d74437;
}

.warehouse-wallet {
  position: absolute;
  top: 4.6%;
  right: 11%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 17%;
  height: 6%;
  color: #ffe58e;
  font-family: var(--ui-font);
  font-size: clamp(9px, 1.3vw, 13px);
  text-shadow: 0 1px 0 #1b0e09;
}

.warehouse-root[data-tab="shop"] .warehouse-wallet {
  display: flex;
}

.warehouse-wallet-icon {
  width: 16px;
  height: 16px;
  background: url("../cute-ui/cut/coin.png") center / contain no-repeat;
  image-rendering: pixelated;
}

.warehouse-tabs {
  display: none;
}

.warehouse-content {
  inset: 16.2% 6% 8.5%;
  display: block;
  padding: 12px 14px;
  scrollbar-color: #a96737 #e4c78f;
}

.warehouse-root[data-tab="shop"] .warehouse-content {
  inset: 16.2% 6% 8.5%;
  padding: 12px 14px;
  scrollbar-color: #a96737 #e4c78f;
}

.warehouse-grid {
  grid-template-columns: repeat(6, minmax(64px, 1fr));
  gap: 10px;
  width: 100%;
}

.warehouse-root[data-warehouse="animal"] .warehouse-grid {
  grid-template-columns: repeat(4, minmax(72px, 1fr));
}

.warehouse-grid.is-shop,
.warehouse-root[data-warehouse="animal"] .warehouse-grid.is-shop {
  grid-template-columns: repeat(4, minmax(105px, 1fr));
  gap: 12px;
  width: 100%;
}

.warehouse-slot {
  min-height: 84px;
  padding: 8px 5px 24px;
  border-color: #405878;
  border-radius: 4px;
  background: #182331;
  box-shadow: inset 0 0 0 2px #0c131d, inset 0 0 0 3px rgb(113 145 180 / 30%);
}

.warehouse-slot.has-item {
  border-color: #4d987e;
}

.warehouse-slot.is-empty {
  opacity: 0.35;
}

.warehouse-slot .inv-pixel-icon {
  transform: scale(2.8);
}

.warehouse-item-name {
  right: 3px;
  bottom: 3px;
  left: 3px;
  border-color: #36516f;
  background: #111a26;
  color: #f6ead0;
  font-size: clamp(7px, 1vw, 10px);
}

.warehouse-qty {
  top: auto;
  right: 5px;
  bottom: 25px;
  border-color: #8ca7c4;
  background: #101722;
}

.warehouse-offer {
  min-height: 150px;
  padding: 12px 8px 48px;
  border: 2px solid #c49a65;
  border-radius: 5px;
  background: rgb(255 247 218 / 78%);
  color: #3b2418;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 45%), 0 3px 0 rgb(88 48 27 / 24%);
}

.warehouse-offer:hover {
  border-color: #d7a33b;
  background: rgb(255 250 226 / 94%);
}

.warehouse-offer .inv-pixel-icon {
  transform: scale(3.4);
}

.warehouse-offer-name {
  right: 5px;
  bottom: 34px;
  left: 5px;
  border: 0;
  background: transparent;
  color: #3c261a;
  font-size: clamp(8px, 1.05vw, 11px);
  text-shadow: none;
}

.warehouse-owned {
  top: 5px;
  right: 6px;
  color: #6f4a2f;
  font-size: 8px;
  text-shadow: none;
}

.warehouse-buy {
  right: 7px;
  bottom: 7px;
  left: 7px;
  min-height: 25px;
  border: 2px solid #23552e;
  border-radius: 5px;
  background: #2c9850;
  color: #fff5c7;
  font-size: 10px;
  box-shadow: inset 0 2px 0 rgb(163 237 146 / 45%), 0 2px 0 #173b20;
}

.warehouse-buy:hover:not(:disabled) {
  background: #42b864;
}

.warehouse-empty {
  color: #d8e4ef;
  font-size: 10px;
}

.warehouse-root[data-tab="shop"] .warehouse-empty {
  color: #68472f;
  text-shadow: none;
}

@media (max-width: 620px) {
  .warehouse-stage,
  .warehouse-root[data-tab="shop"] .warehouse-stage {
    width: min(96vw, calc(88vh * 1151 / 834));
  }

  .warehouse-title {
    font-size: 12px;
  }

  .warehouse-content,
  .warehouse-root[data-tab="shop"] .warehouse-content {
    top: 16%;
    padding: 6px;
  }

  .warehouse-grid {
    grid-template-columns: repeat(4, minmax(48px, 1fr));
    gap: 6px;
    width: 100%;
  }

  .warehouse-grid.is-shop,
  .warehouse-root[data-warehouse="animal"] .warehouse-grid.is-shop {
    grid-template-columns: repeat(3, minmax(62px, 1fr));
    gap: 6px;
  }

  .warehouse-slot {
    min-height: 65px;
  }

  .warehouse-slot .inv-pixel-icon,
  .warehouse-offer .inv-pixel-icon {
    transform: scale(2);
  }

  .warehouse-offer {
    min-height: 105px;
  }
}
