/* Sad u řeky v6.0 — Carved Oak & Parchment Tactile Game UI */
:root {
  --wood-hi: #b5773c;
  --wood-mid: #8e5626;
  --wood-lo: #633815;
  --wood-dark: #45240b;
  --wood-well: #512d11;
  --gold-hi: #fff099;
  --gold-mid: #f7c538;
  --gold-lo: #c98612;
  --parch-hi: #fdf6e2;
  --parch-lo: #f1dfba;
  --ink: #472911;
  --ink-soft: #754c28;
  --green-hi: #6ee05a;
  --green-mid: #43b536;
  --green-lo: #2b7a22;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #5f873f;
  font-family: 'Trebuchet MS', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #fff9eb;
  touch-action: none;
}

#gameCanvas { display: block; width: 100%; height: 100%; cursor: grab; }
#gameCanvas:active { cursor: grabbing; }

.ui-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(40, 18, 4, 0.45)); }

/* Subtle repeating horizontal oak wood grain overlay */
.oak-plaque, .hud-dock, .oak-modal-head {
  background-image:
    repeating-linear-gradient(180deg, rgba(255, 224, 178, 0.06) 0px, rgba(255, 224, 178, 0.06) 2px, rgba(45, 20, 4, 0.07) 2px, rgba(45, 20, 4, 0.07) 6px),
    linear-gradient(180deg, var(--wood-hi) 0%, var(--wood-mid) 52%, var(--wood-lo) 100%);
}

/* ==================== TOP CARVED-OAK HUD ==================== */
.hud-top {
  position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; z-index: 12;
  display: flex; align-items: center; justify-content: space-between; gap: 7px;
  pointer-events: none;
  max-width: 960px; margin: 0 auto;
}

.oak-plaque {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 6px 8px;
  border-radius: 14px;
  border: 2.5px solid #4d290c;
  box-shadow:
    inset 0 2px 0 rgba(255, 228, 168, 0.55),
    inset 0 -3px 0 rgba(56, 28, 8, 0.55),
    0 4px 0 rgba(48, 24, 6, 0.65),
    0 7px 14px rgba(0, 0, 0, 0.28);
  color: #fff9ea;
  font-family: inherit;
  cursor: default;
}
button.oak-plaque { cursor: pointer; transition: transform .1s; }
button.oak-plaque:active { transform: translateY(2px); }

.plaque-ico { width: 26px; height: 26px; flex-shrink: 0; display: block; }
.plaque-ico.sm { width: 22px; height: 22px; }

