/* Line 32520 (ONE-03 part 2 of 2, the_one_terminal_home): her ACT home inside THE ONE's terminal state (partials/the-one-terminal-home,
   moved into her container by public/js/shop-concierge/terminal-home.js). Only while her container carries data-the-one-home-on
   (her terminal state): her container becomes a grid of her home (header, her rail for her owner, her stage holding her one
   <alive-agent>) beside her own words, typed box, voice bar and row, which stay as they are. Google path: the --ns-* tokens through
   house.css's --sc-* roles, light and dark, 375 first, 44 px targets, one filled link (her room, or her home). Hidden otherwise. */
aside.ns-fp.sc-house .ns-one-home[hidden] { display: none !important; }

html[data-sc-cc-house="terminal"] aside.ns-fp.sc-house > #sc-sheet[data-sc-house][data-the-one-home-on] {
    display: grid !important;
    /* her face in her home: the face slot's own size rule (house.css), sized to her stage's row so it never covers her words */
    --ns-one-face: max(120px, min(calc(100vw - 48px), 26vh));
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto calc(var(--ns-one-face) + 12px) auto minmax(0, 1fr) auto;
    grid-template-areas: "ohead" "orail" "ostage" "shead" "sbody" "sfoot";
    width: 100% !important;
    max-width: none !important;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    align-self: stretch !important;
}
#sc-sheet[data-the-one-home-on] > .ns-one-home:not([hidden]) { display: contents; }
#sc-sheet[data-the-one-home-on] > .sc-house-face { display: none !important; }
#sc-sheet[data-the-one-home-on] > .sc-sheet__head { grid-area: shead; }
#sc-sheet[data-the-one-home-on] > .sc-sheet__body { grid-area: sbody; min-height: 0; overflow: auto; }
#sc-sheet[data-the-one-home-on] > .sc-sheet__foot { grid-area: sfoot; }
/* her clear-the-talk question and any other part of her container keep to her words' column */
#sc-sheet[data-the-one-home-on] > :not(.ns-one-home):not(.sc-house-face):not(.sc-sheet__head):not(.sc-sheet__body):not(.sc-sheet__foot) { grid-area: sbody; align-self: start; z-index: 1; }

/* her home's header: her name, the AI tag, her mission (owner) or her AI line (visitor), and her links */
.ns-one-home__head { grid-area: ohead; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 12px 16px; border-bottom: 1px solid var(--sc-hairline, #dadce0); }
.ns-one-home__who { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--sc-ink, #202124); }
.ns-one-home__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ns-one-home__ai { flex: none; padding: 0 6px; border: 1px solid var(--ns-border-strong, #9aa0a6); border-radius: 6px; font-size: 12px; line-height: 20px; font-weight: 600; letter-spacing: .04em; }
.ns-one-home__line { flex: 1 1 100%; order: 3; margin: 0; font-size: 14px; line-height: 20px; color: var(--sc-muted, #5f6368); }
.ns-one-home__links { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-one-home__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--sc-border, #dadce0); border-radius: 999px; color: var(--sc-ink, #202124); font-size: 14px; line-height: 20px; text-decoration: none; background: transparent; }
.ns-one-home__link:hover { background: var(--sc-tile, #f1f3f4); }
.ns-one-home__link:is([data-the-one-home-link="room"], [data-the-one-home-link="home"]) { border-color: transparent; background: var(--sc-olive-btn, #1a73e8); color: #fff; }
.ns-one-home__link:is([data-the-one-home-link="room"], [data-the-one-home-link="home"]):hover { background: color-mix(in srgb, var(--sc-olive-btn, #1a73e8) 88%, #000); }

/* her rail (her owner's room): her rows, each to its own page or to her room where its panel opens */
.ns-one-home__rail { grid-area: orail; display: flex; gap: 8px; min-width: 0; padding: 8px 16px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--sc-hairline, #dadce0); scrollbar-width: none; }
.ns-one-home__group, .ns-one-home__group ul { display: contents; }
.ns-one-home__group h3 { display: none; }
.ns-one-home__group li { flex: none; list-style: none; }
.ns-one-home__row { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--sc-border, #dadce0); border-radius: 999px; color: var(--sc-ink, #202124); font-size: 14px; line-height: 20px; white-space: nowrap; text-decoration: none; }
.ns-one-home__row:hover { background: var(--sc-tile, #f1f3f4); }
:is(.ns-one-home__link, .ns-one-home__row):focus-visible { outline: 2px solid var(--sc-olive, #1a73e8); outline-offset: 2px; }

/* her stage: her one element, moved here, in the face slot's own box (her face's size plus 12 px, centred in its area; the pane's
   own rule fills it with her element and house.css sizes her face from --nsfp-face, here her stage's), so her one hamburger rides
   at her face's corner as it does at home; her words stay in her own column, so the kit's caption rests as it does in her face
   slot. Never clipped: her one menu opens from her face as it does at home. */
.ns-one-home__stage { grid-area: ostage; align-self: center; justify-self: center; position: relative; display: flex; align-items: center; justify-content: center; --nsfp-face: var(--ns-one-face, 220px); width: calc(var(--nsfp-face) + 12px); height: calc(var(--nsfp-face) + 12px); }
.ns-one-home__stage > alive-agent { display: block; flex: none; width: 100%; height: 100%; }
.ns-one-home__stage > alive-agent > :is(.ak-caption, .ak-life-cc, [data-alive-quiet-mic], [data-alive-looks]) { display: none !important; }
.ns-one-home__stage > alive-agent[data-ns-luma-host] > .ak-face::before { width: 100%; }
.ns-one-home__stage > alive-agent > .ns-luma-first img { width: min(100%, var(--nsfp-face)); }

@media (min-width: 900px) {
    html[data-sc-cc-house="terminal"] aside.ns-fp.sc-house > #sc-sheet[data-sc-house][data-the-one-home-on] {
        /* her face: at most 440 px, 56% of the window's height and her stage column's width (the window less her words' column) */
        --ns-one-face: max(160px, min(440px, 56vh, calc(100vw - 420px - 64px)));
        grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        grid-template-areas: "ohead ohead" "ostage shead" "ostage sbody" "ostage sfoot";
        column-gap: 16px;
    }
    html[data-sc-cc-house="terminal"] aside.ns-fp.sc-house > #sc-sheet[data-sc-house][data-the-one-home-on]:has([data-the-one-home-rail]) {
        --ns-one-face: max(160px, min(440px, 56vh, calc(100vw - 212px - 420px - 80px)));
        grid-template-columns: 212px minmax(0, 1fr) minmax(340px, 420px);
        grid-template-areas: "ohead ohead ohead" "orail ostage shead" "orail ostage sbody" "orail ostage sfoot";
    }
    #sc-sheet[data-the-one-home-on] > .sc-sheet__foot { padding-bottom: 16px; }
    .ns-one-home__head { padding: 16px 24px; }
    .ns-one-home__rail { display: block; padding: 8px 8px 16px 16px; overflow-x: hidden; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--sc-hairline, #dadce0); }
    .ns-one-home__group { display: block; margin: 0 0 12px; }
    .ns-one-home__group ul { display: block; margin: 0; padding: 0; }
    .ns-one-home__group h3 { display: block; margin: 8px 8px 4px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--sc-muted, #5f6368); }
    .ns-one-home__row { display: flex; min-height: 40px; padding: 0 8px; border: 0; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) { .ns-one-home * { transition: none !important; } }
@media print { .ns-one-home { display: none !important; } }
