/*
 * Pinkfong Fan Page — production stylesheet
 * -----------------------------------------
 * Layout contract:
 *   1. Landscape            = desktop-style horizontal composition.
 *   2. Portrait < 700px     = phone stacked composition.
 *   3. Portrait 700–1100px  = tablet/iPad stacked composition.
 *   4. Portrait > 1100px    = wide desktop-style composition.
 *
 * Keep new responsive changes inside the matching section below. Avoid adding
 * one-off device/model breakpoints unless there is a reproducible layout issue.
 */

:root {
    --ink: #49266c;
    --ink-strong: #562b7a;
    --card: rgba(255, 255, 255, 0.62);
    --card-border: rgba(255, 255, 255, 0.7);
    --page-left: #b38af3;
    --page-mid: #e5a8e8;
    --page-blue: #958bff;
    --page-pink: #ffc6ec;
    --ease-out: cubic-bezier(.22, .72, .2, 1);
}

/* -------------------------------------------------------------------------- */
/* Base                                                                       */
/* -------------------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    color: var(--ink);
    background: transparent;
    font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

button,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 3px solid #663792;
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------------------------------------------------- */
/* Canvas / background                                                        */
/* -------------------------------------------------------------------------- */

.world {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 76% 17%, var(--page-pink) 0, transparent 51%),
        radial-gradient(ellipse at 15% 93%, var(--page-blue) 0, transparent 60%),
        linear-gradient(120deg, var(--page-left), var(--page-mid));
}

.sky {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.sky::before,
.sky::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(32px);
    opacity: .34;
    mix-blend-mode: soft-light;
    animation: aurora-drift 14s ease-in-out infinite alternate;
}

.sky::before {
    left: 31%;
    top: 12%;
    width: min(34vw, 520px);
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 255, 255, .58), rgba(255, 160, 222, .18) 46%, transparent 72%);
}

.sky::after {
    right: 5%;
    bottom: 5%;
    width: min(30vw, 460px);
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(212, 198, 255, .55), rgba(158, 124, 255, .14) 48%, transparent 72%);
    animation-delay: -7s;
}

@keyframes aurora-drift {
    from {
        transform: translate3d(-1.5%, 1%, 0) scale(.96);
    }
    to {
        transform: translate3d(2%, -1.5%, 0) scale(1.05);
    }
}

.orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(66vw, 870px);
    height: 58%;
    border: 1px solid rgba(255, 255, 255, .27);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-17deg);
    animation: orbit-drift-one 34s ease-in-out infinite alternate;
}

.orbit.two {
    width: min(55vw, 690px);
    height: 75%;
    border-style: dashed;
    opacity: .6;
    transform: translate(-50%, -50%) rotate(28deg);
    animation: orbit-drift-two 42s ease-in-out infinite alternate;
}

@keyframes orbit-drift-one {
    from {
        transform: translate(-50%, -50%) rotate(-17deg) scale(1);
    }
    to {
        transform: translate(-50%, -50%) rotate(-12deg) scale(1.025);
    }
}

@keyframes orbit-drift-two {
    from {
        transform: translate(-50%, -50%) rotate(28deg) scale(1);
    }
    to {
        transform: translate(-50%, -50%) rotate(22deg) scale(.98);
    }
}

.twinkle {
    position: absolute;
    color: rgba(255, 255, 255, .6);
    animation: twinkle 4s ease-in-out infinite;
}

.twinkle.is-accent {
    color: rgba(255, 247, 184, .92);
    text-shadow:
        0 0 8px rgba(255, 239, 151, .75),
        0 0 18px rgba(255, 221, 93, .42);
    animation-duration: 3.2s;
}

@keyframes twinkle {
    50% {
        opacity: .25;
        transform: scale(.7);
    }
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

header {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    padding: 24px 4.5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

header > * {
    pointer-events: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    line-height: 1;
}

.brand-image {
    display: block;
    width: auto;
    height: 28px;
    max-width: none;
    object-fit: contain;
}

.brand-theme-sync {
    transition: opacity .12s ease;
}

.language {
    max-width: 180px;
    padding: 6px 0;
    border: 0;
    outline: 0;
    background: transparent;
    appearance: none;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* Shared content                                                             */
/* -------------------------------------------------------------------------- */

.main {
    position: absolute;
    inset: 90px 4.5% 72px;
}

.intro {
    z-index: 2;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    flex: none;
    background: currentColor;
}

#headline {
    margin: 16px 0 14px;
    color: #fff;
    font-size: clamp(38px, 5vw, 72px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -2.6px;
    text-shadow: 0 4px 0 rgba(140, 90, 196, .11);
}

#headline .headline-line {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

#headline .headline-lead {
    font-size: .92em;
    color: #fff;
}

#headline .headline-emphasis {
    gap: .16em;
}

#headline .headline-emphasis em {
    color: var(--ink-strong);
    font-style: normal;
}

#headline .headline-secondary {
    color: #fff;
    font-size: .72em;
    font-weight: 900;
    letter-spacing: -.035em;
}

:lang(ko) #headline,
:lang(ja) #headline,
:lang(zh) #headline {
    font-size: clamp(36px, 4.65vw, 67px);
    letter-spacing: -1.5px;
}

.intro p {
    max-width: 270px;
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}

/* -------------------------------------------------------------------------- */
/* Character                                                                  */
/* -------------------------------------------------------------------------- */

.character {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.halo {
    position: absolute;
    width: 94%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 237, 255, .55), transparent 68%);
    filter: blur(5px);
    pointer-events: none;
}

.fox {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    filter: drop-shadow(0 25px 17px rgba(118, 62, 154, .15));
    animation: float 5s ease-in-out infinite;
    touch-action: pan-y;
}

@keyframes float {
    50% {
        transform: translateY(-16px) rotate(-2deg);
    }
}

.pose-frame {
    --pose-slide-distance: clamp(48px, 6vw, 88px);
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity .22s ease, transform .28s var(--ease-out);
    will-change: opacity, transform;
}

.pose-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    pointer-events: none;
    user-select: none;
}

.pose-frame.pose-no-transition {
    transition: none;
}
.pose-frame.pose-exit-next {
    opacity: 0;
    transform: translate3d(calc(var(--pose-slide-distance) * -1), 0, 0) scale(.985);
}
.pose-frame.pose-enter-next {
    opacity: 0;
    transform: translate3d(var(--pose-slide-distance), 0, 0) scale(.985);
}
.pose-frame.pose-exit-prev {
    opacity: 0;
    transform: translate3d(var(--pose-slide-distance), 0, 0) scale(.985);
}
.pose-frame.pose-enter-prev {
    opacity: 0;
    transform: translate3d(calc(var(--pose-slide-distance) * -1), 0, 0) scale(.985);
}

/* -------------------------------------------------------------------------- */
/* Speech popup                                                               */
/* -------------------------------------------------------------------------- */

.hello {
    position: absolute;
    z-index: 8;
    top: 10%;
    right: -2%;
    max-width: 180px;
    padding: 10px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .62);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform-origin: 12% 100%;
    will-change: transform, opacity;
}

