:root {
    --pink: #f0156a;
    --pink-lt: #ffd6e8;
    --pink-xlt: #fff5f9;
    --border: #e8e8e8;
    --border2: #d8d8d8;
    --text: #0d0d0d;
    --muted: #666;
    --subtle: #b0b0b0;
    --bg: #fff;
    --surface: #f8f8f8;
}

body[data-theme="dark"] {
    --pink: #ff4f9a;
    --pink-lt: #5e2a42;
    --pink-xlt: #26151d;
    --border: #2e2e2e;
    --border2: #3a3a3a;
    --text: #f3f3f3;
    --muted: #b6b6b6;
    --subtle: #8b8b8b;
    --bg: #121212;
    --surface: #1a1a1a;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Geist', sans-serif;
    font-size: 15px;
    min-height: 100dvh;
    overflow-x: hidden;
    width: 100%;
}

nav {
    height: 56px;
    border-bottom: 1px solid var(--border);
    padding: 0 clamp(1.5rem, 4vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px);
}

.nav-logo {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--pink);
    transition: opacity 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}

.theme-toggle {
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border2);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    line-height: 1;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--pink);
    color: var(--pink);
    background: var(--pink-xlt);
}

#hero-state {
    min-height: 100dvh;
    padding-top: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 4rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: relative;
    isolation: isolate;
}

#hero-state::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    right: -150px;
    top: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in oklab, var(--pink) 20%, transparent), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

#hero-state::after {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    left: -160px;
    bottom: 6%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in oklab, var(--pink) 13%, transparent), transparent 72%);
    z-index: -1;
    pointer-events: none;
}

#hero-state.exiting {
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
}

.hero-center {
    width: 100%;
    max-width: 860px;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.8rem;
}

.hero-center>* {
    max-width: 100%;
}

.hero-h1 {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(3.8rem, 10vw, 7rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.025em;
    color: var(--text);
}

.hero-h1 em {
    color: var(--pink);
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--muted);
    font-weight: 300;
    line-height: 1.65;
    max-width: 500px;
}

.hero-form {
    width: 100%;
    border: 1px solid var(--border2);
    border-radius: 20px;
    background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 95%, var(--pink-xlt)), var(--bg));
    box-shadow: 0 14px 45px color-mix(in oklab, var(--pink) 16%, transparent);
    overflow: hidden;
    max-width: 680px;
}

.hf-field {
    padding: 1.5rem 1.5rem 1.1rem 1.5rem;
    background: color-mix(in oklab, var(--bg) 94%, var(--pink-xlt));
}

.hf-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--subtle);
    margin-bottom: 0.45rem;
}

input[type="text"] {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    color: var(--text);
    caret-color: var(--pink);
    line-height: 1.3;
    text-align: center;
}

input[type="text"]::placeholder {
    color: color-mix(in oklab, var(--subtle) 70%, transparent);
}

.hf-divider {
    padding: 0.55rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hf-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.hf-amp {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--subtle);
}

.hf-foot {
    padding: 1rem 1.5rem;
    background: color-mix(in oklab, var(--surface) 90%, var(--pink-xlt));
}

.go-btn {
    width: 100%;
    height: 48px;
    background: var(--pink);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Geist', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(240, 21, 106, 0.3);
    letter-spacing: 0.02em;
}

.go-btn:hover:not(:disabled) {
    background: #d4005a;
    box-shadow: 0 6px 20px rgba(240, 21, 106, 0.4);
}

.go-btn:active {
    transform: scale(0.99);
}

.go-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.hero-key {
    display: grid;
    width: 100%;
    max-width: 680px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

.hk-item {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    padding: 0.5rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: color-mix(in oklab, var(--surface) 92%, var(--pink-xlt));
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
    align-items: center;
    justify-content: center;
    min-height: 62px;
}

.hk-item strong {
    color: var(--pink);
    font-weight: 500;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1;
}

.hero-note {
    font-size: 0.78rem;
    color: var(--subtle);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
    width: 100%;
    max-width: 680px;
}

#split-state {
    display: none;
    min-height: 100dvh;
    padding-top: 56px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    will-change: opacity, transform;
}

#split-state.pre-enter,
#split-state.active {
    display: flex;
}

#split-state.pre-enter {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#split-state.active {
    opacity: 1;
    transform: translateY(0);
}

#split-state.transitioning {
    position: fixed;
    left: 0;
    right: 0;
    top: 56px;
    bottom: 0;
    padding-top: 0;
    min-height: 0;
    z-index: 90;
    overflow: auto;
    background: var(--bg);
}

