/*
    brakeapp.kr 홈페이지 스타일 — ver 1.000
    - 브레이크(Brake) by 심플리디자인 원페이지
    - 순서: 글꼴 → 색 → 기본 → 떠다니는 배경 → 머리 → 히어로 → 그림(신호등·자동차) → 이름 띠
            → 세 걸음 → 먼저 나오는 3개 → 전체 시리즈 → 약속 → 바닥글 → 알림·맨 위로 → 폭별 → 움직임 줄이기
    - 움직임은 모두 CSS. 'prefers-reduced-motion' 설정이면 맨 아래에서 전부 꺼요.
*/

/* ---- 글꼴: 주아(Jua, SIL OFL 1.1) — 이 페이지에 쓰는 글자만 담은 작은 파일 ---- */
@font-face {
    font-family: "BrakeJua";
    src: url("../fonts/jua-brake.woff2?v=1.000") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---- 색·크기 약속 ---- */
:root {
    --ink: #1f2430;
    --ink-2: #4a5163;
    --muted: #7b8295;
    --red: #ff4b3e;
    --red-dk: #d9362b;
    --mustard: #ffd23f;
    --lav: #c9b8ff;
    --pink: #ffc6e0;
    --sky: #8ec5ff;
    --mint: #9eebcf;
    --cream: #fff8ee;
    --line: #ece6dc;
    --card: #ffffff;
    --radius: 24px;
    --shadow: 0 10px 30px rgba(31, 36, 48, 0.08);
    --shadow-up: 0 18px 40px rgba(31, 36, 48, 0.14);
    --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif;
    --font-fun: "BrakeJua", var(--font);
    --bounce: cubic-bezier(0.2, 0.9, 0.3, 1.35);

    /* 카테고리 색 */
    --c-mind: #ff7aa8;
    --c-money: #f5b700;
    --c-work: #4d8bff;
    --c-love: #ff5f7e;
    --c-family: #ff9447;
    --c-travel: #8a6cff;
    --c-life: #22b98c;
    --c-hobby: #26b4e8;
}

/* ---- 기본 ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* clip 이 되는 브라우저는 sticky 머리가 안 깨지도록 clip 으로 */
@supports (overflow-x: clip) {
    html {
        overflow-x: clip;
    }
}

body {
    margin: 0;
    min-width: 320px;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    word-break: keep-all;
    overflow-wrap: anywhere;
    background: linear-gradient(120deg, #fff8ee, #ffeef6, #f1ecff, #eaf5ff, #fff6dc, #fff8ee);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: bgFlow 24s ease-in-out infinite;
    overflow-x: hidden;
}

@supports (overflow-x: clip) {
    body {
        overflow-x: clip;
    }
}

/* 흐르는 그라데이션 배경 */
@keyframes bgFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

/* 글로만 읽히는 글 (읽기 도구용) */
.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
}

.skip:focus {
    top: 12px;
}

/* 키보드 포커스 테두리 */
:focus-visible {
    outline: 3px solid #3a5bff;
    outline-offset: 3px;
}

.wrap {
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

main,
.ft {
    position: relative;
    z-index: 1;
}

/* 보일 듯 말 듯한 스크롤바 (wally-ui 규칙) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: rgba(31, 36, 48, 0.14);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(31, 36, 48, 0.28);
}

@supports (-moz-appearance: none) {
    * {
        scrollbar-width: thin;
        scrollbar-color: rgba(31, 36, 48, 0.18) transparent;
    }
}

/* ==== 떠다니는 배경 ==== */
.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.fl {
    position: absolute;
    display: block;
    animation: floaty 9s ease-in-out infinite;
}

/* 둥실둥실 위아래 + 살짝 옆으로 */
@keyframes floaty {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(14px, -18px) rotate(6deg);
    }

    66% {
        transform: translate(-10px, 10px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* 구름: 둥근 몸통 + 혹 두 개 */
.cloud {
    width: 120px;
    height: 40px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 20px rgba(142, 197, 255, 0.25);
    animation: cloudDrift 38s linear infinite;
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: inherit;
}

.cloud::before {
    width: 54px;
    height: 54px;
    left: 18px;
    top: -26px;
}

.cloud::after {
    width: 40px;
    height: 40px;
    left: 58px;
    top: -18px;
}

/* 구름은 화면을 천천히 가로질러요 (화면 밖으로 나가도 .sky 가 잘라서 가로 스크롤 없음) */
@keyframes cloudDrift {
    0% {
        transform: translateX(-20vw);
    }

    100% {
        transform: translateX(120vw);
    }
}

.c1 {
    left: 0;
    top: 12%;
    animation-duration: 46s;
}

.c2 {
    left: 0;
    top: 46%;
    transform: scale(0.7);
    animation-duration: 60s;
    animation-delay: -22s;
    opacity: 0.8;
}

.c3 {
    left: 0;
    top: 78%;
    animation-duration: 52s;
    animation-delay: -38s;
    opacity: 0.7;
}

.star {
    font-size: 22px;
    line-height: 1;
    color: var(--mustard);
    text-shadow: 0 2px 8px rgba(255, 210, 63, 0.5);
    animation: twinkle 3.2s ease-in-out infinite;
}

/* 별 반짝 */
@keyframes twinkle {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(0.6) rotate(40deg);
        opacity: 0.45;
    }
}

.s1 {
    left: 8%;
    top: 30%;
}

.s2 {
    left: 86%;
    top: 18%;
    color: #ff9ec4;
    animation-delay: -1s;
}

.s3 {
    left: 72%;
    top: 64%;
    font-size: 16px;
    animation-delay: -2s;
}

.s4 {
    left: 18%;
    top: 86%;
    color: var(--sky);
    animation-delay: -0.5s;
}

.dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.d1 {
    left: 92%;
    top: 40%;
    background: var(--pink);
}

.d2 {
    left: 4%;
    top: 60%;
    width: 26px;
    height: 26px;
    background: var(--lav);
    animation-delay: -3s;
}

.d3 {
    left: 56%;
    top: 8%;
    width: 12px;
    height: 12px;
    background: var(--mint);
    animation-delay: -5s;
}

/* 세모 */
.tri {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid var(--sky);
    opacity: 0.7;
    animation-duration: 12s;
}

.t1 {
    left: 30%;
    top: 22%;
}

.t2 {
    left: 80%;
    top: 84%;
    border-bottom-color: var(--mustard);
    animation-delay: -6s;
}

/* 작은 멈춤 표지판 */
.oct {
    width: 26px;
    height: 26px;
    background: var(--red);
    clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
    opacity: 0.55;
    animation: spinSlow 14s linear infinite;
}

@keyframes spinSlow {
    0% {
        transform: rotate(0deg) translateY(0);
    }

    50% {
        transform: rotate(180deg) translateY(-14px);
    }

    100% {
        transform: rotate(360deg) translateY(0);
    }
}

.o1 {
    left: 64%;
    top: 34%;
}

.o2 {
    left: 12%;
    top: 8%;
    width: 18px;
    height: 18px;
    animation-delay: -7s;
}

/* ==== 머리 ==== */
.hd {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 248, 238, 0.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.hd.scrolled {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 24px rgba(31, 36, 48, 0.08);
}

.hd-in {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.logo-dot {
    display: block;
    width: 34px;
    height: 34px;
    flex: none;
}

.logo-dot polygon {
    fill: var(--red);
}

.logo-dot rect {
    fill: #fff;
}

.logo:hover .logo-dot {
    animation: wiggle 0.5s ease;
}

.logo-txt {
    font-family: var(--font-fun);
    font-size: 26px;
    line-height: 1;
    letter-spacing: 0.02em;
}

.logo-sub {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.on {
    background: #fff;
    color: var(--red);
}

.hd-cta {
    flex: none;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.2s var(--bounce), background 0.2s ease;
}

.hd-cta:hover {
    background: var(--red);
    transform: translateY(-2px) scale(1.04);
}

/* ==== 히어로 ==== */
/* 기울인 이름 띠가 화면 밖으로 넘치지 않게 히어로에서 잘라요 (휴대폰 옆으로 밀림 방지) */
.hero {
    position: relative;
    padding: 40px 0 24px;
    overflow: hidden;
}

.hero-in {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-txt {
    min-width: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-2);
}

/* 깜빡이는 빨간 불 */
.blink {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 75, 62, 0.6);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 75, 62, 0);
    }
}

.hero-title {
    margin-top: 18px;
    font-family: var(--font-fun);
    font-weight: 400;
    font-size: clamp(44px, 6.4vw, 84px);
    line-height: 1.12;
    letter-spacing: -0.01em;
}

/* flex 라서 글자 사이 줄바꿈 공백이 화면에 안 생겨요 (띄어쓰기는 .sp 가 맡아요) */
.ht-line {
    display: flex;
    flex-wrap: wrap;
}

.ht-red {
    color: var(--red);
}

/* 제목 글자 하나하나가 통통 떨어진 뒤 살랑살랑 흔들려요 */
.wl {
    display: inline-block;
    animation:
        dropIn 0.7s var(--bounce) both,
        wob 2.8s ease-in-out infinite;
    animation-delay:
        calc(var(--i) * 0.06s),
        calc(var(--i) * -0.18s);
}

.sp {
    display: inline-block;
    width: 0.28em;
}

@keyframes dropIn {
    0% {
        opacity: 0;
        transform: translateY(-40px) rotate(-12deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes wob {
    0%,
    100% {
        translate: 0 0;
        rotate: 0deg;
    }

    25% {
        translate: 0 -4px;
        rotate: -3deg;
    }

    75% {
        translate: 0 2px;
        rotate: 3deg;
    }
}

.wl:hover {
    color: var(--mustard);
}

/* 타이핑 줄 */
.hero-type {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 18px;
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 700;
}

.type-box {
    display: inline-flex;
    align-items: center;
    min-width: 8.6em;
    min-height: 1.8em;
    padding: 2px 14px;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-fun);
    font-weight: 400;
    white-space: nowrap;
}

.caret {
    display: inline-block;
    width: 3px;
    height: 1.05em;
    margin-left: 3px;
    border-radius: 2px;
    background: var(--mustard);
    animation: caret 0.9s steps(1) infinite;
}

@keyframes caret {
    50% {
        opacity: 0;
    }
}

.type-tail {
    color: var(--ink-2);
}

.hero-lead {
    margin-top: 16px;
    font-size: 18px;
    color: var(--ink-2);
}

.hero-lead b {
    color: var(--ink);
}

/* 스토어 배지 (아직 링크 없음 — 출시되면 a 태그로 바꿔요) */
.store {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.badge-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 14px;
    border-radius: 16px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
    animation: bob 3s ease-in-out infinite;
}

.badge-play svg {
    width: 26px;
    height: 26px;
    fill: #3ddc84;
}

.bp-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.bp-txt small {
    font-size: 12px;
    opacity: 0.75;
}

.bp-txt b {
    font-size: 17px;
    white-space: nowrap;
}

.badge-ios {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border: 1.5px dashed #c9cdd6;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

/* 위아래로 살짝 둥실 */
@keyframes bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* 숫자 네 칸 */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 26px;
    max-width: 520px;
}

.stats li {
    padding: 12px 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow);
    text-align: center;
}

.stats b {
    display: block;
    font-family: var(--font-fun);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.1;
    color: var(--red);
}

.stats span {
    display: block;
    font-size: 13px;
    color: var(--ink-2);
    white-space: nowrap;
}

/* ==== 그림: 하늘 + 신호등 + 멈춤 표지판 + 서는 자동차 + 페달 ==== */
.scene {
    position: relative;
    height: 400px;
    min-width: 0;
    border-radius: 36px;
    overflow: hidden;
    background: linear-gradient(180deg, #bfe0ff 0%, #e4d9ff 55%, #ffe0ee 100%);
    box-shadow: var(--shadow-up);
}

/* 해 */
.sc-sun {
    position: absolute;
    right: 34px;
    top: 30px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #fff6c2, var(--mustard));
    box-shadow: 0 0 0 12px rgba(255, 210, 63, 0.22), 0 0 0 26px rgba(255, 210, 63, 0.12);
    animation: sunPulse 4s ease-in-out infinite;
}

@keyframes sunPulse {
    50% {
        transform: scale(1.08);
    }
}

/* 신호등: 자동차 움직임(7초)과 같은 박자로 초록 → 노랑 → 빨강 */
.sc-light {
    position: absolute;
    left: 40px;
    top: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 20px;
    background: var(--ink);
    box-shadow: 0 10px 20px rgba(31, 36, 48, 0.25);
    animation: bob 3.4s ease-in-out infinite;
}

.sc-light::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 8px;
    height: 120px;
    margin-left: -4px;
    background: #5a6275;
}

.sc-light i {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3a4152;
}

.l-grn {
    animation: lightGrn 7s linear infinite;
}

.l-yel {
    animation: lightYel 7s linear infinite;
}

.l-red {
    animation: lightRed 7s linear infinite;
}

@keyframes lightGrn {
    0%,
    30% {
        background: #3ddc84;
        box-shadow: 0 0 16px #3ddc84;
    }

    31%,
    84% {
        background: #3a4152;
        box-shadow: none;
    }

    85%,
    100% {
        background: #3ddc84;
        box-shadow: 0 0 16px #3ddc84;
    }
}

@keyframes lightYel {
    0%,
    30% {
        background: #3a4152;
        box-shadow: none;
    }

    31%,
    42% {
        background: var(--mustard);
        box-shadow: 0 0 16px var(--mustard);
    }

    43%,
    100% {
        background: #3a4152;
        box-shadow: none;
    }
}

@keyframes lightRed {
    0%,
    42% {
        background: #3a4152;
        box-shadow: none;
    }

    43%,
    84% {
        background: var(--red);
        box-shadow: 0 0 18px var(--red);
    }

    85%,
    100% {
        background: #3a4152;
        box-shadow: none;
    }
}

/* 멈춤 표지판 '전' */
.sc-sign {
    position: absolute;
    left: 62%;
    bottom: 96px;
    width: 76px;
    transform-origin: 50% 100%;
    animation: signNod 7s ease-in-out infinite;
}

.sc-sign svg {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
}

.sc-sign polygon {
    fill: var(--red);
    stroke: #fff;
    stroke-width: 6;
}

.sc-sign text {
    font-family: var(--font-fun);
    font-size: 46px;
    fill: #fff;
    text-anchor: middle;
    dominant-baseline: central;
}

.sc-sign .pole {
    position: absolute;
    left: 50%;
    top: 66px;
    width: 8px;
    height: 70px;
    margin-left: -4px;
    border-radius: 4px;
    background: #8a90a0;
}

/* 차가 설 때 표지판이 '잘했어' 하고 고개를 끄덕여요 */
@keyframes signNod {
    0%,
    44%,
    60%,
    100% {
        transform: rotate(0deg);
    }

    48% {
        transform: rotate(-8deg);
    }

    54% {
        transform: rotate(6deg);
    }
}

/* 길 */
.sc-road {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 86px;
    background: #4a5163;
}

.sc-road::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 14px;
    background: #9eebcf;
    border-radius: 0 0 0 0;
}

/* 길 가운데 점선이 흘러요 */
.lane {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 6px;
    margin-top: -3px;
    background: repeating-linear-gradient(90deg, #fff 0 28px, transparent 28px 56px);
    background-size: 56px 6px;
    opacity: 0.85;
    animation: laneMove 7s linear infinite;
}

@keyframes laneMove {
    0% {
        background-position: 0 0;
    }

    40% {
        background-position: -224px 0;
    }

    44%,
    84% {
        background-position: -236px 0;
    }

    100% {
        background-position: -336px 0;
    }
}

/* 자동차: 들어와서 → 빨간불에 '끼익' 서고 → 초록불에 떠나요 */
.sc-car {
    position: absolute;
    left: 0;
    bottom: 44px;
    width: 140px;
    animation: carDrive 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.sc-car svg {
    width: 140px;
    height: 82px;
    animation: carTilt 7s ease-in-out infinite;
    transform-origin: 70% 90%;
}

.car-body {
    fill: var(--red);
}

.car-top {
    fill: #ff7a6e;
}

.car-win {
    fill: #dff1ff;
}

.car-eye {
    fill: #fff6c2;
}

.car-wheel {
    fill: var(--ink);
}

.car-hub {
    fill: #c9cdd6;
}

@keyframes carDrive {
    0% {
        transform: translateX(-160px);
    }

    40% {
        transform: translateX(calc(var(--stop, 300px) - 6px));
    }

    44% {
        transform: translateX(var(--stop, 300px));
    }

    84% {
        transform: translateX(var(--stop, 300px));
    }

    100% {
        transform: translateX(calc(var(--stop, 300px) + 520px));
    }
}

/* 설 때 앞으로 꾸벅, 떠날 때 뒤로 살짝 */
@keyframes carTilt {
    0%,
    38% {
        transform: rotate(0deg);
    }

    43% {
        transform: rotate(4deg);
    }

    47%,
    84% {
        transform: rotate(0deg);
    }

    88% {
        transform: rotate(-3deg);
    }

    92%,
    100% {
        transform: rotate(0deg);
    }
}

/* 설 때 뒤로 나는 연기 */
.puff {
    position: absolute;
    left: -6px;
    bottom: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    animation: puff 7s ease-out infinite;
}

.p2 {
    left: -20px;
    bottom: 14px;
    width: 12px;
    height: 12px;
    animation-delay: 0.12s;
}

@keyframes puff {
    0%,
    40% {
        opacity: 0;
        transform: translate(0, 0) scale(0.6);
    }

    44% {
        opacity: 1;
        transform: translate(-6px, -4px) scale(1);
    }

    56%,
    100% {
        opacity: 0;
        transform: translate(-30px, -16px) scale(1.6);
    }
}

/* 말풍선 '멈추면, 이긴다!' — 차가 섰을 때 뿅 */
.sc-bubble {
    position: absolute;
    left: 50%;
    top: 112px;
    padding: 10px 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    font-family: var(--font-fun);
    font-size: 20px;
    white-space: nowrap;
    transform: translateX(-50%) scale(0);
    animation: bubblePop 7s var(--bounce) infinite;
}

.sc-bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    background: #fff;
    transform: rotate(45deg);
}

@keyframes bubblePop {
    0%,
    45% {
        transform: translateX(-50%) scale(0);
    }

    50%,
    80% {
        transform: translateX(-50%) scale(1);
    }

    84%,
    100% {
        transform: translateX(-50%) scale(0);
    }
}

/* 브레이크 페달 (누르면 JS 가 색종이를 뿌려요) */
.pedal {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 0 #e3d9cc, var(--shadow);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.pedal:hover {
    transform: translateY(-2px);
}

.pedal:active,
.pedal.press {
    transform: translateY(5px);
    box-shadow: 0 1px 0 #e3d9cc, var(--shadow);
}

.pedal-pad {
    width: 38px;
    height: 30px;
    border-radius: 8px;
    background: repeating-linear-gradient(0deg, var(--ink) 0 4px, #3a4152 4px 8px);
}

.pedal-txt {
    font-size: 15px;
    white-space: nowrap;
}

/* 페달 눌렀을 때 그림 전체가 '끼익' 흔들림 */
.scene.hit {
    animation: shake 0.45s ease;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px) rotate(-0.6deg);
    }

    40% {
        transform: translateX(7px) rotate(0.5deg);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(3px);
    }
}

/* 색종이 조각 (JS 가 만들고 1.4초 뒤 지움) */
.confetti {
    position: absolute;
    z-index: 4;
    width: 10px;
    height: 14px;
    border-radius: 3px;
    pointer-events: none;
    animation: confetti 1.3s ease-out forwards;
}

@keyframes confetti {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    }
}

/* ==== 흐르는 이름 띠 ==== */
/* 기울인 띠의 양 끝이 비어 보이지 않게 화면보다 조금 넓게 (넘친 부분은 body 가 잘라요) */
.marquee {
    margin: 56px -60px 0;
    padding: 14px 0;
    background: var(--ink);
    transform: rotate(-1.5deg);
    box-shadow: var(--shadow-up);
}

.mq-row {
    overflow: hidden;
    padding: 5px 0;
}

.mq-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: marquee 70s linear infinite;
}

.mq-rev .mq-track {
    animation-direction: reverse;
    animation-duration: 80s;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.mq-pill {
    flex: none;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: var(--font-fun);
    font-size: 18px;
    white-space: nowrap;
}

/* ==== 이름 끝 '전' 표지판 글자 (카드·띠 공통) ==== */
.jeon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    margin-left: 0.18em;
    vertical-align: -0.2em;
    background: var(--red);
    color: #fff;
    font-size: 0.8em;
    line-height: 1;
    clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}

/* ==== 구역 공통 ==== */
.sec {
    padding: 96px 0 0;
}

.sec-hd {
    margin-bottom: 36px;
    text-align: center;
}

.sec-kicker {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--red);
    font-size: 14px;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.sec-title {
    margin-top: 14px;
    font-family: var(--font-fun);
    font-weight: 400;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.2;
}

.sec-lead {
    margin: 12px auto 0;
    font-size: 17px;
    color: var(--ink-2);
}

/* ==== 화면에 들어올 때 통통 등장 (JS 가 있을 때만 숨겼다가 보여요) ==== */
.js .rv {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    transition:
        opacity 0.6s ease,
        transform 0.7s var(--bounce);
    transition-delay: var(--d, 0s);
}

.js .rv.in {
    opacity: 1;
    transform: none;
}

/* ==== 세 걸음 ==== */
.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* 걸음 사이를 잇는 흐르는 점선 (넓은 화면만) */
.steps::before {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    top: 74px;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--red) 0 12px, transparent 12px 24px);
    background-size: 24px 4px;
    opacity: 0.35;
    animation: dashFlow 1.2s linear infinite;
}

