:root {
    color-scheme: dark;
    --paper: #f7f4e8;
    --ink: #f7f4e8;
    --muted: rgba(247, 244, 232, 0.62);
    --line: rgba(255, 255, 255, 0.18);
    --panel: rgba(12, 14, 20, 0.58);
    --accent: #dfff57;
    --accent-2: #8be9ff;
    --stage-bg: #151722;
    --stage-line: rgba(255, 255, 255, 0.12);
    --ease-out: cubic-bezier(0.2, 0.88, 0.28, 1);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: #090a0f;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    background: #090a0f;
    font-family: "Arial Narrow", "Inter", "SF Pro Display", "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.is-dragging,
body.is-dragging * {
    cursor: grabbing !important;
    user-select: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
a,
[tabindex] {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

::selection {
    color: #090a0f;
    background: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    padding: 10px 15px;
    border-radius: 999px;
    color: #090a0f;
    background: #fff;
    font-size: 0.76rem;
    font-weight: 850;
    transform: translateY(-170%);
}

.skip-link:focus {
    transform: none;
}

.physics-nav {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: 50%;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    width: min(1180px, calc(100% - 28px));
    min-height: 54px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 9, 14, 0.58);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 18px 45px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    transform: translateX(-50%);
}

.physics-nav > a {
    display: inline-flex;
    width: fit-content;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.79rem;
    font-weight: 780;
    transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.physics-nav > a:hover,
.physics-nav > a:focus-visible {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}

.physics-nav p,
.physics-nav b {
    margin: 0;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.physics-nav p {
    display: flex;
    align-items: center;
    gap: 9px;
}

.physics-nav p i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
}

.physics-nav b {
    justify-self: end;
    padding-right: 13px;
}

.physics-lab {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 0.7fr) minmax(460px, 1.3fr);
    width: 100%;
    min-height: 100svh;
    gap: clamp(28px, 5vw, 78px);
    align-items: center;
    padding: 96px max(28px, calc((100vw - 1280px) / 2)) 84px;
    isolation: isolate;
    background: var(--page-bg, #0b0d14);
}

.physics-lab::before,
.physics-lab::after {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    content: "";
    pointer-events: none;
    filter: blur(1px);
}

.physics-lab::before {
    top: -26vw;
    left: -18vw;
    width: 58vw;
    height: 58vw;
    background: radial-gradient(circle, var(--glow-a, rgba(130, 90, 255, 0.28)), transparent 67%);
}

.physics-lab::after {
    right: -22vw;
    bottom: -35vw;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--glow-b, rgba(0, 210, 255, 0.16)), transparent 68%);
}

.physics-copy {
    position: relative;
    z-index: 5;
    align-self: center;
}

.physics-kicker {
    margin: 0 0 15px;
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.physics-copy h1 {
    max-width: 660px;
    margin: 0;
    font-size: clamp(3.5rem, 7vw, 7.8rem);
    font-weight: 930;
    line-height: 0.82;
    letter-spacing: -0.075em;
    text-wrap: balance;
}

.physics-copy h1 em {
    color: var(--accent);
    font-style: normal;
}

.physics-description {
    max-width: 480px;
    margin: 24px 0 28px;
    color: var(--muted);
    font-size: clamp(0.84rem, 1.15vw, 0.95rem);
    line-height: 1.8;
}

.physics-hint {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    margin: 0 0 22px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.physics-hint span {
    color: var(--accent);
    font-size: 0.92rem;
}

.physics-readout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 510px;
    margin: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.physics-readout div {
    min-width: 0;
    padding: 13px 9px 13px 0;
}

.physics-readout div + div {
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.physics-readout dt {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.49rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    white-space: nowrap;
}

.physics-readout dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    font-family: ui-monospace, "Cascadia Mono", monospace;
    font-size: clamp(0.82rem, 1.6vw, 1.2rem);
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.physics-controls {
    display: grid;
    max-width: 510px;
    gap: 12px;
    margin-top: 18px;
}

.physics-control {
    display: grid;
    grid-template-columns: 88px 1fr 40px;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 820;
    letter-spacing: 0.11em;
}

.physics-control output {
    color: var(--ink);
    font-family: ui-monospace, "Cascadia Mono", monospace;
    text-align: right;
}

.physics-control input[type="range"] {
    width: 100%;
    height: 18px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.physics-stage {
    position: relative;
    min-width: 0;
    min-height: min(72svh, 720px);
    overflow: hidden;
    border: 1px solid var(--stage-line);
    border-radius: clamp(22px, 3vw, 38px);
    background: var(--stage-bg);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 34px 80px rgba(0, 0, 0, 0.24);
    touch-action: none;
    user-select: none;
}

.physics-stage::after {
    position: absolute;
    inset: 10px;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: calc(clamp(22px, 3vw, 38px) - 8px);
    content: "";
    pointer-events: none;
}

.stage-label {
    position: absolute;
    z-index: 12;
    margin: 0;
    color: var(--muted);
    font-size: 0.5rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    pointer-events: none;
}

.stage-label.top {
    top: 23px;
    left: 25px;
}

.stage-label.side {
    right: -29px;
    bottom: 96px;
    transform: rotate(-90deg);
}

.physics-object {
    --x: 0px;
    --y: 0px;
    --rotation: 0deg;
    --scale-x: 1;
    --scale-y: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    display: grid;
    place-items: center;
    border: 0;
    cursor: grab;
    transform: translate3d(calc(-50% + var(--x)), calc(-50% + var(--y)), 0) rotate(var(--rotation)) scale(var(--scale-x), var(--scale-y));
    transform-origin: center;
    will-change: transform;
}

.physics-object:active {
    cursor: grabbing;
}

.physics-object b,
.physics-object small {
    pointer-events: none;
}

.physics-object b {
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.physics-object small {
    font-family: ui-monospace, "Cascadia Mono", monospace;
    font-size: 0.48rem;
    letter-spacing: 0.08em;
    opacity: 0.65;
}

.physics-reset,
.physics-next {
    position: fixed;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 90;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.physics-reset {
    left: max(22px, env(safe-area-inset-left));
    min-width: 112px;
    padding: 0 18px;
    color: var(--ink);
    background: rgba(12, 14, 20, 0.58);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: transform 180ms var(--ease-out), background 180ms ease;
}

.physics-reset:hover,
.physics-reset:focus-visible {
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-2px);
}

.physics-next {
    right: max(22px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: auto 18px;
    min-width: 220px;
    align-items: center;
    column-gap: 12px;
    padding: 9px 16px 9px 19px;
    color: var(--ink);
    background: rgba(12, 14, 20, 0.58);
    transition: transform 180ms var(--ease-out), background 180ms ease;
}

.physics-next:hover,
.physics-next:focus-visible {
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-2px);
}

.physics-next small,
.physics-next span {
    grid-column: 1;
}

.physics-next small {
    color: var(--accent);
    font-size: 0.48rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.physics-next span {
    font-size: 0.68rem;
    font-weight: 820;
    letter-spacing: 0.04em;
}

.physics-next b {
    grid-row: 1 / 3;
    grid-column: 2;
    font-size: 1rem;
}

.no-script {
    position: fixed;
    left: 50%;
    bottom: 82px;
    z-index: 120;
    margin: 0;
    padding: 10px 14px;
    border-radius: 10px;
    color: #111;
    background: #fff;
    font-size: 0.8rem;
    transform: translateX(-50%);
}

/* 35 — Spring drag */

body[data-effect="spring-drag"] {
    --page-bg: linear-gradient(132deg, #160c2c 0%, #0b1024 58%, #071b22 100%);
    --stage-bg: radial-gradient(circle at 50% 50%, rgba(155, 126, 255, 0.14), transparent 34%), #0c0d18;
    --accent: #dfff57;
    --accent-2: #a78bfa;
    --glow-a: rgba(145, 92, 255, 0.32);
    --glow-b: rgba(80, 236, 255, 0.14);
}

.spring-stage {
    background-image:
        radial-gradient(circle at center, transparent 0 26%, rgba(255, 255, 255, 0.035) 26.2% 26.5%, transparent 26.7%),
        radial-gradient(circle at center, transparent 0 43%, rgba(255, 255, 255, 0.028) 43.2% 43.45%, transparent 43.7%),
        radial-gradient(circle at center, rgba(155, 126, 255, 0.14), transparent 34%);
}

.spring-target,
.snap-target {
    --x: 0px;
    --y: 0px;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: 52px;
    aspect-ratio: 1;
    border: 1px solid var(--accent);
    border-radius: 50%;
    opacity: 0.82;
    pointer-events: none;
    transform: translate3d(calc(-50% + var(--x)), calc(-50% + var(--y)), 0);
}

.spring-target::before,
.spring-target::after,
.snap-target::before,
.snap-target::after {
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--accent);
    content: "";
    transform: translate(-50%, -50%);
}

.spring-target::before,
.snap-target::before {
    width: 70px;
    height: 1px;
}

.spring-target::after,
.snap-target::after {
    width: 1px;
    height: 70px;
}

.spring-tether {
    --line-x: 0px;
    --line-y: 0px;
    --line-length: 0px;
    --line-angle: 0rad;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: var(--line-length);
    height: 2px;
    background: linear-gradient(90deg, rgba(223, 255, 87, 0.18), var(--accent));
    box-shadow: 0 0 14px rgba(223, 255, 87, 0.32);
    pointer-events: none;
    transform: translate3d(var(--line-x), var(--line-y), 0) rotate(var(--line-angle));
    transform-origin: 0 50%;
}

.spring-puck {
    width: clamp(94px, 11vw, 132px);
    aspect-ratio: 1;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #15111f;
    background: radial-gradient(circle at 34% 28%, #fff 0 5%, #dfff57 30%, #a78bfa 100%);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 0 42px rgba(167, 139, 250, 0.25);
}

.spring-puck::before {
    position: absolute;
    inset: 13px;
    border: 1px solid rgba(18, 14, 32, 0.25);
    border-radius: inherit;
    content: "";
}

/* 36 — Elastic bounds */

body[data-effect="elastic-bounds"] {
    --ink: #111218;
    --muted: rgba(17, 18, 24, 0.62);
    --line: rgba(17, 18, 24, 0.18);
    --page-bg: linear-gradient(135deg, #ff6b43 0%, #ff8d4d 46%, #ffd35f 100%);
    --stage-bg: #2247ed;
    --stage-line: rgba(10, 20, 76, 0.3);
    --accent: #111218;
    --accent-2: #fff2ae;
    --glow-a: rgba(255, 255, 255, 0.16);
    --glow-b: rgba(16, 46, 220, 0.22);
}

body[data-effect="elastic-bounds"] .physics-nav,
body[data-effect="elastic-bounds"] .physics-reset,
body[data-effect="elastic-bounds"] .physics-next {
    background: rgba(255, 242, 199, 0.54);
}

.elastic-stage {
    box-shadow: inset 0 0 0 9px rgba(255, 242, 174, 0.16), 0 34px 80px rgba(75, 34, 13, 0.22);
}

.elastic-stage::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
    background-size: 56px 56px;
    content: "";
}

.elastic-puck {
    width: clamp(112px, 13vw, 154px);
    aspect-ratio: 1;
    gap: 5px;
    border: 2px solid #111218;
    border-radius: 30%;
    color: #111218;
    background: #fff2ae;
    box-shadow: 10px 12px 0 rgba(7, 15, 77, 0.32), 0 25px 55px rgba(7, 15, 77, 0.26);
}

.elastic-puck::before,
.elastic-puck::after {
    position: absolute;
    border: 1px solid rgba(17, 18, 24, 0.22);
    border-radius: inherit;
    content: "";
}

.elastic-puck::before {
    inset: 11px;
}

.elastic-puck::after {
    inset: 24px;
}

.edge-meter {
    --impact: 0;
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: calc(var(--impact) * 0.72);
    background: radial-gradient(circle at var(--impact-x, 50%) var(--impact-y, 50%), rgba(255, 242, 174, 0.9), transparent 28%);
    pointer-events: none;
}

/* 37 — Momentum throw */

body[data-effect="momentum-throw"] {
    --page-bg: linear-gradient(118deg, #07090d 0%, #111115 53%, #240a0d 100%);
    --stage-bg: #090a0e;
    --accent: #ff4f3d;
    --accent-2: #ffd05c;
    --glow-a: rgba(255, 67, 54, 0.2);
    --glow-b: rgba(255, 196, 55, 0.09);
}

.momentum-stage {
    border-color: rgba(255, 79, 61, 0.3);
    background:
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.035) 80px),
        repeating-linear-gradient(0deg, transparent 0 79px, rgba(255, 255, 255, 0.035) 80px),
        #090a0e;
}

.trail-canvas {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.momentum-puck {
    width: clamp(136px, 17vw, 206px);
    aspect-ratio: 1.6;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    color: #fff4e4;
    background: linear-gradient(135deg, #ff4f3d, #a81322);
    box-shadow: 0 24px 55px rgba(255, 45, 36, 0.27), inset 0 1px rgba(255, 255, 255, 0.34);
}

.momentum-puck::after {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 11px;
    height: 11px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    transform: translateY(-50%) rotate(45deg);
}

/* 38 — Inertial snap grid */

body[data-effect="inertial-snap-grid"] {
    --page-bg: linear-gradient(122deg, #071f27 0%, #062d32 50%, #11233b 100%);
    --stage-bg: #071b22;
    --accent: #76ffd6;
    --accent-2: #73a8ff;
    --glow-a: rgba(42, 243, 201, 0.14);
    --glow-b: rgba(73, 123, 255, 0.22);
}

.snap-stage {
    --grid-size: 72px;
    background-image:
        linear-gradient(rgba(118, 255, 214, 0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(118, 255, 214, 0.13) 1px, transparent 1px),
        linear-gradient(rgba(118, 255, 214, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(118, 255, 214, 0.04) 1px, transparent 1px);
    background-position: 50% 50%;
    background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), 18px 18px, 18px 18px;
}

.snap-target {
    width: 34px;
    border-color: #73a8ff;
    border-radius: 4px;
    opacity: 0;
    box-shadow: 0 0 20px rgba(115, 168, 255, 0.5);
    transition: opacity 120ms ease;
}

.snap-target.is-visible {
    opacity: 0.9;
}

.snap-target::before,
.snap-target::after {
    background: #73a8ff;
}

.snap-vector {
    --line-x: 0px;
    --line-y: 0px;
    --line-length: 0px;
    --line-angle: 0rad;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: var(--line-length);
    height: 1px;
    opacity: 0;
    background: repeating-linear-gradient(90deg, #73a8ff 0 5px, transparent 5px 10px);
    pointer-events: none;
    transform: translate3d(var(--line-x), var(--line-y), 0) rotate(var(--line-angle));
    transform-origin: 0 50%;
    transition: opacity 120ms ease;
}

.snap-vector.is-visible {
    opacity: 0.72;
}

.snap-puck {
    width: clamp(96px, 11vw, 128px);
    aspect-ratio: 1;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 22px;
    color: #071b22;
    background: linear-gradient(145deg, #b5ffe9, #76ffd6 48%, #5a9fff);
    box-shadow: 0 24px 58px rgba(30, 241, 194, 0.2), inset 0 1px rgba(255, 255, 255, 0.55);
}

/* 39 — Magnetic docking */

body[data-effect="magnetic-docking"] {
    --page-bg: linear-gradient(130deg, #130e1d 0%, #1a1021 45%, #221115 100%);
    --stage-bg: radial-gradient(circle at center, #261324, #0f0d16 72%);
    --accent: #ff78bd;
    --accent-2: #ffdc6b;
    --glow-a: rgba(255, 65, 169, 0.2);
    --glow-b: rgba(255, 195, 75, 0.12);
}

.magnetic-stage {
    background:
        radial-gradient(circle at center, rgba(255, 120, 189, 0.08), transparent 38%),
        linear-gradient(33deg, transparent 49.8%, rgba(255, 255, 255, 0.035) 50%, transparent 50.2%),
        linear-gradient(147deg, transparent 49.8%, rgba(255, 255, 255, 0.035) 50%, transparent 50.2%),
        #120e18;
}

.dock {
    --strength: 0;
    position: absolute;
    z-index: 4;
    display: grid;
    width: clamp(58px, 7vw, 82px);
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(255, 120, 189, calc(0.28 + var(--strength) * 0.65));
    border-radius: 50%;
    color: rgba(255, 244, 238, calc(0.52 + var(--strength) * 0.48));
    background: rgba(255, 120, 189, calc(0.03 + var(--strength) * 0.13));
    box-shadow: 0 0 calc(8px + var(--strength) * 34px) rgba(255, 92, 179, calc(var(--strength) * 0.5));
    cursor: pointer;
    transform: translate(-50%, -50%) scale(calc(1 + var(--strength) * 0.1));
    transition: border-color 100ms linear, background 100ms linear, transform 100ms linear;
}

.dock::before,
.dock::after {
    position: absolute;
    border: 1px solid currentColor;
    border-radius: inherit;
    content: "";
    opacity: calc(0.16 + var(--strength) * 0.42);
}

.dock::before {
    inset: 9px;
}

.dock::after {
    inset: 18px;
}

.dock b {
    position: absolute;
    top: calc(100% + 8px);
    font-size: 0.48rem;
    letter-spacing: 0.14em;
}

.dock.is-active {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

.magnetic-puck {
    width: clamp(98px, 12vw, 142px);
    aspect-ratio: 1;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #27101f;
    background: radial-gradient(circle at 34% 28%, #fff8d8 0 5%, #ffdc6b 24%, #ff78bd 72%, #9f3cff 100%);
    box-shadow: 0 0 44px rgba(255, 100, 187, 0.34), 0 24px 55px rgba(0, 0, 0, 0.38);
}

.magnetic-puck::before {
    position: absolute;
    inset: 15px;
    border: 1px solid rgba(40, 12, 30, 0.26);
    border-radius: inherit;
    content: "";
}

@media (max-width: 900px) {
    .physics-lab {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 16px;
        align-items: stretch;
        height: 100svh;
        padding: 82px 16px 72px;
    }

    .physics-copy {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(230px, 0.9fr);
        column-gap: 24px;
        align-items: end;
    }

    .physics-kicker {
        grid-column: 1;
        margin-bottom: 8px;
    }

    .physics-copy h1 {
        grid-column: 1;
        font-size: clamp(2.6rem, 10vw, 5rem);
    }

    .physics-description {
        grid-row: 1 / 3;
        grid-column: 2;
        margin: 0 0 3px;
        font-size: 0.78rem;
        line-height: 1.6;
    }

    .physics-hint {
        display: none;
    }

    .physics-readout {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        margin-top: 13px;
    }

    .physics-controls {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        margin-top: 11px;
    }

    .physics-stage {
        min-height: 0;
    }
}

@media (max-width: 600px) {
    .physics-nav {
        min-height: 48px;
    }

    .physics-nav p {
        display: none;
    }

    .physics-nav b {
        grid-column: 3;
    }

    .physics-lab {
        gap: 10px;
        padding: 75px 10px 67px;
    }

    .physics-copy {
        display: block;
    }

    .physics-kicker {
        margin-bottom: 6px;
        font-size: 0.53rem;
    }

    .physics-copy h1 {
        font-size: clamp(2.35rem, 13vw, 3.8rem);
        line-height: 0.84;
    }

    .physics-description {
        display: none;
    }

    .physics-readout {
        margin-top: 10px;
    }

    .physics-readout div {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .physics-readout dt {
        margin-bottom: 4px;
        font-size: 0.42rem;
    }

    .physics-readout dd {
        font-size: 0.78rem;
    }

    .physics-controls {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 8px;
    }

    .physics-control {
        grid-template-columns: 61px 1fr 28px;
        gap: 5px;
        font-size: 0.46rem;
    }

    .physics-stage {
        border-radius: 20px;
    }

    .physics-stage::after {
        inset: 6px;
        border-radius: 14px;
    }

    .physics-reset,
    .physics-next {
        bottom: max(10px, env(safe-area-inset-bottom));
        min-height: 46px;
    }

    .physics-reset {
        left: max(10px, env(safe-area-inset-left));
        min-width: 90px;
        padding: 0 13px;
        font-size: 0.53rem;
    }

    .physics-next {
        right: max(10px, env(safe-area-inset-right));
        min-width: 182px;
        padding: 7px 12px 7px 15px;
    }

    .physics-next span {
        font-size: 0.58rem;
    }

    .stage-label.side {
        display: none;
    }

    .stage-label.top {
        top: 16px;
        left: 18px;
    }

    .dock {
        width: 52px;
    }
}

@media (max-height: 700px) and (min-width: 901px) {
    .physics-lab {
        padding-top: 82px;
        padding-bottom: 70px;
    }

    .physics-description {
        margin: 16px 0 18px;
        line-height: 1.55;
    }

    .physics-stage {
        min-height: calc(100svh - 152px);
    }
}

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