.hello::after {
    content: "";
    position: absolute;
    left: 12px;
    bottom: -6px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 2px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, .6);
    transform: rotate(10deg);
    transform-origin: top left;
}

.hello.is-visible {
    visibility: visible;
    animation: speech-pop-in .36s cubic-bezier(.2, 1.35, .45, 1) both;
}

.hello.is-hiding {
    visibility: visible;
    animation: speech-pop-out .22s cubic-bezier(.55, .05, .7, .35) both;
}

.hello[data-story="1"],
.hello[data-story="2"] {
    left: -5%;
    right: auto;
    transform-origin: 88% 100%;
}

.hello[data-story="1"] {
    top: 9%;
}
.hello[data-story="2"] {
    top: 12%;
}

.hello[data-story="1"]::after,
.hello[data-story="2"]::after {
    left: auto;
    right: 12px;
    border-left: 2px solid transparent;
    border-right: 7px solid transparent;
    transform: rotate(-10deg);
    transform-origin: top right;
}

.hello[data-story="1"].is-visible,
.hello[data-story="2"].is-visible {
    animation-name: speech-pop-in-left;
}

.hello[data-story="1"].is-hiding,
.hello[data-story="2"].is-hiding {
    animation-name: speech-pop-out-left;
}

@keyframes speech-pop-in {
    0% {
        opacity: 0;
        transform: translate(-16px, 13px) rotate(-2deg) scale(.58);
    }
    62% {
        opacity: 1;
        transform: translate(2px, -2px) rotate(8deg) scale(1.06);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(7deg) scale(1);
    }
}

@keyframes speech-pop-out {
    from {
        opacity: 1;
        transform: translate(0, 0) rotate(7deg) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-11px, 9px) rotate(1deg) scale(.72);
    }
}

@keyframes speech-pop-in-left {
    0% {
        opacity: 0;
        transform: translate(16px, 13px) rotate(2deg) scale(.58);
    }
    62% {
        opacity: 1;
        transform: translate(-2px, -2px) rotate(-7deg) scale(1.06);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(-6deg) scale(1);
    }
}

@keyframes speech-pop-out-left {
    from {
        opacity: 1;
        transform: translate(0, 0) rotate(-6deg) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(11px, 9px) rotate(-1deg) scale(.72);
    }
}

/* -------------------------------------------------------------------------- */
/* Story card                                                                 */
/* -------------------------------------------------------------------------- */

.fact {
    position: absolute;
    z-index: 6;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 18px 20px;
    border: 1px solid var(--card-border);
    border-radius: 26px;
    background: var(--card);
    box-shadow: 0 18px 45px rgba(102, 60, 152, .06);
    backdrop-filter: blur(16px);
    transform-origin: center;
}

.fact-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.fact h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.08;
    letter-spacing: -.6px;
}

.fact p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.paging {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(138, 97, 169, .28);
}

.dots i.active {
    width: 19px;
    border-radius: 10px;
    background: #70408c;
}

/* Card navigation is created by JS. */
.story-arrows {
    position: absolute;
    z-index: 8;
    inset: 0;
    pointer-events: none;
}

.story-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: #fffdf0;
    color: #603780;
    box-shadow: 0 10px 26px rgba(102, 60, 152, .16);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .22s var(--ease-out), background-color .18s ease;
}

.story-arrow-prev {
    left: -19px;
    transform: translate(-7px, -50%) scale(.92);
}
.story-arrow-next {
    right: -19px;
    transform: translate(7px, -50%) scale(.92);
}

.story-chevron {
    display: block;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.story-arrow-prev .story-chevron {
    transform: translateX(2px) rotate(135deg);
}
.story-arrow-next .story-chevron {
    transform: translateX(-2px) rotate(-45deg);
}

@media (hover: hover) and (pointer: fine) {
    .fact:hover .story-arrow,
    .fact:focus-within .story-arrow {
        opacity: 1;
        pointer-events: auto;
    }

    .fact:hover .story-arrow-prev,
    .fact:focus-within .story-arrow-prev,
    .fact:hover .story-arrow-next,
    .fact:focus-within .story-arrow-next {
        transform: translate(0, -50%) scale(1);
    }

    .story-arrow:hover {
        background: #fff;
    }
}

.story-arrow:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

/* -------------------------------------------------------------------------- */
/* Character switcher                                                         */
/* -------------------------------------------------------------------------- */

.character-switcher {
    position: absolute;
    z-index: 7;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transform: translateX(-50%);
}

.character-switcher-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(73, 38, 108, .68);
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.character-switcher-label::before,
.character-switcher-label::after {
    content: "";
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, .6);
}

.character-options {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}

.character-option {
    position: relative;
    width: 54px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.character-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .54);
    border-radius: 15px;
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 8px 20px rgba(91, 54, 137, .08);
    backdrop-filter: blur(10px);
    transition:
        transform .22s var(--ease-out),
        box-shadow .22s ease,
        border-color .22s ease,
        opacity .22s ease;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transform: scale(1.04);
}

.character-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .72), transparent 30%),
        linear-gradient(145deg, rgba(255, 203, 233, .7), rgba(193, 182, 255, .62));
    color: rgba(73, 38, 108, .62);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: -.3px;
}

.character-name {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    font-size: 7.5px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    text-align: center;
    text-overflow: ellipsis;
}

.character-option.is-active .character-avatar {
    border: 2px solid rgba(255, 255, 255, .95);
    box-shadow:
        0 0 0 2px rgba(196, 112, 236, .22),
        0 10px 24px rgba(112, 64, 140, .15);
    transform: translateY(-2px) scale(1.04);
}

.character-option.is-active .character-name {
    color: #5a2f7b;
    font-weight: 900;
}

.character-option.is-upcoming {
    cursor: default;
    opacity: .58;
}

.character-option.is-upcoming .character-avatar::after {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    background: rgba(101, 65, 136, .58);
}