.split-left {
    width: 380px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: clamp(2.5rem, 5dvh, 4rem) clamp(2rem, 3vw, 3rem);
    position: sticky;
    top: 56px;
    height: calc(100dvh - 56px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: slideInLeft 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.split-title {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text);
}

.split-title em {
    color: var(--pink);
}

.split-names {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.split-name-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.split-name-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--subtle);
    width: 2.4rem;
    text-align: right;
}

.split-name-val {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    color: var(--text);
    line-height: 1.2;
}

.split-key {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-top: auto;
}

.sk-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.4rem;
    text-align: center;
}

.sk-letter {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--pink);
    line-height: 1;
    display: block;
}

.sk-word {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--subtle);
    margin-top: 0.2rem;
    display: block;
}

/* ── SIDE BUTTON ROW ── */
.side-btn-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.side-btn-row .again-side-btn,
.side-btn-row .share-wa-btn {
    flex: 1;
    min-width: 0;
}

.again-side-btn {
    height: 40px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Geist', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.again-side-btn:hover {
    border-color: var(--pink);
    color: var(--pink);
    background: var(--pink-xlt);
}

.share-wa-btn {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #25D366;
    border: 1px solid #25D366;
    border-radius: 8px;
    font-family: 'Geist', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.share-wa-btn:hover:not(:disabled) {
    background: #1ebe5d;
    border-color: #1ebe5d;
}

.share-wa-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.share-wa-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.split-right {
    flex: 1;
    padding: clamp(2rem, 4dvh, 3.5rem) clamp(2rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.5s ease 0.1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.step-card {
    border: 1px solid var(--border2);
    border-radius: 14px;
    background: var(--bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.step-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-head {
    padding: 0.9rem 1.4rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pink);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.step-body {
    padding: 1.4rem;
}

.name-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.name-tag {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle);
    width: 2.2rem;
    text-align: right;
    flex-shrink: 0;
}

.lchip {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1.05rem;
    background: var(--pink-xlt);
    color: var(--pink);
    border: 1px solid var(--pink-lt);
    transition: transform 0.3s, background 0.2s, color 0.2s, border-color 0.2s;
}

.lchip.cancelled {
    transform: scale(1);
    background: #fdf1f7;
    color: #c35a86;
    border-color: #efc6d8;
}

.lchip.cancelled::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    width: 48px;
    height: 2px;
    background: #d81b69;
    transform: rotate(-38deg);
    border-radius: 999px;
    pointer-events: none;
}

.lchip.cancelling {
    animation: lPop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes lPop {
    0% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.45) rotate(-10deg);
        background: #ffc0d8;
        color: #fff;
        border-color: transparent;
    }

    100% {
        transform: scale(1);
        background: #fdf1f7;
        color: #c35a86;
        border-color: #efc6d8;
    }
}

.cancel-note {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
}

.cancel-note strong {
    color: var(--pink);
}

.count-display {
    text-align: center;
    padding: 0.5rem 0;
}

.count-big {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(5rem, 9vw, 8rem);
    color: var(--pink);
    line-height: 1;
}

.count-sub {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.4rem;
    letter-spacing: 0.06em;
}

.fc-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
    overflow: hidden;
}

.fc-row {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.25rem;
    width: max-content;
    min-width: 100%;
    margin-inline: auto;
    align-items: center;
}

.fc-chip {
    width: clamp(52px, 7vw, 66px);
    height: clamp(52px, 7vw, 66px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(1.3rem, 2.8vw, 1.75rem);
    background: var(--pink-xlt);
    color: var(--pink);
    border: 1.5px solid var(--pink-lt);
    transition: opacity 0.3s, transform 0.3s, background 0.2s, color 0.2s, border-color 0.2s;
    overflow: hidden;
    flex: 0 0 auto;
    transform-origin: center;
}

.fc-letter {
    line-height: 1;
}

.fc-mini {
    position: absolute;
    right: 6px;
    bottom: 5px;
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    font-family: 'Geist', sans-serif;
    font-style: normal;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in oklab, var(--pink) 16%, transparent);
    color: var(--pink);
}

.fc-chip.eliminated {
    opacity: 1;
    transform: scale(1);
    background: color-mix(in oklab, var(--pink) 9%, var(--bg));
    color: color-mix(in oklab, var(--pink) 72%, var(--text));
    border-color: color-mix(in oklab, var(--pink) 30%, var(--border));
}

.fc-chip.eliminated::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: calc(100% + 20px);
    height: 2px;
    background: var(--pink);
    transform: translateY(-50%) rotate(-33deg);
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.95;
}

.fc-chip.eliminated .fc-mini {
    opacity: 0;
}

.fc-chip.counting {
    animation: fcPulse 0.2s ease;
}

