/* 《輕鬆農場》 Cozy Pixel UI Styling */
:root {
  --ink: #2c2137;
  --cream: #fff8e8;
  --cream-dark: #f2e4c9;
  --wood: #c78c56;
  --wood-dark: #8c5a32;
  --green: #6ec45e;
  --green-dark: #4a9641;
  --pink: #ff8fab;
  --gold: #ffd447;
  --shadow: rgba(44, 33, 55, 0.28);
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #9ee0f5;
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

#game-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
}

#loading-overlay {
  position: fixed;
  inset: 0;
  background: #fdf6e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  z-index: 999;
}

.hidden {
  display: none !important;
}

/* ==================== TOP HUD ==================== */
.hud-top {
  position: fixed;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
  z-index: 20;
  flex-wrap: wrap;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.wood-badge {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 4px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.title-badge {
  background: linear-gradient(180deg, #fffdf6 0%, #f7ebd2 100%);
}

.ranch-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.level-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.level-tag {
  background: var(--green);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12px;
}

.exp-track {
  width: 58px;
  height: 10px;
  background: #e2d3b8;
  border: 2px solid var(--ink);
  border-radius: 5px;
  overflow: hidden;
}

.exp-fill {
  height: 100%;
  width: 0%;
  background: #ffd447;
  transition: width 0.25s ease;
}

.coin-badge {
  background: #fff5cc;
  font-size: 15px;
}

.stamina-badge {
  background: #e9f9e3;
  font-size: 13px;
}

.stamina-track {
  width: 52px;
  height: 10px;
  background: #d8e3d1;
  border: 2px solid var(--ink);
  border-radius: 5px;
  overflow: hidden;
}

.stamina-fill {
  height: 100%;
  width: 100%;
  background: #67c959;
  transition: width 0.2s ease, background 0.2s ease;
}

.stamina-fill.low {
  background: #f06553;
}

.rest-btn {
  width: 100%;
  background: #ffe094;
}

.sub-pill.locked {
  opacity: 0.55;
  background: #e6dac4;
}

.hud-btn {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 6px 11px;
  box-shadow: 0 4px 0 var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease;
}

.hud-btn:hover {
  background: #fffdf8;
}

.hud-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.hud-btn.accent {
  background: #ffe3ee;
}

.hud-btn.weather-btn {
  background: #e3f6ff;
}

.hud-btn.weather-btn.rainy {
  background: #cbe6ff;
}

/* ==================== FISHING MINI-GAME OVERLAY ==================== */
.fishing-overlay {
  position: fixed;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 6px 0 var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 60;
  width: min(320px, calc(100vw - 24px));
}

.fishing-title {
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.fishing-gauge {
  position: relative;
  width: min(260px, 100%);
  height: 22px;
  background: #3d3347;
  border: 3px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}

.fishing-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #78db65;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
}

.fishing-cursor {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 8px;
  margin-left: -4px;
  background: #ffe866;
  border: 2px solid var(--ink);
  border-radius: 3px;
}

.fishing-actions {
  display: flex;
  gap: 8px;
}

.hud-btn.icon-only {
  padding: 6px 9px;
  font-size: 15px;
}

.hud-btn.bgm-on {
  background: #e6f7d9;
}

.hud-btn.bgm-off {
  background: #ece3d5;
  opacity: 0.72;
}

.hint-chip {
  position: fixed;
  top: 66px;
  left: 14px;
  background: rgba(255, 248, 232, 0.88);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  z-index: 15;
}

/* ==================== TOAST ==================== */
.toast-box {
  position: fixed;
  top: 108px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: var(--ink);
  color: #fff8e8;
  border: 3px solid #ffd447;
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}

.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== BOTTOM DOCK ==================== */
.hud-bottom {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 20;
  max-width: 96vw;
}

.sub-bar {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
  width: max-content;
  max-width: 96vw;
  overflow-x: auto;
  justify-content: center;
  background: rgba(255, 248, 232, 0.94);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 4px 7px;
  box-shadow: 0 4px 0 var(--ink);
}

.sub-pill {
  background: #f5e8ce;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 3px 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.sub-pill.active {
  background: #ffd447;
}

.sub-pill .badge {
  background: var(--ink);
  color: #fff8e8;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 11px;
}

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

.hotbar {
  display: flex;
  gap: 6px;
  background: var(--wood);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 5px 0 var(--ink);
}

.tool-btn, .dock-action-btn {
  position: relative;
  width: 68px;
  height: 60px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: transform 0.08s;
}

.tool-btn:hover, .dock-action-btn:hover {
  background: #ffffff;
}

.tool-btn.active {
  background: #ffe875;
  transform: translateY(-4px);
  box-shadow: 0 6px 0 var(--ink);
}

.dock-action-btn {
  width: 78px;
  height: 68px;
  box-shadow: 0 5px 0 var(--ink);
}

.bag-btn {
  background: #dff5d3;
}
.bag-btn:hover {
  background: #ecfae5;
}

.shop-launch-btn {
  background: #ffcad8;
}
.shop-launch-btn:hover {
  background: #ffdce5;
}

.corner-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  background: #e8505b;
  color: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-key {
  position: absolute;
  top: 2px;
  left: 5px;
  font-size: 10px;
  font-weight: 900;
  opacity: 0.65;
}

.tool-icon {
  font-size: 22px;
  line-height: 1;
}

.tool-label {
  font-size: 11px;
  font-weight: 800;
}

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 24, 46, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.pixel-modal {
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 8px 0 var(--ink);
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.house-modal { max-width: 860px; }
.shop-modal { max-width: 780px; }
.gallery-modal { max-width: 840px; }

.modal-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.house-pane {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.interior-layout {
  display: grid;
  grid-template-columns: 468px 1fr;
  gap: 14px;
  padding: 14px 16px 18px;
}

.interior-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#interior-canvas {
  width: 448px;
  height: 288px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  image-rendering: pixelated;
  cursor: pointer;
}

.interior-quick-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.interior-quick-actions .px-btn {
  flex: 1;
}

.interior-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.furn-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}

.furn-item-btn {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.furn-item-btn.selected {
  background: #ffe875;
}

.bag-toolbar {
  padding: 10px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ing-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

.ing-chip {
  background: #f2e4c9;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 1px 6px;
}

.ing-chip.ok {
  background: #d8f5c9;
}

.ing-chip.missing {
  background: #ffd9de;
  color: #8f2d3b;
}

.modal-header {
  background: var(--wood);
  color: #fff8e8;
  border-bottom: 4px solid var(--ink);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  text-shadow: 2px 2px 0 var(--ink);
}

.close-btn {
  background: #e85d5d;
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.px-btn {
  background: var(--cream-dark);
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 3px 0 var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.px-btn.primary {
  background: #8ee36f;
}

.px-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.px-btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

/* Wardrobe Layout */
.wardrobe-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 16px;
  height: 100%;
  overflow-y: auto;
}

.wardrobe-preview-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.wardrobe-stage-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.wardrobe-stage-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.wardrobe-confirm-bar {
  width: 100%;
  background: #fff3c4;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 var(--ink);
}

.confirm-text {
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.confirm-btns {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.confirm-btns .px-btn {
  padding: 5px 10px;
  font-size: 12px;
}

.wardrobe-pill.previewing {
  background: #ffd1e0;
  border-color: #d43564;
  box-shadow: 0 2px 0 #d43564;
}

#wardrobe-canvas {
  border: 3px solid var(--ink);
  border-radius: 12px;
  image-rendering: pixelated;
  background: #fae8cc;
}

.turntable-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dir-label {
  font-size: 12px;
  font-weight: 800;
  min-width: 82px;
  text-align: center;
}

.preview-note {
  margin: 0;
  font-size: 12px;
  color: #5c4b66;
  text-align: center;
  line-height: 1.5;
}

.wardrobe-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wardrobe-group-title {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}

.wardrobe-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wardrobe-pill {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wardrobe-pill.selected {
  background: #ffe875;
  box-shadow: 0 2px 0 var(--ink);
}

.wardrobe-pill.locked {
  background: #efe6d5;
  color: #6b5a73;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: inline-block;
}

/* Shop Layout */
.shop-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  flex-wrap: wrap;
}

.shop-tab {
  background: var(--cream-dark);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.shop-tab.active {
  background: #ffd447;
}

.shop-grid {
  padding: 14px 16px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.shop-card {
  background: #fffdf7;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 3px 0 var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.shop-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-emoji {
  font-size: 28px;
}

.shop-name {
  font-size: 15px;
  font-weight: 900;
}

.shop-name small {
  font-size: 11px;
  color: #705d7a;
}

.shop-meta {
  font-size: 12px;
  font-weight: 700;
  color: #4f7a3e;
}

.shop-desc {
  margin: 0;
  font-size: 12px;
  color: #5c4b66;
  line-height: 1.45;
}

.shop-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Gallery Layout */
.gallery-intro {
  margin: 12px 16px 0;
  font-size: 13px;
  line-height: 1.5;
}

.gallery-grid {
  padding: 12px 16px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.gallery-card {
  background: #fffdf7;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-title {
  font-size: 14px;
  font-weight: 900;
}

.pixel-img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  image-rendering: pixelated;
  background: #fdf6e8;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px;
}

.gallery-desc {
  margin: 0;
  font-size: 12px;
  color: #5c4b66;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .hint-chip {
    display: none;
  }
}

@media (max-width: 860px) {
  .interior-layout {
    grid-template-columns: 1fr;
  }
  #interior-canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 448 / 288;
  }
}

@media (max-width: 720px) {
  /* Top HUD compact 2-row layout */
  .hud-top {
    top: calc(6px + env(safe-area-inset-top));
    left: 6px;
    right: 6px;
    gap: 5px;
  }
  .hud-left, .hud-right {
    gap: 4px;
    width: 100%;
  }
  .wood-badge {
    padding: 3px 7px;
    font-size: 11px;
    gap: 4px;
    border-width: 2px;
    border-radius: 8px;
    box-shadow: 0 2px 0 var(--ink);
  }
  .ranch-title {
    font-size: 12px;
  }
  .coin-badge {
    font-size: 12px;
  }
  .stamina-badge {
    font-size: 11px;
  }
  .exp-track, .stamina-track {
    width: 30px;
    height: 8px;
  }
  .hud-btn {
    padding: 4px 7px;
    font-size: 11px;
    border-width: 2px;
    border-radius: 8px;
    box-shadow: 0 2px 0 var(--ink);
  }
  .hud-btn.icon-only {
    padding: 4px 7px;
    font-size: 13px;
  }

  .toast-box {
    top: 96px;
    font-size: 12px;
    padding: 6px 12px;
    max-width: calc(100vw - 16px);
  }

  /* Bottom Dock: zero horizontal overflow on any phone screen */
  .hud-bottom {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: 100vw;
    padding: 0 6px calc(8px + env(safe-area-inset-bottom));
    gap: 5px;
  }
  .sub-bar {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 6px;
    border-width: 2.5px;
    box-shadow: 0 3px 0 var(--ink);
  }
  .sub-bar::-webkit-scrollbar {
    display: none;
  }
  .sub-pill {
    padding: 3px 7px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .dock-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
  }
  .hotbar {
    grid-column: 1 / -1;
    order: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 4px;
    border-width: 2.5px;
    border-radius: 12px;
    box-shadow: 0 3px 0 var(--ink);
  }
  .tool-btn {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 2px;
    border-width: 2px;
    border-radius: 8px;
    box-shadow: 0 2px 0 var(--ink);
    gap: 1px;
  }
  .tool-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 0 var(--ink);
  }
  .tool-key {
    display: none;
  }
  .tool-icon {
    font-size: 18px;
  }
  .tool-label {
    font-size: 10px;
    white-space: nowrap;
  }
  .dock-action-btn {
    order: 1;
    width: 100%;
    height: 38px;
    flex-direction: row;
    gap: 6px;
    border-width: 2.5px;
    border-radius: 10px;
    box-shadow: 0 3px 0 var(--ink);
  }
  .dock-action-btn .tool-icon {
    font-size: 16px;
  }
  .dock-action-btn .tool-label {
    font-size: 12px;
  }

  .fishing-overlay {
    bottom: 162px;
    padding: 10px 14px;
  }

  /* Modals fit mobile viewports cleanly */
  .modal-backdrop {
    padding: 8px;
  }
  .pixel-modal {
    max-height: 92dvh;
    border-width: 3px;
    border-radius: 12px;
  }
  .modal-header {
    padding: 8px 12px;
  }
  .modal-header h2 {
    font-size: 15px;
  }
  .close-btn {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .modal-tabs {
    padding: 8px 10px 0;
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .modal-tabs::-webkit-scrollbar {
    display: none;
  }
  .shop-tab {
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    border-width: 2px;
  }
  .interior-layout {
    padding: 10px;
    gap: 10px;
  }
  /* Mobile Wardrobe: pinned live character preview on top + scrollable options below! */
  #house-pane-wardrobe {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .wardrobe-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 10px 10px;
    gap: 8px;
    flex: 1;
    min-height: 0;
  }
  .wardrobe-preview-pane {
    flex-shrink: 0;
    width: 100%;
    background: #f7ebd2;
    border: 2.5px solid var(--ink);
    border-radius: 10px;
    padding: 6px 8px;
  }
  .wardrobe-stage-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  #wardrobe-canvas {
    width: 112px;
    height: 98px;
    flex-shrink: 0;
  }
  .wardrobe-stage-controls {
    flex: 1;
    min-width: 0;
    align-items: stretch;
    gap: 6px;
  }
  .turntable-controls {
    justify-content: space-between;
    gap: 4px;
  }
  .turntable-controls .px-btn {
    padding: 4px 7px;
    font-size: 11px;
  }
  .dir-label {
    min-width: 0;
    font-size: 11px;
  }
  .desktop-only-note {
    display: none;
  }
  .wardrobe-confirm-bar {
    padding: 5px 6px;
    gap: 4px;
  }
  .confirm-text {
    font-size: 11px;
  }
  .confirm-btns .px-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  .wardrobe-options {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }
  .shop-grid, .gallery-grid {
    padding: 10px;
    gap: 8px;
  }
  .bag-toolbar {
    padding: 8px 10px 0;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .ranch-title {
    display: none;
  }
}