.plaque-well {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: 999px;
  background: linear-gradient(180deg, #4b280e 0%, #653816 100%);
  border: 1.5px solid rgba(255, 214, 130, 0.35);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
  font-size: 15px; font-weight: 900; letter-spacing: 0.01em;
  text-shadow: 0 1.5px 2px rgba(24, 10, 2, 0.85);
  white-space: nowrap;
}
.coin-plaque .plaque-well strong { color: #ffe77a; }
.carry-icons { display: inline-flex; gap: 4px; font-size: 12px; opacity: 0.94; }

.estate-plaque { gap: 8px; padding: 5px 11px 6px; }
.estate-pair { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 900; text-shadow: 0 1.5px 2px rgba(24, 10, 2, 0.85); }
.estate-sep { width: 2px; height: 18px; border-radius: 2px; background: rgba(66, 34, 10, 0.65); box-shadow: 1px 0 0 rgba(255, 224, 160, 0.25); }
.rep-lv-txt { color: #ffe578; }

/* ==================== SUB-HUD: PARCHMENT QUEST & SKY WEATHER ==================== */
.objective-bar {
  position: fixed; top: calc(58px + env(safe-area-inset-top)); left: 10px; z-index: 10;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px 7px 10px; border-radius: 999px;
  background: linear-gradient(180deg, var(--parch-hi) 0%, var(--parch-lo) 100%);
  border: 2.5px solid #8c5c2b;
  box-shadow:
    inset 0 2px 0 #ffffff,
    inset 0 -2px 0 rgba(164, 114, 58, 0.4),
    0 4px 0 rgba(72, 42, 14, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.22);
  font-family: inherit; font-size: 13px; font-weight: 800; color: var(--ink);
  max-width: calc(100vw - 148px); cursor: pointer; text-align: left;
  transition: transform .12s;
}
.objective-bar:active { transform: translateY(2px); }
.objective-bar.ready {
  border-color: #d49312;
  background: linear-gradient(180deg, #fff9d6 0%, #ffe68c 100%);
  box-shadow: 0 0 18px rgba(255, 218, 72, 0.72), 0 4px 0 rgba(128, 78, 12, 0.6);
}
.obj-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, #9bff7a, #2fa629);
  border: 1.5px solid #1e6619;
  box-shadow: 0 0 6px rgba(96, 224, 80, 0.7);
}
.obj-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-prog {
  font-size: 12px; font-weight: 900; color: #5c3716;
  background: rgba(164, 118, 62, 0.2); padding: 1px 7px; border-radius: 999px; flex-shrink: 0;
}
.obj-reward {
  font-size: 11.5px; font-weight: 900; color: #7d4708;
  background: rgba(255, 206, 56, 0.45); padding: 1px 7px; border-radius: 999px; flex-shrink: 0;
}

.status-right {
  position: fixed; top: calc(58px + env(safe-area-inset-top)); right: 10px; z-index: 10;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}

.env-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 6px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #bde4ff 0%, #7bc0f2 100%);
  border: 2.5px solid #3f6f99;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    0 3px 0 rgba(36, 68, 96, 0.55),
    0 5px 12px rgba(0, 0, 0, 0.22);
  font-family: inherit; font-size: 13.5px; font-weight: 900; color: #1b3b5c;
  cursor: pointer; white-space: nowrap;
}
.env-pill:active { transform: translateY(2px); }
.env-ico { width: 22px; height: 22px; display: block; flex-shrink: 0; }

.sub-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px 5px; border-radius: 999px;
  font-size: 12px; font-weight: 900; white-space: nowrap;
}
.sub-chip.hidden { display: none; }
.fever-chip {
  background: linear-gradient(180deg, #fff199 0%, #f5be2e 100%);
  border: 2px solid #8f560c; color: #4d2906;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.7), 0 0 16px rgba(255, 218, 64, 0.7), 0 3px 0 #7a4608;
}
.boost-chip {
  background: linear-gradient(180deg, #f8e4b8 0%, #e0b468 100%);
  border: 2px solid #6b3f16; color: #3d2108;
  box-shadow: 0 3px 0 rgba(62, 34, 10, 0.55);
}
.combo-chip {
  background: linear-gradient(180deg, #ffb45c 0%, #e06526 100%);
  border: 2px solid #6e2308; color: #fff8e8;
  text-shadow: 0 1px 2px rgba(60, 14, 0, 0.7);
  box-shadow: 0 3px 0 rgba(88, 28, 6, 0.6);
}
.trend-chip {
  background: linear-gradient(180deg, #fff4d6 0%, #f5cf72 100%);
  border: 2px solid #9c5b10; color: #4d2606;
  box-shadow: 0 3px 0 rgba(88, 46, 8, 0.55);
}

/* Contextual action pills above bottom Action Dock */
.context-bar {
  position: fixed; bottom: calc(92px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  z-index: 16; display: flex; gap: 8px; pointer-events: none;
}
.ctx-action-btn {
  pointer-events: auto;
  padding: 10px 18px; border-radius: 999px; border: 2.5px solid #fff2a8;
  font-family: inherit; font-size: 14px; font-weight: 900; cursor: pointer;
  white-space: nowrap; transition: transform .12s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42), 0 0 18px rgba(255, 224, 96, 0.65);
}
.ctx-action-btn:active { transform: translateY(2px); }
.ctx-action-btn.hidden { display: none; }
.ctx-action-btn.fish {
  background: linear-gradient(180deg, #43b7d9 0%, #1d7ca1 100%); color: #fff;
  text-shadow: 0 1.5px 2px rgba(10, 42, 60, 0.8);
}
.ctx-action-btn.talent {
  background: linear-gradient(180deg, #ffe36e 0%, #e39414 100%); color: #472404;
}

/* Talent Picker Cards */
.talent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.talent-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 14px 10px;
}
.talent-ico { font-size: 36px; line-height: 1; filter: drop-shadow(0 3px 4px rgba(60, 30, 6, 0.35)); }
.talent-name { font-size: 14px; font-weight: 900; color: var(--ink); }
.talent-desc { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.38; flex: 1; }
.talent-card .btn-gold-3d { width: 100%; }
.talent-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.talent-chip {
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: rgba(154, 102, 34, 0.16); border: 1.5px solid rgba(154, 102, 34, 0.45); color: var(--ink);
}

/* 3-Second Fishing Minigame */
.fishing-card { max-width: 370px; }
.fishing-stage { display: flex; flex-direction: column; gap: 14px; padding: 16px 14px; }
.fish-track {
  position: relative; height: 42px; border-radius: 999px;
  background: linear-gradient(180deg, #1b6d85 0%, #38a8c2 100%);
  border: 3px solid #14495c; overflow: hidden;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.38);
}
.fish-target {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255, 240, 120, 0.92), rgba(242, 184, 34, 0.92));
  border-left: 2.5px solid #fffbe0; border-right: 2.5px solid #fffbe0;
  box-shadow: 0 0 14px rgba(255, 224, 72, 0.8);
}
.fish-cursor {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  font-size: 26px; line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}
.fish-catch-btn { width: 100%; padding: 12px; font-size: 16px; }

/* ==================== BOTTOM CARVED-OAK ACTION DOCK ==================== */
.hud-dock {
  position: fixed; bottom: calc(10px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  z-index: 14;
  display: flex; align-items: flex-end; gap: 7px;
  padding: 7px 11px 8px;
  border-radius: 20px;
  border: 3px solid #4a270c;
  box-shadow:
    inset 0 2px 0 rgba(255, 224, 160, 0.55),
    inset 0 -4px 0 rgba(52, 24, 6, 0.6),
    0 6px 0 rgba(44, 20, 4, 0.72),
    0 12px 26px rgba(0, 0, 0, 0.42);
}

.dock-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: #fff8e6; cursor: pointer;
  font-family: inherit; transition: transform .12s;
  min-width: 56px;
}
.dock-btn:active { transform: translateY(2px) scale(0.96); }

.dock-tile {
  width: 48px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #a66a34 0%, #7d4a1e 100%);
  border: 2.2px solid #4a260a;
  box-shadow:
    inset 0 2px 0 rgba(255, 228, 174, 0.48),
    inset 0 -3px 0 rgba(54, 26, 6, 0.55),
    0 3px 0 rgba(44, 20, 4, 0.55);
  transition: box-shadow .18s, border-color .18s, background .18s;
}
.dock-ico { width: 32px; height: 32px; display: block; }
.dock-lbl {
  font-size: 11px; font-weight: 800; letter-spacing: 0.01em;
  color: #fff6dc; text-shadow: 0 1.5px 2px rgba(24, 10, 2, 0.9);
}

.dock-btn.has-afford .dock-tile,
.dock-btn.near-shed .dock-tile {
  background: linear-gradient(180deg, #f0b844 0%, #c47e18 100%);
  border-color: #ffe87c;
  box-shadow:
    inset 0 2px 0 rgba(255, 250, 204, 0.78),
    0 0 16px rgba(255, 218, 72, 0.75),
    0 3px 0 rgba(92, 52, 6, 0.7);
}
.dock-btn.active .dock-tile {
  background: linear-gradient(180deg, #ffd85c 0%, #d4901e 100%);
  border-color: #fff2a6;
}

.btn-badge {
  position: absolute; top: -4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5e52 0%, #cc2920 100%);
  color: #fff; font-size: 11px; font-weight: 900;
  display: grid; place-items: center;
  border: 2px solid #fff5d6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.btn-badge.hidden { display: none; }

/* ==================== TOAST BANNER ==================== */
.toast {
  position: fixed; bottom: calc(144px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%) translateY(16px); opacity: 0; pointer-events: none; z-index: 25;
  padding: 9px 16px; border-radius: 999px;
  background: linear-gradient(180deg, var(--parch-hi), var(--parch-lo));
  border: 2.5px solid #8c5c2b; color: var(--ink);
  font-size: 13px; font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: opacity .22s, transform .22s;
  white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== CARVED-OAK & PARCHMENT MODALS ==================== */
.modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(18, 28, 16, 0.68); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.modal.hidden { display: none; }

.oak-modal {
  width: 100%; max-width: 410px; max-height: 86vh;
  display: flex; flex-direction: column;
  border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, #5e3617 0%, #47260d 100%);
  border: 3.5px solid #3d1f09;
  box-shadow:
    inset 0 2px 0 rgba(255, 224, 158, 0.45),
    0 20px 52px rgba(0, 0, 0, 0.6);
}

.oak-modal-head {
  padding: 13px 14px 11px;
  border-bottom: 3px solid #3f2009;
  box-shadow: inset 0 2px 0 rgba(255, 230, 175, 0.45), 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  position: relative;
}
.oak-head-top {
  width: 100%; display: flex; align-items: center; justify-content: center; position: relative;
}
.oak-modal-head h2 {
  font-size: 20px; font-weight: 900; color: #fff7e2;
  text-shadow: 0 2px 3px rgba(42, 18, 4, 0.9);
  letter-spacing: 0.01em;
}
.oak-head-sub { font-size: 12px; font-weight: 700; color: #f6e0b3; }
.oak-head-sub strong { color: #ffe578; }

.close-orb {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(180deg, #f25f52 0%, #b8291e 100%);
  border: 2.5px solid #5c130d;
  box-shadow: inset 0 2px 0 rgba(255, 198, 192, 0.7), 0 3px 0 #5c130d;
  color: #fff; font-size: 16px; font-weight: 900; cursor: pointer;
  display: grid; place-items: center;
}
.close-orb:active { transform: translateY(calc(-50% + 2px)); }

.oak-coin-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 14px 4px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #47240a 0%, #5c3212 100%);
  border: 1.5px solid rgba(255, 214, 130, 0.4);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
  font-size: 15px; font-weight: 900; color: #ffe578;
}
.mini-ico { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; }

.modal-scroll {
  padding: 12px; display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
}

/* Cream Parchment Cards with 4 Golden Corner Rivets! */
.parchment-card, .rep-card, .q-item, .upg-row, .shed-row {
  position: relative;
  background:
    radial-gradient(circle 3px at 8px 8px, #d4962a 70%, transparent 72%),
    radial-gradient(circle 3px at calc(100% - 8px) 8px, #d4962a 70%, transparent 72%),
    radial-gradient(circle 3px at 8px calc(100% - 8px), #d4962a 70%, transparent 72%),
    radial-gradient(circle 3px at calc(100% - 8px) calc(100% - 8px), #d4962a 70%, transparent 72%),
    linear-gradient(180deg, var(--parch-hi) 0%, var(--parch-lo) 100%);
  border: 2.5px solid #9e6a32;
  border-radius: 15px;
  padding: 11px 13px;
  color: var(--ink);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    0 3px 0 rgba(48, 22, 6, 0.55);
}

/* Estate Reputation Banner Card */
.rep-card { display: flex; align-items: center; gap: 11px; }
.rep-crest { width: 52px; height: 52px; flex-shrink: 0; }
.rep-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rep-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.rep-title { font-size: 14px; font-weight: 900; color: var(--ink); }
.rep-xp { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); }
.rep-perk-pill {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(180deg, #52c946 0%, #379c2d 100%);
  border: 1.5px solid #246e1d; color: #fff;
  font-size: 11.5px; font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}
.rep-next { font-size: 11px; color: var(--ink-soft); font-weight: 700; }

/* Highlighted Golden Treasure Chest Card */
.chest-card {
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(180deg, #734216 0%, #522c0c 100%);
  border: 2.5px solid #d49628;
  border-radius: 16px; padding: 10px 12px;
  box-shadow: inset 0 2px 0 rgba(255, 224, 140, 0.4), 0 4px 0 rgba(40, 18, 4, 0.65);
}
.chest-card.ready {
  border-color: #ffe266;
  background: linear-gradient(180deg, #8c5216 0%, #5c310a 100%);
  box-shadow: inset 0 2px 0 rgba(255, 240, 178, 0.65), 0 0 20px rgba(255, 214, 68, 0.48), 0 4px 0 rgba(40, 18, 4, 0.7);
}
.chest-ico-wrap { width: 56px; height: 48px; flex-shrink: 0; }
.chest-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.chest-title { font-size: 14px; font-weight: 900; color: #fff7dc; text-shadow: 0 1.5px 2px rgba(0, 0, 0, 0.65); }
.chest-sub { font-size: 11px; color: #f6e0b3; }

/* Progress Bars */
.q-bar {
  height: 11px; border-radius: 999px;
  background: linear-gradient(180deg, #5e3819 0%, #7d4e26 100%);
  border: 1.5px solid #4a280d; overflow: hidden;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.45);
}
.q-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(180deg, #ffe878 0%, #e8a420 100%);
  transition: width .25s;
}

.q-sec-title {
  font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em;
  color: #f4dca6; text-shadow: 0 1px 2px rgba(28, 12, 2, 0.8); margin-top: 2px;
}
.q-sec-title.dark { color: var(--ink-soft); text-shadow: none; margin-bottom: 6px; }

/* Quest Cards */
.q-item { display: flex; flex-direction: column; gap: 7px; }
.q-item.ready {
  border-color: #4db83e;
  box-shadow: inset 0 2px 0 #fff, 0 0 14px rgba(102, 224, 82, 0.35), 0 3px 0 rgba(48, 22, 6, 0.55);
}
.q-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 900; color: var(--ink); }
.q-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.q-rewards-row { display: inline-flex; align-items: center; gap: 8px; }
.q-rew-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 900; color: var(--ink); }
.q-rew-chip .mini-ico { width: 17px; height: 17px; }
.q-bar-wrap { display: flex; align-items: center; gap: 8px; }
.q-bar-wrap .q-bar { flex: 1; }

/* Tactile 3D Game Buttons */
.btn-green-3d, .q-claim-btn {
  padding: 7px 14px; border-radius: 10px; border: 2px solid #21661a;
  background: linear-gradient(180deg, var(--green-hi) 0%, var(--green-mid) 100%);
  color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer;
  text-shadow: 0 1.5px 1px rgba(18, 64, 12, 0.8);
  box-shadow: inset 0 2px 0 rgba(210, 255, 195, 0.65), 0 3px 0 var(--green-lo);
  white-space: nowrap;
}
.btn-green-3d:active, .q-claim-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--green-lo); }

.btn-gold-3d, .btn-gold-sm, .upg-buy {
  padding: 7px 13px; border-radius: 10px; border: 2px solid #8a5208;
  background: linear-gradient(180deg, #ffeb7a 0%, #f0a81c 100%);
  color: #4a2606; font-family: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 252, 214, 0.8), 0 3px 0 #8a5208;
  white-space: nowrap; text-align: center;
}
.btn-gold-3d:active, .upg-buy:active { transform: translateY(2px); }
.btn-gold-3d:disabled, .upg-buy:disabled {
  background: #d8c7a6; border-color: #9e8a68; color: #78674c; box-shadow: none; cursor: not-allowed;
}
.btn-gold-3d small { display: block; font-size: 10px; font-weight: 800; opacity: 0.9; }

.btn-red-3d {
  padding: 9px 14px; border-radius: 10px; border: 2px solid #6e1710;
  background: linear-gradient(180deg, #ee6458 0%, #bd2d22 100%);
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 900; cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 200, 195, 0.55), 0 3px 0 #6e1710;
}

.q-reroll-btn {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(180deg, #a86b34 0%, #734118 100%);
  border: 2px solid #4d280b; padding: 5px; cursor: pointer;
  box-shadow: inset 0 1.5px 0 rgba(255, 224, 168, 0.45), 0 2px 0 #422108;
  display: grid; place-items: center;
}
.q-reroll-btn:active { transform: translateY(2px); }

/* Upgrades & Warehouse Rows */
.upg-row, .shed-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.upg-row.focus { border-color: #e6a218; box-shadow: 0 0 16px rgba(255, 214, 68, 0.55), 0 3px 0 rgba(48, 22, 6, 0.55); }
.upg-info, .shed-item-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upg-title, .shed-item-title { font-size: 13.5px; font-weight: 900; color: var(--ink); }
.upg-lv { color: #b56808; font-size: 12px; font-weight: 900; margin-left: 3px; }
.upg-desc, .shed-item-counts { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; }
.upg-next { font-size: 11px; color: #2b7a22; font-weight: 800; }

.shed-hint {
  margin: 10px 12px 0; padding: 7px 11px; border-radius: 10px;
  background: rgba(255, 226, 128, 0.16); border: 1.5px solid rgba(255, 216, 86, 0.45);
  color: #ffe89e; font-size: 12px; font-weight: 800; text-align: center;
}
.shed-hint.hidden { display: none; }
.shed-quick-bar { padding: 10px 12px 0; display: flex; }
.shed-footer { padding: 0 12px 12px; display: flex; }
.btn-wood-full {
  flex: 1; padding: 9px 12px; border-radius: 11px;
  background: linear-gradient(180deg, #9c622d 0%, #6e3e16 100%);
  border: 2px solid #422209; color: #fff6dc;
  font-family: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 224, 168, 0.35), 0 3px 0 #3d1e07;
}
.btn-wood-full:disabled { opacity: 0.45; cursor: not-allowed; }
.shed-btns { display: flex; gap: 4px; flex-shrink: 0; }
.shed-btn {
  padding: 6px 8px; border-radius: 8px; border: 1.8px solid #7d4e24;
  background: #e6d1a8; color: var(--ink);
  font-family: inherit; font-size: 11.5px; font-weight: 900; cursor: pointer; min-width: 34px;
}
.shed-btn.take {
  background: linear-gradient(180deg, #ffe36e, #e8a420); border-color: #8a5208; color: #472506;
}
.shed-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Pause / Menu Stats & Achievements */
.sound-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-box {
  background: linear-gradient(180deg, var(--parch-hi), var(--parch-lo));
  border: 2px solid #9e6a32; border-radius: 13px; padding: 9px 11px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-box small { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.stat-box strong { font-size: 16.5px; font-weight: 900; color: #9c5608; }

.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.ach-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 800;
  background: rgba(124, 82, 38, 0.14); border: 1.5px solid rgba(124, 82, 38, 0.25); color: #8c6d4a;
}
.ach-badge.done {
  background: linear-gradient(180deg, #fff5c4, #f5d66b); border-color: #c98612; color: #472606;
}
.controls-hint { font-size: 11.5px; color: #f0d7a8; line-height: 1.45; text-align: center; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions button { flex: 1; }

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 720px) {
  .carry-icons { display: none; }
}
@media (max-width: 520px) {
  .hud-top { top: calc(6px + env(safe-area-inset-top)); left: 6px; right: 6px; gap: 5px; }
  .oak-plaque { padding: 4px 7px 5px 6px; gap: 5px; border-radius: 12px; }
  .plaque-ico { width: 22px; height: 22px; }
  .plaque-ico.sm { width: 18px; height: 18px; }
  .plaque-well { padding: 2px 8px; font-size: 13.5px; }
  .estate-plaque { gap: 5px; padding: 4px 8px 5px; }
  .estate-pair { font-size: 13px; gap: 3px; }
  .objective-bar { top: calc(50px + env(safe-area-inset-top)); left: 6px; font-size: 11.5px; padding: 5px 10px 6px 8px; max-width: calc(100vw - 116px); }
  .status-right { top: calc(50px + env(safe-area-inset-top)); right: 6px; gap: 5px; }
  .env-pill { font-size: 12px; padding: 4px 9px 5px 7px; }
  .env-ico { width: 19px; height: 19px; }
  .sub-chip { font-size: 11px; padding: 3px 9px 4px; }
  .hud-dock { gap: 5px; padding: 6px 8px 7px; border-radius: 17px; }
  .dock-btn { min-width: 52px; }
  .dock-tile { width: 44px; height: 42px; border-radius: 11px; }
  .dock-ico { width: 28px; height: 28px; }
  .dock-lbl { font-size: 10px; }
}