@keyframes fcPulse {
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 18px rgba(240, 21, 106, 0.35);
    }
}

.fc-chip.eliminating {
    animation: fcElim 0.46s ease forwards;
}

@keyframes fcElim {
    0% {
        transform: scale(1);
    }

    38% {
        transform: scale(1.55) rotate(10deg);
        background: #ffc0d8;
        color: #fff;
        border-color: transparent;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        background: color-mix(in oklab, var(--pink) 9%, var(--bg));
        color: color-mix(in oklab, var(--pink) 72%, var(--text));
        border-color: color-mix(in oklab, var(--pink) 30%, var(--border));
    }
}

.fc-chip.fc-winner {
    animation: fcWin 0.8s ease forwards;
}

@keyframes fcWin {
    0% {
        transform: scale(1);
    }

    38% {
        transform: scale(1.28);
        box-shadow: 0 0 44px rgba(240, 21, 106, 0.45);
    }

    65% {
        transform: scale(1.14);
    }

    100% {
        transform: scale(1.07);
        background: var(--pink);
        color: #fff;
        border-color: var(--pink);
        box-shadow: 0 0 20px rgba(240, 21, 106, 0.3);
    }
}

.fc-status {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
    min-height: 1.2rem;
    letter-spacing: 0.04em;
}

body[data-theme="dark"] .fc-mini {
    background: color-mix(in oklab, var(--pink) 28%, transparent);
    color: #ffd7ea;
}

.result-card {
    border: 1px solid var(--border2);
    border-radius: 14px;
    background: var(--bg);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.07);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.result-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-top {
    background: var(--pink);
    padding: clamp(2rem, 4vw, 2.8rem) 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-top::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.15), transparent 55%);
    pointer-events: none;
}

.r-word {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(3rem, 7vw, 5rem);
    color: #fff;
    line-height: 0.9;
    letter-spacing: -0.02em;
    animation: rSlide 0.45s ease 0.1s both;
}

.r-pair {
    margin-top: 0.8rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    animation: rSlide 0.45s ease 0.2s both;
}

@keyframes rSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-bottom {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.r-msg {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text);
    font-weight: 300;
    animation: rSlide 0.45s ease 0.3s both;
}

.r-quote {
    padding: 0.9rem 1.1rem;
    background: var(--pink-xlt);
    border-left: 2.5px solid var(--pink);
    border-radius: 0 6px 6px 0;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--pink);
    line-height: 1.55;
    animation: rSlide 0.45s ease 0.4s both;
}

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

