/* Complete shared icons already contain their rim. Match the old choice
   selectors' state specificity so their pink/green CSS borders cannot win. */
html body button.nanamono-choice[data-nanamono-choice]:not([hidden]):has(>img.garden-shared-complete),
html body :is(#gameConfirm,#purchaseConfirm,#musicPurchaseConfirm,#comicReadConfirm,#comicReturnDialog,#gardenRestDialog,.nm-game-topbar,.nm-settlement-overlay) button.nanamono-choice[data-nanamono-choice]:not([hidden]):has(>img.garden-shared-complete) {
 border:0!important;
 padding:0!important;
 background:none!important;
 box-shadow:none!important;
 backdrop-filter:none!important;
}

/* GOOD and both balances each own a bounded grid cell. Keep every value and
   put connection messages in their own full-width row rather than the wallet
   flex line. This changes no scene anchor or gameplay-space reservation. */
html body #gardenApp>.appbar,
html body #gardenApp[data-nanamono-settlement-surface="garden"]>.appbar {
 grid-template-columns:116px minmax(0,1fr) minmax(0,1fr);
 grid-template-rows:60px auto auto;
 z-index:61;
}
html body #gardenApp>.appbar>.heading {
 grid-column:2/-1;
}
html body #gardenApp>.appbar>#gardenCalendarButton {
 grid-column:2/-1;
}
html body #gardenApp>.appbar>.gardenWallet {
 display:contents;
}
html body #gardenApp>.appbar>.garden-good-status {
 grid-column:1;grid-row:2;
 box-sizing:border-box;
 display:flex;flex-wrap:wrap;align-items:center;
 min-width:0;max-width:100%;
 white-space:normal;overflow-wrap:anywhere;
 min-height:16px;line-height:16px;
}
html body #gardenApp>.appbar>.gardenWallet>.gold,
html body #gardenApp>.appbar>.gardenWallet>.garden-coin {
 grid-row:2;
 box-sizing:border-box;
 display:flex;align-items:center;justify-content:flex-end;
 gap:3px;min-width:0;max-width:100%;
 white-space:normal;line-height:16px;
}
html body #gardenApp>.appbar>.gardenWallet>.gold {grid-column:2}
html body #gardenApp>.appbar>.gardenWallet>.garden-coin {grid-column:3}
html body #gardenApp>.appbar :is(#gardenGoodCount,#goldCount,#gardenCoinCount) {
 min-width:0;max-width:100%;
 white-space:normal;overflow-wrap:anywhere;word-break:normal;
 font-variant-numeric:tabular-nums;
}
html body #gardenApp>.appbar>.gardenWallet>#gardenConnection {
 grid-column:1/-1;grid-row:3;
 box-sizing:border-box;
 min-width:0;max-width:100%;
 margin:0;padding:0;
 white-space:normal;overflow-wrap:anywhere;word-break:normal;
 line-height:1.4;text-align:right;
}
html body #gardenApp>.appbar>.gardenWallet>#gardenConnection:empty {
 display:none;
}

/* The field-specific relative-position rule overrode the common fixed hero.
   Restore the existing full-viewport backdrop; its controls retain their
   original artwork coordinates and the field section keeps its own padding. */
html body #sceneField>.hero {
 position:fixed!important;
 inset:0 0 var(--garden-safe-bottom)!important;
 width:100vw;
 height:calc(100dvh - var(--garden-safe-bottom))!important;
 margin:0;
}

/* The two existing destinations are distinct: the application HOME and the
   front of the house. Use the old header's two left control slots, with their
   short captions inside the 60px first row. Both controls belong to the header
   stacking context, above the field overlays (32/33) and tutorial card (40).
   The old scene-nav slot remains below those overlays with the other nav UI. */
html body #gardenApp>.appbar>.garden-ui-control:has(>#appHome):not([hidden]),
html body #gardenApp>.appbar>.garden-ui-control:has(>#houseBack):not([hidden]) {
 position:fixed;left:max(10px,env(safe-area-inset-left));
 top:max(4px,env(safe-area-inset-top));
 display:flex!important;flex-direction:column;
 align-items:center;justify-content:flex-start;gap:2px;
 width:48px;min-width:48px;max-width:48px;
 margin:0;padding:0;z-index:61;pointer-events:none;
}
html body #gardenApp>.appbar .garden-ui-control>#appHome.garden-ui-button:not([hidden]),
html body #gardenApp>.appbar .garden-ui-control>#houseBack.garden-ui-button:not([hidden]) {
 --garden-icon-size:44px!important;
 display:inline-flex!important;
 width:44px!important;height:44px!important;
 min-width:44px!important;min-height:44px!important;
 max-width:44px!important;max-height:44px!important;
 flex:0 0 44px!important;
 margin:0!important;transform:none!important;
 pointer-events:auto;
}
html body #gardenApp>.appbar .garden-ui-control>#appHome.garden-ui-button:not([hidden]),
html body #gardenApp>.appbar .garden-ui-control>#houseBack.garden-ui-button:not([hidden]) {
 position:relative!important;inset:auto!important;
}
html body #gardenApp>.appbar>.garden-ui-control:has(>#appHome)>.garden-ui-caption,
html body #gardenApp>.appbar>.garden-ui-control:has(>#houseBack)>.garden-ui-caption {
 box-sizing:border-box;display:block!important;
 width:56px;max-width:56px;
 margin:0;padding:1px 2px;
 font-size:10px;line-height:12px;white-space:nowrap;
 text-align:center;pointer-events:none;
}
html body #gardenApp #gardenLocalNav>.garden-local-return-slot {
 box-sizing:border-box;
 width:48px!important;min-width:48px;max-width:48px;
 height:48px;min-height:48px;
 flex:0 0 48px;
 grid-column:1;grid-row:1;justify-self:center;align-self:start;
 margin:0;padding:0;pointer-events:none;
}
html body #gardenApp>.appbar>.garden-ui-control:has(>#houseBack):not([hidden]) {
 left:max(68px,calc(env(safe-area-inset-left) + 68px));
 width:44px;min-width:44px;max-width:44px;
}