@keyframes dashFlow {
    100% {
        background-position: 24px 0;
    }
}

.step {
    position: relative;
    padding: 30px 24px 28px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    text-align: center;
}

.step:hover {
    box-shadow: var(--shadow-up);
}

.step:hover .step-ico {
    animation: boing 0.6s var(--bounce);
}

.step-no {
    position: absolute;
    left: 18px;
    top: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-fun);
    font-size: 17px;
    line-height: 30px;
}

.step-ico {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 28px;
    background: #fff4d6;
    font-size: 44px;
    line-height: 1;
}

.step:nth-child(2) .step-ico {
    background: #ffe3e0;
}

.step:nth-child(3) .step-ico {
    background: #e7f8f0;
}

/* 가운데 🛑 는 꾹 눌리듯 숨쉬기 */
.ico-stop {
    animation: press 1.8s ease-in-out infinite;
}

@keyframes press {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9) translateY(3px);
    }
}

.step h3 {
    margin-top: 16px;
    font-family: var(--font-fun);
    font-weight: 400;
    font-size: 28px;
}

.step p {
    margin-top: 6px;
    color: var(--ink-2);
}

/* 통 튀어 오르기 */
@keyframes boing {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.18, 0.86) translateY(4px);
    }

    55% {
        transform: scale(0.92, 1.12) translateY(-10px);
    }

    80% {
        transform: scale(1.04, 0.97);
    }

    100% {
        transform: scale(1);
    }
}