@media (hover: hover) and (pointer: fine) {
    .character-option:not(:disabled):hover .character-avatar {
        transform: translateY(-3px) scale(1.04);
        box-shadow: 0 12px 26px rgba(91, 54, 137, .15);
    }
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.bottom {
    position: absolute;
    z-index: 20;
    left: 4.5%;
    right: 4.5%;
    bottom: 12px;
    display: flex;
    justify-content: center;
}

.source {
    color: rgba(89, 58, 116, .58);
    font-size: 9px;
    line-height: 1.4;
    text-decoration: none;
}

.source:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Landscape — desktop-style layout                                           */
/* -------------------------------------------------------------------------- */

@media (orientation: landscape) {
    header {
        height: clamp(44px, 9.5vh, 78px);
        padding: clamp(10px, 2.2vh, 20px) 4.5% 4px;
    }

    .brand-image {
        height: clamp(20px, 2.5vh, 28px);
    }
    .language {
        font-size: clamp(9px, 1vw, 12px);
    }

    .main {
        inset: clamp(48px, 9.5vh, 82px) 4.5% clamp(28px, 7vh, 60px);
    }

    .intro {
        position: absolute;
        left: 12%;
        top: 41.5%;
        width: 34%;
        transform: translateY(-50%);
        text-align: left;
        z-index: 2;
    }

    .eyebrow {
        justify-content: flex-start;
        font-size: clamp(7px, .78vw, 12px);
        letter-spacing: clamp(1.2px, .18vw, 3px);
    }

    .eyebrow::before {
        width: clamp(13px, 1.8vw, 24px);
    }

    #headline {
        margin: clamp(7px, 1.5vh, 15px) 0;
        font-size: clamp(28px, 4.25vw, 66px);
        line-height: .96;
        letter-spacing: clamp(-2.6px, -.15vw, -1px);
    }

    :lang(ko) #headline,
    :lang(ja) #headline,
    :lang(zh) #headline {
        font-size: clamp(27px, 3.95vw, 61px);
    }

    .intro p {
        max-width: min(240px, 90%);
        font-size: clamp(8px, 1.05vw, 15px);
        line-height: 1.48;
    }

    .character {
        left: 50%;
        top: 45.5%;
        width: min(43vw, 76vh);
        height: 104%;
        transform: translate(-50%, -50%);
    }

    .fox {
        width: 108%;
        height: 108%;
    }

    .fact {
        right: 9%;
        top: 60.5%;
        width: clamp(150px, 22vw, 260px);
        max-width: 260px;
        padding: clamp(10px, 1.45vw, 18px);
        border-radius: clamp(18px, 2vw, 26px);
        transform: translateY(-50%) rotate(1.8deg);
    }

    .fact-top {
        margin-bottom: clamp(5px, 1vh, 9px);
        font-size: clamp(7px, .78vw, 10px);
        letter-spacing: clamp(.8px, .1vw, 1.35px);
    }

    .fact h2 {
        margin-bottom: clamp(5px, 1vh, 9px);
        font-size: clamp(14px, 1.55vw, 21px);
    }

    .fact p {
        font-size: clamp(8px, .98vw, 13px);
        line-height: 1.42;
    }

    .paging {
        margin-top: clamp(7px, 1.2vh, 12px);
    }

    .character-switcher {
        bottom: clamp(-14px, -1vh, -4px);
    }

    .source {
        font-size: clamp(6px, .65vw, 9px);
    }
}

/* Desktop / large landscape: preserve the intentional overlap composition. */
@media (orientation: landscape) and (min-width: 1101px) {
    .intro {
        left: 13%;
        top: 39.5%;
        width: 35%;
    }
    .character {
        width: min(40vw, 70vh);
        height: 100%;
    }
    .fox {
        width: 104%;
        height: 104%;
    }
    .fact {
        right: 15.5%;
        top: 60.8%;
        width: clamp(230px, 22vw, 315px);
        max-width: 315px;
    }

    .character-switcher {
        bottom: -16px;
    }

    .character-option {
        width: 56px;
    }

    .character-avatar {
        width: 50px;
        height: 50px;
    }
}

/* Tablet landscape. */
@media (orientation: landscape) and (min-width: 701px) and (max-width: 1100px) {
    .intro {
        left: 8%;
        top: 45%;
        width: 34%;
    }
    .fact {
        right: 8%;
        top: 66%;
    }
}

/* Phone landscape / very short windows: same desktop idea, compact scale. */
@media (orientation: landscape) and (max-width: 700px),
              (orientation: landscape) and (max-height: 520px) {
    header {
        height: 42px;
        padding: 9px 4.5% 3px;
    }
    .brand-image {
        height: 20px;
    }
    .main {
        inset: 44px 4.5% 24px;
    }
    .intro {
        left: 6%;
        top: 40.5%;
        width: 34%;
    }
    #headline {
        font-size: clamp(23px, 4.5vw, 42px);
    }
    :lang(ko) #headline,
    :lang(ja) #headline,
    :lang(zh) #headline {
        font-size: clamp(22px, 4.2vw, 39px);
    }
    .intro p {
        font-size: clamp(7px, 1vw, 10px);
    }
    .character {
        top: 41.5%;
        width: min(40vw, 74vh);
        height: 100%;
    }
    .fox {
        width: 92%;
        height: 98%;
    }
    .fact {
        right: 4%;
        top: 48.5%;
        width: clamp(135px, 22vw, 185px);
        padding: 8px 10px;
    }
    .fact-top {
        font-size: 6.5px;
    }
    .fact h2 {
        font-size: 12px;
    }
    .fact p {
        font-size: 7.5px;
        line-height: 1.32;
    }

    .character-switcher {
        bottom: 2px;
        gap: 2px;
    }

    .character-switcher-label {
        display: none;
    }

    .character-options {
        gap: 5px;
    }

    .character-option {
        width: 34px;
    }

    .character-avatar {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .character-name {
        display: none;
    }
}

/* -------------------------------------------------------------------------- */
/* Portrait phones / narrow portrait devices                                  */
/* -------------------------------------------------------------------------- */

@media (orientation: portrait) and (max-width: 699px) {
    header {
        height: 64px;
        padding: 14px 20px;
    }
    .brand-image {
        height: 22px;
    }
    .language {
        font-size: 10px;
    }

    .main {
        inset: 0;
        --phone-anchor-y: 53dvh;
        --phone-copy-gap: clamp(240px, min(80vw, 43dvh), 320px);
        --phone-card-gap: clamp(158px, 42vw, 178px);
        --phone-switcher-gap: clamp(266px, 71vw, 298px);
    }

    .intro {
        position: absolute;
        left: 50%;
        top: calc(var(--phone-anchor-y) - var(--phone-copy-gap));
        width: min(88vw, 340px);
        transform: translateX(-50%);
        text-align: center;
    }

    .eyebrow {
        justify-content: center;
        margin-bottom: 4px;
        font-size: 9px;
        letter-spacing: 1.7px;
    }

    .eyebrow::before {
        width: 16px;
    }

    #headline {
        margin: 10px 0 6px;
        font-size: clamp(28px, 9.8vw, 44px);
        line-height: .96;
        letter-spacing: -1.8px;
    }

    :lang(ko) #headline,
    :lang(ja) #headline,
    :lang(zh) #headline {
        font-size: clamp(27px, 9.1vw, 41px);
    }

    .intro p {
        max-width: 245px;
        margin: 8px auto 0;
        font-size: 10px;
        line-height: 1.42;
    }

    .character {
        left: 50%;
        top: var(--phone-anchor-y);
        width: 100vw;
        height: clamp(330px, 102vw, 400px);
        transform: translate(-50%, -50%);
    }

    .fox {
        width: 96%;
        height: 102%;
    }
    .pose-frame {
        --pose-slide-distance: clamp(34px, 12vw, 54px);
    }

    .character-switcher {
        left: 50%;
        top: calc(var(--phone-anchor-y) + var(--phone-switcher-gap));
        bottom: auto;
        width: min(76vw, 280px);
        gap: 2px;
    }

    .character-switcher-label {
        font-size: 6.5px;
        letter-spacing: 1px;
    }

    .character-switcher-label::before,
    .character-switcher-label::after {
        width: 14px;
    }

    .character-options {
        gap: 6px;
    }

    .character-option {
        width: 42px;
    }

    .character-avatar {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .character-name {
        margin-top: 3px;
        font-size: 6px;
    }

    .fact {
        left: 50%;
        top: calc(var(--phone-anchor-y) + var(--phone-card-gap));
        width: min(72vw, 275px);
        padding: 13px 15px;
        border-radius: 22px;
        transform: translateX(-50%) rotate(1.3deg);
    }

    .fact-top {
        margin-bottom: 6px;
        font-size: 8px;
        letter-spacing: 1.1px;
    }
    .fact h2 {
        margin-bottom: 6px;
        font-size: 17px;
    }
    .fact p {
        font-size: 10px;
        line-height: 1.4;
    }

    .paging {
        margin-top: 8px;
    }

    .story-arrows {
        display: none;
    }

    .hello {
        top: 10%;
        right: 8px;
        max-width: min(150px, calc(100vw - 40px));
        padding: 8px 10px;
        border-radius: 16px;
        font-size: 10px;
    }

    .hello[data-story="1"],
    .hello[data-story="2"] {
        left: 8px;
        right: auto;
        top: 10%;
    }

    .bottom {
        bottom: 8px;
    }
    .source {
        font-size: 7px;
    }
}

