:root {
    color-scheme: dark;
    --ink: #10100f;
    --paper: #f2f0e8;
    --acid: #c7ff3d;
    --coral: #ff5f56;
    --cyan: #3fe2d0;
    --muted: #aaa99f;
    --line: rgba(242, 240, 232, 0.2);
    font-family: Inter, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    background: #080808;
    overscroll-behavior: none;
}

body {
    color: var(--paper);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

button {
    color: inherit;
    font: inherit;
}

button:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

.app-shell {
    position: relative;
    width: min(100%, 480px);
    height: 100vh;
    height: 100dvh;
    min-height: 560px;
    margin: 0 auto;
    overflow: hidden;
    background: var(--ink);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.75);
}

.screen {
    position: absolute;
    inset: 0;
    min-height: 100%;
}

/* スタート画面 */
.title-screen {
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 78% 13%, rgba(199, 255, 61, 0.2), transparent 25%),
        radial-gradient(circle at 10% 84%, rgba(255, 95, 86, 0.18), transparent 29%),
        var(--ink);
}

.title-screen::before,
.title-screen::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.title-screen::before {
    z-index: 0;
    width: 150vmax;
    height: 150vmax;
    opacity: 0.24;
    background: repeating-conic-gradient(
        from 0deg,
        transparent 0deg 8deg,
        rgba(199, 255, 61, 0.18) 9deg 11deg,
        transparent 12deg 22deg,
        rgba(255, 95, 86, 0.17) 23deg 25deg
    );
    mask-image: radial-gradient(circle, #000 0 10%, transparent 59%);
    animation: titleRaySpin 18s linear infinite;
}

.title-screen::after {
    z-index: 1;
    inset: 0;
    opacity: 0.78;
    background:
        radial-gradient(circle at 12% 18%, #fff 0 1px, transparent 3px),
        radial-gradient(circle at 82% 12%, var(--acid) 0 2px, transparent 5px),
        radial-gradient(circle at 73% 66%, var(--cyan) 0 1px, transparent 4px),
        radial-gradient(circle at 22% 78%, var(--coral) 0 2px, transparent 5px);
    background-size: 74px 89px, 121px 137px, 97px 113px, 143px 101px;
    filter: drop-shadow(0 0 7px currentColor);
    animation: titleSparkleDrift 3.2s linear infinite;
}

.signal-grid {
    position: absolute;
    z-index: 1;
    inset: -20%;
    opacity: 0.18;
    transform: rotate(-8deg);
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, #000 10%, transparent 68%);
    animation: signalGridRush 2.4s linear infinite;
}

.title-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 390px;
}

.eyebrow {
    margin: 0 0 13px;
    color: transparent;
    background: linear-gradient(90deg, var(--acid), #fff, var(--cyan), var(--acid));
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    filter: drop-shadow(0 0 8px rgba(199, 255, 61, 0.8));
    animation: titleShimmer 1.4s linear infinite;
}

.game-logo {
    display: flex;
    flex-direction: column;
    margin: 0;
    color: var(--paper);
    font-size: clamp(3.25rem, 15vw, 5rem);
    font-weight: 1000;
    font-style: italic;
    line-height: 0.86;
    letter-spacing: -0.07em;
    filter: drop-shadow(0 0 18px rgba(63, 226, 208, 0.25));
    transform-origin: left center;
    animation: titleLogoKick 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.game-logo > span:first-child {
    color: transparent;
    background: linear-gradient(110deg, #fff 0 20%, var(--cyan) 36%, #fff 48%, #ff9bf0 67%, #fff 84%);
    background-size: 260% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.9);
    text-shadow: 3px 3px 0 #5a00ff;
    animation: titleShimmer 1.25s linear infinite;
}

.game-logo-accent {
    color: transparent;
    background: linear-gradient(90deg, var(--acid), #fff000, #ff5f56, #ff4fff, var(--cyan), var(--acid));
    background-size: 260% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 2px #fff;
    text-shadow: 7px 7px 0 var(--coral), -3px -2px 0 #5a00ff;
    animation: titleGlitch 920ms steps(2, end) infinite, titleShimmer 1.1s linear infinite;
}

.lead {
    margin: 32px 0 18px;
    color: #d6d4cb;
    font-size: 0.95rem;
    line-height: 1.75;
}

.lead strong {
    color: var(--paper);
    font-size: 1.12em;
    text-shadow: 0 0 9px var(--coral), 0 0 18px rgba(255, 95, 86, 0.65);
    animation: leadFlash 700ms ease-in-out infinite alternate;
}

.rule-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 7px 12px;
    margin-bottom: 22px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    background: rgba(242, 240, 232, 0.045);
    box-shadow: inset 0 0 22px rgba(63, 226, 208, 0.05), 0 0 18px rgba(199, 255, 61, 0.08);
    backdrop-filter: blur(12px);
    animation: ruleCardGlow 1.6s ease-in-out infinite alternate;
}

.rule-card p {
    margin: 0;
    color: #d2d0c7;
    font-size: 0.78rem;
    line-height: 1.5;
}

.rule-number {
    color: var(--coral);
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.7;
}

.primary-button,
.secondary-button {
    min-height: 56px;
    border: 0;
    cursor: pointer;
    font-weight: 900;
}

.primary-button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 19px;
    color: var(--ink);
    background: var(--acid);
    box-shadow: 7px 7px 0 var(--coral);
    transition: transform 120ms ease, box-shadow 120ms ease;
    animation: startButtonBeat 850ms ease-in-out infinite alternate;
}

.primary-button:active {
    animation: none;
    transform: translate(5px, 5px);
    box-shadow: 2px 2px 0 var(--coral);
}

.zen-button {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding: 9px 13px 9px 16px;
    border: 1px solid rgba(230, 229, 217, 0.35);
    color: #e9e7dc;
    background: linear-gradient(110deg, rgba(221, 222, 208, 0.13), rgba(79, 91, 80, 0.19));
    cursor: pointer;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.zen-button:disabled {
    color: #77766f;
    background: rgba(255, 255, 255, 0.025);
    cursor: not-allowed;
}

.zen-button:not(:disabled):active {
    transform: scale(0.98);
}

.zen-button strong,
.zen-button small {
    display: block;
}

.zen-button strong {
    font-family: Georgia, "Noto Serif JP", serif;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
}

.zen-button small {
    margin-top: 4px;
    color: #999a90;
    font-size: 0.62rem;
}

.zen-button:not(:disabled) small {
    color: #b8c4b5;
}

.zen-button-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: Georgia, "Noto Serif JP", serif;
    font-size: 0.8rem;
}

.fine-print {
    margin: 18px 0 0;
    color: #77766f;
    font-size: 0.68rem;
    text-align: center;
}

.copyright {
    margin: 11px 0 0;
    color: #98978f;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: center;
}

/* ゲーム画面 */
.game-screen {
    background: #0b0b0a;
}

/* 60回達成で解放される、刺激を抑えた裏面 */
.game-screen.is-zen {
    background: #d9d6c9;
}

.game-screen.is-zen .energy-overlay,
.game-screen.is-zen .engagement-rail,
.game-screen.is-zen .feed-sticker {
    display: none;
}

.game-screen.is-zen .sound-toggle {
    border-color: rgba(229, 226, 214, 0.55);
    color: #e5e2d6;
    background: rgba(31, 40, 34, 0.52);
}

.game-screen.is-zen .sound-bars i {
    background: #cbd8ca;
}

.game-screen.is-zen .feed-card::before,
.game-screen.is-zen .feed-card::after {
    display: none;
}

.game-screen.is-zen .feed-image {
    filter: grayscale(1) contrast(1.04) brightness(0.98);
}

.game-screen.is-zen .feed-card.is-active .feed-image {
    animation: zenDrift 7s ease-in-out infinite alternate;
}

.game-screen.is-zen .feed-card.is-next .feed-image {
    animation: none;
}

.game-screen.is-zen .feed-vignette {
    background:
        linear-gradient(180deg, rgba(21, 28, 23, 0.42), transparent 25%),
        linear-gradient(0deg, rgba(16, 21, 18, 0.65), transparent 43%);
}

.game-screen.is-zen .feed-meta {
    right: 19px;
}

.game-screen.is-zen .feed-series {
    color: #f0eee4;
    background: none;
    font-family: Georgia, "Noto Serif JP", serif;
    font-style: normal;
    letter-spacing: 0.08em;
    -webkit-text-stroke: 0;
    filter: none;
    animation: none;
    text-shadow: 0 2px 13px rgba(0, 0, 0, 0.55);
}

.game-screen.is-zen .feed-tag,
.game-screen.is-zen .feed-index {
    color: #e6e3d8;
}

.game-screen.is-zen .time-bar {
    background: linear-gradient(90deg, #d9ddce, #718577);
}

.game-screen.is-zen .mini-logo span {
    color: #cbd8ca;
}

.game-screen.is-zen .swipe-counter strong {
    color: #cbd8ca;
}

.game-screen.is-zen .ready-message {
    color: #e5e2d6;
    font-family: Georgia, "Noto Serif JP", serif;
    font-style: normal;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.45);
}

.game-header {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(17px, env(safe-area-inset-top)) 18px 12px;
    pointer-events: none;
}

.mini-logo {
    font-size: 1rem;
    font-weight: 1000;
    font-style: italic;
    letter-spacing: -0.04em;
}

.mini-logo span {
    color: var(--acid);
}

.sound-toggle {
    display: flex;
    min-width: 58px;
    height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--paper);
    background: rgba(10, 10, 9, 0.58);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.sound-toggle[aria-pressed="false"] {
    color: #8d8b83;
}

.sound-bars {
    display: flex;
    height: 15px;
    align-items: end;
    gap: 2px;
}

.sound-bars i {
    display: block;
    width: 3px;
    height: 45%;
    background: var(--acid);
    animation: soundBar 500ms ease-in-out infinite alternate;
}

.sound-bars i:nth-child(2) {
    height: 100%;
    animation-delay: -220ms;
}

.sound-bars i:nth-child(3) {
    height: 70%;
    animation-delay: -360ms;
}

.sound-toggle[aria-pressed="false"] .sound-bars i {
    height: 2px;
    background: #77766f;
    animation: none;
}

.swipe-counter {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(10, 10, 9, 0.58);
    backdrop-filter: blur(10px);
}

.swipe-counter strong {
    color: var(--acid);
    font-size: 1.25rem;
    line-height: 1;
}

.swipe-counter span {
    color: #d6d4cb;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.time-track {
    position: absolute;
    z-index: 21;
    top: max(63px, calc(env(safe-area-inset-top) + 47px));
    left: 18px;
    right: 18px;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.time-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--acid), var(--cyan));
    transform-origin: left center;
}

