/* ===== Reset & Variables ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --cream: #fff6e5;
    --paper: #fffdf6;
    --brown: #8a5a2b;
    --poop: #b07a3c;
    --sky: #35b6e8;
    --pink: #ff77aa;
    --yellow: #ffcf3f;
    --green: #4bbf72;
    --ink: #3b2a1a;
}

/* ===== Base ===== */
body {
    font-family: "Hiragino Maru Gothic ProN", "Comic Sans MS", "Yu Gothic", system-ui, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ===== Background Blobs ===== */
.bg-blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35; animation: drift 18s ease-in-out infinite alternate; }
.blob-1 { width: 420px; height: 420px; background: var(--yellow); top: -8%; left: -6%; }
.blob-2 { width: 360px; height: 360px; background: var(--sky); top: 30%; right: -8%; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: var(--pink); bottom: 5%; left: 10%; animation-delay: -11s; }
.blob-4 { width: 260px; height: 260px; background: var(--green); top: 62%; left: 45%; animation-delay: -3s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(40px, -30px) scale(1.15); } }

/* ===== Navigation ===== */
nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.9rem 1.5rem;
    background: rgba(255, 246, 229, 0.9); backdrop-filter: blur(12px);
    border-bottom: 3px dashed rgba(138, 90, 43, 0.25);
}
.logo { display: flex; align-items: baseline; gap: 0.5rem; text-decoration: none; font-weight: 800; font-size: 1.35rem; color: var(--brown); }
.logo span { font-size: 0.85rem; color: var(--pink); }
.nav-links { display: flex; gap: 0.8rem; list-style: none; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--brown); font-size: 0.9rem; font-weight: 700; padding: 0.35rem 0.75rem; border-radius: 999px; transition: all 0.25s; }
.nav-links a:hover { background: var(--yellow); color: var(--ink); transform: rotate(-2deg) scale(1.05); }

/* ===== Hero ===== */
.hero {
    position: relative; min-height: 100vh; text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 5rem 1.5rem 4rem;
}
.hero-content { max-width: 820px; }
.hero-badge {
    display: inline-block; padding: 0.45rem 1.1rem; border-radius: 999px; margin-bottom: 1.5rem;
    background: rgba(255, 119, 170, 0.15); border: 2px solid var(--pink); color: #c0356b;
    font-weight: 700; font-size: 0.85rem; animation: bounceIn 0.7s ease both;
}
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.2; margin-bottom: 1.2rem; animation: bounceIn 0.7s ease 0.15s both; }
.rainbow {
    background: linear-gradient(90deg, var(--brown), var(--pink), var(--sky), var(--green), var(--brown));
    background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: rainbowMove 6s linear infinite;
}
@keyframes rainbowMove { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.hero p { font-size: 1.05rem; color: rgba(59, 42, 26, 0.75); margin-bottom: 2rem; animation: bounceIn 0.7s ease 0.3s both; }
@keyframes bounceIn { from { opacity: 0; transform: translateY(28px) scale(0.96); } to { opacity: 1; transform: none; } }
.scroll-hint { position: absolute; bottom: 1.5rem; font-size: 0.9rem; color: rgba(138, 90, 43, 0.7); animation: bobDown 2s ease-in-out infinite; }
@keyframes bobDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ===== Floating Emojis ===== */
.float { position: absolute; font-size: clamp(2rem, 5vw, 3.4rem); opacity: 0.85; animation: bob 6s ease-in-out infinite; }
.f1 { top: 12%; left: 6%; }
.f2 { top: 20%; right: 8%; animation-delay: -1.5s; }
.f3 { bottom: 22%; left: 12%; animation-delay: -3s; }
.f4 { bottom: 16%; right: 14%; animation-delay: -4.5s; }
.f5 { top: 45%; left: 3%; animation-delay: -2.2s; }
@keyframes bob { 0%, 100% { transform: translateY(-12px) rotate(-6deg); } 50% { transform: translateY(14px) rotate(8deg); } }

/* ===== Buttons ===== */
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: bounceIn 0.7s ease 0.45s both; }
.btn {
    display: inline-block; padding: 0.9rem 1.8rem; border-radius: 999px; cursor: pointer;
    font-family: inherit; font-size: 1rem; font-weight: 800; text-decoration: none;
    border: 3px solid var(--ink); transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: 0 6px 0 var(--brown); }
.btn-secondary { background: var(--sky); color: #fff; box-shadow: 0 6px 0 #1c7ba3; }
.btn-primary:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 9px 0 var(--brown); }
.btn-secondary:hover { transform: translateY(-3px) rotate(1deg); box-shadow: 0 9px 0 #1c7ba3; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brown); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
/* ===== Sections ===== */
main { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.5rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); color: var(--brown); margin-bottom: 0.7rem; }
.section-header p { color: rgba(59, 42, 26, 0.72); max-width: 660px; margin: 0 auto; }