/* Extra-small / short phones. */
@media (orientation: portrait) and (max-width: 360px) {
    .main {
        --phone-anchor-y: 55dvh;
        --phone-copy-gap: clamp(232px, 70vw, 270px);
        --phone-card-gap: clamp(136px, 43vw, 148px);
        --phone-switcher-gap: clamp(230px, 72vw, 250px);
    }
    .character {
        height: clamp(300px, 98vw, 360px);
    }
    .fox {
        width: 94%;
        height: 100%;
    }
    .fact {
        width: min(74vw, 238px);
        padding: 11px 12px;
    }

    .character-option {
        width: 36px;
    }

    .character-avatar {
        width: 33px;
        height: 33px;
        border-radius: 10px;
    }

    .character-name {
        display: none;
    }
}

@media (orientation: portrait) and (max-width: 340px) and (max-height: 650px) {
    .main {
        --phone-anchor-y: 56dvh;
        --phone-copy-gap: clamp(255px, 82vw, 275px);
        --phone-card-gap: 128px;
        --phone-switcher-gap: 216px;
    }
    .character {
        height: clamp(280px, 90vw, 310px);
    }
    .fox {
        width: 92%;
        height: 98%;
    }
}

/* -------------------------------------------------------------------------- */
/* Portrait tablets / iPads                                                   */
/* -------------------------------------------------------------------------- */

@media (orientation: portrait) and (min-width: 700px) and (max-width: 1100px) {
    header {
        height: 88px;
        padding: 18px 24px;
    }
    .brand-image {
        height: 26px;
    }
    .language {
        font-size: 12px;
    }

    .main {
        inset: 0;
        --tablet-anchor-y: 52dvh;
        --tablet-copy-gap: clamp(380px, 36.5dvh, 505px);
        --tablet-switcher-gap: clamp(162px, 16dvh, 205px);
        --tablet-card-gap: clamp(225px, 21dvh, 280px);
    }

    .intro {
        position: absolute;
        left: 50%;
        top: calc(var(--tablet-anchor-y) - var(--tablet-copy-gap));
        width: min(72vw, 480px);
        transform: translateX(-50%);
        text-align: center;
    }

    .eyebrow {
        justify-content: center;
        margin-bottom: 6px;
        font-size: 11px;
        letter-spacing: 2.2px;
    }

    .eyebrow::before {
        width: 20px;
    }

    #headline {
        margin: 12px 0 8px;
        font-size: clamp(35px, 5vw, 50px);
        line-height: 1.03;
        letter-spacing: -1.8px;
    }

    :lang(ko) #headline,
    :lang(ja) #headline,
    :lang(zh) #headline {
        font-size: clamp(33px, 4.7vw, 47px);
    }

    .intro p {
        max-width: 310px;
        margin: 10px auto 0;
        font-size: 13px;
        line-height: 1.45;
    }

    .character {
        left: 50%;
        top: var(--tablet-anchor-y);
        width: min(82vw, 760px);
        height: clamp(470px, 58vw, 620px);
        transform: translate(-50%, -50%);
    }

    .fox {
        width: 92%;
        height: 104%;
    }

    .character-switcher {
        left: 50%;
        top: calc(var(--tablet-anchor-y) + var(--tablet-switcher-gap));
        bottom: auto;
        gap: 5px;
    }

    .character-option {
        width: 58px;
    }

    .character-avatar {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .character-name {
        font-size: 7.5px;
    }

    .fact {
        left: 50%;
        top: calc(var(--tablet-anchor-y) + var(--tablet-card-gap));
        width: min(54vw, 400px);
        max-width: 400px;
        padding: 17px 19px;
        border-radius: 24px;
        transform: translateX(-50%) rotate(1.2deg);
    }

    .fact-top {
        margin-bottom: 7px;
        font-size: 10px;
        letter-spacing: 1.4px;
    }
    .fact h2 {
        margin-bottom: 7px;
        font-size: 22px;
    }
    .fact p {
        font-size: 14px;
        line-height: 1.45;
    }

    .paging {
        margin-top: 10px;
    }

    .hello {
        top: 13%;
        right: 7%;
        max-width: 170px;
        padding: 9px 12px;
        font-size: 12px;
    }

    .hello[data-story="1"],
    .hello[data-story="2"] {
        left: 7%;
        right: auto;
        top: 13%;
    }
}

@media (orientation: portrait) and (min-width: 900px) and (max-width: 1100px) {
    .main {
        --tablet-anchor-y: 55dvh;
        --tablet-copy-gap: clamp(430px, 36.5dvh, 520px);
        --tablet-switcher-gap: clamp(194px, 16dvh, 228px);
        --tablet-card-gap: clamp(260px, 20dvh, 310px);
    }
    .intro {
        width: min(64vw, 520px);
    }
    .character {
        width: min(76vw, 780px);
        height: clamp(560px, 58vw, 680px);
    }
    .fox {
        width: 90%;
        height: 103%;
    }
    .fact {
        width: min(40vw, 380px);
        max-width: 380px;
    }
}

/* -------------------------------------------------------------------------- */
/* Very wide portrait screens                                                 */
/* -------------------------------------------------------------------------- */