.feed,
.feed-stack,
.feed-card,
.feed-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.feed {
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.feed.is-dragging {
    cursor: grabbing;
}

.feed-card {
    overflow: hidden;
    background: #202020;
    will-change: transform, opacity;
}

.feed-card::before,
.feed-card::after {
    position: absolute;
    z-index: 1;
    inset: -30%;
    content: "";
    pointer-events: none;
    mix-blend-mode: screen;
}

.feed-card::before {
    opacity: 0.48;
    background:
        conic-gradient(from 20deg at 50% 50%, transparent 0 6%, rgba(255, 255, 255, 0.5) 7%, transparent 9% 18%, rgba(199, 255, 61, 0.42) 20%, transparent 22% 100%);
    animation: raySpin 6s linear infinite;
}

.feed-card::after {
    opacity: 0.7;
    background: linear-gradient(112deg, transparent 35%, rgba(255, 255, 255, 0.65) 47%, transparent 58%);
    transform: translateX(-55%);
    animation: glintSweep 1.35s ease-in-out infinite;
}

.feed-card.is-next {
    transform: scale(0.96);
    filter: brightness(0.75);
}

.feed-card.is-next::before,
.feed-card.is-next::after {
    opacity: 0.16;
    animation: none;
}

.feed-card.is-active {
    z-index: 2;
}

.feed-image {
    object-fit: cover;
    pointer-events: none;
}

.feed-card.is-active .feed-image {
    animation: visualRush 900ms ease-in-out infinite alternate;
}

.feed-card.is-next .feed-image {
    animation: none;
}

.energy-overlay {
    position: absolute;
    z-index: 4;
    inset: 0;
    overflow: hidden;
    opacity: 0.42;
    background:
        radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.9) 0 1px, transparent 3px),
        radial-gradient(circle at 82% 35%, rgba(199, 255, 61, 0.95) 0 2px, transparent 5px),
        radial-gradient(circle at 66% 72%, rgba(255, 255, 255, 0.85) 0 1px, transparent 4px),
        radial-gradient(circle at 25% 80%, rgba(63, 226, 208, 0.9) 0 2px, transparent 5px);
    background-size: 71px 93px, 113px 137px, 83px 107px, 127px 89px;
    animation: sparkleDrift 2.4s linear infinite;
    pointer-events: none;
}