/* 좌우로 살랑 */
@keyframes wiggle {
    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-6deg);
    }

    50% {
        transform: rotate(5deg);
    }

    75% {
        transform: rotate(-3deg);
    }
}

/* ==== 먼저 나오는 3개 ==== */
.feat-list {
    display: grid;
    gap: 28px;
}

.feat {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
    gap: 0;
    border-radius: 32px;
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.feat:hover {
    box-shadow: var(--shadow-up);
}

/* 두 번째 카드는 그림을 오른쪽에 (지그재그) */
.feat:nth-child(2) .feat-art {
    order: 2;
}

.feat-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 28px;
    overflow: hidden;
}

.feat-art svg {
    width: 100%;
    max-width: 440px;
    height: auto;
    overflow: visible;
}

.f-sago .feat-art {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 75, 62, 0.12) 0 18px, transparent 19px),
        radial-gradient(circle at 80% 76%, rgba(77, 139, 255, 0.14) 0 24px, transparent 25px),
        radial-gradient(circle at 70% 18%, rgba(155, 107, 255, 0.14) 0 12px, transparent 13px),
        #fff1b8;
}

.f-trip .feat-art {
    background: linear-gradient(180deg, #cdbbff 0%, #f3c6ea 70%, #ffd9e8 100%);
}

/* 소리 치기 전: 여행 가기 전처럼 색이 천천히 흘러요 */
.f-sori .feat-art {
    background: linear-gradient(120deg, #a8ecd8, #bfe3ff, #ffd6c2, #e5d6ff, #a8ecd8);
    background-size: 300% 300%;
    animation: bgFlow 12s ease-in-out infinite;
}

.feat-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 40px;
    min-width: 0;
}

.feat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-and,
.tag-cat {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tag-and {
    background: #e3f9ec;
    color: #138a4a;
}

.tag-cat {
    background: #f3f1ec;
    color: var(--ink-2);
}

.feat-name {
    margin-top: 12px;
    font-family: var(--font-fun);
    font-weight: 400;
    font-size: clamp(32px, 3.6vw, 42px);
    line-height: 1.2;
}

.feat-copy {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
}

.feat-pts {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.feat-pts li {
    position: relative;
    padding-left: 26px;
    color: var(--ink-2);
}

.feat-pts li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    border-radius: 6px;
    background: #fff0d1;
    color: #d48b00;
    font-size: 12px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
}

/* 위험 모드 안내는 장난 없이 단단하게 */
.feat-pts .pt-safe {
    padding: 10px 12px 10px 38px;
    border-radius: 14px;
    background: #eef2f8;
    color: #2b3a55;
    font-weight: 600;
}

.feat-pts .pt-safe::before {
    content: "!";
    left: 12px;
    top: 10px;
    background: #2b3a55;
    color: #fff;
}

.who {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.who li {
    padding: 6px 12px;
    border-radius: 999px;
    background: #eefaf6;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.2s var(--bounce);
}

.who li:hover {
    transform: translateY(-3px) rotate(-3deg);
}

.feat-store {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.mini-play,
.mini-ios {
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.mini-play {
    background: var(--ink);
    color: #fff;
}

.mini-ios {
    border: 1.5px dashed #c9cdd6;
    color: var(--muted);
}

/* ---- 로고 그림 안 글자 공통 ---- */
.lt {
    font-family: var(--font-fun);
    font-size: 60px;
    text-anchor: middle;
    dominant-baseline: central;
    stroke: #2b2240;
    stroke-width: 6px;
    stroke-linejoin: round;
    paint-order: stroke fill;
    transform-box: fill-box;
    transform-origin: center;
}

/* '전' 멈춤 표지판 */
.jeon-oct polygon {
    fill: var(--red);
    stroke: #2b2240;
    stroke-width: 5px;
    stroke-linejoin: round;
}

.jeon-oct text {
    font-family: var(--font-fun);
    font-size: 40px;
    fill: #fff;
    text-anchor: middle;
    dominant-baseline: central;
}

.jeon-oct {
    transform-box: fill-box;
    transform-origin: center;
    animation: jeonPulse 2.4s ease-in-out infinite;
}

/* 표지판이 '멈춰!' 하고 두근 */
@keyframes jeonPulse {
    0%,
    100% {
        scale: 1;
        rotate: 0deg;
    }

    15% {
        scale: 1.12;
        rotate: -6deg;
    }

    30% {
        scale: 0.96;
        rotate: 4deg;
    }

    45% {
        scale: 1;
        rotate: 0deg;
    }
}

/* 사고 치기 전 글자는 조금 작게 (기울인 글자끼리 겹치지 않게) */
.logo-sago .lt {
    font-size: 54px;
}

/* 사고 치기 전: 글자마다 제각각 흔들 (기울기는 바깥 g 의 SVG 속성, 흔들림은 글자에만) */
.w1,
.w2,
.w3 {
    animation: sagoWob 1.6s ease-in-out infinite;
}

.w2 {
    animation-delay: -0.4s;
}

.w3 {
    animation-delay: -0.8s;
}

/* '기'는 넘어지려다 버텨요 */
.lt-fall {
    animation: sagoFall 2.2s ease-in-out infinite;
}

@keyframes sagoWob {
    0%,
    100% {
        translate: 0 0;
        rotate: 0deg;
    }

    50% {
        translate: 0 -6px;
        rotate: 5deg;
    }
}

@keyframes sagoFall {
    0%,
    100% {
        rotate: 0deg;
    }

    40% {
        rotate: 18deg;
    }

    55% {
        rotate: 10deg;
    }

    70% {
        rotate: 16deg;
    }
}

.sg-boom path {
    fill: var(--mustard);
    stroke: var(--red);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.sg-boom {
    transform-box: fill-box;
    transform-origin: center;
    animation: boom 1.4s ease-in-out infinite;
}

@keyframes boom {
    0%,
    100% {
        scale: 0.85;
        rotate: 0deg;
    }

    50% {
        scale: 1.15;
        rotate: 14deg;
    }
}

.sg-sweat path {
    fill: #8ec5ff;
    stroke: #2b2240;
    stroke-width: 2px;
}

.sg-sweat {
    animation: sweat 1.6s ease-in infinite;
}

@keyframes sweat {
    0% {
        translate: 0 0;
        opacity: 1;
    }

    100% {
        translate: 0 18px;
        opacity: 0;
    }
}

/* 여행 가기 전: 하얀 통통 글자 */
.lt-trip {
    fill: #fff;
    stroke: #7d5cff;
    animation: tripBounce 1.8s var(--bounce) infinite;
}

.b2 {
    animation-delay: 0.15s;
}

.b3 {
    animation-delay: 0.3s;
}

.b4 {
    animation-delay: 0.45s;
}

@keyframes tripBounce {
    0%,
    60%,
    100% {
        translate: 0 0;
        scale: 1;
    }

    20% {
        translate: 0 -10px;
        scale: 1.06 0.94;
    }

    35% {
        translate: 0 0;
        scale: 0.96 1.04;
    }
}

.jeon-round polygon {
    fill: #ff7a6e;
    stroke: #fff;
    stroke-width: 6px;
}

.tp-cloud ellipse {
    fill: #fff;
}

.tp-c1 {
    animation: drift 6s ease-in-out infinite;
}

.tp-c2 {
    animation: drift 7s ease-in-out infinite reverse;
}

@keyframes drift {
    50% {
        translate: 14px 0;
    }
}

.tp-path {
    fill: none;
    stroke: #fff;
    stroke-width: 3px;
    stroke-dasharray: 2 10;
    stroke-linecap: round;
    opacity: 0.9;
}

/* 비행기가 점선 길을 따라 날아요 */
.tp-plane path {
    fill: #5b3fd6;
}

.tp-plane {
    offset-path: path("M70 52 Q160 10 236 40");
    offset-rotate: auto;
    animation: fly 4s ease-in-out infinite;
}

@keyframes fly {
    0% {
        offset-distance: 0%;
        opacity: 0;
    }

    10%,
    85% {
        opacity: 1;
    }

    100% {
        offset-distance: 100%;
        opacity: 0;
    }
}

.tp-mt1 {
    fill: #a58bff;
}

.tp-mt2 {
    fill: #b9a3ff;
}

.tp-mt3 {
    fill: #9f86f0;
}

.tp-boat path {
    fill: #fff;
}

.tp-boat {
    animation: rock 2.4s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

@keyframes rock {
    0%,
    100% {
        rotate: -4deg;
    }

    50% {
        rotate: 4deg;
    }
}

/* 소리 치기 전: 소리 물결이 퍼지다 사라져요 */
.lt-sori {
    fill: #fff;
    stroke: #2f4a6a;
    animation: soriShh 3s ease-in-out infinite;
}

.q2 {
    animation-delay: 0.2s;
}

.q3 {
    animation-delay: 0.4s;
}

.q4 {
    animation-delay: 0.6s;
}

@keyframes soriShh {
    0%,
    100% {
        scale: 1;
    }

    30% {
        scale: 1.12;
    }

    55% {
        scale: 0.94;
    }
}

.sr-wave circle {
    fill: none;
    stroke: #fff;
    stroke-width: 4px;
    transform-box: fill-box;
    transform-origin: center;
    animation: wave 3s ease-out infinite;
}

.sr-wave circle:nth-child(2) {
    animation-delay: 1s;
}

.sr-wave circle:nth-child(3) {
    animation-delay: 2s;
}

@keyframes wave {
    0% {
        scale: 0.4;
        opacity: 0.9;
    }

    100% {
        scale: 3.4;
        opacity: 0;
    }
}

.sr-bubble path {
    fill: #fff;
    stroke: #2f4a6a;
    stroke-width: 3px;
}

.sr-bubble text {
    font-family: var(--font-fun);
    font-size: 22px;
    fill: #2f4a6a;
    text-anchor: middle;
    dominant-baseline: central;
}

.sr-bubble {
    transform-box: fill-box;
    transform-origin: 20% 100%;
    animation: wiggle 2.6s ease-in-out infinite;
}

/* ==== 전체 시리즈 ==== */
.tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

/* 칩: 이름 바로 뒤에 굵은 숫자 (wally-ui 칩 숫자 규칙) */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    height: 40px;
    padding: 0 11px;
    border: 1.5px solid #e1e4ea;
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform 0.2s var(--bounce),
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.chip .n {
    font-weight: 700;
}

.chip:hover {
    transform: translateY(-2px);
    border-color: var(--red);
    color: var(--ink);
}

.chip:active {
    transform: scale(0.95);
}

.chip.on {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

/* 찾기 칸: 44px, 옅은 색 상자 위라 흰 바탕, 누르면 파란 테두리 */
.find {
    position: relative;
    display: block;
    width: 100%;
    max-width: 460px;
    min-width: 0;
}

.find-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
}

.find input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid #e1e4ea;
    border-radius: 14px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.find input:focus {
    border-color: #3a5bff;
    box-shadow: 0 0 0 3px rgba(58, 91, 255, 0.14);
}

.find input::placeholder {
    color: #a3a9b6;
}

.sum {
    margin: 18px 4px 14px;
    font-size: 15px;
    color: var(--ink-2);
}

.sum b {
    color: var(--red);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

/* 카드 */
.card {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 2px solid transparent;
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--shadow);
    transition:
        transform 0.35s var(--bounce),
        box-shadow 0.3s ease,
        border-color 0.2s ease;
}

.card[hidden] {
    display: none;
}

/* 올리면 통 떠오르면서 살짝 기울고, 이모지는 통통 */
.card:hover {
    transform: translateY(-6px) rotate(-1deg);
    border-color: var(--kc);
    box-shadow: var(--shadow-up);
}

.card:nth-child(even):hover {
    transform: translateY(-6px) rotate(1deg);
}

.card:hover .card-ico {
    animation: boing 0.6s var(--bounce), wiggle 0.6s ease 0.6s;
}

.card:hover .jeon {
    animation: wiggle 0.5s ease;
}

.card-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--kt);
    font-size: 30px;
    line-height: 1;
}

.card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.card-name {
    font-family: var(--font-fun);
    font-weight: 400;
    font-size: 21px;
    line-height: 1.3;
}

.card-desc {
    margin-top: 4px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-2);
}

.card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
}

.card-cat,
.card-soon {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.card-cat {
    background: var(--kt);
    color: var(--kc);
}

.card-soon {
    background: #f3f1ec;
    color: var(--muted);
}

/* 카테고리별 색 (진한 색 --kc / 옅은 바탕 --kt) */
.k-mind {
    --kc: var(--c-mind);
    --kt: #ffeaf2;
}

.k-money {
    --kc: #c78f00;
    --kt: #fff4cc;
}

.k-work {
    --kc: var(--c-work);
    --kt: #e8f0ff;
}

.k-love {
    --kc: var(--c-love);
    --kt: #ffe6ec;
}

.k-family {
    --kc: #e57422;
    --kt: #ffeedf;
}

.k-travel {
    --kc: var(--c-travel);
    --kt: #efeaff;
}

.k-life {
    --kc: #159a72;
    --kt: #e2f7ef;
}

.k-hobby {
    --kc: #128fc0;
    --kt: #e2f5fc;
}

/* '전부 보기' 단추 */
.more-box {
    margin-top: 22px;
    text-align: center;
}

.more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.25s var(--bounce), background 0.2s ease;
}

.more:hover {
    background: var(--red);
    transform: translateY(-3px);
}

.more:active {
    transform: scale(0.96);
}

.more-ico {
    font-size: 12px;
    animation: bob 1.6s ease-in-out infinite;
}

/* 찾은 게 없을 때 */
.empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--ink-2);
}

.empty-ico {
    display: inline-block;
    font-size: 44px;
    animation: wiggle 1.4s ease-in-out infinite;
}

/* ==== 약속 ==== */
.prom-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.prom {
    padding: 28px 22px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.35s var(--bounce);
}

.prom:hover {
    transform: translateY(-6px);
}

.prom:hover .prom-ico {
    animation: boing 0.6s var(--bounce);
}

.prom-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff0ee;
    font-size: 34px;
    line-height: 1;
}