@media (max-width:768px) {
    nav {
        height: auto;
        min-height: calc(52px + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 1rem 0.35rem;
    }

    .theme-toggle {
        min-height: 32px;
        padding: 0.36rem 0.62rem;
        font-size: 0.61rem;
    }

    #hero-state {
        min-height: 100dvh;
        padding: calc(52px + env(safe-area-inset-top) + 0.7rem) 0 calc(1.1rem + env(safe-area-inset-bottom));
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-center {
        width: min(100%, 480px);
        max-width: 100%;
        padding: 0 1rem 0.5rem;
        margin: 0 auto;
        gap: 1.1rem;
    }

    .hero-h1 {
        font-size: clamp(2.35rem, 11.8vw, 3.2rem);
        line-height: 0.94;
    }

    .hero-sub {
        max-width: 100%;
        font-size: 0.94rem;
    }

    .hero-form {
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
    }

    #hero-state::before,
    #hero-state::after {
        display: none;
    }

    .hf-field {
        padding: 1.05rem 1rem 0.85rem;
    }

    .hf-divider {
        padding: 0.5rem 1rem;
    }

    .hf-foot {
        padding: 0.85rem 1rem 1rem;
    }

    .go-btn {
        height: 50px;
        font-size: 0.92rem;
    }

    input[type="text"] {
        text-align: left;
        font-size: clamp(1.16rem, 6.8vw, 1.38rem);
    }

    .hero-key {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .hk-item {
        text-align: center;
        font-size: 0.68rem;
        padding: 0.4rem 0.35rem;
        border-radius: 8px;
        min-height: 54px;
    }

    .hk-item strong {
        font-size: 1.1rem;
    }

    .hero-note {
        font-size: 0.62rem;
        padding-top: 0.58rem;
    }

    #split-state {
        padding-top: calc(52px + env(safe-area-inset-top) + 0.65rem);
    }

    #split-state.transitioning {
        top: calc(52px + env(safe-area-inset-top));
    }

    #split-state.active {
        flex-direction: column;
    }

    .split-left {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1.35rem 1rem 1.05rem;
        gap: 0.82rem;
        animation: none;
        transform: none;
        background: color-mix(in oklab, var(--surface) 87%, transparent);
    }

    .split-title {
        font-size: clamp(1.9rem, 8.8vw, 2.45rem);
        text-align: center;
    }

    .split-names {
        align-items: center;
    }

    .split-name-row {
        justify-content: center;
    }

    .split-name-val {
        font-size: clamp(1.1rem, 6vw, 1.35rem);
    }

    .split-key {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
        margin-top: 0.25rem;
    }

    .sk-item {
        padding: 0.55rem 0.3rem;
        border-radius: 8px;
    }

    .sk-letter {
        font-size: 1.15rem;
    }

    .sk-word {
        font-size: 0.52rem;
    }

    .split-right {
        padding: 1.25rem 1rem calc(2.5rem + env(safe-area-inset-bottom));
        gap: 0.9rem;
        width: 100%;
        max-width: 100%;
    }

    .side-btn-row {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        width: min(560px, calc(100vw - 2rem));
        bottom: calc(0.85rem + env(safe-area-inset-bottom));
        z-index: 120;
        gap: 0.5rem;
    }

    .side-btn-row .again-side-btn,
    .side-btn-row .share-wa-btn {
        flex: 1;
        height: 46px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
    }

    .side-btn-row .again-side-btn {
        background: var(--bg);
    }

    #split-state.active .split-right {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    .step-head {
        padding: 0.72rem 0.95rem;
    }

    .step-body {
        padding: 1.2rem 1rem;
    }

    .name-row {
        gap: 0.28rem;
    }

    .name-tag {
        width: 100%;
        text-align: left;
        margin-bottom: 0.2rem;
    }

    .lchip {
        width: 32px;
        height: 32px;
        font-size: 0.92rem;
    }

    .lchip.cancelled::after {
        width: 42px;
        left: -5px;
    }

    .count-big {
        font-size: clamp(3rem, 17vw, 4.8rem);
    }

    .fc-chip {
        width: clamp(44px, 12.5vw, 56px);
        height: clamp(44px, 12.5vw, 56px);
        font-size: clamp(1.05rem, 5vw, 1.3rem);
    }

    .fc-row {
        flex-wrap: nowrap;
        gap: 0.38rem;
        justify-content: center;
    }

    .result-top {
        padding: 1.35rem 1rem;
    }

    .r-word {
        font-size: clamp(2.2rem, 14vw, 3.2rem);
    }

    .r-pair {
        font-size: 0.62rem;
        letter-spacing: 0.12em;
    }

    .result-bottom {
        padding: 1.05rem;
        gap: 0.85rem;
    }

    .r-msg {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .r-quote {
        font-size: 0.95rem;
        line-height: 1.45;
    }
}

@media (max-width:420px) {
    nav {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
        padding-bottom: 0.3rem;
    }

    .hero-center {
        width: 100%;
        padding-left: 0.8rem;
        padding-right: 0.8rem;
        padding-bottom: 0.7rem;
    }

    .hero-h1 {
        font-size: clamp(2rem, 13.2vw, 2.65rem);
    }

    .hf-label {
        font-size: 0.6rem;
    }

    .split-name-label {
        width: 2.1rem;
        font-size: 0.58rem;
    }

    .split-key {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-key {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.38rem;
    }

    .fc-row {
        gap: 0.3rem;
        justify-content: center;
    }

    .fc-chip {
        width: clamp(40px, 11.8vw, 48px);
        height: clamp(40px, 11.8vw, 48px);
        font-size: clamp(0.95rem, 4.8vw, 1.15rem);
    }

    .fc-mini {
        min-width: 13px;
        height: 13px;
        font-size: 0.5rem;
        right: 4px;
        bottom: 4px;
    }
}

@media (prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.ff-btn {
    margin-top: 0.8rem;
    align-self: center;
    height: 32px;
    padding: 0 1.1rem;
    background: none;
    border: 1px solid var(--border2);
    border-radius: 999px;
    font-family: 'Geist', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ff-btn:hover:not(:disabled) {
    border-color: var(--pink);
    color: var(--pink);
    background: var(--pink-xlt);
}

.ff-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.subtle-footer {
    display: none;
    width: fit-content;
    margin: 0 auto 1rem;
    padding: 0.25rem 0.75rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--pink);
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.85;
}

.subtle-footer a {
    color: var(--pink);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.subtle-footer a:visited {
    color: var(--pink);
}

#split-state.active+.subtle-footer {
    display: block;
}

@media (max-width:768px) {
    #split-state.active+.subtle-footer {
        margin-bottom: calc(0.75rem + env(safe-area-inset-bottom));
        padding-bottom: 0;
    }
}