.feed-sticker {
    position: absolute;
    z-index: 4;
    top: 18%;
    right: -14px;
    padding: 9px 24px 9px 15px;
    border: 3px solid #080808;
    color: #080808;
    background: var(--acid);
    box-shadow: 5px 5px 0 var(--coral);
    font-size: 1.05rem;
    font-weight: 1000;
    letter-spacing: -0.04em;
    transform: rotate(7deg);
    animation: stickerBeat 700ms ease-in-out infinite alternate;
}

.feed-meta {
    position: absolute;
    z-index: 2;
    left: 19px;
    right: 76px;
    bottom: 144px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    pointer-events: none;
}

.engagement-rail {
    position: absolute;
    z-index: 8;
    right: 10px;
    bottom: 140px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    pointer-events: none;
}

.engagement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.engagement-icon {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    color: white;
    background: rgba(10, 10, 9, 0.38);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.38));
    backdrop-filter: blur(9px);
}

.engagement-icon svg {
    width: 25px;
    height: 25px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.engagement-heart {
    color: #ff4b78;
    background: rgba(22, 5, 12, 0.5);
    box-shadow: 0 0 20px rgba(255, 32, 112, 0.34);
}

.engagement-heart svg {
    fill: currentColor;
    stroke: white;
    stroke-width: 1.1;
}

.engagement-count {
    color: white;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
}

.feed-meta p {
    margin: 0;
}

.feed-series {
    color: var(--paper);
    font-size: clamp(2.1rem, 11vw, 3.2rem);
    font-weight: 1000;
    line-height: 0.86;
    letter-spacing: -0.07em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.type-wide .feed-series {
    font-family: "Arial Black", "Noto Sans JP", sans-serif;
    font-style: italic;
}

.type-condensed .feed-series {
    font-family: Impact, "Arial Narrow", "Noto Sans JP", sans-serif;
    letter-spacing: -0.035em;
}

.type-mono .feed-series {
    font-family: "Courier New", "Noto Sans JP", monospace;
    letter-spacing: -0.1em;
}

.type-serif .feed-series {
    font-family: Georgia, "Noto Serif JP", serif;
    font-style: italic;
    letter-spacing: -0.045em;
}

.text-glitter .feed-series {
    color: transparent;
    background: linear-gradient(100deg, #fff 0%, #fff55c 12%, #ff64d8 25%, #fff 37%, #61fff2 50%, #fff 62%, #d8ff49 75%, #fff 88%, #ff64d8 100%);
    background-size: 240% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 0 7px #fff) drop-shadow(0 0 16px #ff3fc5);
    animation: glitterText 1.15s linear infinite;
}

.text-neon .feed-series {
    color: #dfff47;
    -webkit-text-stroke: 1px white;
    text-shadow: 0 0 4px white, 0 0 12px #dfff47, 0 0 26px #00f5ff, 5px 5px 0 #ff006e;
    animation: neonPulse 1.1s ease-in-out infinite alternate;
}

.text-chrome .feed-series {
    color: transparent;
    background: linear-gradient(#fff 0%, #8f8f8f 28%, #fff 45%, #292929 62%, #fff 83%, #777 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 1px white;
    filter: drop-shadow(4px 5px 0 #ff006e);
}

.text-candy .feed-series {
    color: transparent;
    background: repeating-linear-gradient(120deg, #fff 0 10px, #ff2b99 10px 20px, #fff55c 20px 30px, #00efcf 30px 40px);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 2px white;
    filter: drop-shadow(4px 4px 0 #191919);
}

.text-outline .feed-series {
    color: rgba(12, 12, 11, 0.48);
    -webkit-text-stroke: 2px white;
    text-shadow: 4px 4px 0 #ff006e, 8px 8px 0 #00f5ff;
}

.text-rainbow .feed-series {
    color: transparent;
    background: linear-gradient(90deg, #ff005c, #fff000, #00f0a8, #00d9ff, #7a00ff, #ff00c8, #ff005c);
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 1px white;
    filter: drop-shadow(4px 4px 0 #111);
    animation: glitterText 1.5s linear infinite;
}

.feed-tag {
    margin-top: 10px !important;
    color: #f0eee4;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.feed-index {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    font-family: monospace;
    font-size: 0.68rem;
    backdrop-filter: blur(8px);
}

.feed-vignette {
    position: absolute;
    z-index: 5;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 25%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 42%);
    pointer-events: none;
}

@keyframes titleRaySpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes titleSparkleDrift {
    to {
        background-position: 74px 89px, -121px 137px, 97px -113px, -143px -101px;
    }
}

@keyframes signalGridRush {
    from {
        background-position: 0 0, 0 0;
        transform: rotate(-8deg) scale(1);
    }
    to {
        background-position: 40px 40px, 40px 40px;
        transform: rotate(-8deg) scale(1.035);
    }
}

@keyframes titleShimmer {
    to {
        background-position: -260% 0;
    }
}

@keyframes titleLogoKick {
    0%,
    72%,
    100% {
        transform: skewX(-3deg) scale(1);
    }
    78% {
        transform: translateX(5px) skewX(-8deg) scale(1.025);
    }
    84% {
        transform: translateX(-3px) skewX(2deg) scale(0.99);
    }
}

@keyframes titleGlitch {
    0%,
    64%,
    100% {
        transform: translate(0, 0);
    }
    68% {
        transform: translate(4px, -2px);
    }
    72% {
        transform: translate(-3px, 2px);
    }
    76% {
        transform: translate(2px, 0);
    }
}

@keyframes leadFlash {
    to {
        color: var(--acid);
        text-shadow: 0 0 8px #fff, 0 0 20px var(--acid), 0 0 32px var(--coral);
    }
}

@keyframes ruleCardGlow {
    to {
        border-color: rgba(63, 226, 208, 0.66);
        box-shadow: inset 0 0 28px rgba(63, 226, 208, 0.1), 0 0 24px rgba(199, 255, 61, 0.16);
    }
}

@keyframes startButtonBeat {
    to {
        filter: saturate(1.3) brightness(1.08);
        box-shadow: 9px 9px 0 var(--coral), 0 0 24px rgba(199, 255, 61, 0.45);
        transform: translate(-1px, -1px) scale(1.008);
    }
}

@keyframes soundBar {
    to {
        height: 100%;
    }
}

@keyframes visualRush {
    from {
        filter: saturate(1.25) contrast(1.08) brightness(1);
        transform: scale(1.01);
    }
    to {
        filter: saturate(1.75) contrast(1.16) brightness(1.12) hue-rotate(8deg);
        transform: scale(1.055);
    }
}

@keyframes zenDrift {
    from {
        filter: grayscale(1) contrast(1.02) brightness(0.97);
        transform: scale(1.01);
    }
    to {
        filter: grayscale(1) contrast(1.08) brightness(1.03);
        transform: scale(1.025);
    }
}

@keyframes raySpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes glintSweep {
    0%,
    18% {
        transform: translateX(-55%);
    }
    75%,
    100% {
        transform: translateX(55%);
    }
}

@keyframes sparkleDrift {
    to {
        background-position: 71px 93px, -113px 137px, 83px -107px, -127px -89px;
    }
}

@keyframes stickerBeat {
    from {
        transform: rotate(7deg) scale(0.96);
    }
    to {
        transform: rotate(4deg) scale(1.08);
    }
}

@keyframes glitterText {
    to {
        background-position: -240% 0;
    }
}

@keyframes neonPulse {
    to {
        filter: brightness(1.2) saturate(1.35);
        text-shadow: 0 0 7px white, 0 0 18px #dfff47, 0 0 34px #00f5ff, 6px 6px 0 #ff006e;
    }
}

.ready-message {
    position: absolute;
    z-index: 12;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--acid);
    font-size: clamp(4.5rem, 28vw, 8rem);
    font-weight: 1000;
    font-style: italic;
    letter-spacing: -0.08em;
    text-shadow: 7px 7px 0 var(--coral);
    pointer-events: none;
}

.game-footer {
    position: absolute;
    z-index: 20;
    left: 19px;
    right: 19px;
    bottom: max(18px, env(safe-area-inset-bottom));
    display: flex;
    align-items: end;
    justify-content: space-between;
    pointer-events: none;
}

.timer-label {
    margin: 0 0 2px;
    color: #d0cec5;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.timer {
    margin: 0;
    font-size: clamp(3.8rem, 17vw, 5.4rem);
    font-weight: 1000;
    line-height: 0.82;
    letter-spacing: -0.08em;
}

.swipe-hint {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    backdrop-filter: blur(8px);
}

.swipe-hint span {
    color: var(--acid);
    font-size: 1rem;
}

/* 結果画面 */
.result-screen {
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: max(26px, env(safe-area-inset-top)) 24px max(26px, env(safe-area-inset-bottom));
    background:
        linear-gradient(135deg, transparent 48%, rgba(199, 255, 61, 0.06) 48%, rgba(199, 255, 61, 0.06) 52%, transparent 52%),
        var(--ink);
    background-size: 30px 30px;
}

.result-content {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.result-content .eyebrow {
    text-align: left;
}

.result-content h2 {
    margin: 0 0 10px;
    font-size: clamp(2.8rem, 13vw, 4rem);
    line-height: 1;
    letter-spacing: -0.08em;
    text-align: left;
}

.meter {
    position: relative;
    width: min(48vw, 190px);
    aspect-ratio: 1;
    margin: 3px auto 0;
}

.meter svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.meter circle {
    fill: none;
    stroke-width: 9;
}

.meter-base {
    stroke: rgba(242, 240, 232, 0.12);
}

.meter-value {
    stroke: var(--acid);
    stroke-linecap: square;
    stroke-dasharray: 427.26;
    stroke-dashoffset: 427.26;
    transition: stroke-dashoffset 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.meter-copy {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paper);
}

.meter-copy strong {
    font-size: clamp(3.5rem, 17vw, 5rem);
    line-height: 1;
    letter-spacing: -0.08em;
}

.meter-copy span {
    align-self: flex-end;
    margin: 0 0 27% 3px;
    color: var(--acid);
    font-weight: 900;
}

.rank {
    margin: -4px 0 7px;
    color: var(--acid);
    font-size: 1.45rem;
    font-weight: 1000;
}

.result-message {
    min-height: 2.8em;
    margin: 0 auto 14px;
    color: #b9b7ae;
    font-size: 0.78rem;
    line-height: 1.65;
}

.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    border: 1px solid var(--line);
}

.result-stats div {
    padding: 12px;
}

.result-stats div + div {
    border-left: 1px solid var(--line);
}

.result-stats dt {
    color: var(--muted);
    font-size: 0.65rem;
}

.result-stats dd {
    margin: 4px 0 0;
    font-size: 0.8rem;
}

.result-stats strong {
    margin-right: 3px;
    color: var(--paper);
    font-size: 1.5rem;
}

.record-message {
    min-height: 1.2em;
    margin: 8px 0 12px;
    color: var(--coral);
    font-size: 0.7rem;
    font-weight: 900;
}

.result-actions {
    display: grid;
    gap: 12px;
}

.secondary-button {
    width: 100%;
    border: 1px solid var(--line);
    background: transparent;
}

@media (min-width: 700px) {
    body {
        background:
            radial-gradient(circle at center, #292926 0, #080808 65%);
    }

    .app-shell {
        border-right: 1px solid #2f2f2b;
        border-left: 1px solid #2f2f2b;
    }
}

@media (max-height: 690px) {
    .title-screen {
        padding-top: 18px;
        padding-bottom: 16px;
    }

    .game-logo {
        font-size: 3.35rem;
    }

    .lead {
        margin-top: 27px;
        margin-bottom: 12px;
    }

    .rule-card {
        margin-bottom: 16px;
        padding: 11px 14px;
    }

    .zen-button {
        min-height: 48px;
        margin-top: 11px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .zen-button-icon {
        width: 31px;
        height: 31px;
    }

    .fine-print {
        margin-top: 12px;
    }

    .copyright {
        margin-top: 7px;
    }

    .result-content h2 {
        font-size: 2.7rem;
    }

    .meter {
        width: 145px;
    }

    .engagement-rail {
        bottom: 112px;
        gap: 7px;
    }

    .engagement-icon {
        width: 38px;
        height: 38px;
    }

    .engagement-icon svg {
        width: 21px;
        height: 21px;
    }
}

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

    .feed-card.is-active .feed-image,
    .feed-card::before,
    .feed-card::after,
    .energy-overlay,
    .feed-sticker,
    .feed-series,
    .sound-bars i,
    .title-screen::before,
    .title-screen::after,
    .signal-grid,
    .eyebrow,
    .game-logo,
    .game-logo > span,
    .lead strong,
    .rule-card,
    .primary-button {
        animation: none !important;
    }
}