.ico-pay {
    background: #fff4d6;
}

.ico-safe {
    background: #eef2f8;
}

/* 'AD', '↻' 위에 빨간 사선 = 없어요 */
.no-mark {
    position: relative;
    font-family: var(--font-fun);
    font-size: 26px;
    color: var(--ink);
}

.no-mark::after {
    content: "";
    position: absolute;
    left: -10px;
    right: -10px;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
    background: var(--red);
    transform: rotate(-35deg);
}

.prom h3 {
    margin-top: 14px;
    font-family: var(--font-fun);
    font-weight: 400;
    font-size: 24px;
}

.prom p {
    margin-top: 6px;
    font-size: 15px;
    color: var(--ink-2);
}

.prom-note {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

/* ==== 바닥글 ==== */
.ft {
    margin-top: 110px;
    padding: 48px 0 calc(48px + env(safe-area-inset-bottom));
    background: var(--ink);
    color: #c9cdd6;
}

.ft-in {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.ft-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ft-brand .logo-dot {
    width: 48px;
    height: 48px;
    animation: wiggle 3s ease-in-out infinite;
}

.ft-name {
    font-family: var(--font-fun);
    font-size: 24px;
    color: #fff;
}

.ft-slogan {
    font-size: 14px;
}

.ft-info {
    display: grid;
    gap: 4px;
    font-size: 14px;
}

.ft-info b {
    color: #fff;
}

.ft-ph {
    color: #8a90a0;
}

.ft-copy {
    margin-top: 6px;
    color: #8a90a0;
}

/* ==== 맨 위로 · 알림 ==== */
.to-top {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 16px;
    box-shadow: var(--shadow-up);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s var(--bounce);
}

.to-top.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.to-top:hover {
    animation: boing 0.6s var(--bounce);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom));
    z-index: 40;
    max-width: calc(100% - 32px);
    padding: 12px 20px;
    border-radius: 16px;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-fun);
    font-size: 18px;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.35s var(--bounce);
}

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

