@charset "UTF-8";

/* Phone first: a fixed screen and a large room, with paged choices. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { padding: 0; }
.app-shell { height: 100dvh; min-height: 0; max-height: 100dvh; max-width: 480px; border-radius: 0; }
.app-shell > :not(.scene-root) { flex-shrink: 0; }
.topbar { padding: 9px 14px 4px; gap: 5px; }
.identity h1 { font-size: 19px; }
.identity p { margin-top: 2px; font-size: 10px; }
.top-actions .icon-btn { width: 40px; min-width: 40px; height: 40px; }
.top-actions .art-icon { width: 34px; height: 34px; }
.economy-bar { padding: 0 14px 3px; }
.economy-bar .quiet-btn { min-height: 30px; padding: 2px 3px; font-size: 10px; }
.wallet-trigger { min-height: 30px; padding: 2px 6px; }
.wallet-trigger .coin-icon { width: 20px; height: 20px; }
.wallet-trigger strong { font-size: 12px; }
.status-panel { padding: 0 14px 7px; }
.status-line { display: none; }
.personality-rhythm { margin: 1px 0 5px; font-size: 9px; line-height: 1.3; }
.needs-grid { gap: 10px; }
.metric-label, .metric-value { font-size: 9px; }
.metric-bar { height: 3px; margin-top: 4px; }
.growth-journey { margin-top: 7px; font-size: 9px; }
.care-nav { padding: 3px 9px 2px; gap: 4px; }
.care-nav button { min-height: 60px; padding: 3px 4px; gap: 2px; }
.care-nav .care-icon, .care-nav .care-icon .art-icon { width: 39px; height: 39px; }
.care-label { font-size: 10px; }
.demo-strip { padding: 3px 12px; min-height: 30px; }
.demo-strip button { min-height: 28px; padding: 2px 7px; font-size: 9px; }
.scene-root { flex: 1 1 0; min-height: 0; overflow: hidden; }
.scene-root > .room { height: 100%; min-height: 0; aspect-ratio: auto; }
.scene-root > .page-scene { height: 100%; min-height: 0; overflow: hidden; }
.page-scene { padding: 10px 14px; }
.page-header { margin-bottom: 7px; }
.page-header h2 { font-size: 18px; }
.page-header p { font-size: 10px; }
.scene-root > .wardrobe-page { padding: 0; position: relative; display: block; }
.wardrobe-heading { position: absolute; z-index: 7; left: 10px; right: 10px; top: 4px; margin: 0; gap: 8px; pointer-events: none; }
.wardrobe-heading > button { pointer-events: auto; min-height: 40px; padding: 3px 5px; font-size: 11px; }
.wardrobe-heading h2 { font-size: 15px; }
.wardrobe-heading p { display: none; }
.wardrobe-room { position: absolute; inset: 0; height: 100%; min-height: 0; width: 100%; aspect-ratio: auto; border-radius: 0; }
.wardrobe-room .pet-anchor { --frame-width: min(60cqw, calc((100cqh - 198px) * .92), 240px); left: 50%; top: calc(100cqh - 204px); }
.wardrobe-page[data-picker-open="false"] .pet-anchor { --frame-width: min(68cqw, 80cqh, 250px); top: 81%; }
.wardrobe-mirror { width: min(26cqw, 34cqh); bottom: 14%; }
.wardrobe-clothes-rack { width: min(33cqw, 42cqh); bottom: 17%; }
.wardrobe-categories { position: absolute; z-index: 7; left: 10px; right: 10px; bottom: 158px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.wardrobe-categories button { padding: 5px 2px; font-size: 11px; min-height: 40px; border-radius: 13px; background: #fff9edee; }
.wardrobe-categories button[aria-pressed="true"] { color: #6f5737; background: #efddadee; }
.wardrobe-shelf { position: absolute; z-index: 7; left: 10px; right: 10px; bottom: 50px; height: 106px; padding: 0 7px; border-radius: 16px; background: #f1e4ccf5; }
.wardrobe-panel-head { height: 27px; display: flex; align-items: center; justify-content: space-between; }
.wardrobe-panel-head h3 { font-size: 10px; }
.wardrobe-pagination { display: flex; align-items: center; gap: 3px; font-size: 9px; color: #9a8160; }
.wardrobe-pagination .quiet-btn { min-width: 34px; min-height: 27px; padding: 2px 8px; font-size: 17px; }
.wardrobe-items { height: 77px; gap: 5px; padding: 0; }
.wardrobe-items::before { display: none; }
.wardrobe-item, .wardrobe-costume { min-height: 0; height: 77px; padding: 2px; }
.wardrobe-item-art, .wardrobe-costume .wardrobe-item-art { height: 39px; width: 63px; margin: 0 0 1px; }
.wardrobe-item small { font-size: 9px; line-height: 1.3; }
.wardrobe-item-status { font-size: 9px; line-height: 1.5; color: #9a8160; }
.wardrobe-footer { position: absolute; z-index: 8; left: 0; right: 0; bottom: 0; height: 48px; padding: 2px 10px; margin: 0; gap: 5px; background: #fff9eef2; }
.wardrobe-note { min-width: 0; flex: 1; font-size: 10px; line-height: 1.4; }
.wardrobe-footer button { flex-shrink: 0; min-height: 40px; padding: 5px 8px; font-size: 10px; }
.wardrobe-page[data-picker-open="false"] .wardrobe-categories, .wardrobe-page[data-picker-open="false"] .wardrobe-shelf { display: none; }
.sheet { display: flex; flex-direction: column; max-width: 456px; max-height: 85dvh; overflow: hidden; }
.sheet-head, .sheet-actions { flex-shrink: 0; }
.sheet-body { min-height: 0; overflow: hidden; }
.mobile-pages-nav { color: #8c7651; font-size: 11px; }
.mobile-pages-nav button { border-radius: 12px; background: #f0e4c9; color: #755d3b; font-size: 11px; }
.renovation-dialog.sheet { width: min(456px, calc(100vw - 24px)); max-width: 456px; height: min(85dvh, 720px); max-height: 85dvh; }
.renovation-layout { grid-template-columns: 1fr; grid-template-rows: minmax(112px, 35%) minmax(0, 1fr); }
.renovation-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.renovation-preview { width: auto; max-width: 100%; height: 100%; justify-self: center; }
.renovation-choices { overflow: hidden; }
.food-map { min-height: 0; height: calc(100% - 74px); gap: 8px; padding: 10px; }
.food-map .map-node:nth-child(n) { min-height: 0; }
.food-map .map-node > .food-art { width: 60px; height: 60px; margin-bottom: 4px; }
.app-shell:has(.homestead-page) .status-panel, .app-shell:has(.homestead-page) .care-nav, .app-shell:has(.homestead-page) .demo-strip { display: none; }
.homestead-page { display: flex; flex-direction: column; align-items: center; justify-content: center; container-type: size; padding: 0; }
.scene-root > .homestead-page { height: 100%; min-height: 0; overflow: hidden; }
.homestead-header, .homestead-guide { display: none; }
.homestead-stage { flex: 0 0 auto; width: min(100%, calc((100cqh - 56px) * .8)); height: auto; min-height: 0; aspect-ratio: 4 / 5; }
.homestead-page:has(.homestead-page-controls) .homestead-stage { width: min(100%, calc((100cqh - 108px) * .8)); }
.homestead-page-controls { flex-shrink: 0; height: 52px; margin: 0; gap: 12px; }
.homestead-bottom-actions { flex-shrink: 0; min-height: 56px; margin: 0; padding: 6px 10px; align-items: center; justify-content: center; }
.homestead-bottom-actions button { min-height: 44px; padding: 6px 10px; font-size: 11px; }
.homestead-roster { position: absolute; z-index: 140; top: 58px; right: 10px; max-width: calc(50% - 14px); margin: 0; background: #fffdf6ee; }
.homestead-roster > summary { min-height: 44px; padding: 11px 9px; font-size: 11px; white-space: nowrap; }
.homestead-roster summary span { margin-left: 6px; }
.homestead-roster-list { overflow: hidden; }
.homestead-roster[open] { top: auto; bottom: 10px; left: 10px; right: 10px; max-width: none; height: min(46%, 260px); min-height: 0; display: flex; flex-direction: column; margin: 0; box-shadow: 0 6px 24px #44392724; }
.homestead-roster[open] > summary { flex-shrink: 0; }
.homestead-roster[open] .homestead-roster-list { flex: 1; min-height: 0; }
.homestead-egg-roster[open] { height: min(76%, 390px); }
.homestead-egg-roster[open] .homestead-egg-grid { flex: 1; min-height: 0; overflow-y: auto; }
.food-game { container-type: size; padding: 6px 12px; }
.food-game > h2 { font-size: 18px; margin: 1px 0; }
.food-game-intro { display: none; }
.food-game-heading .quiet-btn { min-height: 32px; padding: 2px; }
.food-round-stats { padding: 1px 3px 5px; }
.food-round-stats b { font-size: 17px; }
.match-board { max-width: min(100%, calc(100cqh - 174px)); margin: 0 auto; gap: 4px; padding: 7px; }
.food-match-message { min-height: 18px; margin: 4px 0 0; font-size: 9px; }
.food-game-controls button { min-height: 32px; padding: 3px 8px; }
.food-unlock-note { margin-top: 4px; font-size: 9px; }
.food-harvest { display: none; }
.app-shell:has(.food-game) .status-panel, .app-shell:has(.food-game) .care-nav, .app-shell:has(.food-game) .demo-strip { display: none; }
.app-shell:has(.adoption-grid) .status-panel, .app-shell:has(.adoption-grid) .economy-bar, .app-shell:has(.adoption-grid) .care-nav, .app-shell:has(.adoption-grid) .demo-strip { display: none; }
@media (max-height: 700px) {
  .topbar { padding-top: 5px; }
  .personality-rhythm { display: none; }
  .growth-journey { margin-top: 4px; }
  .care-nav button { min-height: 54px; }
  .care-nav .care-icon, .care-nav .care-icon .art-icon { width: 34px; height: 34px; }
  .wardrobe-room .pet-anchor { --frame-width: min(60cqw, calc((100cqh - 188px) * .95), 230px); top: calc(100cqh - 199px); }
  .wardrobe-page[data-picker-open="false"] .pet-anchor { --frame-width: min(68cqw, 80cqh, 250px); top: 81%; }
  .food-game > h2 { display: none; }
  .match-board { max-width: min(100%, calc(100cqh - 150px)); }
  .candidate-card .mini-pet { height: 85px; width: 80px; }
  .candidate-card::before { top: 67px; }
  .candidate-card p { display: none; }
  .adoption-note, .adoption-form > p { display: none; }
}