/* ===== Info Cards ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.card-grid.small { margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.info-card {
    background: var(--paper); border: 3px solid var(--brown); border-radius: 22px; padding: 1.6rem;
    box-shadow: 0 8px 0 rgba(138, 90, 43, 0.18);
}
.info-card .card-emoji { display: block; font-size: 2.4rem; margin-bottom: 0.6rem; }
.info-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--brown); }
.info-card p { font-size: 0.95rem; color: rgba(59, 42, 26, 0.8); }
.info-card:hover { animation: shake 0.4s ease; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.5deg) scale(1.02); } 75% { transform: rotate(1.5deg) scale(1.02); } }

/* ===== Flip Cards ===== */
.flip-card {
    min-height: 230px; padding: 0; border: none; background: none; cursor: pointer;
    font-family: inherit; color: inherit; text-align: left; perspective: 1200px;
}
.flip-inner {
    position: relative; display: block; width: 100%; min-height: 230px;
    transform-style: preserve-3d; transition: transform 0.6s;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.face {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.5rem;
    padding: 1.5rem; border-radius: 22px; border: 3px solid var(--brown); backface-visibility: hidden;
}
.face.front { align-items: center; text-align: center; background: var(--paper); box-shadow: 0 8px 0 rgba(138, 90, 43, 0.18); }
.face.back { background: #fff2d2; transform: rotateY(180deg); font-size: 0.95rem; }
.card-emoji { font-size: 2.6rem; }
.card-title { font-weight: 800; font-size: 1.1rem; color: var(--brown); }
.flip-hint { font-size: 0.75rem; font-weight: 700; color: var(--pink); }
.flip-card:hover .face.front { border-color: var(--pink); }

/* ===== Stool Scale ===== */
.scale { background: var(--paper); border: 3px dashed var(--brown); border-radius: 26px; padding: 1.8rem; }
.scale-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.9rem; }
.scale-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    padding: 1rem 0.6rem; background: #fff; border: 3px solid rgba(138, 90, 43, 0.3); border-radius: 18px;
    font-family: inherit; cursor: pointer; transition: all 0.2s;
}
.scale-item:hover { transform: translateY(-4px); border-color: var(--brown); }
.scale-item.active { background: #fff2d2; border-color: var(--pink); box-shadow: 0 6px 0 rgba(255, 119, 170, 0.35); }
.scale-item .label { font-size: 0.8rem; font-weight: 800; color: var(--brown); }
.shape { width: 74px; height: 26px; border-radius: 14px; background: linear-gradient(180deg, #c08a4a, #8a5a2b); }
.shape.lumps { display: flex; gap: 5px; width: auto; height: auto; background: none; }
.shape.lumps i { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(180deg, #c08a4a, #8a5a2b); }
.shape.bumpy { border-radius: 10px; background: repeating-linear-gradient(90deg, #c08a4a 0 12px, #a06f34 12px 24px); }
.shape.cracked { position: relative; }
.shape.cracked::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 50%; width: 3px; background: rgba(255, 246, 229, 0.9); transform: rotate(8deg); }
.shape.banana { border-radius: 14px 14px 26px 26px; transform: rotate(-5deg); }
.shape.fluffy { width: 78px; height: 22px; border-radius: 50% 50% 40% 40%; background: linear-gradient(180deg, #d3a468, #a06f34); box-shadow: 0 -6px 0 rgba(211, 164, 104, 0.5); }
.scale-info {
    min-height: 70px; margin-top: 1.5rem; padding: 1.2rem 1.4rem; border-radius: 18px;
    background: #fff2d2; border: 2px solid rgba(138, 90, 43, 0.3); font-size: 0.95rem;
}
.scale-info b { color: var(--brown); }
/* ===== Pee Lab ===== */
.pee-lab {
    display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 2rem; align-items: center;
    padding: 2rem; background: var(--paper); border: 3px solid var(--sky); border-radius: 26px;
    box-shadow: 0 8px 0 rgba(53, 182, 232, 0.25);
}
.pee-machine { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.bladder {
    position: relative; width: 150px; height: 190px; overflow: hidden;
    border: 4px solid var(--brown); border-radius: 50% 50% 45% 45%; background: #fff;
}
.pee-level {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 0%;
    background: linear-gradient(180deg, #9fdcff, var(--sky)); transition: height 0.12s linear;
}
.pee-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }
.stream {
    position: absolute; left: 50%; bottom: 34px; width: 12px; height: 0; opacity: 0;
    background: linear-gradient(180deg, var(--sky), rgba(53, 182, 232, 0.4)); border-radius: 0 0 8px 8px;
}
.stream.on { animation: pour 1.1s ease-in forwards; }
@keyframes pour { 0% { opacity: 1; height: 0; } 30% { opacity: 1; height: 80px; } 100% { opacity: 0; height: 110px; } }
.toilet { font-size: 3rem; line-height: 1; }
.pee-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.pee-hint { font-size: 0.95rem; color: rgba(59, 42, 26, 0.8); margin-bottom: 0.8rem; }
.pee-status { min-height: 1.8em; margin-top: 0.8rem; font-weight: 800; color: var(--sky); }
.drink-btn { margin-top: 0.8rem; padding: 0.6rem 1.2rem; font-size: 0.9rem; background: #fff; border: 3px solid var(--sky); color: var(--ink); box-shadow: 0 5px 0 rgba(53, 182, 232, 0.5); }
.drink-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(53, 182, 232, 0.5); }

/* ===== Quiz ===== */
.quiz-progress { height: 16px; border-radius: 999px; overflow: hidden; background: rgba(138, 90, 43, 0.15); margin-bottom: 0.8rem; }
.quiz-progress span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--yellow)); transition: width 0.4s; }
.quiz-score { text-align: center; font-weight: 800; color: var(--brown); margin-bottom: 1.8rem; }
.quiz-list { display: grid; gap: 1.4rem; }
.quiz-card { background: var(--paper); border: 3px solid var(--brown); border-radius: 22px; padding: 1.5rem; box-shadow: 0 8px 0 rgba(138, 90, 43, 0.15); }
.quiz-card h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--brown); }
.quiz-options { display: grid; gap: 0.7rem; }
.quiz-option {
    padding: 0.8rem 1rem; border-radius: 14px; cursor: pointer; text-align: left;
    font-family: inherit; font-size: 0.95rem; background: #fff; border: 3px solid rgba(138, 90, 43, 0.3);
    transition: all 0.2s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--pink); transform: translateX(4px); }
.quiz-option.correct { background: #e3f8e9; border-color: var(--green); }
.quiz-option.wrong { background: #ffeaea; border-color: #e05b5b; animation: shake 0.4s ease; }
.quiz-option:disabled { cursor: default; }
.quiz-why { display: none; margin-top: 0.9rem; font-size: 0.9rem; color: rgba(59, 42, 26, 0.78); }
.quiz-why.show { display: block; }
.quiz-result {
    margin-top: 2rem; padding: 1.6rem; text-align: center; border-radius: 22px;
    background: #fff2d2; border: 3px dashed var(--yellow); font-weight: 800; font-size: 1.15rem;
}
/* ===== Catch Game ===== */
.game-hud { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; margin-bottom: 1.2rem; font-weight: 800; color: var(--brown); }
.game-hud b { font-size: 1.3rem; color: var(--pink); }
.catch-area {
    position: relative; height: 420px; overflow: hidden; border-radius: 26px;
    border: 3px dashed var(--brown); background: linear-gradient(180deg, #fffdf6, #fff2d2);
}
.catch-hint {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    padding: 1rem; text-align: center; color: rgba(138, 90, 43, 0.6); font-weight: 700;
}
.falling {
    position: absolute; top: -60px; font-size: 2.2rem; line-height: 1;
    padding: 0; border: none; background: none; cursor: pointer;
    animation: fall linear forwards; transition: transform 0.15s;
}
.falling:hover { transform: scale(1.25); }
@keyframes fall { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(520px) rotate(360deg); } }
.falling.caught { animation: caught 0.3s ease forwards; }
@keyframes caught { to { transform: scale(1.8); opacity: 0; } }
.pop { position: absolute; font-size: 1.1rem; font-weight: 800; color: var(--green); pointer-events: none; animation: popUp 0.7s ease forwards; }
@keyframes popUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-40px); } }
.game-over {
    position: absolute; inset: 0; display: flex; flex-direction: column; gap: 0.5rem;
    align-items: center; justify-content: center; background: rgba(255, 246, 229, 0.93); font-weight: 800;
}

/* ===== Footer ===== */
footer { margin-top: 3rem; padding: 3rem 1.5rem 2.5rem; text-align: center; border-top: 3px dashed rgba(138, 90, 43, 0.3); background: rgba(255, 242, 210, 0.6); }
.foot-note { max-width: 640px; margin: 0 auto 1.2rem; font-size: 0.9rem; color: rgba(59, 42, 26, 0.72); }
footer p:last-child { color: var(--brown); font-weight: 700; }

/* ===== Scroll Reveal ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) { .pee-lab { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
@media (max-width: 768px) {
    .nav-links { display: none; }
    .float { display: none; }
    .catch-area { height: 340px; }
    @keyframes fall { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(420px) rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}



