/* A real layered scene. No visible instruction or discovery labels. */
.playful-about {
    width: 100%;
    margin: 0 auto;
    padding: 48px 0 0;
}

.playful-intro {
    width: min(100%, 720px);
    padding: 0 24px;
    margin: 0 auto;
}

.playful-intro h1 {
    margin: 0 0 32px;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.playground-scene {
    position: relative;
    margin-top: 34px;
    overflow: clip;
    isolation: isolate;
}

.about-playground {
    position: relative;
    width: min(100%, 1280px);
    height: clamp(690px, 68vw, 880px);
    margin: 0 auto;
    overflow: clip;
    isolation: isolate;
    --sash-angle: -68deg;
    -webkit-tap-highlight-color: transparent;
}

.about-playground button {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.about-playground img { display: block; width: 100%; height: auto; user-select: none; pointer-events: none; }
.about-playground [hidden] { display: none !important; }
.about-playground button:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 8px; border-radius: 3px; }

.playground-thread {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    opacity: .56;
    z-index: 0;
}
.playground-thread path { fill: none; stroke: #8a839e; stroke-width: .8; vector-effect: non-scaling-stroke; }

.playground-window {
    position: absolute;
    left: 34%;
    top: 0;
    width: 21%;
    aspect-ratio: 2 / 3;
    perspective: 1200px;
    z-index: 2;
}
.window-back { position: absolute; inset: 0; filter: drop-shadow(9px 17px 10px #39335412); }
.window-light {
    position: absolute;
    left: 19.5%; top: 56%; width: 61%; height: 28.5%;
    background: linear-gradient(110deg, transparent 20%, #ffffff25 48%, transparent 75%);
    opacity: .32;
    animation: window-tide 9s ease-in-out infinite alternate;
    pointer-events: none;
}
.window-toggle { position: absolute; inset: 0; perspective: 1200px; transform-style: preserve-3d; }
.window-sash {
    position: absolute;
    inset: 1% auto auto -2%;
    width: 107% !important;
    height: 98% !important;
    transform-origin: 86% 50%;
    transform: rotateY(calc(var(--sash-angle) * 1.72));
    backface-visibility: visible;
    filter: drop-shadow(-3px 8px 3px #38314718);
    pointer-events: auto !important;
}
.playground-fish {
    position: absolute;
    left: var(--fish-x); top: var(--fish-y);
    width: 5.2%; min-width: 44px;
    transform: translate(-50%, -50%);
    opacity: var(--fish-opacity, 1);
    z-index: 4;
    touch-action: manipulation;
}
.playground-fish img { transform: scaleX(var(--fish-facing, 1)); filter: drop-shadow(0 8px 7px #5e577017); }
.playground-fish::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: max(100%, 48px); transform: translateY(-50%); }
.playground-chair {
    position: absolute;
    left: 70%; top: 50%; width: 24%;
    transform: rotate(var(--chair-angle, 0deg));
    transform-origin: 50% 94%;
    touch-action: manipulation;
    z-index: 3;
}
.playground-chair img { filter: drop-shadow(8px 14px 8px #42395513); }

.about-playground .playground-paper {
    position: absolute;
    left: var(--home-x); top: var(--home-y);
    width: 10%; min-width: 84px;
    min-height: 62px;
    padding: 13px 10px 15px;
    transform: translate(var(--paper-dx, 0px), var(--paper-dy, 0px)) rotate(var(--paper-rotate, 0deg));
    transform-origin: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
    z-index: 5;
    isolation: isolate;
    filter: drop-shadow(0 5px 3px #51415d24);
    transition: filter 160ms ease;
    color: #53464d;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
    font-size: clamp(19px, 2.1vw, 26px);
    line-height: 1.35;
}
.playground-paper::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(173deg, #faf7ef, #f0ece3 76%, #f8f4eb);
    clip-path: polygon(0 3%, 13% 1%, 21% 3%, 33% 0, 45% 2%, 61% 1%, 75% 3%, 93% 0, 98% 2%, 100% 20%, 98% 33%, 100% 60%, 99% 80%, 97% 98%, 79% 97%, 62% 100%, 48% 97%, 31% 99%, 16% 97%, 1% 100%, 2% 78%, 0 60%, 2% 43%);
    box-shadow: inset 0 0 18px #bdb1971f;
}
.playground-paper:nth-of-type(2n)::before { background: linear-gradient(12deg, #faf6ec, #eee9df 72%, #f8f5ed); }
.playground-paper:active { cursor: grabbing; filter: drop-shadow(0 11px 6px #51415d2c); }
.about-playground .playground-paper[data-wide="true"] { width: 13%; }
html[lang="zh-CN"] .playground-paper span { white-space: nowrap; }
html[lang="en"] .playground-paper { font-size: clamp(15px, 1.6vw, 20px); }

.about-playground[data-motion="paused"] *, .about-playground[data-motion="paused"] *::before { animation-play-state: paused !important; }
.playground-about-page .site-footer { margin-top: 0; }
@media (min-width: 801px) and (max-width: 1100px) {
    .playground-about-page .site-header { gap: 20px; padding-left: 28px !important; padding-right: 28px !important; }
    .playground-about-page .site-nav { gap: 18px; }
    .playground-about-page .site-nav a { white-space: nowrap; }
}
@keyframes window-tide { from { opacity: .18; transform: translateY(-2px); } to { opacity: .48; transform: translateY(2px); } }

@media (max-width: 800px) {
    .playful-about { padding-top: 38px; }
    .playground-scene { margin-top: 26px; }
    .about-playground { height: 690px; }
    .playground-window { left: 31%; width: 27%; }
    .playground-chair { left: 67%; top: 52%; width: 29%; }
    .about-playground .playground-paper { min-width: 83px; min-height: 59px; }
}
@media (max-width: 560px) {
    .playful-about { padding-top: 28px; }
    .playful-intro { padding: 0 27px; }
    .playful-intro h1 { margin-bottom: 27px; }
    .playful-intro p { font-size: 16px; line-height: 1.85; margin-bottom: 15px; }
    .playground-scene { margin-top: 25px; }
    .about-playground { height: 730px; }
    .playground-window { left: 22%; width: 46%; top: 0; }
    .playground-chair { left: 57%; top: 44%; width: 39%; }
    .playground-fish { width: 10%; }
    .about-playground .playground-paper { width: 24%; min-width: 0; min-height: 59px; padding: 13px 6px; font-size: 18px; }
    .about-playground .playground-paper[data-wide="true"] { width: 29%; }
    html[lang="zh-CN"] .playground-paper[data-wide="true"] { font-size: 17px; }
    .paper-0 { --home-x: 8% !important; --home-y: 72% !important; }
    .paper-1 { --home-x: 35% !important; --home-y: 74% !important; }
    .paper-2 { --home-x: 12% !important; --home-y: 85% !important; }
    .paper-3 { --home-x: 39% !important; --home-y: 86% !important; }
    .paper-4 { --home-x: 68% !important; --home-y: 80% !important; }
    html[lang="en"] .playground-paper { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .about-playground *, .about-playground *::before { animation: none !important; transition: none !important; }
}

/* ---------- The hunt: five passages, four found in the scene ---------- */

/* The opening: each clause does a little of what it says. */
.about-opening {
    margin: 0;
    font-family: "Playfair Display", "Songti SC", Georgia, serif;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.03em;
    color: var(--text-color);
}

.o-line {
    display: block;
}

.o2 { padding-left: 2.2em; }
.o3 { padding-left: 0.9em; }
.o5 { padding-left: 3.4em; }
.o6 { padding-left: 8em; margin-top: 0.35em; }

/* 质地: the word has grain. */
.w-texture {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -0.55'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
        var(--text-color);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 强度: heavier, with a slow pulse. */
.w-intensity {
    display: inline-block;
    font-weight: 700;
    animation: w-pulse 4.6s ease-in-out infinite;
}

@keyframes w-pulse {
    0%, 70%, 100% { transform: scale(1); }
    76% { transform: scale(1.07); }
    82% { transform: scale(1); }
    88% { transform: scale(1.04); }
}

/* 谜: kept blurred until someone comes close. */
.w-mystery {
    display: inline-block;
    filter: blur(5px);
    cursor: help;
    outline: none;
    transition: filter 1.2s ease;
}

.w-mystery:hover,
.w-mystery:focus {
    filter: blur(0);
    transition-duration: 0.4s;
}

/* 疑问: a small question keeps rising out of it. */
.w-question {
    position: relative;
}

.w-question::after {
    content: "?";
    position: absolute;
    right: -0.35em;
    top: -0.2em;
    font-size: 0.5em;
    color: var(--muted-color);
    opacity: 0;
    animation: w-rise 6s ease-in-out 1.2s infinite;
}

@keyframes w-rise {
    0% { opacity: 0; transform: translateY(0.4em); }
    20% { opacity: 0.9; }
    60% { opacity: 0; transform: translateY(-1.2em) rotate(12deg); }
    100% { opacity: 0; }
}

/* 渴望: leaning forward. */
.w-longing {
    display: inline-block;
    transform: skewX(-9deg) translateX(0.08em);
    letter-spacing: 0.12em;
}

/* 参与其中: steps down, toward the scene below. */
.w-join {
    display: inline-block;
    animation: w-step 1.4s cubic-bezier(.3, .7, .2, 1) 1.6s both;
}

@keyframes w-step {
    from { opacity: 0; transform: translate(-0.8em, -0.9em); }
}

.hunt-progress {
    display: flex;
    gap: 10px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.hunt-progress li {
    width: 7px;
    height: 7px;
    border: 1px solid var(--muted-color);
    border-radius: 50%;
    opacity: .6;
    transition: background-color .6s ease, opacity .6s ease;
}

.hunt-progress li.is-found {
    background: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
}

.hunt-note {
    color: var(--text-color);
    font-family: "Source Serif 4", "Songti SC", Georgia, serif;
    font-size: 17px;
    line-height: 1.9;
}

.hunt-note p {
    margin: 0 0 10px;
}

.hunt-note[hidden] {
    display: none;
}

.hunt-note.is-arriving {
    animation: hunt-arrive 1.4s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes hunt-arrive {
    from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
}

/* Where the notes are not placed in the scene, they gather under it. */
.hunt-notes {
    display: grid;
    gap: 40px;
    width: min(100%, 720px);
    margin: 48px auto 0;
    padding: 0 24px;
}

@media (min-width: 1100px) {
    /* In the scene: each passage stands beside the object that kept it. */
    .hunt-notes {
        position: absolute;
        top: 0;
        left: 50%;
        width: min(100%, 1280px);
        height: clamp(690px, 68vw, 880px);
        margin: 0;
        padding: 0;
        transform: translateX(-50%);
        pointer-events: none;
        z-index: 1;
    }

    .hunt-notes .hunt-note {
        position: absolute;
        pointer-events: auto;
    }

    /* Kept clear of the scraps, which drift across the lower left. */
    .hunt-others { left: 4%; top: 5%; width: 27%; }
    .hunt-inside { left: 62%; top: 5%; width: 32%; }
    .hunt-few { left: 62%; top: 30%; width: 32%; }
}

/* Whatever still keeps a passage breathes, very little, each at its own pace. */
.about-playground.hunt-waiting-fish .playground-fish img { animation: hunt-breathe 3.4s ease-in-out infinite; }
.about-playground.hunt-waiting-window .window-sash { animation: hunt-breathe 4.2s ease-in-out 1.1s infinite; }
.about-playground.hunt-waiting-chair .playground-chair img { animation: hunt-breathe 5s ease-in-out 2.3s infinite; }

@keyframes hunt-breathe {
    0%, 100% { filter: drop-shadow(8px 14px 8px rgba(66, 57, 85, .075)); }
    50% { filter: drop-shadow(8px 14px 8px rgba(66, 57, 85, .075)) drop-shadow(0 0 12px rgba(76, 67, 111, .3)); }
}

/* The sentence on the thread. */
.hunt-thread-words {
    --thread-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

html[lang="en"] .hunt-thread-words {
    --thread-family: "Source Serif 4", Georgia, serif;
}

html[lang="en"] .thread-glyph {
    font-style: italic;
}

.thread-glyph {
    position: absolute;
    transform: translate(-50%, -135%) rotate(var(--angle, 0deg));
    transform-origin: 50% 135%;
    color: var(--primary-color);
    font-family: var(--thread-family);
    font-size: var(--thread-size, 14px);
    line-height: 1;
    white-space: pre;
    opacity: calc(.3 + var(--near, 0) * .7);
    transition: opacity .4s ease;
}

.thread-last {
    position: absolute;
    width: 3.2em;
    height: 2em;
    margin: -1.6em 0 0 -.8em;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    font-size: var(--thread-size, 14px);
}

.thread-last .thread-glyph {
    margin: 1.6em 0 0 .8em;
}

.hunt-thread-words.is-waiting .thread-last .thread-glyph {
    animation: thread-call 3.6s ease-in-out 3s infinite;
}

@keyframes thread-call {
    50% { opacity: 1; color: var(--text-color); }
}

.thread-last:focus-visible {
    outline: 1.5px dashed var(--primary-color);
    outline-offset: 4px;
}

/* Step 5: twenty selves, drawn one at a time, centred. */
.hunt-maybe {
    width: min(100%, 1040px);
    margin: 88px auto 104px;
    padding: 0 24px;
    text-align: center;
}

.maybe-ask,
.maybe-never {
    font-family: "Playfair Display", "Songti SC", Georgia, serif;
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.8;
    text-wrap: balance;
}

.maybe-never {
    margin-top: 48px !important;
    color: var(--muted-color);
}

.maybe-never.is-arriving {
    animation: hunt-arrive 1.6s cubic-bezier(.2, .7, .2, 1) both;
}

.selves {
    margin: 32px 0 0;
}

.self-ticks {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
}

.self-ticks li {
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: var(--border-color);
    transition: background-color .8s ease;
}

.self-ticks li.is-seen {
    background: var(--primary-color);
}

.selves:not(.is-drawing) .self-ticks {
    display: none;
}

.self {
    margin: 0 0 28px;
}

.self[hidden] {
    display: none;
}

.self.is-arriving {
    animation: hunt-arrive 1.1s cubic-bezier(.2, .7, .2, 1) both;
}

.self summary,
.self-summary {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin: 0;
    list-style: none;
    cursor: pointer;
}

.self summary::-webkit-details-marker {
    display: none;
}

.self-no {
    color: var(--muted-color);
    font-size: 12px;
    letter-spacing: 0.14em;
    font-variant-numeric: tabular-nums;
}

.self-word {
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
    font-size: clamp(20px, 2.1vw, 28px);
    line-height: 1.5;
    color: var(--primary-color);
    text-wrap: balance;
}

@media (min-width: 801px) {
    /* On a wide screen every self keeps to one line. */
    .self-word {
        white-space: nowrap;
    }
}

.self summary:hover .self-word,
.self[open] .self-word {
    color: var(--text-color);
}

/* The long paragraph stays left-aligned in a centred column. */
.self p {
    max-width: 34em;
    margin: 18px auto 0;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.9;
    text-align: left;
}

.self .self-heading {
    color: var(--muted-color);
}

.self-next {
    display: block;
    width: 56px;
    height: 56px;
    margin: 20px auto 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary-color);
    cursor: pointer;
}

.self-next[hidden] {
    display: none;
}

.self-planet {
    width: 100%;
    height: 100%;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linecap: round;
}

.planet-body {
    fill: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.planet-star {
    fill: currentColor;
    stroke: none;
    opacity: .6;
}

.planet-ring {
    transform-origin: 32px 32px;
    transition: transform .6s ease;
}

.self-next:hover .planet-ring,
.self-next:focus-visible .planet-ring {
    transform: rotate(-14deg);
}

.self-next.is-turning .self-planet {
    animation: planet-turn .9s cubic-bezier(.3, .7, .2, 1);
}

@keyframes planet-turn {
    40% { transform: rotate(-24deg) scale(1.08); }
}

.self-next:focus-visible {
    outline: 1.5px dashed var(--primary-color);
    outline-offset: 4px;
    border-radius: 50%;
}

.self-next:disabled {
    opacity: .35;
    cursor: default;
}

@media (max-width: 800px) {
    .about-opening { font-size: clamp(20px, 5.6vw, 26px); }
    .o2, .o3 { padding-left: 0; }
    .o5 { padding-left: 1.2em; }
    .o6 { padding-left: 4em; }

}

@media (prefers-reduced-motion: reduce) {
    .hunt-note.is-arriving,
    .self.is-arriving,
    .about-playground[class*="hunt-waiting"] *,
    .hunt-thread-words .thread-glyph,
    .w-intensity,
    .w-question::after,
    .w-join {
        animation: none !important;
    }
}

/* Narrow screens: a found passage rises from the bottom for a moment. */
.hunt-toast {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: min(calc(100vw - 32px), 440px);
    padding: 16px 20px 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    box-shadow: 0 14px 40px color-mix(in srgb, var(--primary-color) 16%, transparent);
    color: var(--text-color);
    font-family: "Source Serif 4", "Songti SC", Georgia, serif;
    font-size: 16px;
    line-height: 1.8;
    opacity: 0;
    transform: translate(-50%, 24px);
    transition: opacity .45s ease, transform .45s cubic-bezier(.2, .7, .2, 1);
    cursor: pointer;
}

.hunt-toast[hidden] {
    display: none;
}

.hunt-toast.is-shown {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hunt-toast p {
    margin: 0 0 4px;
    text-wrap: balance;
}

.hunt-toast-marks {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.hunt-toast-marks i {
    width: 6px;
    height: 6px;
    border: 1px solid var(--muted-color);
    border-radius: 50%;
    opacity: .6;
}

.hunt-toast-marks i.is-found {
    background: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hunt-toast { transition: none; }
}

/* Narrow screens: the thread is too short to carry the sentence, so it rests under the chair. */
.thread-caption {
    position: absolute;
    left: 16px;
    right: 16px;
    margin: 0;
    color: var(--primary-color);
    font-family: var(--thread-family);
    font-size: 13px;
    line-height: 1.7;
    letter-spacing: 0.08em;
    text-align: center;
    text-wrap: balance;
    opacity: .55;
}

html[lang="en"] .thread-caption {
    font-style: italic;
    letter-spacing: 0.02em;
}

.is-caption .thread-last {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 4px;
}

.is-caption.is-waiting .thread-last {
    animation: thread-call 3.6s ease-in-out 3s infinite;
}