@media (orientation: portrait) and (min-width: 1101px) {
    .main {
        inset: 100px 5% 90px;
        display: grid;
        grid-template-columns: 1fr 1.2fr 1fr;
        align-items: center;
        gap: 18px;
    }

    .intro {
        grid-column: 1;
        align-self: center;
    }
    .character {
        left: 50%;
        top: 50%;
        width: min(44vw, 68vh);
        height: 80%;
        transform: translate(-50%, -50%);
    }
    .fox {
        width: 108%;
        height: 108%;
    }
    .fact {
        right: 2%;
        top: 55%;
        width: min(29vw, 340px);
        transform: translateY(-50%) rotate(1.8deg);
    }

    .character-switcher {
        bottom: 2%;
    }
}

/* -------------------------------------------------------------------------- */
/* Accessibility                                                              */
/* -------------------------------------------------------------------------- */

@media (hover: none) {
    .story-arrows {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Character themes                                                           */
/* -------------------------------------------------------------------------- */

body[data-character="hogi"] {
    --ink: #34516b;
    --ink-strong: #28556f;
    --page-left: #8dd9d0;
    --page-mid: #c7afea;
    --page-blue: #8ccfd7;
    --page-pink: #d4f7ec;
}

body[data-character="hogi"] .halo {
    background: radial-gradient(circle, rgba(222, 255, 247, .68), transparent 68%);
}

body[data-character="hogi"] .fox {
    filter: drop-shadow(0 25px 17px rgba(48, 115, 113, .16));
}

body[data-character="hogi"] .character-option.is-active .character-avatar {
    box-shadow:
        0 0 0 2px rgba(70, 187, 171, .24),
        0 10px 24px rgba(52, 112, 109, .16);
}

body[data-character="hogi"] .character-option.is-active .character-name {
    color: #2c6771;
}

body[data-character="jeni"] {
    --ink: #6d3f55;
    --ink-strong: #8b4f31;
    --page-left: #f8c968;
    --page-mid: #f5a9bd;
    --page-blue: #f6b46c;
    --page-pink: #fff0b8;
}

body[data-character="jeni"] .halo {
    background: radial-gradient(circle, rgba(255, 247, 199, .74), transparent 68%);
}

body[data-character="jeni"] .fox {
    filter: drop-shadow(0 25px 17px rgba(164, 103, 52, .17));
}

body[data-character="jeni"] .character-option.is-active .character-avatar {
    box-shadow:
        0 0 0 2px rgba(255, 184, 72, .28),
        0 10px 24px rgba(143, 88, 48, .16);
}

body[data-character="jeni"] .character-option.is-active .character-name {
    color: #91522f;
}

/* Three active Wonderstar characters: keep the switcher clear and readable. */
@media (orientation: portrait) and (max-width: 699px) {
    .character-options {
        gap: 7px;
    }

    .character-option {
        width: 44px;
    }

    .character-avatar {
        width: 40px;
        height: 40px;
    }
}

/* -------------------------------------------------------------------------- */
/* v94 — three-character visual normalization                                 */
/* -------------------------------------------------------------------------- */

/*
 * Thumbnail files are purpose-built square portraits. Display the whole file
 * instead of cropping it in CSS.
 */
.character-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: 50% 50%;
    transform: none;
}

/*
 * Hogi and Jeni pose files now use the same portrait canvas as Pinkfong.
 * Keep character positioning simple and centered; avoid per-slide nudges.
 */
body[data-character="hogi"] .pose-frame img,
body[data-character="jeni"] .pose-frame img {
    object-position: 50% 50%;
    transform: none;
}

/* Keep the three-character switcher readable but visually compact. */
@media (orientation: landscape) and (min-width: 701px) {
    .character-options {
        gap: 11px;
    }

    .character-option {
        width: 60px;
    }

    .character-avatar {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }
}

@media (orientation: portrait) and (max-width: 699px) {
    .character-options {
        gap: 8px;
    }

    .character-option {
        width: 46px;
    }

    .character-avatar {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }
}


/* -------------------------------------------------------------------------- */
/* v96 composition adjustment                                                 */
/* -------------------------------------------------------------------------- */
/*
 * Main landscape content is intentionally lifted above the character switcher.
 * The switcher remains near the bottom so it does not overlap the hero.
 */

/* -------------------------------------------------------------------------- */
/* v97 — larger hero + pose-aware speech placement                            */
/* -------------------------------------------------------------------------- */

/*
 * Each story owns its speech position so the bubble stays visually attached
 * to the current pose instead of sharing one generic coordinate.
 */
.hello[data-story="1"] {
    left: 10%;
    right: auto;
    top: 10%;
    transform-origin: 88% 100%;
}

.hello[data-story="2"] {
    left: auto;
    right: 13%;
    top: 8%;
    transform-origin: 12% 100%;
}

.hello[data-story="3"] {
    left: auto;
    right: 10%;
    top: 24%;
    transform-origin: 12% 100%;
}

/* Story 1 sits left of the character, therefore its pointer faces right. */
.hello[data-story="1"]::after {
    left: auto;
    right: 12px;
    border-left: 2px solid transparent;
    border-right: 7px solid transparent;
    transform: rotate(-10deg);
    transform-origin: top right;
}

/* Stories 2 and 3 sit on the right, so restore the default left pointer. */
.hello[data-story="2"]::after,
.hello[data-story="3"]::after {
    left: 12px;
    right: auto;
    border-left: 7px solid transparent;
    border-right: 2px solid transparent;
    transform: rotate(10deg);
    transform-origin: top left;
}

.hello[data-story="1"].is-visible {
    animation-name: speech-pop-in-left;
}

.hello[data-story="1"].is-hiding {
    animation-name: speech-pop-out-left;
}

.hello[data-story="2"].is-visible,
.hello[data-story="3"].is-visible {
    animation-name: speech-pop-in;
}

.hello[data-story="2"].is-hiding,
.hello[data-story="3"].is-hiding {
    animation-name: speech-pop-out;
}

/* A slightly fuller hero creates the intended overlap with copy and card. */
@media (orientation: landscape) {
    .character {
        width: min(46vw, 82vh);
        height: 110%;
    }

    .fox {
        width: 112%;
        height: 112%;
    }
}

@media (orientation: landscape) and (min-width: 1101px) {
    .character {
        width: min(42vw, 74vh);
        height: 106%;
    }

    .fox {
        width: 109%;
        height: 109%;
    }
}

/* Character-specific nudges keep the speech bubble close to each silhouette. */
body[data-character="hogi"] .hello[data-story="1"] {
    left: 12%;
    top: 12%;
}

body[data-character="hogi"] .hello[data-story="2"] {
    right: 15%;
    top: 10%;
}

body[data-character="hogi"] .hello[data-story="3"] {
    right: 12%;
    top: 23%;
}

body[data-character="jeni"] .hello[data-story="1"] {
    left: 11%;
    top: 13%;
}

body[data-character="jeni"] .hello[data-story="2"] {
    right: 14%;
    top: 10%;
}

body[data-character="jeni"] .hello[data-story="3"] {
    right: 11%;
    top: 22%;
}

/* Phone portrait: larger hero, with compact pose-specific speech positions. */
@media (orientation: portrait) and (max-width: 699px) {
    .character {
        height: clamp(345px, 106vw, 418px);
    }

    .fox {
        width: 100%;
        height: 106%;
    }

    .hello[data-story="1"] {
        left: 10%;
        right: auto;
        top: 8%;
    }

    .hello[data-story="2"] {
        left: auto;
        right: 10%;
        top: 10%;
    }

    .hello[data-story="3"] {
        left: auto;
        right: 9%;
        top: 22%;
    }

    body[data-character="hogi"] .hello[data-story="1"],
    body[data-character="jeni"] .hello[data-story="1"] {
        left: 10%;
        top: 9%;
    }

    body[data-character="hogi"] .hello[data-story="2"],
    body[data-character="jeni"] .hello[data-story="2"] {
        right: 10%;
        top: 11%;
    }

    body[data-character="hogi"] .hello[data-story="3"],
    body[data-character="jeni"] .hello[data-story="3"] {
        right: 9%;
        top: 22%;
    }
}

/* Portrait tablet/iPad: retain the stacked layout but let the hero breathe. */
@media (orientation: portrait) and (min-width: 700px) and (max-width: 1100px) {
    .character {
        width: min(86vw, 790px);
        height: clamp(495px, 61vw, 650px);
    }

    .fox {
        width: 96%;
        height: 108%;
    }

    .hello[data-story="1"] {
        left: 11%;
        right: auto;
        top: 11%;
    }

    .hello[data-story="2"] {
        left: auto;
        right: 12%;
        top: 10%;
    }

    .hello[data-story="3"] {
        left: auto;
        right: 11%;
        top: 24%;
    }
}

/* -------------------------------------------------------------------------- */
/* v99 — raise the main landscape composition                                 */
/* -------------------------------------------------------------------------- */
/*
 * Move only the three primary hero components upward. The character switcher
 * intentionally stays near the bottom so the hero has more breathing room.
 */
@media (orientation: landscape) {
    .intro {
        top: 36%;
    }

    .character {
        top: 40%;
    }

    .fact {
        top: 55%;
    }
}

@media (orientation: landscape) and (min-width: 1101px) {
    .intro {
        top: 34%;
    }

    .character {
        top: 39.5%;
    }

    .fact {
        top: 55%;
    }
}

/* Short desktop/laptop windows need a little more lift. */
@media (orientation: landscape) and (min-width: 900px) and (max-height: 760px) {
    .intro {
        top: 32.5%;
    }

    .character {
        top: 38%;
    }

    .fact {
        top: 53.5%;
    }
}

/* -------------------------------------------------------------------------- */
/* v100 — larger hero character                                               */
/* -------------------------------------------------------------------------- */
/* Keep the same center point; only increase the visible hero scale. */
@media (orientation: landscape) {
    .character {
        width: min(49vw, 88vh);
        height: 116%;
    }

    .fox {
        width: 116%;
        height: 116%;
    }
}

@media (orientation: landscape) and (min-width: 1101px) {
    .character {
        width: min(45vw, 80vh);
        height: 112%;
    }

    .fox {
        width: 114%;
        height: 114%;
    }
}

/* Short laptop windows benefit from a little extra presence. */
@media (orientation: landscape) and (min-width: 900px) and (max-height: 760px) {
    .character {
        width: min(47vw, 84vh);
        height: 115%;
    }

    .fox {
        width: 116%;
        height: 116%;
    }
}

/* -------------------------------------------------------------------------- */
/* v102 — pose-specific speech placement + white navbar wordmark              */
/* -------------------------------------------------------------------------- */
/*
 * Speech bubbles are tuned per character and per pose. Keep these overrides
 * together so future adjustments stay easy to find and do not affect layout.
 */

.brand-image {
    filter: none;
}

/* Pinkfong */
body[data-character="pinkfong"][data-story="1"] .hello {
    left: 18%;
    right: auto;
    top: 7%;
}

body[data-character="pinkfong"][data-story="2"] .hello {
    left: auto;
    right: 5%;
    top: 5%;
}

body[data-character="pinkfong"][data-story="3"] .hello {
    left: auto;
    right: 4%;
    top: 17%;
}

/* Hogi */
body[data-character="hogi"][data-story="1"] .hello {
    left: 17%;
    right: auto;
    top: 8%;
}

body[data-character="hogi"][data-story="2"] .hello {
    left: auto;
    right: 12%;
    top: 4%;
}

body[data-character="hogi"][data-story="3"] .hello {
    left: auto;
    right: 6%;
    top: 15%;
}

/* Jeni */
body[data-character="jeni"][data-story="1"] .hello {
    left: 18%;
    right: auto;
    top: 6%;
}

body[data-character="jeni"][data-story="2"] .hello {
    left: auto;
    right: 8%;
    top: 3%;
}

body[data-character="jeni"][data-story="3"] .hello {
    left: auto;
    right: 6%;
    top: 15%;
}

/* Phone portrait — keep the same pose logic but pull bubbles inward. */
@media (orientation: portrait) and (max-width: 699px) {
    body[data-character="pinkfong"][data-story="1"] .hello {
        left: 13%;
        top: 8%;
    }

    body[data-character="pinkfong"][data-story="2"] .hello {
        right: 5%;
        top: 8%;
    }

    body[data-character="pinkfong"][data-story="3"] .hello {
        right: 5%;
        top: 18%;
    }

    body[data-character="hogi"][data-story="1"] .hello {
        left: 12%;
        top: 9%;
    }

    body[data-character="hogi"][data-story="2"] .hello {
        right: 7%;
        top: 8%;
    }

    body[data-character="hogi"][data-story="3"] .hello {
        right: 5%;
        top: 18%;
    }

    body[data-character="jeni"][data-story="1"] .hello {
        left: 12%;
        top: 8%;
    }

    body[data-character="jeni"][data-story="2"] .hello {
        right: 7%;
        top: 7%;
    }

    body[data-character="jeni"][data-story="3"] .hello {
        right: 5%;
        top: 17%;
    }
}

/* Portrait tablets / iPads — slightly more breathing room than phones. */
@media (orientation: portrait) and (min-width: 700px) and (max-width: 1100px) {
    body[data-character="pinkfong"][data-story="1"] .hello,
    body[data-character="hogi"][data-story="1"] .hello,
    body[data-character="jeni"][data-story="1"] .hello {
        left: 15%;
        right: auto;
        top: 9%;
    }

    body[data-character="pinkfong"][data-story="2"] .hello,
    body[data-character="hogi"][data-story="2"] .hello,
    body[data-character="jeni"][data-story="2"] .hello {
        left: auto;
        right: 9%;
        top: 7%;
    }

    body[data-character="pinkfong"][data-story="3"] .hello,
    body[data-character="hogi"][data-story="3"] .hello,
    body[data-character="jeni"][data-story="3"] .hello {
        left: auto;
        right: 7%;
        top: 19%;
    }
}


/* -------------------------------------------------------------------------- */
/* v103 — mobile card/switcher spacing + short-screen lock                    */
/* -------------------------------------------------------------------------- */
/*
 * Normal portrait phones keep the switcher a little farther below the card.
 * Short portrait screens use bottom anchors so the card and switcher never
 * drift into the footer or hug the bottom edge as viewport height changes.
 */
@media (orientation: portrait) and (max-width: 699px) and (max-height: 720px) {
    .fact {
        top: auto;
        bottom: clamp(122px, 21dvh, 148px);
    }

    .character-switcher {
        top: auto;
        bottom: clamp(46px, 8dvh, 62px);
    }

    .bottom {
        bottom: 7px;
    }
}

/* Very short phones: keep both controls comfortably above the footer. */
@media (orientation: portrait) and (max-width: 360px) and (max-height: 620px) {
    .fact {
        bottom: 118px;
    }

    .character-switcher {
        bottom: 44px;
    }
}


/* -------------------------------------------------------------------------- */
/* v104 — slightly smaller mobile hero + tighter character overlap            */
/* -------------------------------------------------------------------------- */
/*
 * Pinkfong was touching the top on narrow portrait screens. Reduce only the
 * mobile hero scale, then pull the intro and story card closer to the character
 * so the layered composition still feels intentional.
 */
@media (orientation: portrait) and (max-width: 699px) {
    .main {
        --phone-copy-gap: clamp(218px, min(73vw, 39dvh), 292px);
        --phone-card-gap: clamp(145px, 38vw, 162px);
    }

    .character {
        width: 94vw;
        height: clamp(310px, 95vw, 372px);
    }

    .fox {
        width: 92%;
        height: 98%;
    }
}

/* Narrow phones need the same relationship at a slightly smaller scale. */
@media (orientation: portrait) and (max-width: 360px) {
    .main {
        --phone-copy-gap: clamp(216px, 66vw, 250px);
        --phone-card-gap: clamp(128px, 39vw, 140px);
    }

    .character {
        width: 92vw;
        height: clamp(286px, 91vw, 338px);
    }

    .fox {
        width: 90%;
        height: 96%;
    }
}

/* On short screens the card is bottom-anchored by v103; lift it a little so
 * it still overlaps the smaller hero instead of drifting too far below it. */
@media (orientation: portrait) and (max-width: 699px) and (max-height: 720px) {
    .fact {
        bottom: clamp(132px, 22.5dvh, 158px);
    }
}

@media (orientation: portrait) and (max-width: 360px) and (max-height: 620px) {
    .fact {
        bottom: 128px;
    }
}

/* -------------------------------------------------------------------------- */
/* v105 — closer speech bubbles + slightly smaller character                  */
/* -------------------------------------------------------------------------- */
/* Keep the speech close to the pose silhouette instead of floating near the
 * outer edge of the character stage. The character is reduced only slightly. */

/* Desktop / landscape: slightly smaller hero. */
@media (orientation: landscape) {
    .character {
        width: min(41.5vw, 73vh);
        height: 100%;
    }

    .fox {
        width: 103%;
        height: 103%;
    }

    body[data-character="pinkfong"][data-story="1"] .hello {
        left: 25%;
        top: 11%;
    }

    body[data-character="pinkfong"][data-story="2"] .hello {
        right: 14%;
        top: 9%;
    }

    body[data-character="pinkfong"][data-story="3"] .hello {
        right: 13%;
        top: 20%;
    }

    body[data-character="hogi"][data-story="1"] .hello {
        left: 24%;
        top: 12%;
    }

    body[data-character="hogi"][data-story="2"] .hello {
        right: 18%;
        top: 10%;
    }

    body[data-character="hogi"][data-story="3"] .hello {
        right: 14%;
        top: 19%;
    }

    body[data-character="jeni"][data-story="1"] .hello {
        left: 24%;
        top: 11%;
    }

    body[data-character="jeni"][data-story="2"] .hello {
        right: 16%;
        top: 9%;
    }

    body[data-character="jeni"][data-story="3"] .hello {
        right: 14%;
        top: 19%;
    }
}

/* Phone portrait: reduce the hero another small step and pull speech inward. */
@media (orientation: portrait) and (max-width: 699px) {
    .character {
        width: 90vw;
        height: clamp(300px, 91vw, 356px);
    }

    .fox {
        width: 89%;
        height: 95%;
    }

    body[data-character="pinkfong"][data-story="1"] .hello {
        left: 23%;
        top: 14%;
    }

    body[data-character="pinkfong"][data-story="2"] .hello {
        right: 14%;
        top: 13%;
    }

    body[data-character="pinkfong"][data-story="3"] .hello {
        right: 13%;
        top: 23%;
    }

    body[data-character="hogi"][data-story="1"] .hello {
        left: 22%;
        top: 15%;
    }

    body[data-character="hogi"][data-story="2"] .hello {
        right: 16%;
        top: 13%;
    }

    body[data-character="hogi"][data-story="3"] .hello {
        right: 13%;
        top: 23%;
    }

    body[data-character="jeni"][data-story="1"] .hello {
        left: 22%;
        top: 14%;
    }

    body[data-character="jeni"][data-story="2"] .hello {
        right: 16%;
        top: 12%;
    }

    body[data-character="jeni"][data-story="3"] .hello {
        right: 13%;
        top: 22%;
    }
}

@media (orientation: portrait) and (max-width: 360px) {
    .character {
        width: 88vw;
        height: clamp(278px, 87vw, 324px);
    }

    .fox {
        width: 87%;
        height: 93%;
    }
}

/* -------------------------------------------------------------------------- */
/* v106 — deterministic responsive composition + QA matrix                    */
/* -------------------------------------------------------------------------- */
/*
 * Wide screens no longer position intro/card as percentages of the viewport.
 * They are attached to the character stage in a fixed three-column cluster.
 * This keeps the visual distance consistent from laptop through desktop.
 */

/* Stable laptop / desktop / landscape-tablet composition. */
@media (min-width: 900px) and (min-height: 560px) and (min-aspect-ratio: 5/4) {
    .main {
        --cluster-intro-width: clamp(220px, 20vw, 280px);
        --cluster-character-width: clamp(400px, 36vw, 510px);
        --cluster-card-width: clamp(220px, 20vw, 280px);

        top: clamp(62px, 8vh, 82px);
        right: auto;
        bottom: clamp(56px, 7vh, 76px);
        left: 50%;
        width: max-content;
        max-width: calc(100vw - 48px);
        display: grid;
        grid-template-columns:
            var(--cluster-intro-width)
            var(--cluster-character-width)
            var(--cluster-card-width);
        align-items: center;
        justify-content: center;
        column-gap: 0;
        transform: translateX(-50%);
    }

    .intro {
        position: relative;
        z-index: 2;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: var(--cluster-intro-width);
        transform: translate(28px, -28px);
        text-align: left;
    }

    .character {
        position: relative;
        z-index: 3;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: var(--cluster-character-width);
        height: min(72vh, 600px);
        transform: translateY(-20px);
    }

    .fox {
        width: 100%;
        height: 100%;
    }

    .fact {
        position: relative;
        z-index: 6;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: var(--cluster-card-width);
        max-width: var(--cluster-card-width);
        transform: translate(-28px, 34px) rotate(1.6deg);
    }

    .character-switcher {
        top: auto;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Compact square windows: keep the same side-by-side relationship, scaled. */
@media (min-width: 720px) and (min-height: 700px) and (min-aspect-ratio: 4/5) and (max-aspect-ratio: 5/4) {
    .main {
        --square-intro-width: clamp(180px, 23vw, 220px);
        --square-character-width: clamp(350px, 43vw, 420px);
        --square-card-width: clamp(190px, 23vw, 230px);

        top: 66px;
        right: auto;
        bottom: 62px;
        left: 50%;
        width: max-content;
        max-width: calc(100vw - 28px);
        display: grid;
        grid-template-columns:
            var(--square-intro-width)
            var(--square-character-width)
            var(--square-card-width);
        align-items: center;
        justify-content: center;
        column-gap: 0;
        transform: translateX(-50%);
    }

    .intro {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: var(--square-intro-width);
        transform: translate(18px, -22px);
        text-align: left;
    }

    .eyebrow {
        justify-content: flex-start;
        font-size: clamp(7px, 1vw, 10px);
        letter-spacing: 1.5px;
    }

    #headline,
    :lang(ko) #headline,
    :lang(ja) #headline,
    :lang(zh) #headline {
        margin: 10px 0 8px;
        font-size: clamp(30px, 4.7vw, 43px);
        line-height: .97;
        letter-spacing: -1.5px;
    }

    .intro p {
        max-width: 210px;
        margin: 0;
        font-size: clamp(9px, 1.25vw, 12px);
        line-height: 1.45;
    }

    .character {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: var(--square-character-width);
        height: min(58vh, 440px);
        transform: translateY(-16px);
    }

    .fox {
        width: 100%;
        height: 100%;
    }

    .fact {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: var(--square-card-width);
        max-width: var(--square-card-width);
        padding: 14px 16px;
        transform: translate(-18px, 26px) rotate(1.4deg);
    }

    .fact-top {
        font-size: 8px;
    }

    .fact h2 {
        font-size: 17px;
    }

    .fact p {
        font-size: 10px;
        line-height: 1.4;
    }

    .character-switcher {
        top: auto;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Portrait tablets stay stacked, but the switcher now follows the card rather
 * than floating back over the character. */
@media (orientation: portrait) and (min-width: 700px) and (max-width: 1100px) and (max-aspect-ratio: 799/1000) {
    .character-switcher {
        top: calc(var(--tablet-anchor-y) + var(--tablet-card-gap) + 155px);
        bottom: auto;
    }
}

/* Small landscape devices are the explicit compact exception. Keep the hero
 * below the navbar and reduce the chance of clipping its ears/head. */
@media (orientation: landscape) and (max-width: 899px) {
    .intro {
        top: 46%;
    }

    .character {
        top: 49%;
        width: min(39vw, 64vh);
        height: 88%;
    }

    .fox {
        width: 96%;
        height: 96%;
    }

    .fact {
        top: 54%;
    }
}

/* Popup guardrails. The per-character/per-pose coordinates above still own
 * the direction; these rules only prevent a bubble from drifting far away. */
@media (min-width: 900px) and (min-height: 560px) {
    .hello {
        max-width: 170px;
    }

    body[data-character="pinkfong"][data-story="1"] .hello,
    body[data-character="hogi"][data-story="1"] .hello,
    body[data-character="jeni"][data-story="1"] .hello {
        left: 18%;
        right: auto;
    }

    body[data-character="pinkfong"][data-story="2"] .hello,
    body[data-character="hogi"][data-story="2"] .hello,
    body[data-character="jeni"][data-story="2"] .hello {
        left: auto;
        right: 10%;
    }

    body[data-character="pinkfong"][data-story="3"] .hello,
    body[data-character="hogi"][data-story="3"] .hello,
    body[data-character="jeni"][data-story="3"] .hello {
        left: auto;
        right: 8%;
    }
}

/* Final QA correction: Hogi's thinking pose has a narrower silhouette, so its
 * speech bubble needs a slightly stronger inward anchor than the other poses. */
@media (min-width: 900px) and (min-height: 560px) {
    body[data-character="hogi"][data-story="2"] .hello {
        right: 14%;
    }
}

@media (min-width: 720px) and (max-width: 899px) and (min-height: 700px) and (min-aspect-ratio: 4/5) and (max-aspect-ratio: 5/4) {
    body[data-character="hogi"][data-story="2"] .hello {
        right: 20%;
    }
}

/* QA final: lower Hogi's thinking bubble to remove the last tablet gap. */
@media (min-width: 720px) and (min-height: 560px) {
    body[data-character="hogi"][data-story="2"] .hello {
        top: 15%;
    }
}


/* -------------------------------------------------------------------------- */
/* v109 — clean, rounded focus states                                          */
/* -------------------------------------------------------------------------- */

/*
 * Keep keyboard focus visible without drawing large rectangular outlines
 * around transparent/oversized interactive areas.
 */
.brand:focus-visible,
.language:focus-visible,
.fox:focus-visible,
.character-option:focus-visible {
    outline: none;
}

/* Navbar logo: compact rounded focus ring. */
.brand {
    border-radius: 12px;
}

.brand:focus-visible {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .82),
        0 0 0 4px rgba(102, 55, 146, .5);
}

/* Language selector: pill-shaped focus instead of a square browser outline. */
.language {
    border-radius: 999px;
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

.language:focus-visible {
    background: rgba(255, 255, 255, .18);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .78),
        0 0 0 4px rgba(102, 55, 146, .48);
}

/*
 * Main character button occupies a large rectangular hit-area.
 * Highlight the visible PNG silhouette instead of that entire rectangle.
 */
.fox:focus-visible .pose-frame img {
    filter:
        drop-shadow(0 0 2px rgba(255, 255, 255, .95))
        drop-shadow(0 0 7px rgba(102, 55, 146, .72));
}

/* Character switcher: focus only the avatar tile. */
.character-option:focus-visible .character-avatar {
    border-color: rgba(255, 255, 255, .95);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .88),
        0 0 0 4px rgba(102, 55, 146, .52),
        0 10px 24px rgba(91, 54, 137, .14);
    transform: translateY(-2px) scale(1.04);
}

/* Hogi/Jeni retain their own accent while focused. */
body[data-character="hogi"] .character-option:focus-visible .character-avatar {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .88),
        0 0 0 4px rgba(43, 145, 137, .55),
        0 10px 24px rgba(52, 112, 109, .15);
}

body[data-character="jeni"] .character-option:focus-visible .character-avatar {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .88),
        0 0 0 4px rgba(229, 139, 47, .58),
        0 10px 24px rgba(160, 91, 40, .14);
}

/* Small links can keep a normal accessible ring, but make it rounded. */
.source:focus-visible {
    outline: none;
    border-radius: 999px;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .72),
        0 0 0 4px rgba(102, 55, 146, .42);
}
