/* House interior facilities */
.house-station-panel{
  width:min(1120px,96vw);
  height:min(820px,92vh);
  height:min(820px,92dvh);
  max-height:none;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.house-station-body{
  --house-accent:#8cc9ac;
  --house-border:rgba(140,201,172,.35);
  --house-glow:rgba(140,201,172,.12);
  --house-deep:#101713;
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:12px;
  padding:4px 5px 14px;
  scrollbar-gutter:stable;
}
.house-station-forge{--house-accent:#ef985b;--house-border:rgba(239,152,91,.38);--house-glow:rgba(239,152,91,.12);--house-deep:#1a130f}
.house-station-body.house-station-forge{
  overflow:hidden;
  grid-template-rows:minmax(0,1fr);
  align-content:stretch;
}
.house-station-purifier{--house-accent:#75d8db;--house-border:rgba(117,216,219,.35);--house-glow:rgba(117,216,219,.10);--house-deep:#0d1819}
.house-station-workshop{--house-accent:#e0bd72;--house-border:rgba(224,189,114,.35);--house-glow:rgba(224,189,114,.11);--house-deep:#17150f}
.house-station-body.house-station-workshop.house-workshop-reinforcement-mode{
  overflow:hidden;
  grid-template-rows:auto minmax(0,1fr);
  align-content:stretch;
}
.house-station-kitchen{--house-accent:#8fd179;--house-border:rgba(143,209,121,.35);--house-glow:rgba(143,209,121,.11);--house-deep:#10180f}
.house-station-armoire{--house-accent:#9bb7d6;--house-border:rgba(155,183,214,.35);--house-glow:rgba(155,183,214,.10);--house-deep:#11161b}
.house-station-potager{--house-accent:#8ed067;--house-border:rgba(142,208,103,.40);--house-glow:rgba(142,208,103,.12);--house-deep:#10180e}

.house-layout{display:grid;gap:12px;min-width:0}
.house-layout-forge{
  height:100%;
  min-height:0;
  overflow:hidden;
  grid-template-columns:minmax(0,1.35fr) minmax(220px,.65fr);
  grid-template-rows:auto minmax(0,1fr) auto;
}
.house-layout-workshop{
  height:100%;
  min-height:0;
  overflow:hidden;
  grid-template-columns:minmax(0,1.35fr) minmax(220px,.65fr);
  grid-template-rows:132px minmax(0,1fr) auto;
}
.house-layout-purifier{grid-template-columns:repeat(2,minmax(0,1fr))}
.house-layout-kitchen{grid-template-columns:minmax(210px,.72fr) minmax(320px,1.28fr)}
.house-layout-kitchen .house-pane-refine{grid-column:1/-1}
.house-layout-potager{grid-template-columns:minmax(190px,.45fr) minmax(0,1.55fr)}

.house-pane{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--house-border);
  border-radius:14px;
  background:
    linear-gradient(145deg,var(--house-glow),transparent 36%),
    linear-gradient(180deg,rgba(25,34,29,.98),var(--house-deep));
  box-shadow:inset 0 1px rgba(255,255,255,.035);
  padding:12px;
}
.house-pane-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding-bottom:9px;
  margin-bottom:10px;
  border-bottom:1px solid color-mix(in srgb,var(--house-accent) 22%,transparent);
}
.house-pane-copy{min-width:0}
.house-pane-head h3{
  margin:0;
  color:#f1f6f2;
  font-size:13px;
  line-height:1.15;
  letter-spacing:.02em;
}
.house-pane-head small{
  display:block;
  margin-top:4px;
  color:#92a39a;
  font-size:9px;
  line-height:1.35;
}
.house-semantic-tag{
  display:inline-grid;
  gap:2px;
  align-content:center;
  justify-items:start;
  max-width:100%;
  border:1px solid var(--house-border);
  border-radius:8px;
  background:var(--house-glow);
  padding:5px 7px;
  color:#dfece5;
  line-height:1.1;
}
.house-semantic-tag b{font-size:9px;white-space:normal}
.house-semantic-tag small{font-size:7px;color:#8fa49a;letter-spacing:.06em}
.house-semantic-tag.terminal{border-color:rgba(220,198,126,.35);background:rgba(220,198,126,.08)}
.house-semantic-tag.selected{border-color:var(--house-accent);background:var(--house-glow)}
.house-semantic-tag.ready{border-color:#8edc75;background:rgba(101,204,93,.13);color:#caffbc}

.house-tile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(128px,1fr));
  gap:8px;
  align-items:stretch;
}
.house-tile{
  min-width:0;
  min-height:112px;
  display:grid;
  grid-template-rows:auto auto 1fr;
  justify-items:center;
  align-content:start;
  gap:6px;
  border:1px solid color-mix(in srgb,var(--rarity,#9ca9a2) 55%,#334039);
  border-radius:11px;
  background:linear-gradient(160deg,color-mix(in srgb,var(--rarity,#9ca9a2) 8%,#19221d),#101713 62%);
  color:#eaf1ed;
  padding:10px 8px;
  text-align:center;
}
.house-tile:hover,.house-tile:focus-visible{border-color:var(--rarity,var(--house-accent));outline:none}
.house-tile.selected{
  border-color:var(--rarity,var(--house-accent));
  box-shadow:0 0 0 2px color-mix(in srgb,var(--rarity,var(--house-accent)) 35%,transparent),inset 0 0 22px color-mix(in srgb,var(--rarity,var(--house-accent)) 10%,transparent);
}
.house-tile-icon{font:28px/1 "Noto Color Emoji","Segoe UI Emoji","Apple Color Emoji",sans-serif}
.house-tile-title{
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#edf4f0;
  font-size:10px;
  line-height:1.15;
}
.house-tile-meta{
  width:100%;
  color:#899b91;
  font-size:8px;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.house-gear-grid-forge{
  min-height:0;
  height:100%;
  max-height:100%;
  grid-template-columns:repeat(auto-fill,minmax(58px,1fr));
  gap:6px;
  align-content:start;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.house-gear-grid-forge .house-tile.icon-only{
  min-height:60px;
  height:60px;
  grid-template-rows:1fr;
  place-items:center;
  padding:5px;
}
.house-gear-grid-forge .house-tile.icon-only .house-tile-icon{font-size:28px}
.house-forge-description{
  width:100%;
  height:100%;
  min-height:0;
  max-height:100%;
  margin:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  align-items:start;
}
.house-forge-description .house-selection-copy{align-self:start}
.house-layout-forge>.house-forge-description-pane{
  grid-column:1/-1;
  height:148px;
  min-height:148px;
  max-height:148px;
  overflow:hidden;
}
.house-forge-description-pane .house-forge-description{
  height:100%;
  min-height:0;
  max-height:100%;
  margin:0;
  overflow-y:auto;
  overflow-x:hidden;
}
.house-forge-browser{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);
  gap:7px;
  min-width:0;
  min-height:0;
  height:100%;
  overflow:hidden;
  align-items:stretch;
}
.house-layout-forge>.house-pane-source{
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
}
.house-layout-forge>.house-pane-source>.house-pane-head{flex:0 0 auto}
.house-layout-forge>.house-pane-source>.house-forge-browser{flex:1 1 auto}
.house-forge-filters{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}
.house-forge-filter{
  width:38px;
  min-width:38px;
  height:38px;
  min-height:38px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--house-border);
  border-radius:9px;
  background:rgba(7,11,9,.42);
  color:#dfe9e4;
  font:20px/1 var(--icon-font);
  letter-spacing:normal;
  word-spacing:normal;
}
.house-forge-filter.active{
  border-color:var(--house-accent);
  background:var(--house-glow);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--house-accent) 38%,transparent),inset 0 0 13px var(--house-glow);
}
.house-layout-forge>.house-pane-process{align-self:start}

.house-tile{position:relative}
.house-tile-badge{
  position:absolute;
  top:4px;
  right:4px;
  z-index:2;
  display:grid;
  place-items:center;
  width:16px;
  height:16px;
  border:1px solid color-mix(in srgb,var(--rarity,var(--house-accent)) 70%,#fff);
  border-radius:5px;
  background:rgba(8,13,11,.88);
  color:#f4fff8;
  font:900 9px/1 WaveVar2;
  letter-spacing:0;
  pointer-events:none;
}
.house-tile-rarity,.house-tile-level{
  position:absolute;
  bottom:4px;
  z-index:2;
  max-width:44%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  pointer-events:none;
  font:900 6px/1 WaveVar2;
  letter-spacing:-.02em;
  text-shadow:0 1px 2px #000;
}
.house-tile-rarity{left:5px;color:var(--rarity,#aeb5b1)}
.house-tile-level{right:5px;color:#dce7e1}

.house-selection-hero{
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  gap:10px;
  align-items:center;
  border:1px solid var(--house-border);
  border-radius:11px;
  background:rgba(7,11,9,.42);
  padding:10px;
}
.house-selection-icon{
  display:grid;
  place-items:center;
  width:54px;height:54px;
  border-radius:10px;
  background:var(--house-glow);
  font:30px/1 "Noto Color Emoji","Segoe UI Emoji","Apple Color Emoji",sans-serif;
}
.house-selection-media{
  min-width:54px;
  display:grid;
  justify-items:center;
  align-content:start;
  gap:5px;
}
.house-selection-owned{
  display:grid;
  justify-items:center;
  gap:2px;
  color:var(--house-accent);
  text-align:center;
  white-space:nowrap;
}
.house-selection-owned-label{font:900 6.5px/1 WaveVar2}
.house-selection-owned-qty{
  color:#f2dfac;
  font:900 10.5px/1 WaveVar2;
}
.house-selection-material-art{
  display:block;
  width:44px;
  height:44px;
  object-fit:contain;
}
.house-selection-copy{min-width:0;display:grid;gap:4px}
.house-selection-copy strong{color:#f4f6f4;font-size:12px}
.house-selection-copy small{color:#91a099;font-size:8px;line-height:1.3}
.house-transform-line{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:8px;
  align-items:center;
  margin:10px 0;
}
.house-transform-line .house-semantic-tag{justify-items:center;text-align:center}
.house-transform-arrow{color:var(--house-accent);font-size:17px;font-weight:900;text-align:center}

.house-stat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.house-stat-box{
  min-width:0;
  display:grid;
  gap:2px;
  border:1px solid var(--house-border);
  border-radius:10px;
  background:rgba(5,9,7,.34);
  padding:8px;
}
.house-stat-box>span{color:#8ca097;font-size:8px}
.house-stat-box>b{color:#f0f5f2;font-size:13px;overflow-wrap:anywhere}
.house-stat-box>small{color:#819087;font-size:8px}
.house-stat-box.metal{border-color:rgba(146,174,185,.42)}
.house-stat-box.leather{border-color:rgba(196,152,102,.42)}
.house-stat-box.wide{grid-column:1/-1}
.house-danger-note{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin:10px 0;
  border-left:3px solid #d66a54;
  background:rgba(173,69,48,.10);
  padding:7px 9px;
  color:#cdb5ae;
  font-size:8px;
}
.house-danger-note b{color:#ffad98}

.house-action,.house-transfer-action{
  min-width:0;
  border:1px solid color-mix(in srgb,var(--house-accent) 60%,#4a5a51);
  border-radius:9px;
  background:color-mix(in srgb,var(--house-accent) 15%,#17241d);
  color:#ecfff3;
  font:900 9px WaveVar2;
  line-height:1.15;
  padding:9px 10px;
}
.house-pane>.house-action{width:100%;margin-top:10px}
.house-action:hover:not(:disabled),.house-transfer-action:hover:not(:disabled){filter:brightness(1.12)}
.house-action:disabled,.house-transfer-action:disabled{opacity:.35;filter:saturate(.35)}
.house-action.danger{border-color:#c76651;background:rgba(148,58,42,.20);color:#ffd7cc}
.house-action.harvest{border-color:#77c763;background:rgba(72,150,63,.20)}
.house-action.plant{border-color:#93c86d;background:rgba(88,141,60,.18)}

.house-quality-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(128px,1fr));
  gap:8px;
}
.house-quality-card{
  min-width:0;
  display:grid;
  align-content:start;
  gap:8px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:11px;
  background:rgba(6,11,9,.34);
  padding:9px;
}
.house-quality-card.can-process{border-color:var(--house-border);box-shadow:inset 0 0 16px var(--house-glow)}
.house-quality-card.terminal{align-content:center}
.house-quality-head{display:flex;align-items:center;justify-content:space-between;gap:5px}
.house-quality-head strong{font-size:10px;color:#e8efeb}
.house-quality-count{font-size:12px;color:var(--house-accent)}
.house-quality-flow{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:4px;
  align-items:center;
  color:#a6b7af;
  font-size:8px;
  text-align:center;
}
.house-probability{color:#8d9d95;font-size:8px}
.house-pane-quality.metal{border-color:rgba(132,180,197,.35)}
.house-pane-quality.leather{border-color:rgba(198,155,105,.35)}


.house-layout-workshop>.house-workshop-description-pane{
  grid-column:1/-1;
  grid-row:1;
  height:132px;
  min-height:132px;
  max-height:132px;
  overflow:hidden;
}
.house-workshop-description{
  width:100%;
  height:100%;
  min-height:0;
  max-height:100%;
  margin:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  align-items:start;
}
.house-workshop-description .house-selection-copy{align-self:start}
.house-workshop-reinforcement-state{color:var(--house-accent)!important}
.house-layout-workshop>.house-pane-source{
  grid-column:1;
  grid-row:2;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
}
.house-layout-workshop>.house-pane-source>.house-pane-head{flex:0 0 auto}
.house-layout-workshop>.house-pane-source>.house-workshop-browser{flex:1 1 auto}
.house-workshop-browser{min-height:0;height:100%;overflow:hidden}
.house-gear-grid-workshop{min-height:0;height:100%;max-height:100%}
.house-layout-workshop>.house-workshop-costs{
  grid-column:2;
  grid-row:2;
  align-self:start;
}
.house-workshop-cost-grid{display:grid;gap:6px}
.house-workshop-cost-item{
  min-width:0;
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  gap:5px;
  align-items:center;
  border:1px solid var(--house-border);
  border-radius:9px;
  background:rgba(5,9,7,.34);
  padding:7px 8px;
}
.house-workshop-cost-item small{
  min-width:0;
  overflow-wrap:anywhere;
  color:#aab8b0;
  font-size:7px;
  line-height:1.2;
}
.house-workshop-cost-item b{color:#f0f5f2;font-size:11px;white-space:nowrap}
.house-workshop-cost-icon{
  width:18px;
  height:18px;
  object-fit:contain;
  display:grid;
  place-items:center;
  font:14px/18px "Noto Color Emoji","Segoe UI Emoji","Apple Color Emoji",sans-serif;
  text-align:center;
}
.house-workshop-materials-pane{
  grid-column:1/-1;
  grid-row:3;
  padding:7px 8px;
}
.house-workshop-materials-pane .house-pane-head{
  margin-bottom:5px;
  padding-bottom:4px;
}
.house-workshop-materials-pane .house-pane-head h3{font-size:9px}
.house-workshop-material-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:4px;
}
.house-workshop-material{
  min-width:0;
  min-height:34px;
  display:grid;
  grid-template-columns:auto auto;
  justify-content:center;
  align-items:center;
  gap:4px;
  appearance:none;
  border:1px solid rgba(255,255,255,.09);
  border-radius:7px;
  background:rgba(5,9,7,.34);
  color:#e5ece8;
  padding:4px 5px;
  font:inherit;
  line-height:1;
  cursor:pointer;
}
.house-workshop-material:hover,
.house-workshop-material:focus-visible{
  border-color:color-mix(in srgb,var(--house-accent) 70%,#fff);
  outline:none;
}
.house-workshop-material.required{
  border-color:var(--house-accent);
  background:var(--house-glow);
  box-shadow:inset 0 0 10px var(--house-glow);
}
.house-workshop-material.selected{
  border-color:#f3d995;
  background:color-mix(in srgb,var(--house-accent) 18%,rgba(5,9,7,.45));
  box-shadow:0 0 0 1px rgba(243,217,149,.32),inset 0 0 12px var(--house-glow);
}
.house-workshop-material-icon{
  display:block;
  width:24px;
  height:24px;
  object-fit:contain;
}
.house-workshop-material-qty{
  min-width:0;
  color:#edf4f0;
  font:900 8px/1 WaveVar2;
  white-space:nowrap;
}
.house-workshop-material.static{cursor:default}
.house-workshop-material.static:hover{
  border-color:rgba(255,255,255,.09);
}
.house-workshop-utility-materials{
  padding:7px 8px;
}
.house-workshop-utility-materials .house-pane-head{
  margin-bottom:5px;
  padding-bottom:4px;
}
.house-workshop-utility-materials .house-pane-head h3{font-size:9px}
.house-forge-materials-pane{
  grid-column:1/-1;
  grid-row:3;
  padding:7px 8px;
}
.house-forge-materials-pane .house-pane-head{
  margin-bottom:5px;
  padding-bottom:4px;
}
.house-forge-materials-pane .house-pane-head h3{font-size:9px}

.house-workshop-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  position:sticky;
  top:0;
  z-index:3;
  padding:2px;
  border:1px solid var(--house-border);
  border-radius:12px;
  background:color-mix(in srgb,var(--house-deep) 92%,#0b100d);
  box-shadow:0 7px 18px rgba(0,0,0,.22);
}
.house-workshop-tab{
  min-width:0;
  display:grid;
  gap:3px;
  justify-items:center;
  border:1px solid transparent;
  border-radius:9px;
  background:rgba(255,255,255,.025);
  color:#8fa099;
  padding:9px 8px;
  text-align:center;
}
.house-workshop-tab strong{font-size:10px;line-height:1.1}
.house-workshop-tab small{font-size:7px;line-height:1.15;color:#74857d}
.house-workshop-tab.active{
  border-color:var(--house-accent);
  background:var(--house-glow);
  color:#f0f6f2;
  box-shadow:inset 0 0 16px var(--house-glow);
}
.house-workshop-tab.active small{color:#b8c7c0}

.house-upgrade-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:8px;
}
.house-upgrade-card{
  min-width:0;
  height:clamp(210px,44dvh,430px);
  display:flex;
  flex-direction:column;
  gap:5px;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  scrollbar-width:thin;
  scrollbar-color:var(--house-accent) transparent;
  border:1px solid var(--house-border);
  border-radius:11px;
  background:rgba(7,11,9,.35);
  padding:9px;
}
.house-upgrade-card::-webkit-scrollbar{width:5px}
.house-upgrade-card::-webkit-scrollbar-thumb{
  border-radius:5px;
  background:var(--house-accent);
}
.house-upgrade-card:focus-visible{outline:2px solid var(--house-accent);outline-offset:-2px}
.house-upgrade-card>.house-action{margin-top:auto;flex-shrink:0}
.house-upgrade-card.locked{opacity:.60}
.house-upgrade-card.maxed{border-style:dashed}
.house-upgrade-title{display:flex;align-items:center;gap:7px;min-width:0}
.house-upgrade-title strong{font-size:10px;color:#ecf2ef}
.house-upgrade-icon{font-size:19px}
.house-upgrade-value{font-size:15px;color:var(--house-accent)}
.house-upgrade-card>small{font-size:8px;color:#8d9b94}
.house-cost-line{margin:0;color:#b4c0ba;font-size:8px;line-height:1.35;overflow-wrap:anywhere}

/* Shared, non-wrapping material tokens: never place a payment note inside a
   three-column cost row. Chips wrap as whole units on narrow phone screens. */
.house-payment-breakdowns{display:grid;gap:6px;min-width:0}
.house-payment-block{
  min-width:0;display:grid;gap:4px;padding:6px;
  border:1px solid rgba(178,163,109,.3);border-radius:8px;
  background:rgba(183,150,67,.055);
}
.house-payment-heading{font-size:7px;color:#dec68a;line-height:1.35}
.house-payment-line{display:grid;gap:3px;min-width:0}
.house-payment-kind{font-size:7px;color:#aebeb4}
.house-payment-chips{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.house-payment-chip{
  display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%;
  white-space:nowrap;overflow:visible;
  padding:3px 5px;border:1px solid rgba(168,184,171,.24);
  border-radius:6px;background:rgba(7,14,11,.5);
  color:#e5eee5;font-size:7px;line-height:1.4;
}
.house-payment-icon{width:16px;height:16px;object-fit:contain;flex:none}
.house-utility-cost{min-width:0;display:grid;gap:5px;align-content:start}
.house-utility-currency{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.house-utility-currency-item{
  display:inline-flex;align-items:center;gap:3px;white-space:nowrap;
  font-size:9px;color:#f0f5f2;
}
.house-utility-currency-item .house-workshop-cost-icon{
  width:17px;height:17px;font-size:15px;line-height:17px;
}
.house-utility-material-row{
  display:grid;grid-template-columns:19px minmax(0,1fr) auto;
  gap:5px;align-items:center;min-width:0;
  font-size:7px;color:#c8d4ca;line-height:1.3;
}
.house-utility-material-row b{white-space:nowrap;color:#f0f5f2;font-size:9px}
.house-utility-material-icon{width:19px;height:19px;object-fit:contain}
@media(max-width:430px){
  .house-utility-material-row{grid-template-columns:17px minmax(0,1fr) auto;gap:3px;font-size:6.5px}
  .house-utility-material-icon{width:17px;height:17px}
  .house-payment-chip{font-size:6.5px;padding:3px 4px}
  .house-payment-heading,.house-payment-kind{font-size:6.5px}
}

.house-pantry-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:8px;
}
.house-ingredient-card{
  min-width:0;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:5px 7px;
  align-items:center;
  border:1px solid rgba(143,209,121,.24);
  border-radius:10px;
  background:rgba(14,28,12,.38);
  padding:8px;
}
.house-ingredient-icon{font-size:22px}
.house-ingredient-card strong{font-size:9px;color:#e7f2e2}
.house-ingredient-count{font-size:11px;color:#a9e88c}
.house-ingredient-card small{grid-column:1/-1;color:#81917f;font-size:7px;line-height:1.3}
.house-recipe-grid,.house-refine-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}
.house-recipe-card,.house-refine-card{
  min-width:0;
  display:grid;
  gap:8px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:11px;
  background:rgba(7,12,8,.38);
  padding:9px;
}
.house-recipe-card.craftable,.house-refine-card.can-process{border-color:var(--house-border);box-shadow:inset 0 0 16px var(--house-glow)}
.house-recipe-head{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:center}
.house-recipe-icon{font-size:25px}
.house-recipe-head>div{display:grid;gap:2px}
.house-recipe-head strong{font-size:10px;color:#eef5ea}
.house-recipe-head small{font-size:8px;color:#91a28b}
.house-recipe-inputs,.house-refine-stats{display:flex;flex-wrap:wrap;gap:5px}
.house-refine-flow{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:7px;
  align-items:center;
}
.house-refine-potion{
  min-width:0;
  border:1px solid rgba(255,255,255,.10);
  border-radius:8px;
  background:rgba(255,255,255,.035);
  padding:7px;
  color:#e3eee0;
  font-size:8px;
  text-align:center;
}

.house-capacity-controls{
  display:grid;
  grid-template-columns:minmax(120px,1fr) minmax(180px,auto) auto;
  gap:10px;
  align-items:center;
}
.house-capacity-bar{
  height:9px;
  overflow:hidden;
  border:1px solid var(--house-border);
  border-radius:999px;
  background:rgba(0,0,0,.35);
}
.house-capacity-bar i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,color-mix(in srgb,var(--house-accent) 50%,#456),var(--house-accent));
}
.house-transfer-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr);
  gap:8px;
  align-items:stretch;
}
.house-transfer-axis{
  display:grid;
  place-content:center;
  justify-items:center;
  gap:5px;
  color:var(--house-accent);
}
.house-transfer-axis span{font-size:25px}
.house-transfer-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(124px,1fr));
  gap:8px;
}
.house-transfer-item{
  min-width:0;
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  justify-items:center;
  gap:6px;
  border:1px solid color-mix(in srgb,var(--rarity,#9ca9a2) 46%,#334039);
  border-radius:10px;
  background:linear-gradient(160deg,color-mix(in srgb,var(--rarity,#9ca9a2) 7%,#19221d),#101713 62%);
  padding:8px;
  text-align:center;
}
.house-transfer-item .house-transfer-action{width:100%}

.house-crop-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(112px,1fr));
  gap:8px;
}
.house-crop-tile{
  min-width:0;
  display:grid;
  justify-items:center;
  gap:4px;
  border:1px solid rgba(142,208,103,.24);
  border-radius:11px;
  background:rgba(11,24,9,.42);
  color:#e7f2df;
  padding:9px 7px;
  text-align:center;
}
.house-crop-tile.selected{
  border-color:var(--house-accent);
  box-shadow:0 0 0 2px rgba(142,208,103,.13),inset 0 0 18px rgba(142,208,103,.10);
}
.house-crop-icon{font-size:27px}
.house-crop-tile strong{font-size:9px}
.house-crop-tile small{font-size:7px;color:#8fa485}
.house-pane-crops>.house-semantic-tag{margin-top:9px;width:100%;box-sizing:border-box}
.house-potager-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.house-potager-count{
  color:#b9d5a8;
  font-size:8px;
  letter-spacing:.08em;
}
.house-add-plot{width:auto!important;min-width:150px}
.house-plot-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}
.house-plot-card{
  position:relative;
  min-width:0;
  min-height:132px;
  display:grid;
  grid-template-rows:auto auto auto 1fr auto;
  justify-items:center;
  align-items:center;
  gap:4px;
  overflow:hidden;
  border:1px solid rgba(136,104,65,.50);
  border-radius:10px;
  background:
    radial-gradient(circle at 50% 70%,rgba(88,66,39,.38),transparent 45%),
    linear-gradient(180deg,rgba(34,52,26,.55),rgba(27,22,14,.72));
  padding:8px;
  text-align:center;
}
.house-plot-card.growing{border-color:rgba(121,169,82,.50)}
.house-plot-card.ready{border-color:#83d06a;box-shadow:inset 0 0 18px rgba(102,188,77,.14)}
.house-plot-number{
  position:absolute;
  top:5px;
  left:6px;
  color:#9db08f;
  font-size:6px;
  letter-spacing:.06em;
}
.house-plot-icon{font-size:29px;line-height:1}
.house-plot-icon.soil{color:#9a744d;font-family:WaveVar2;font-size:27px}
.house-plot-title{font-size:9px;color:#edf6e8}
.house-plot-stage{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#a9c49a;
  font-size:6px;
  letter-spacing:.06em;
}
.house-plot-stage.ready{color:#9bea7d}
.house-plot-stage.maturing{color:#c8dd7a}
.house-plot-stage.empty{color:#8d9a82}
.house-plot-card>small{font-size:7px;color:#9aab91}
.house-plot-card>.house-action{width:100%;align-self:end;padding:6px 4px;font-size:7px}
.house-growth-track{
  width:100%;
  height:5px;
  overflow:hidden;
  border:1px solid rgba(142,208,103,.28);
  border-radius:999px;
  background:rgba(0,0,0,.28);
}
.house-growth-track i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#597d3d,#93d26c);
}
.house-grow-time{font-variant-numeric:tabular-nums}


.house-empty{
  grid-column:1/-1;
  display:grid;
  place-items:center;
  min-height:92px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:10px;
  color:#7f9087;
  font-size:9px;
  text-align:center;
  padding:12px;
}
.house-station-message{
  flex:0 0 auto;
  min-height:18px;
  margin:5px 2px 0;
  padding-top:6px;
  border-top:1px solid rgba(255,255,255,.08);
  color:#f2d48d;
  font-size:9px;
}

@media(max-width:900px){
  .house-station-panel{width:97vw}
  /* Keep the semantic multi-panel structure on tablets/phones instead of
     collapsing it into a vertical list. */
  .house-layout-forge{grid-template-columns:minmax(0,1.28fr) minmax(0,.72fr)}
  .house-layout-workshop{grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr)}
  .house-layout-kitchen{grid-template-columns:minmax(150px,.72fr) minmax(0,1.28fr)}
  .house-layout-kitchen .house-pane-refine{grid-column:1/-1}
  .house-layout-potager{grid-template-columns:minmax(130px,.52fr) minmax(0,1.48fr)}
  .house-transfer-layout{grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr)}
  .house-transfer-axis{grid-template-columns:1fr;place-content:center;gap:4px;padding:0}
  .house-transfer-axis span{transform:none;font-size:20px}
  .house-transfer-axis small{writing-mode:vertical-rl;font-size:6px}
}
@media(max-width:680px){
  .house-station-panel{
    width:98vw;
    height:min(900px,95vh);
    height:min(900px,95dvh);
  }
  .house-station-body{gap:8px;padding:2px 2px 10px}
  .house-pane{padding:8px;border-radius:10px}
  .house-pane-head{gap:6px;padding-bottom:7px;margin-bottom:8px}
  .house-layout-purifier{grid-template-columns:repeat(2,minmax(0,1fr))}
  .house-upgrade-grid{grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:6px}
  .house-upgrade-card{padding:7px;gap:4px}
  .house-upgrade-title{gap:4px}
  .house-upgrade-title strong{font-size:8px}
  .house-upgrade-icon{font-size:16px}
  .house-upgrade-value{font-size:12px}
  .house-capacity-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}
  .house-capacity-controls>.house-action{grid-column:1/-1}
  .house-tile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .house-gear-grid-forge{grid-template-columns:repeat(auto-fill,minmax(50px,1fr));gap:5px}
  .house-gear-grid-forge .house-tile.icon-only{min-height:54px;height:54px;padding:4px}
  .house-gear-grid-forge .house-tile.icon-only .house-tile-icon{font-size:25px}
  .house-layout-forge>.house-forge-description-pane{height:124px;min-height:124px;max-height:124px}
  .house-layout-workshop>.house-workshop-description-pane{height:112px;min-height:112px;max-height:112px}
  .house-workshop-materials-pane{padding:6px}
  .house-workshop-material-grid{gap:3px}
  .house-workshop-material{min-height:31px;padding:3px 4px;gap:3px}
  .house-workshop-material-icon{width:21px;height:21px}
  .house-workshop-material-qty{font-size:7px}
  .house-forge-browser{grid-template-columns:36px minmax(0,1fr);gap:5px}
  .house-forge-filters{gap:4px}
  .house-forge-filter{width:32px;min-width:32px;height:32px;min-height:32px;font-size:17px;border-radius:8px}
  .house-tile-badge{top:3px;right:3px;width:14px;height:14px;font-size:8px}
  .house-tile-rarity,.house-tile-level{bottom:3px;font-size:5.5px}
  .house-tile-rarity{left:4px}
  .house-tile-level{right:4px}
  .house-tile{min-height:96px;padding:7px 5px}
  .house-tile-icon{font-size:23px}
  .house-tile-title{font-size:8px}
  .house-tile-meta{font-size:6px}
  .house-quality-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .house-quality-card{padding:7px;gap:6px}
  .house-transfer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .house-transfer-item{padding:6px}
  .house-pantry-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .house-recipe-grid,.house-refine-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .house-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .house-selection-hero{grid-template-columns:38px 1fr;padding:7px}
  .house-selection-icon{width:38px;height:38px;font-size:22px}
  .house-selection-media{min-width:38px;gap:3px}
  .house-selection-owned-label{font-size:6px}
  .house-selection-owned-qty{font-size:9.5px}
  .house-selection-material-art{width:32px;height:32px}
  .house-layout-forge{grid-template-columns:minmax(0,1.22fr) minmax(0,.78fr)}
  .house-layout-workshop{grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);grid-template-rows:112px minmax(0,1fr) auto}
  .house-layout-kitchen{grid-template-columns:minmax(115px,.68fr) minmax(0,1.32fr)}
  .house-layout-potager{grid-template-columns:minmax(100px,.48fr) minmax(0,1.52fr)}
}
@media(max-width:430px){
  .house-pane-head h3{font-size:10px}
  .house-pane-head small{font-size:7px}
  .house-pane{padding:7px}
  .house-semantic-tag{padding:4px 5px}
  .house-semantic-tag b{font-size:7px}
  .house-semantic-tag small{font-size:6px}
  .house-layout-forge{grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr)}
  .house-layout-workshop{grid-template-columns:minmax(0,1.14fr) minmax(0,.86fr);grid-template-rows:104px minmax(0,1fr) auto}
  .house-layout-forge .house-forge-yields{grid-template-columns:1fr}
  .house-layout-forge>.house-forge-description-pane{height:120px;min-height:120px;max-height:120px}
  .house-layout-workshop>.house-workshop-description-pane{height:108px;min-height:108px;max-height:108px}
  .house-workshop-cost-item{grid-template-columns:15px minmax(0,1fr) auto;padding:6px 5px;gap:3px}
  .house-workshop-cost-icon{width:16px;height:16px;font-size:12px;line-height:16px}
  .house-workshop-cost-item small{font-size:6px}
  .house-workshop-cost-item b{font-size:9px}
  .house-workshop-material{min-height:29px;padding:3px}
  .house-workshop-material-icon{width:19px;height:19px}
  .house-workshop-material-qty{font-size:6.5px}
  .house-layout-kitchen{grid-template-columns:minmax(102px,.64fr) minmax(0,1.36fr)}
  .house-layout-potager{grid-template-columns:minmax(88px,.44fr) minmax(0,1.56fr)}
  .house-quality-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .house-plot-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .house-plot-card{min-height:140px;padding:7px}
  .house-crop-grid{grid-template-columns:1fr;gap:5px}
  .house-crop-tile{padding:6px 3px}
  .house-crop-tile small{font-size:6px}
  .house-crop-icon{font-size:22px}
  .house-transfer-layout{grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr)}
  .house-transfer-axis span{font-size:16px}
  .house-transfer-axis small{display:none}
  .house-recipe-grid,.house-refine-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .house-recipe-card,.house-refine-card{padding:6px;gap:6px}
  .house-recipe-head strong{font-size:8px}
  .house-recipe-head small{font-size:6px}
}
@media(max-height:640px){
  .house-station-panel{height:96vh;height:96dvh}
  .house-pane{padding:8px}
  .house-pane-head{margin-bottom:7px;padding-bottom:6px}
  .house-plot-card{min-height:138px}
}



/* Kitchen v2: split purifier panels + compact pantry item grid */
.house-layout-kitchen-v2{
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
}
.house-layout-kitchen-v2>.house-kitchen-recipes,
.house-layout-kitchen-v2>.house-kitchen-pantry{
  grid-column:1/-1;
}
.house-layout-kitchen-v2>.house-pane-refine{
  grid-column:auto;
}
.house-pane-refine-step{
  display:flex;
  min-height:0;
  flex-direction:column;
  gap:9px;
}
.house-pane-refine-step.can-process{
  border-color:var(--house-accent);
  box-shadow:inset 0 0 16px var(--house-glow);
}
.house-pane-refine-step>.house-pane-head{
  flex:0 0 auto;
}
.house-pane-refine-step>.house-refine-flow{
  margin-top:0;
}
.house-pane-refine-step>.house-refine-stats{
  margin-top:auto;
}
.house-pane-refine-step>.house-action{
  width:100%;
}
.house-kitchen-pantry{
  min-height:0;
}
.house-kitchen-pantry .house-pane-head{
  margin-bottom:7px;
}
.house-kitchen-ingredient-grid{
  grid-template-columns:repeat(auto-fill,minmax(58px,1fr));
  gap:6px;
  align-content:start;
  max-height:148px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.house-kitchen-ingredient-grid .house-tile.icon-only{
  min-height:60px;
  height:60px;
  grid-template-rows:1fr;
  place-items:center;
  padding:5px;
}
.house-kitchen-ingredient-grid .house-tile.icon-only .house-tile-icon{
  font-size:28px;
}
.house-kitchen-ingredient-grid .house-ingredient-tile{
  background:linear-gradient(160deg,rgba(143,209,121,.07),#101713 62%);
}

@media(max-width:680px){
  .house-layout-kitchen-v2{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .house-kitchen-ingredient-grid{
    grid-template-columns:repeat(auto-fill,minmax(50px,1fr));
    gap:5px;
    max-height:126px;
  }
  .house-kitchen-ingredient-grid .house-tile.icon-only{
    min-height:54px;
    height:54px;
    padding:4px;
  }
  .house-kitchen-ingredient-grid .house-tile.icon-only .house-tile-icon{
    font-size:25px;
  }
}
@media(max-width:430px){
  .house-layout-kitchen-v2{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .house-pane-refine-step{
    padding:6px;
    gap:6px;
  }
  .house-pane-refine-step .house-refine-flow{
    gap:4px;
  }
  .house-pane-refine-step .house-refine-potion{
    padding:6px 4px;
    font-size:6.5px;
  }
  .house-pane-refine-step .house-refine-stats{
    gap:4px;
  }
  .house-kitchen-pantry .house-pane-head small{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}


/* Armoire: fixed description, two independent item grids, second-tap transfer. */
.house-station-body.house-station-armoire{
  overflow:hidden;
  grid-template-rows:minmax(0,1fr);
  align-content:stretch;
}
.house-layout-armoire{
  height:100%;
  min-height:0;
  overflow:hidden;
  grid-template-rows:148px minmax(0,1fr) auto;
  gap:9px;
}
.house-layout-armoire>.house-armoire-description-pane{
  height:148px;
  min-height:148px;
  max-height:148px;
  overflow:hidden;
}
.house-armoire-description{
  width:100%;
  height:100%;
  min-height:0;
  max-height:100%;
  margin:0;
  align-items:start;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.house-armoire-description .house-selection-copy{align-self:start}
.house-armoire-item-facts{color:#aab9b3!important}
.house-armoire-stats{margin:1px 0 0}
.house-armoire-selection-hint{
  display:block;
  margin-top:2px;
  color:#b9d9f5!important;
}
.house-armoire-selection-hint.blocked{color:#f0bd86!important}
.house-armoire-transfer-layout{
  min-height:0;
  height:100%;
  overflow:hidden;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  align-items:stretch;
}
.house-armoire-transfer-layout .house-pane-container{
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
}
.house-armoire-transfer-layout .house-pane-container>.house-pane-head{flex:0 0 auto}
.house-armoire-transfer-layout .house-transfer-grid{
  flex:1 1 auto;
  min-height:0;
  height:100%;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(58px,1fr));
  grid-auto-rows:64px;
  gap:6px;
  align-content:start;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.house-armoire-transfer-layout .house-empty{
  min-height:90px;
  height:auto;
  grid-column:1/-1;
}
.house-armoire-transfer-layout .house-transfer-item{
  position:relative;
  min-width:0;
  min-height:64px;
  height:64px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--rarity,#9ca9a2) 52%,#334039);
  border-radius:9px;
  background:linear-gradient(160deg,color-mix(in srgb,var(--rarity,#9ca9a2) 9%,#19221d),#101713 65%);
  padding:4px;
  color:#edf4f0;
  text-align:center;
}
.house-armoire-transfer-layout .house-transfer-item:hover,
.house-armoire-transfer-layout .house-transfer-item:focus-visible{
  border-color:var(--rarity,var(--house-accent));
  outline:none;
}
.house-armoire-transfer-layout .house-transfer-item.selected{
  border-color:var(--rarity,var(--house-accent));
  box-shadow:
    0 0 0 2px color-mix(in srgb,var(--rarity,var(--house-accent)) 38%,transparent),
    inset 0 0 20px color-mix(in srgb,var(--rarity,var(--house-accent)) 14%,transparent);
}
.house-transfer-icon{
  font:29px/1 var(--icon-font);
  letter-spacing:normal;
  word-spacing:normal;
}
.house-transfer-rarity,
.house-transfer-level{
  position:absolute;
  bottom:4px;
  z-index:2;
  max-width:45%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  pointer-events:none;
  font:900 6px/1 WaveVar2;
  letter-spacing:-.02em;
  text-shadow:0 1px 2px #000;
}
.house-transfer-rarity{left:5px;color:var(--rarity,#aeb5b1)}
.house-transfer-level{right:5px;color:#dce7e1}
.house-armoire-capacity{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(110px,.8fr) minmax(130px,1.4fr) auto;
  gap:9px;
  align-items:center;
  border:1px solid var(--house-border);
  border-radius:10px;
  background:linear-gradient(145deg,var(--house-glow),rgba(8,13,11,.65));
  padding:7px 8px;
}
.house-armoire-capacity-copy{min-width:0;display:grid;gap:2px}
.house-armoire-capacity-copy strong{font-size:9px;color:#edf4f0}
.house-armoire-capacity-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:7px;
  color:#91a099;
}
.house-armoire-capacity .house-capacity-bar{min-width:0}
.house-armoire-expand{
  min-width:76px;
  min-height:34px!important;
  height:34px;
  padding:6px 9px!important;
  font-size:8px;
}
@media(max-width:680px){
  .house-layout-armoire{grid-template-rows:132px minmax(0,1fr) auto;gap:6px}
  .house-layout-armoire>.house-armoire-description-pane{
    height:132px;
    min-height:132px;
    max-height:132px;
  }
  .house-armoire-transfer-layout{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px;
  }
  .house-armoire-transfer-layout .house-transfer-grid{
    grid-template-columns:repeat(auto-fill,minmax(50px,1fr));
    grid-auto-rows:58px;
    gap:4px;
  }
  .house-armoire-transfer-layout .house-transfer-item{
    min-height:58px;
    height:58px;
    padding:3px;
  }
  .house-transfer-icon{font-size:26px}
  .house-armoire-capacity{
    grid-template-columns:minmax(84px,.75fr) minmax(80px,1.25fr) auto;
    gap:5px;
    padding:5px 6px;
  }
  .house-armoire-capacity-copy small{font-size:6px}
  .house-armoire-expand{min-width:62px;padding:5px 6px!important}
}
@media(max-width:430px){
  .house-layout-armoire{grid-template-rows:124px minmax(0,1fr) auto}
  .house-layout-armoire>.house-armoire-description-pane{
    height:124px;
    min-height:124px;
    max-height:124px;
  }
  .house-armoire-transfer-layout{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
  }
  .house-armoire-transfer-layout .house-transfer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-rows:56px;
    gap:4px;
  }
  .house-armoire-transfer-layout .house-transfer-item{
    min-height:56px;
    height:56px;
  }
  .house-transfer-icon{font-size:24px}
  .house-transfer-rarity,.house-transfer-level{bottom:3px;font-size:5.5px}
  .house-transfer-rarity{left:4px}
  .house-transfer-level{right:4px}
  .house-armoire-capacity{grid-template-columns:minmax(0,1fr) auto}
  .house-armoire-capacity .house-capacity-bar{grid-column:1/-1;grid-row:2}
  .house-armoire-expand{grid-column:2;grid-row:1}
}