/* ==== 폭별 ==== */

/* 태블릿 이하: 머리 바로가기 숨기고 '시리즈 보기'만 */
@media (max-width: 960px) {
    .nav {
        display: none;
    }

    .hd-cta {
        margin-left: auto;
    }

    .hero-in {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .scene {
        height: 360px;
    }

    .feat {
        grid-template-columns: minmax(0, 1fr);
    }

    .feat:nth-child(2) .feat-art {
        order: 0;
    }

    .feat-art {
        min-height: 240px;
    }

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

    .br-pc {
        display: none;
    }
}

/* 좁은 태블릿·큰 휴대폰 */
@media (max-width: 760px) {
    .steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .steps::before {
        display: none;
    }

    .step {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        column-gap: 16px;
        align-items: center;
        padding: 20px;
        text-align: left;
    }

    .step-no {
        left: 10px;
        top: 10px;
        width: 26px;
        height: 26px;
        font-size: 15px;
        line-height: 26px;
        text-align: center;
        z-index: 2;
    }

    .step-ico {
        grid-row: span 2;
        width: 72px;
        height: 72px;
        font-size: 36px;
        border-radius: 22px;
    }

    .step h3 {
        margin-top: 0;
        font-size: 24px;
    }

    .tools {
        padding: 14px;
    }
}

/* 휴대폰 */
@media (max-width: 640px) {
    .wrap {
        padding: 0 16px;
    }

    .hd-in {
        height: 60px;
        gap: 12px;
    }

    .logo-sub {
        display: none;
    }

    .hd-cta {
        padding: 9px 14px;
        font-size: 14px;
    }

    .hero {
        padding-top: 24px;
    }

    .hero-title {
        font-size: clamp(40px, 12vw, 56px);
    }

    .hero-lead {
        font-size: 16px;
    }

    .stats {
        gap: 8px;
    }

    .stats b {
        font-size: 26px;
    }

    .stats span {
        font-size: 12px;
    }

    .scene {
        height: 320px;
        border-radius: 28px;
    }

    .sc-light {
        left: 22px;
        top: 26px;
    }

    .sc-light i {
        width: 24px;
        height: 24px;
    }

    .sc-sun {
        right: 22px;
        top: 22px;
        width: 48px;
        height: 48px;
    }

    .sc-sign {
        left: 58%;
        bottom: 92px;
        width: 60px;
    }

    .sc-sign svg {
        width: 60px;
        height: 60px;
    }

    .sc-sign .pole {
        top: 52px;
    }

    .sc-car,
    .sc-car svg {
        width: 110px;
    }

    .sc-car svg {
        height: 64px;
    }

    .sc-bubble {
        top: 92px;
        font-size: 17px;
    }

    .pedal {
        right: 12px;
        bottom: 12px;
        padding: 8px 12px 8px 8px;
    }

    .pedal-pad {
        width: 30px;
        height: 24px;
    }

    .marquee {
        margin-top: 40px;
    }

    .badge-play {
        padding: 8px 14px 8px 10px;
        gap: 8px;
    }

    .badge-play svg {
        width: 22px;
        height: 22px;
    }

    .bp-txt b {
        font-size: 15px;
    }

    .bp-txt small {
        font-size: 11px;
    }

    .badge-ios {
        padding: 10px 12px;
        font-size: 14px;
    }

    .mq-pill {
        font-size: 16px;
    }

    .sec {
        padding-top: 72px;
    }

    .sec-hd {
        margin-bottom: 26px;
    }

    .sec-lead {
        font-size: 15.5px;
    }

    .feat {
        border-radius: 26px;
    }

    .feat-art {
        min-height: 200px;
        padding: 20px 16px;
    }

    .feat-body {
        padding: 24px 20px 26px;
    }

    .feat-copy {
        font-size: 16.5px;
    }

    /* 휴대폰: 칩은 한 줄로 두고 옆으로 밀어서 봐요 (칩 줄 안에서만 넘김, 화면은 안 밀림) */
    .chips {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: calc(100% + 28px);
        margin: 0 -14px;
        padding: 2px 14px 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
        mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
    }

    .chips::-webkit-scrollbar {
        display: none;
    }

    .chip {
        height: 38px;
        padding: 0 12px;
        font-size: 14px;
    }

    .grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .card {
        padding: 16px;
    }

    .card-ico {
        width: 50px;
        height: 50px;
        font-size: 26px;
        border-radius: 16px;
    }

    .prom-list {
        gap: 12px;
    }

    .prom {
        padding: 22px 14px;
    }

    .prom-ico {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .prom h3 {
        font-size: 20px;
    }

    .prom p {
        font-size: 14px;
    }

    .ft {
        margin-top: 80px;
    }

    .to-top {
        right: 14px;
        width: 42px;
        height: 42px;
    }

    .toast {
        font-size: 16px;
    }
}

/* 아주 좁은 휴대폰 (360 안팎) */
@media (max-width: 380px) {
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prom-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .pedal-txt {
        font-size: 14px;
    }
}

/* ==== 움직임 줄이기 설정이면 움직임을 모두 끄고 바로 보여 줘요 ==== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .js .rv {
        opacity: 1;
        transform: none;
    }

    /* 자동차는 표지판 앞에 서 있고, 빨간불 · 말풍선이 켜진 채로 */
    .sc-car {
        transform: translateX(var(--stop, 300px));
    }

    .sc-light .l-red {
        background: var(--red);
    }

    .sc-bubble {
        transform: translateX(-50%) scale(1);
    }

    .cloud {
        transform: none;
    }

    /* 흐르는 띠는 멈추고 줄바꿈으로 다 보여 줘요 */
    .mq-track {
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
        padding: 0 16px;
    }

    .mq-dup {
        display: none;
    }

    .tp-plane {
        offset-distance: 55%;
    }
}
