/* Drawer Village interface authority.
   This is the only runtime theme layer. It intentionally loads last so old
   page-specific paint rules cannot split a theme into unrelated colors. */

html[data-color-mode][data-visual-theme]{
  --ui-radius:20px;
  --ui-shadow:0 14px 38px var(--theme-shadow);
  color-scheme:light;
}
html[data-color-mode="dark"][data-visual-theme]{color-scheme:dark}
html[data-color-mode][data-visual-theme],
html[data-color-mode][data-visual-theme] body,
html[data-color-mode][data-visual-theme] main:not(.web-drawer-content){
  color:var(--ink)!important;
  background:
    radial-gradient(circle at 8% -8%,color-mix(in srgb,var(--s) 18%,transparent),transparent 34%),
    radial-gradient(circle at 92% 9%,color-mix(in srgb,var(--p) 13%,transparent),transparent 30%),
    var(--bg)!important;
}

html[data-color-mode][data-visual-theme] body>header,
html[data-color-mode][data-visual-theme] #app>header,
html[data-color-mode][data-visual-theme] .native-sub-header{
  border-color:var(--theme-border)!important;
  background:linear-gradient(135deg,var(--theme-surface-strong),var(--panel))!important;
  color:var(--ink)!important;
  box-shadow:0 9px 28px var(--theme-shadow)!important;
}
html[data-color-mode][data-visual-theme] body>header :is(h1,h2,h3,b,small,#save-state),
html[data-color-mode][data-visual-theme] .native-sub-header :is(b,span){
  color:var(--ink)!important;
  -webkit-text-fill-color:var(--ink)!important;
}
html[data-color-mode][data-visual-theme] body>header nav button:not(.home-native-pill){
  border-color:var(--theme-border)!important;
  background:var(--theme-surface)!important;
  color:var(--ink)!important;
  -webkit-text-fill-color:var(--ink)!important;
}
html[data-color-mode][data-visual-theme] body>header nav button:not(.home-native-pill):is(.on,:hover,:focus-visible),
html[data-color-mode][data-visual-theme] button.primary,
html[data-color-mode][data-visual-theme] button.on:not(.routine-shell *):not(.roster-card):not(.place-person-face):not(.theme-swatch):not(.character-picker-button):not(.character-pane-ribbon):not(.character-wallet-selected):not(.character-roster-entry):not(.character-full-tab):not(.character-overview-section-tab):not(.character-overview-next-bookmark):not(.home-native-pill),
html[data-color-mode][data-visual-theme] [aria-pressed="true"]:not(.mail-center *){
  border-color:#b48930!important;
  background:linear-gradient(145deg,#fff0a6,#efd15e)!important;
  color:#3c2b16!important;
  -webkit-text-fill-color:#3c2b16!important;
  box-shadow:inset 0 1px #fff8d2,0 3px 0 #997535!important;
}

html[data-color-mode][data-visual-theme] :is(
  .panel,.form,.setting-card,.sync-panel,.feedback-card,.font-preview,
  .catalog-shell,.catalog-kind,.catalog-dex-card,.catalog-card,.favorite-group,
  .shop-store,.shop-cart,.premium-product,
  .relationship-page:not(.relationship-redesign),.relation,.character-menu,
  .mobile-character-heading,
  .town-tabs,.town-editor-panel,.resident-editor,.sleep-room-editor,
  .character-statistics-page,.character-statistics-page article,.character-statistics-page section
):not(.relationship-redesign){
  border-color:var(--theme-border)!important;
  background:linear-gradient(145deg,var(--theme-surface),var(--panel))!important;
  color:var(--ink)!important;
  box-shadow:var(--ui-shadow)!important;
}
html[data-color-mode][data-visual-theme] :is(
  .settings-shell,.catalog-shell,.shop-store,.relationship-page:not(.relationship-redesign),
  .character-statistics-page,.character-editor,.home-page
){
  border-color:var(--theme-border)!important;
  background:
    radial-gradient(circle at 4% 0,color-mix(in srgb,var(--s) 13%,transparent),transparent 29%),
    linear-gradient(155deg,var(--theme-wash),var(--bg))!important;
  color:var(--ink)!important;
}
html[data-color-mode][data-visual-theme] :is(
  .settings-shell,.catalog-shell,.shop-store,.relationship-page,
  .character-statistics-page,.character-editor,.home-page,.panel,.form,
  dialog:not(.direct-command-dialog),.visual-theme-dialog
) :is(h1,h2,h3,h4,h5,b,strong,label,legend,dt,dd,span,li):not(.relationship-redesign *):not(.relationship-fullscreen-dialog *):not(.room-heading *):not(.character-draft-sheet *):not(.character-registration-card *):not(.character-pane-ribbon *):not(.character-wallet-selected *):not(.character-wallet-roster *):not(.mobile-character-dashboard[data-character-ui-version="8"] *):not(.character-quick-settings-dialog *):not(.mobile-character-full-settings *):not(.character-book-v8 *):not(.home-native-hud *):not(.home-native-edit-tools *){
  color:var(--ink)!important;
  -webkit-text-fill-color:var(--ink)!important;
}
html[data-color-mode][data-visual-theme] :is(
  .settings-shell,.catalog-shell,.shop-store,.relationship-page,
  .character-statistics-page,.character-editor,.home-page,.panel,.form,
  dialog:not(.direct-command-dialog),.visual-theme-dialog
) :is(p,small,time,em,.muted,.hint):not(.relationship-redesign *):not(.relationship-fullscreen-dialog *):not(.room-edit-hint):not(.character-draft-sheet *):not(.character-registration-card *):not(.character-pane-ribbon *):not(.character-wallet-selected *):not(.character-wallet-roster *):not(.mobile-character-dashboard[data-character-ui-version="8"] *):not(.character-quick-settings-dialog *):not(.mobile-character-full-settings *):not(.character-book-v8 *){
  color:var(--muted)!important;
  -webkit-text-fill-color:var(--muted)!important;
}
html[data-color-mode][data-visual-theme] :is(input,select,textarea):not(.dictionary-shell *):not(.character-book-v8 *):not(.town-building-screen *):not(.mail-center *):not(.mail-letter *),
html[data-color-mode][data-visual-theme] main button:not(.dictionary-shell *):not(.catalog-tile):not(.village-welcome *):not(.relationship-redesign *):not(.relationship-fullscreen-dialog *):not(.routine-shell *):not(.game-hud-button):not(.game-hud-profile-toggle):not(.game-hud-moment-title):not(.primary):not(.on):not(.place):not(.person):not(.place-person-face):not(.town-traveler):not(.meeting-walker):not(.meeting-pair *):not(.mail-center *):not(.mail-letter *):not(.home-person):not(.room-pet):not(.home-interaction-avatar):not([data-home-character]):not(.character-draft-back):not(.character-draft-action):not(.character-pane-ribbon):not(.character-pane-add):not(.character-wallet-selected):not(.character-registration-photo):not(.character-roster-entry):not(.character-roster-add):not(.character-roster-reorder):not(.character-setting-choice):not(.character-quick-settings-dialog *):not(.mobile-character-full-settings *):not(.character-book-v8 *):not(.town-building-screen *):not(.drawer-shop-stage *):not(.character-full-tab):not(.character-full-save):not(.home-native-pill):not(.home-native-back):not(.town-native-title):not(.town-native-community):not(.town-native-town-pill):not(.home-native-info-link):not(.home-native-house-name):not(.room-furniture-item){
  border-color:var(--theme-border)!important;
  background:var(--theme-surface)!important;
  color:var(--ink)!important;
  -webkit-text-fill-color:var(--ink)!important;
}
html[data-color-mode][data-visual-theme] :is(dialog:not(.relationship-fullscreen-dialog):not(.mail-letter):not(.direct-command-dialog),.visual-theme-dialog),
html[data-color-mode][data-visual-theme] :is(dialog:not(.relationship-fullscreen-dialog):not(.mail-letter):not(.direct-command-dialog),.visual-theme-dialog)>form{
  border-color:var(--theme-border)!important;
  background:linear-gradient(145deg,var(--theme-surface),var(--panel))!important;
  color:var(--ink)!important;
}

/* Theme personalities stay visible across the entire app, not only Settings. */
html[data-visual-theme="baroque"]{--ui-radius:12px}
html[data-visual-theme="moonlit-drawer"]{--ui-radius:8px}
html[data-visual-theme="ruined-rose"]{--ui-radius:5px}
html[data-visual-theme="healing-glasshouse"]{--ui-radius:26px}
html[data-visual-theme="reverie-ward"]{--ui-radius:18px}
html[data-visual-theme="noir-rain"]{--ui-radius:3px}
html:is([data-visual-theme="baroque"],[data-visual-theme="moonlit-drawer"],[data-visual-theme="ruined-rose"],[data-visual-theme="healing-glasshouse"],[data-visual-theme="reverie-ward"],[data-visual-theme="noir-rain"]) #app :is(h1,h2,h3,.brand h1):not(.routine-shell *){
  font-family:Georgia,"Times New Roman","Noto Serif KR",serif;
  letter-spacing:.018em;
}
html:is([data-visual-theme="baroque"],[data-visual-theme="moonlit-drawer"],[data-visual-theme="ruined-rose"],[data-visual-theme="healing-glasshouse"],[data-visual-theme="reverie-ward"],[data-visual-theme="noir-rain"]) #app :is(.panel,.form,.setting-card,.sync-panel,.feedback-card,.catalog-card,.relation,.character-statistics-page){
  border-radius:var(--ui-radius)!important;
}
html[data-visual-theme="baroque"] body{background-image:radial-gradient(circle at 14% 0,#fee39f55,transparent 28%),linear-gradient(145deg,var(--bg),color-mix(in srgb,#ad6d15 14%,var(--bg)))!important}
html[data-visual-theme="moonlit-drawer"] body{background-image:radial-gradient(circle at 82% 2%,#d4a84f30,transparent 22%),linear-gradient(150deg,var(--bg),color-mix(in srgb,#172a58 22%,var(--bg)))!important}
html[data-visual-theme="ruined-rose"] body{background-image:linear-gradient(118deg,transparent 0 48%,color-mix(in srgb,var(--line) 16%,transparent) 48.2% 48.5%,transparent 48.7%),radial-gradient(circle at 88% 3%,#681f2a38,transparent 28%),var(--bg)!important}
html[data-visual-theme="healing-glasshouse"] body{background-image:radial-gradient(ellipse at 18% 0,#9bb88a44,transparent 34%),radial-gradient(ellipse at 87% 15%,#ffffff35,transparent 26%),var(--bg)!important}
html[data-visual-theme="reverie-ward"] body{background-image:radial-gradient(circle at 16% 8%,#6551a545,transparent 26%),radial-gradient(circle at 84% 2%,#36a9a038,transparent 30%),var(--bg)!important}
html[data-visual-theme="noir-rain"] body{background-image:repeating-linear-gradient(104deg,transparent 0 24px,#ffffff08 25px,#ffffff08 26px,transparent 27px 49px),radial-gradient(circle at 92% 0,#a21f2d38,transparent 24%),var(--bg)!important}

/* Theme picker: selected badge gets its own row and never covers the label. */
.visual-theme-dialog .visual-theme-options-all{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding-top:14px!important}
.visual-theme-dialog .visual-theme-options-all>button{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:center!important;gap:6px 12px!important;min-width:0!important}
.visual-theme-dialog .visual-theme-options-all>button>i{grid-column:1;grid-row:1/3}
.visual-theme-dialog .visual-theme-options-all>button>span{grid-column:2;grid-row:1;min-width:0}
.visual-theme-dialog .visual-theme-options-all>button>em{position:static!important;grid-column:2;grid-row:2;justify-self:start;margin:0!important;padding:3px 9px!important;border-radius:99px;background:var(--p)!important;color:var(--on-p)!important;-webkit-text-fill-color:var(--on-p)!important;font-size:.7rem!important;line-height:1.25!important}

/* Home tools: only a discreet edit control remains, clear of cards and menu. */
.native-observe-home>.home-observe-tools{top:auto!important;left:auto!important;right:max(14px,env(safe-area-inset-right))!important;bottom:calc(314px + env(safe-area-inset-bottom))!important;translate:0 0!important}
.desktop-observe-scene .home-observe-tools{top:auto!important;right:16px!important;bottom:16px!important}
.home-observe-tools button{min-height:28px!important;padding:5px 9px!important;border:1px solid #ffffff4a!important;background:#101722b0!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font-size:10px!important;box-shadow:0 5px 14px #0005!important}

/* Town characters never inherit the generic white button/card surface. */
.town-map-scroll :is(.place-people,.place-people-faces,.place-person-face),
.standard-observe-view :is(.place-people,.place-people-faces,.place-person-face),
.observe :is(.place-people,.place-people-faces,.place-person-face){
  border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;padding:0!important;
}
.town-map-scroll :is(.town-traveler,.town-traveler-visual){border:0!important;outline:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important;backdrop-filter:none!important}
.town-map-scroll .place-person-face :is(.avatar,.sprite),
.standard-observe-view .place-person-face :is(.avatar,.sprite),
.observe .place-person-face :is(.avatar,.sprite){
  border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;object-fit:contain!important;
}
.town-map-scroll .place-person-face img.profile-photo-fallback,
.standard-observe-view .place-person-face img.profile-photo-fallback{border-radius:50%!important;object-fit:cover!important}

@media(max-width:720px),(min-width:721px) and (orientation:portrait){
  html.native-app[data-active-tab="observe"] .native-observe-top{
    position:absolute!important;
    top:max(32px,calc(env(safe-area-inset-top) + 20px))!important;
    left:88px!important;
    right:88px!important;
    z-index:60!important;
    pointer-events:none!important;
  }
  html.native-app[data-active-tab="observe"] .native-character-stage.visual-mode-sd{
    translate:0 -32px!important;
    pointer-events:none!important;
  }
  html.native-app[data-active-tab="observe"] .native-character-stage.visual-mode-sd + .native-character-picker{
    margin-top:-64px!important;
  }
  html.native-app[data-active-tab="observe"] .native-game-menu{pointer-events:none!important}
  html.native-app[data-active-tab="observe"] .native-game-menu button{
    z-index:200!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
  html.native-app[data-active-tab="observe"] .native-game-menu .native-menu-left{left:max(10px,env(safe-area-inset-left))!important}
  html.native-app[data-active-tab="observe"] .native-game-menu .native-menu-right{right:max(10px,env(safe-area-inset-right))!important}
}

.home-character-display-card{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important}
.home-character-display-card>:is(h2,p,small){grid-column:1/-1}
.home-character-display-card label{display:grid!important;gap:7px!important}
.home-character-display-card label:first-of-type{grid-column:1/-1}
.home-character-display-card output{justify-self:end;font-weight:900}
@media(max-width:560px){.home-character-display-card{grid-template-columns:1fr}}
/* Soap has one stable, bounded glyph per actor. The legacy bubble pseudo
   elements were large enough to overlap both SD faces on Android. */
.native-app .scene-action-washing-up .action-prop-soap{
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  height:44px!important;
  padding:0!important;
  color:initial!important;
  font-size:34px!important;
  line-height:1!important;
  text-shadow:none!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:drop-shadow(0 5px 5px #0007)!important;
  animation:native-soap-small-motion 1.65s ease-in-out infinite!important;
}
.native-app .scene-action-washing-up .action-prop-soap::before,
.native-app .scene-action-washing-up .action-prop-soap::after{display:none!important;content:none!important}
@keyframes native-soap-small-motion{
  0%,100%{translate:-4px 3px;rotate:-5deg}
  50%{translate:4px -3px;rotate:5deg}
}
/* House occupants: artwork and status copy are separate. Transparent icon art
   never receives a card, while an actual photo is cropped to a true circle. */
.home-page .home-person>.sprite,
.home-page .room-pet>.room-pet-icon,
.home-occupant-popover .home-occupant-visual :is(.sprite,.room-pet-icon,.room-pet-emoji){
  display:block!important;max-width:none!important;padding:0!important;border:0!important;border-radius:0!important;clip-path:none!important;background:transparent!important;box-shadow:none!important;object-fit:contain!important;
}
.home-page :is(.home-person,.room-pet){display:flex!important;flex-direction:column!important;align-items:center!important;gap:4px!important;padding:0!important;border:0!important;outline-offset:3px;background:transparent!important;background-image:none!important;box-shadow:none!important;backdrop-filter:none!important;appearance:none!important;-webkit-appearance:none!important;cursor:pointer;user-select:none}
.home-page :is(.home-person,.room-pet):focus-visible{outline:3px solid color-mix(in srgb,var(--p) 72%,#fff)}
.home-page :is(.home-person,.room-pet)>:is(.avatar,.sprite,.room-pet-photo,.room-pet-icon,.room-pet-emoji){flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important}
.home-page .home-person>.sprite{width:72px!important;min-width:72px!important;max-width:72px!important;height:72px!important;min-height:72px!important;max-height:72px!important;object-fit:contain!important;overflow:visible!important}
.home-page .home-person>.avatar{width:64px!important;min-width:64px!important;max-width:64px!important;height:64px!important;min-height:64px!important;max-height:64px!important}
.home-page .room-pet>.room-pet-icon{width:64px!important;min-width:64px!important;max-width:64px!important;height:64px!important;min-height:64px!important;max-height:64px!important;object-fit:contain!important;overflow:visible!important}
.home-page .room-pet>.room-pet-photo{width:58px!important;min-width:58px!important;max-width:58px!important;height:58px!important;min-height:58px!important;max-height:58px!important;overflow:hidden!important}
.home-page .room-pet>.room-pet-emoji{display:grid!important;place-items:center!important;width:58px!important;min-width:58px!important;max-width:58px!important;height:58px!important;min-height:58px!important;max-height:58px!important;font-size:40px!important;line-height:1!important;overflow:visible!important}
.home-page .home-person>.avatar,
.home-page .room-pet>.room-pet-photo,
.home-occupant-popover .home-occupant-visual :is(.avatar,.room-pet-photo){
  border-radius:50%!important;clip-path:circle(50% at 50% 50%)!important;object-fit:cover!important;overflow:hidden!important;
}
.home-occupant-popover .home-occupant-visual{border-radius:0!important;background:transparent!important;overflow:visible!important}
.home-page :is(.home-person-status,.room-pet-status){position:relative!important;display:grid!important;justify-items:center!important;width:max-content!important;min-width:66px!important;max-width:132px!important;margin:0!important;padding:6px 9px!important;border:0!important;border-radius:12px!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;text-align:center!important;white-space:normal!important;color:#302821!important;-webkit-text-fill-color:#302821!important}
.home-page :is(.home-person-status,.room-pet-status) :is(b,small){display:block!important;width:100%!important;margin:0!important;color:inherit!important;-webkit-text-fill-color:inherit!important;text-align:center!important;text-shadow:none!important;white-space:normal!important;word-break:keep-all!important;overflow-wrap:normal!important}
.home-page :is(.home-person-status,.room-pet-status) small{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;line-clamp:2!important;overflow:hidden!important}
html[data-color-mode="dark"] .home-page :is(.home-person-status,.room-pet-status){border-color:transparent!important;background:transparent!important;color:#f5f8fb!important;-webkit-text-fill-color:#f5f8fb!important}

/* Room photographs are deliberately darkened, so their authored title is
   always light regardless of the active color theme. */
html[data-color-mode][data-visual-theme] .home-page .room-heading :is(b,.room-edit-hint){color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:0 2px 4px #000,0 0 3px #000!important}

@media(max-width:720px),(min-width:721px) and (orientation:portrait){
  html.native-app[data-active-tab="home"] .home-person>.sprite{width:58px!important;min-width:58px!important;max-width:58px!important;height:58px!important;min-height:58px!important;max-height:58px!important}
  html.native-app[data-active-tab="home"] .home-person>.avatar{width:52px!important;min-width:52px!important;max-width:52px!important;height:52px!important;min-height:52px!important;max-height:52px!important}
  html.native-app[data-active-tab="home"] .room-pet>.room-pet-icon{width:54px!important;min-width:54px!important;max-width:54px!important;height:54px!important;min-height:54px!important;max-height:54px!important}
  html.native-app[data-active-tab="home"] .room-pet>.room-pet-photo{width:50px!important;min-width:50px!important;max-width:50px!important;height:50px!important;min-height:50px!important;max-height:50px!important}
  html.native-app[data-active-tab="home"] .room-pet>.room-pet-emoji{width:50px!important;min-width:50px!important;max-width:50px!important;height:50px!important;min-height:50px!important;max-height:50px!important;font-size:34px!important}
  html.native-app[data-active-tab="home"] :is(.home-person-status,.room-pet-status){min-width:58px!important;max-width:108px!important;padding:4px 6px!important}
}

/* The pet library distinguishes a cropped photo from transparent icon art,
   and exposes its own editor without requiring whole-house edit mode. */
.home-page .pet-avatar .pet-photo-art,
.home-page .resident-pet-photo{border-radius:50%!important;clip-path:circle(50% at 50% 50%)!important;object-fit:cover!important;overflow:hidden!important}
.home-page .pet-avatar .pet-icon-art,
.home-page .resident-pet-icon{border:0!important;border-radius:0!important;clip-path:none!important;background:transparent!important;box-shadow:none!important;object-fit:contain!important;overflow:visible!important}
.home-page .pet-edit{grid-column:1/-1;width:100%;margin-top:8px;border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface);overflow:hidden}
.home-page .pet-edit>summary{cursor:pointer;padding:11px 13px;font-weight:800;color:var(--ink);list-style-position:inside}
.home-page .pet-edit[open]>summary{border-bottom:1px solid var(--theme-border)}
.home-page .pet-edit-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}
.home-page .pet-edit-fields>:is(fieldset,.pet-actions){grid-column:1/-1}
.home-page .resident-pet-scene-card .resident-profile>:is(.resident-pet-photo,.resident-pet-icon){width:72px!important;height:72px!important;flex:0 0 72px!important}
.home-page .resident-pet-scene-card .resident-profile>.resident-pet-emoji{display:grid;place-items:center;width:72px;height:72px;font-size:46px;line-height:1}
@media(max-width:720px),(min-width:721px) and (orientation:portrait){
  .home-page .pet-edit-fields{grid-template-columns:minmax(0,1fr)}
  .home-page .pet-edit-fields>*{grid-column:1!important;min-width:0!important}
  .home-page .resident-pet-scene-card .resident-profile>:is(.resident-pet-photo,.resident-pet-icon){width:58px!important;height:58px!important;flex-basis:58px!important}
  .home-page .resident-pet-scene-card .resident-profile>.resident-pet-emoji{width:58px;height:58px;font-size:38px}
}

/* Expansion showcase owns its paint and intrinsic height. Generic light-mode
   card rules must not collapse it into a decorative strip. */
html[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase{
  display:grid!important;height:auto!important;max-height:none!important;overflow:visible!important;
  border-color:#e5bf68!important;
  background:radial-gradient(circle at 12% 15%,#ffe9a033,transparent 28%),linear-gradient(135deg,#17131f,#312344 54%,#5b3427)!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
}
html[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-copy{
  display:flex!important;visibility:visible!important;opacity:1!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
}
html[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-copy :is(h2,p,li,span){
  visibility:visible!important;opacity:1!important;color:#f8f1ff!important;-webkit-text-fill-color:#f8f1ff!important;text-shadow:0 2px 8px #09060db8!important;
}
html[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-copy>small{color:#e8c98a!important;-webkit-text-fill-color:#e8c98a!important}
html[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-copy>span,
html[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-copy>div>b{color:#ffe6a2!important;-webkit-text-fill-color:#ffe6a2!important}
@media(max-width:720px),(min-width:721px) and (orientation:portrait){
  html.native-app[data-active-tab="shop"] .shop-expansion-heading{
    display:flex!important;align-items:baseline!important;justify-content:flex-start!important;gap:12px!important;
    min-width:0!important;margin:26px 0 12px!important;padding-inline:4px!important;overflow:visible!important;
  }
  html.native-app[data-active-tab="shop"] .shop-expansion-heading h2{
    min-width:0!important;margin:0!important;font-size:clamp(26px,8vw,34px)!important;line-height:1!important;
    white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  }
  html.native-app[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-store{height:100%!important;overflow-x:hidden!important;overflow-y:auto!important}
  html.native-app[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase{
    grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:18px!important;width:100%!important;min-height:650px!important;padding:16px!important;
  }
  html.native-app[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-art{display:grid!important;width:100%!important;min-height:250px!important}
  html.native-app[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-art img{display:block!important;width:100%!important;height:250px!important;min-height:250px!important;object-fit:contain!important}
  html.native-app[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-copy{min-height:340px!important;align-items:flex-start!important;justify-content:flex-start!important}
  html.native-app[data-color-mode][data-visual-theme][data-active-tab="shop"] .shop-expansion-showcase .expansion-copy h2{
    max-width:100%!important;font-size:clamp(28px,8.5vw,38px)!important;line-height:1.12!important;
    white-space:normal!important;word-break:break-word!important;overflow-wrap:anywhere!important;overflow:visible!important;text-overflow:clip!important;
  }
}

/* Dedicated statistics page. */
.character-statistics-page{display:grid!important;gap:18px!important;width:min(1180px,100%)!important;margin:0 auto!important;padding:clamp(18px,3vw,34px)!important;box-sizing:border-box!important}
.character-statistics-page>.home-dialog-head{position:static!important}
.character-stat-gender{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:22px!important;padding:20px!important}
.character-stat-gender-pie{display:grid;place-content:center;width:148px;height:148px;border-radius:50%;background:var(--gender-pie);position:relative;isolation:isolate}
.character-stat-gender-pie::after{content:"";position:absolute;inset:24px;border-radius:50%;background:var(--panel);z-index:-1}
.character-stat-gender-pie b{font-size:30px;line-height:1;text-align:center}.character-stat-gender-pie small{text-align:center}
.character-stat-gender h3{margin:0 0 10px}.character-stat-gender ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.character-stat-gender li{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:8px}
.character-stat-gender li>i{width:10px;height:10px;border-radius:50%;background:var(--gender-color)}
.character-stat-rankings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.character-stat-rankings section{min-width:0;padding:15px!important}.character-stat-rankings h3{margin:0 0 12px;font-size:15px}
.character-stat-rankings ol{display:grid;gap:8px;margin:0;padding:0;list-style:none}.character-stat-rankings li{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px}
.character-stat-rankings em{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,var(--p),var(--s));color:var(--on-grad)!important;-webkit-text-fill-color:var(--on-grad)!important;font-style:normal;font-weight:900}.character-stat-rankings li>b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.character-stat-rankings li>span{font-size:.82rem;color:var(--muted)!important}
.character-statistics-page .character-stat-actions{position:static!important;margin:0!important;padding:14px 0 0!important;border-top:1px solid var(--theme-border)!important;background:transparent!important;grid-template-columns:minmax(180px,360px)!important}

@media(max-width:720px),(min-width:721px) and (orientation:portrait){
  .visual-theme-dialog .visual-theme-options-all{grid-template-columns:minmax(0,1fr)!important}
  .character-statistics-page{padding:16px 12px calc(24px + env(safe-area-inset-bottom))!important}
  .character-stat-gender{grid-template-columns:1fr!important;justify-items:center!important}.character-stat-gender>div:last-child{width:100%}
  .character-stat-rankings{grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){html[data-visual-theme] *,html[data-visual-theme] *::before,html[data-visual-theme] *::after{scroll-behavior:auto!important}}

/* Final scene controls and occupant surfaces. */
.character-manage-grid>.character-home-visual-choice{grid-column:1/-1;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important}
.character-home-visual-choice>div:first-child{display:grid;gap:5px}.character-home-visual-choice h3,.character-home-visual-choice p{margin:0}
.character-home-visual-buttons{display:flex!important;flex:0 0 auto!important;gap:4px!important;padding:4px!important;border:1px solid var(--theme-border)!important;border-radius:999px!important;background:color-mix(in srgb,var(--panel) 82%,var(--p) 18%)!important}
.character-home-visual-buttons button{min-width:62px!important;min-height:40px!important;border:0!important;border-radius:999px!important;background:transparent!important;color:var(--ink)!important;-webkit-text-fill-color:var(--ink)!important;font-weight:900!important}
.character-home-visual-buttons button.on{background:linear-gradient(135deg,var(--p),var(--s))!important;color:var(--on-grad)!important;-webkit-text-fill-color:var(--on-grad)!important;box-shadow:0 7px 18px color-mix(in srgb,var(--p) 30%,transparent)!important}
.character-home-visual-buttons button:disabled{opacity:.38!important}

html[data-color-mode][data-visual-theme] .home-page .room-pet,
html[data-color-mode][data-visual-theme] .home-page .room-pet::before,
html[data-color-mode][data-visual-theme] .home-page .room-pet::after{
  border:0!important;outline:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important;backdrop-filter:none!important;
}
html[data-color-mode][data-visual-theme] .home-page .room-pet{padding:0!important;overflow:visible!important}
html[data-color-mode][data-visual-theme] .home-page .room-pet>:not(.room-pet-status){border:0!important;outline:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important}
html[data-color-mode][data-visual-theme] .home-page .room-pets{border:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important}
html[data-color-mode][data-visual-theme] .home-page .room-pet>:is(.room-pet-photo,.room-pet-icon,.room-pet-emoji){filter:none!important;-webkit-mask:none!important;mask:none!important}
html[data-color-mode][data-visual-theme] .home-page .room-pet>.room-pet-photo{border-radius:50%!important;clip-path:circle(50% at 50% 50%)!important;object-fit:cover!important}
html[data-color-mode][data-visual-theme] .home-page .room-pet>.room-pet-status{border:1px solid color-mix(in srgb,var(--p) 22%,#cbb8a8)!important;border-radius:12px!important;background:color-mix(in srgb,#fff 91%,var(--p) 9%)!important;box-shadow:0 5px 14px #2b201b24!important}
html[data-color-mode="dark"][data-visual-theme] .home-page .room-pet>.room-pet-status{border-color:#ffffff38!important;background:#172536e8!important}

html.native-app[data-active-tab="observe"] .scene-action-tea .native-character-stage.visual-mode-ld :is(.native-scene-action-prop,.native-person-action-prop),
.desktop-observe-scene.scene-action-tea :is(.native-scene-action-prop,.native-person-action-prop),
.desktop-observe-scene .desktop-scene-canvas.scene-action-tea :is(.native-scene-action-prop,.native-person-action-prop),
.native-app .scene-action-tea :is(.native-scene-action-prop,.native-person-action-prop){
  display:grid!important;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif!important;
  filter:drop-shadow(0 7px 7px #0009)!important;
  animation:native-prop-coffee-sip 2.25s ease-in-out infinite!important;
}
.native-app :is(.native-scene-action-prop,.native-person-action-prop).action-prop-tea,
.native-app :is(.native-scene-action-prop,.native-person-action-prop).action-prop-coffee-drinking{
  display:grid!important;
  filter:drop-shadow(0 7px 7px #0009)!important;
  animation:native-prop-coffee-sip 2.25s ease-in-out infinite!important;
}
.native-app :is(.native-scene-action-prop,.native-person-action-prop).action-prop-eating{
  animation:native-prop-eat 1.7s ease-in-out infinite!important;
}

@media(max-width:720px),(min-width:721px) and (orientation:portrait){
  .character-manage-grid>.character-home-visual-choice{align-items:stretch!important;flex-direction:column!important}
  .character-home-visual-buttons{width:100%!important}.character-home-visual-buttons button{flex:1 1 0!important}
}
