.portal-home-entry .portal-story { min-height: 0; }
.portal-home-entry .portal-access { justify-content: flex-start; }
.portal-home-entry .portal-story-message { margin-top: clamp(30px, 5vh, 64px); }
.portal-home-entry .portal-story-message h1 { font-size: clamp(36px, 4.2vw, 66px); margin-bottom: 12px; }
.portal-home-entry .portal-description { font-size: clamp(14px, 1.3vw, 19px); }
.portal-home-entry .portal-benefits { padding-top: 20px; }
.portal-home-entry .portal-signature { margin-top: 24px; }
.portal-bruno-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 12px;
}
.portal-bruno-layout .portal-story-message { grid-column: 1 / -1; }
.portal-bruno-copy {
    justify-self: start;
    padding: 8px 9px;
    border: 1px solid rgb(182 220 255 / 30%);
    border-radius: 10px;
    background: rgb(49 91 128 / 38%);
    backdrop-filter: blur(2px);
    box-shadow: inset 0 1px rgb(227 245 255 / 8%);
    color: #f3f8ff;
    font-size: 14px;
}
.portal-bruno-copy > strong { display: block; margin-bottom: 5px; font-size: clamp(14px, 1.15vw, 16px); line-height: 1.25; }
.portal-bruno-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.portal-bruno-copy button {
    min-height: 34px;
    padding: 5px 8px;
    border: 0;
    border-radius: 8px;
    background: #0b55a3;
    color: #fff;
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    cursor: pointer;
}
.portal-bruno-actions button:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.portal-bruno-actions svg { width: 14px; height: 14px; flex: none; }
.portal-bruno-label-short { display: none; }
.portal-bruno-copy .portal-bruno-listen { background: rgb(187 218 255 / 18%); color: #f3f8ff; }
.portal-bruno-copy .portal-bruno-dance { grid-column: 1 / -1; background: rgb(192 162 255 / 23%); color: #fcf6ff; }
.portal-bruno-audio-status { margin: 6px 0 0; font-size: 12px; }
.portal-bruno-audio-status:empty { display: none; }
.portal-bruno-character {
    position: relative;
    justify-self: center;
    width: min(100%, 260px, 31vh);
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #eaf5ff;
}

.portal-bruno-character:enabled { cursor: pointer; }
.portal-bruno-character:focus-visible { outline: 2px solid #a8dcff; outline-offset: 3px; }
.portal-bruno-turn-frames, .portal-bruno-jump-pose { position: absolute; inset: 0; visibility: hidden; }
.portal-bruno-turn-frames { background-size: 700% 100%; }
.portal-bruno-jump-pose { background: center bottom / contain no-repeat; transform-origin: center bottom; }
.portal-bruno-turn-icon {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    box-sizing: border-box;
    width: 26px;
    height: 26px;
    padding: 5px;
    border: 1px solid #ffffff55;
    border-radius: 50%;
    background: #0b325b;
}
.portal-bruno-character:enabled .portal-bruno-turn-icon { display: block; }
.portal-bruno-character::before {
    content: "";
    position: absolute;
    inset: auto 0 -4px;
    height: 10%;
    border-radius: 50%;
    background: radial-gradient(ellipse, #42bfff63, transparent 70%);
    z-index: -1;
}
.portal-bruno { width: 100%; height: auto; display: block; overflow: visible; stroke: none !important; }
.portal-bruno-wave { transform-origin: 858px 620px; }
.portal-bruno-blink { opacity: 0; }
.portal-bruno-welcome { transform-origin: center bottom; }
.portal-bruno-step-left { transform-origin: 359px 1058px; }
.portal-bruno-step-right { transform-origin: 615px 1055px; }
.portal-bruno-head { transform-origin: 487px 539px; }
.portal-bruno-heartbeat { transform-origin: 583px 733px; }
.portal-bruno-chest-globe { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
    .bruno-turning .portal-bruno-turn-frames { visibility: visible; }
    .bruno-jumping .portal-bruno-jump-pose { visibility: visible; }
    .bruno-turning .portal-bruno-welcome, .bruno-jumping .portal-bruno-welcome { visibility: hidden; }
    .portal-bruno-welcome { animation: portal-bruno-arrive 1s ease-out .18s both; }
    .portal-bruno-step-left { animation: portal-bruno-step .48s ease-in-out .22s; }
    .portal-bruno-step-right { animation: portal-bruno-step .48s ease-in-out .61s; }
    .portal-bruno-character {
        --bruno-farewell-delay: calc(var(--bruno-greeting-delay, 1.12s) + .90s);
        --bruno-chest-delay: calc(var(--bruno-farewell-delay) + .94s);
    }
    .portal-bruno-character:not(.bruno-turn-pending, .bruno-turning, .bruno-jumping) .portal-bruno-wave {
        animation: portal-bruno-wave .9s ease-in-out var(--bruno-farewell-delay);
    }
    .portal-bruno-character:not(.bruno-turn-pending, .bruno-turning, .bruno-jumping) .portal-bruno-blink {
        animation: portal-bruno-blink .17s ease-in-out calc(var(--bruno-farewell-delay) + .34s);
    }
    .portal-bruno-character:not(.bruno-turn-pending, .bruno-turning, .bruno-jumping) .portal-bruno-heartbeat {
        animation: portal-bruno-heartbeat .86s ease-in-out var(--bruno-greeting-delay, 1.12s);
    }
    .portal-bruno-character:not(.bruno-turn-pending, .bruno-turning, .bruno-jumping) .portal-bruno-chest-globe {
        animation: portal-bruno-chest-reveal .35s ease-in var(--bruno-chest-delay) forwards;
    }
    .portal-bruno-character:not(.bruno-turn-pending, .bruno-turning, .bruno-jumping) .portal-bruno-chest-map {
        animation: portal-bruno-chest-spin 9s linear var(--bruno-chest-delay) infinite both;
    }
    .bruno-turn-ready { --bruno-greeting-delay: .06s; }
    #portal-help[open] .portal-bruno-head { animation: portal-bruno-tilt .45s ease-in-out; }
    #portal-help[open] .portal-bruno-in-help { animation: portal-bruno-change-pose .32s ease-in .38s both; }
    #portal-help[open] .portal-bruno-point { animation: portal-bruno-point .32s ease-out .38s both; }
}
@keyframes portal-bruno-chest-reveal { to { opacity: 1; } }
@keyframes portal-bruno-chest-spin {
    from { transform: translateX(34px); }
    to { transform: translateX(-326px); }
}
@keyframes portal-bruno-heartbeat {
    0%, 28%, 60%, 100% { transform: none; }
    14% { transform: scale(1.075); }
    43% { transform: scale(1.055); }
}
@keyframes portal-bruno-arrive {
    0% { transform: translateX(-12%); }
    27% { transform: translate(-8%, -2%); }
    54% { transform: translateX(-5%); }
    76% { transform: translate(-2%, -1%); }
    100% { transform: none; }
}
@keyframes portal-bruno-step {
    0%, 100% { transform: none; }
    45% { transform: translate(15px, -27px) rotate(-5deg); }
    75% { transform: translate(9px, -4px) rotate(1deg); }
}
@keyframes portal-bruno-tilt {
    0%, 100% { transform: none; }
    55% { transform: rotate(7deg); }
}
@keyframes portal-bruno-change-pose { from { opacity: 1; } to { opacity: 0; } }
@keyframes portal-bruno-point {
    from { opacity: 0; transform: scaleX(.96) rotate(-3deg); }
    to { opacity: 1; transform: none; }
}
@keyframes portal-bruno-wave {
    0%, 100% { transform: rotate(0deg); }
    24%, 68% { transform: rotate(-8deg); }
    46%, 84% { transform: rotate(5deg); }
}
@keyframes portal-bruno-blink {
    0%, 100% { opacity: 0; }
    34%, 66% { opacity: 1; }
}
.portal-help-dialog .portal-help-actions { margin-top: 14px; }
.portal-help-actions a, .portal-help-actions button {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid #d6e7f8;
    border-radius: 10px;
    padding: 8px 12px;
    background: #eff7ff;
    color: #145196;
    text-decoration: none;
    font: inherit;
    font-weight: 650;
}
.portal-help-actions button { width: 100%; cursor: pointer; }
.portal-bruno-help-layout {
    display: grid;
    grid-template-columns: clamp(65px, 22vw, 132px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 3vw, 20px);
}
.portal-bruno-help-character {
    display: grid;
    position: relative;
    align-items: end;
    aspect-ratio: 1059 / 1485;
}
.portal-bruno-help-character > * { grid-area: 1 / 1; }
.portal-bruno-in-help { opacity: 0; }
.portal-bruno-point { display: block; width: 100%; height: auto; transform-origin: center bottom; }
.portal-bruno-point-arm { transform-origin: 161px 149px; }
.portal-bruno-help-layout[data-bruno-pointing] .portal-bruno-point { animation: none !important; }
.portal-bruno-help-layout[data-bruno-pointing] .portal-bruno-in-help { animation: none !important; }
.portal-help-actions .bruno-target {
    background: #dcecff;
    border-color: #84afd9;
}
@media (prefers-reduced-motion: no-preference) {
    .portal-bruno-point-arm {
        transform: rotate(var(--bruno-point-angle, 0deg));
        transition: transform 200ms ease-out;
    }
}
.portal-help-with-bruno {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
}
.portal-help-avatar {
    display: block;
    flex: none;
    width: 26px;
    height: 26px;
    object-fit: contain;
}
@media (max-width: 900px) {
    .portal-home-entry .portal-home-layout { display: block; }
    .portal-home-entry .portal-story { padding: 16px 16px 13px; border-radius: 0 0 24px 24px; }
    .portal-home-entry .portal-brand-icon { width: 42px; height: 42px; }
    .portal-home-entry .portal-brand { gap: 8px; padding-right: 42px; }
    .portal-home-entry .portal-brand strong { font-size: clamp(16px, 5vw, 23px); }
    .portal-home-entry .portal-brand small { letter-spacing: 1px; }
    .portal-bruno-layout { grid-template-columns: minmax(0, 1fr) clamp(88px, 27vw, 112px); gap: 6px 10px; margin-top: 8px; }
    .portal-bruno-layout .portal-story-message { grid-area: 1 / 1; margin-top: 0; }
    .portal-home-entry .portal-story-message h1 { font-size: clamp(21px, 6vw, 35px); line-height: 1.1; margin: 0; }
    .portal-home-entry .portal-story-message .portal-eyebrow,
    .portal-home-entry .portal-story-message .portal-description,
    .portal-home-entry .portal-benefits, .portal-home-entry .portal-signature { display: none; }
    .portal-bruno-copy { grid-area: 2 / 1 / 3 / -1; justify-self: stretch; padding: 6px; }
    .portal-bruno-copy > strong { margin: 0 0 5px 2px; font-size: 13px; }
    .portal-bruno-actions { display: flex; flex-wrap: wrap; }
    .portal-bruno-actions button:not([hidden]) {
        flex: 1 1 0;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        min-height: 44px;
        padding-inline: 4px;
        line-height: 1.15;
        text-align: center;
    }
    .portal-bruno-actions button[data-bruno-help] { flex-direction: column-reverse; }
    .portal-bruno-character { grid-area: 1 / 2; width: 100%; }
    .portal-home-entry .portal-globe { inset: -35px -45px -40px 26%; }
    .portal-home-entry .school-location-trigger {
        position: absolute; inset: 12px 12px auto auto !important;
        margin: 0; width: 44px; height: 44px;
    }
    .portal-home-entry .school-location-trigger span { font-size: 0; padding: 5px 9px; }
    .portal-home-entry .school-location-trigger span::before { font-size: 20px; }
    .portal-home-entry .portal-access { padding: 18px 14px 24px; }
    .portal-home-entry .portal-entry-heading { margin: 0 88px 12px 0; }
    .portal-home-entry .portal-entry-heading h2 { font-size: clamp(21px, 6vw, 29px); }
    .portal-home-entry .portal-help-button { top: 17px; right: 12px; }
    .portal-home-entry .portal-profiles { gap: 8px; }
    .portal-home-entry .portal-profile { padding: 9px 10px; }
    .portal-home-entry .portal-profile-icon { width: 43px; height: 46px; }
    .portal-home-entry .portal-profile-icon svg { width: 28px; height: 28px; }
    .portal-home-entry .portal-profile-copy strong { font-size: clamp(15px, 4.3vw, 19px); }
    .portal-home-entry .portal-profile-copy small { display: none; }
}

@media (max-width: 600px) {
    .portal-bruno-copy { padding: 7px; }
    .portal-bruno-actions { gap: 5px; }
    .portal-bruno-actions button:not([hidden]) { flex-direction: row; gap: 4px; }
    .portal-bruno-actions .portal-bruno-label-full { display: none; }
    .portal-bruno-actions .portal-bruno-label-short { display: inline; }
}
