/* ======================================
   hwagryul.com - Memphis Probability
   Colors: #E8D8C0, #40A0A0, #E0C040, #3A3028, #8A7A60, #C0B0A0, #E05080
   Fonts: Black Han Sans, Righteous, Noto Sans KR
   ====================================== */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    font-size: clamp(14px, 1vw, 16px);
    color: #3A3028;
    background: #E8D8C0;
    overflow-x: hidden;
}

/* === SECTION 1: HERO === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #E8D8C0;
    overflow: hidden;
}

/* Memphis Geometric Scatter */
#memphis-scatter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.memphis-shape {
    position: absolute;
    opacity: 0;
    will-change: transform, opacity;
}

.memphis-shape.triangle {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #E05080;
}

.memphis-shape.circle {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #40A0A0;
}

.memphis-shape.squiggle {
    width: 30px;
    height: 10px;
    border: 2px solid #E0C040;
    border-radius: 50%;
    background: none;
}

.memphis-shape.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E05080;
}

/* Scatter positions */
.shape-1  { top: 8%;  left: 5%;  }
.shape-2  { top: 12%; left: 25%; }
.shape-3  { top: 5%;  left: 48%; }
.shape-4  { top: 15%; left: 72%; }
.shape-5  { top: 8%;  left: 90%; }
.shape-6  { top: 30%; left: 3%;  }
.shape-7  { top: 35%; left: 15%; }
.shape-8  { top: 25%; left: 85%; }
.shape-9  { top: 40%; left: 92%; }
.shape-10 { top: 55%; left: 5%;  }
.shape-11 { top: 60%; left: 20%; }
.shape-12 { top: 50%; left: 80%; }
.shape-13 { top: 65%; left: 93%; }
.shape-14 { top: 75%; left: 8%;  }
.shape-15 { top: 80%; left: 30%; }
.shape-16 { top: 70%; left: 70%; }
.shape-17 { top: 85%; left: 88%; }
.shape-18 { top: 90%; left: 12%; }
.shape-19 { top: 92%; left: 50%; }
.shape-20 { top: 88%; left: 75%; }
.shape-21 { top: 20%; left: 40%; }
.shape-22 { top: 45%; left: 60%; }
.shape-23 { top: 70%; left: 45%; }
.shape-24 { top: 35%; left: 75%; }

.memphis-shape.animated {
    opacity: 0.15;
    transition: opacity 0.3s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Different Memphis accent colors for variety */
.shape-2.circle  { background: #E05080; }
.shape-6.circle  { background: #E0C040; }
.shape-10.circle { background: #40A0A0; }
.shape-14.circle { background: #E05080; }
.shape-22.circle { background: #E0C040; }

.shape-5.triangle  { border-bottom-color: #40A0A0; }
.shape-9.triangle  { border-bottom-color: #E0C040; }
.shape-13.triangle { border-bottom-color: #E05080; }
.shape-17.triangle { border-bottom-color: #40A0A0; }
.shape-21.triangle { border-bottom-color: #E0C040; }

.shape-7.squiggle  { border-color: #E05080; }
.shape-11.squiggle { border-color: #40A0A0; }
.shape-15.squiggle { border-color: #E05080; }
.shape-19.squiggle { border-color: #40A0A0; }
.shape-23.squiggle { border-color: #E05080; }

.shape-8.dot  { background: #40A0A0; }
.shape-12.dot { background: #E0C040; }
.shape-16.dot { background: #E05080; }
.shape-20.dot { background: #40A0A0; }
.shape-24.dot { background: #E0C040; }

/* Hex Frame in Hero */
#hex-frame {
    position: relative;
    width: 260px;
    height: 230px;
    z-index: 2;
    margin-bottom: 30px;
}

#hex-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#hex-border {
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
}

#hex-border.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s ease-in-out;
}

#dice-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
}

#dice {
    width: 80px;
    height: 80px;
    position: relative;
    cursor: pointer;
}

.dice-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #E8D8C0;
    border: 3px solid #3A3028;
    border-radius: 12px;
    display: none;
    box-shadow: 3px 3px 0 #8A7A60;
}

.dice-face.active {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    padding: 10px;
    place-items: center;
}

.dice-dot {
    width: 12px;
    height: 12px;
    background: #3A3028;
    border-radius: 50%;
    display: block;
}

/* Dot positions in 3x3 grid */
.dice-dot.top-left     { grid-column: 1; grid-row: 1; }
.dice-dot.top-right    { grid-column: 3; grid-row: 1; }
.dice-dot.mid-left     { grid-column: 1; grid-row: 2; }
.dice-dot.center       { grid-column: 2; grid-row: 2; }
.dice-dot.mid-right    { grid-column: 3; grid-row: 2; }
.dice-dot.bottom-left  { grid-column: 1; grid-row: 3; }
.dice-dot.bottom-right { grid-column: 3; grid-row: 3; }

/* Dice rolling animation */
#dice.rolling {
    animation: diceShake 0.15s infinite;
}

@keyframes diceShake {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(-8deg) scale(1.05); }
    50%  { transform: rotate(8deg) scale(0.95); }
    75%  { transform: rotate(-4deg) scale(1.02); }
    100% { transform: rotate(0deg) scale(1); }
}

/* Logotype */
#logotype {
    z-index: 2;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0;
}

#logotype.visible {
    opacity: 1;
}

#logo-kr {
    font-family: 'Black Han Sans', sans-serif;
    font-size: clamp(32px, 5vw, 72px);
    color: #3A3028;
    display: inline-block;
    transform: translateY(-40px);
    opacity: 0;
}

#logo-kr.animate-in {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

#logo-dot {
    font-family: 'Righteous', sans-serif;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #E05080;
    display: inline-block;
    opacity: 0;
}

#logo-dot.animate-in {
    opacity: 1;
    transition: opacity 0.3s ease 0.3s;
}

#logo-com {
    font-family: 'Righteous', sans-serif;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #3A3028;
    display: inline-block;
    transform: translateX(30px);
    opacity: 0;
}

#logo-com.animate-in {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s, opacity 0.4s ease 0.2s;
}

#hero-subtitle {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #8A7A60;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
}

#hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

/* === SECTION 2: HONEYCOMB === */
#honeycomb {
    position: relative;
    padding: 80px 20px 100px;
    background: #3A3028;
    overflow: hidden;
}

#honeycomb-title {
    font-family: 'Righteous', sans-serif;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #E8D8C0;
    text-align: center;
    margin-bottom: 60px;
}

#honeycomb-grid {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 520px;
    margin: 0 auto;
}

.hex-cell {
    position: absolute;
    width: 160px;
    height: 160px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: #E8D8C0;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.hex-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: #E8D8C0;
    z-index: 0;
}

.hex-cell-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    text-align: center;
}

.hex-cell-inner h3 {
    font-family: 'Righteous', sans-serif;
    font-size: 18px;
    color: #3A3028;
    margin-bottom: 2px;
}

.hex-cell-inner p {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    color: #8A7A60;
    line-height: 1.3;
}

.hex-formula {
    font-family: 'Righteous', sans-serif;
    font-size: 11px;
    color: #8A7A60;
    margin-top: 4px;
    opacity: 0.8;
}

/* Honeycomb positions (centered layout) */
.hex-center       { left: 50%; top: 50%;  transform: translate(-50%, -50%); }
.hex-top-left     { left: 32%; top: 18%;  transform: translate(-50%, -50%); }
.hex-top-right    { left: 68%; top: 18%;  transform: translate(-50%, -50%); }
.hex-right        { left: 86%; top: 50%;  transform: translate(-50%, -50%); }
.hex-bottom-right { left: 68%; top: 82%;  transform: translate(-50%, -50%); }
.hex-bottom-left  { left: 32%; top: 82%;  transform: translate(-50%, -50%); }
.hex-left         { left: 14%; top: 50%;  transform: translate(-50%, -50%); }

/* Memphis accent borders via box-shadow (visible within clip-path) */
.hex-cell[data-index="0"] { background: linear-gradient(135deg, #E8D8C0 60%, rgba(224,192,64,0.15)); }
.hex-cell[data-index="1"] { background: linear-gradient(135deg, #E8D8C0 60%, rgba(224,80,128,0.15)); }
.hex-cell[data-index="2"] { background: linear-gradient(135deg, #E8D8C0 60%, rgba(64,160,160,0.15)); }
.hex-cell[data-index="3"] { background: linear-gradient(135deg, #E8D8C0 60%, rgba(224,192,64,0.15)); }
.hex-cell[data-index="4"] { background: linear-gradient(135deg, #E8D8C0 60%, rgba(224,80,128,0.15)); }
.hex-cell[data-index="5"] { background: linear-gradient(135deg, #E8D8C0 60%, rgba(64,160,160,0.15)); }
.hex-cell[data-index="6"] { background: linear-gradient(135deg, #E8D8C0 60%, rgba(224,192,64,0.15)); }

/* Hex border ring using outline trick - we use a wrapping approach */
.hex-cell::after {
    content: '';
    position: absolute;
    inset: -3px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -1;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.hex-cell[data-index="0"]::after { background: #E0C040; }
.hex-cell[data-index="1"]::after { background: #E05080; }
.hex-cell[data-index="2"]::after { background: #40A0A0; }
.hex-cell[data-index="3"]::after { background: #E0C040; }
.hex-cell[data-index="4"]::after { background: #E05080; }
.hex-cell[data-index="5"]::after { background: #40A0A0; }
.hex-cell[data-index="6"]::after { background: #E0C040; }

/* Honeycomb hover */
.hex-cell:hover::after {
    opacity: 1;
}

.hex-cell:hover {
    filter: brightness(1.05);
}

/* Breathing honeycomb - adjacent cells shift on hover */
.hex-cell.shift-out {
    transition: transform 0.3s ease;
}

/* === SECTION 3: CALCULATOR === */
#calculator-section {
    position: relative;
    padding: 0 20px 80px;
    background: #E8D8C0;
    overflow: hidden;
}

#memphis-band {
    position: relative;
    width: 100%;
    height: 60px;
    background: #8A7A60;
    overflow: hidden;
    margin-bottom: 50px;
}

.pattern-zigzag {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(224,80,128,0.3) 20px,
        rgba(224,80,128,0.3) 22px
    );
}

.pattern-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle 3px at 15px 15px, rgba(64,160,160,0.4) 100%, transparent 100%);
    background-size: 40px 40px;
}

.pattern-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(224,192,64,0.2) 10px,
        rgba(224,192,64,0.2) 12px
    );
}

#calc-title {
    font-family: 'Righteous', sans-serif;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #3A3028;
    text-align: center;
    margin-bottom: 40px;
}

#calculator {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Glassmorphic Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    filter: blur(2px);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.glass-card:hover, .glass-card:focus-within {
    filter: blur(0);
    transform: translateY(-2px);
}

.calc-card {
    width: 280px;
}

.calc-card h3 {
    font-family: 'Righteous', sans-serif;
    font-size: 20px;
    color: #3A3028;
    margin-bottom: 20px;
}

.calc-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.calc-inputs label {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #3A3028;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-inputs input {
    width: 60px;
    padding: 6px 10px;
    border: 2px solid #C0B0A0;
    border-radius: 8px;
    background: rgba(255,255,255,0.3);
    font-family: 'Righteous', sans-serif;
    font-size: 16px;
    color: #3A3028;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

.calc-inputs input:focus {
    border-color: #E05080;
}

.calc-result {
    font-family: 'Righteous', sans-serif;
    font-size: 18px;
    color: #E05080;
    padding: 10px;
    background: rgba(224,80,128,0.08);
    border-radius: 8px;
    text-align: center;
}

/* === SECTION 4: PLAYGROUND === */
#playground {
    position: relative;
    padding: 80px 20px 100px;
    background: #3A3028;
    overflow: hidden;
}

#playground-title {
    font-family: 'Righteous', sans-serif;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #E8D8C0;
    text-align: center;
    margin-bottom: 5px;
}

#playground-subtitle {
    font-family: 'Black Han Sans', sans-serif;
    font-size: clamp(18px, 2.5vw, 30px);
    color: #E0C040;
    text-align: center;
    margin-bottom: 50px;
}

#playground-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
}

.playground-card {
    width: 320px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.playground-card h3 {
    font-family: 'Righteous', sans-serif;
    font-size: 22px;
    color: #E8D8C0;
    margin-bottom: 20px;
    text-align: center;
}

/* Memphis Button */
.memphis-btn {
    font-family: 'Righteous', sans-serif;
    font-size: 16px;
    color: #E8D8C0;
    background: #E05080;
    border: 3px solid #3A3028;
    border-radius: 8px;
    padding: 10px 28px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #8A7A60;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.3s ease;
    filter: blur(1px);
    margin: 15px 0;
}

.memphis-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #8A7A60;
    filter: blur(0);
}

.memphis-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #8A7A60;
}

/* Coin */
.coin-display {
    width: 80px;
    height: 80px;
    perspective: 300px;
    margin: 10px auto;
}

.coin {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.coin.flipping {
    animation: coinFlip 0.6s ease;
}

@keyframes coinFlip {
    0%   { transform: rotateY(0deg); }
    50%  { transform: rotateY(900deg) scale(1.1); }
    100% { transform: rotateY(1800deg); }
}

.coin.show-tails {
    transform: rotateY(180deg);
}

.coin-side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Righteous', sans-serif;
    font-size: 32px;
    backface-visibility: hidden;
    border: 3px solid #3A3028;
}

.coin-heads {
    background: #E0C040;
    color: #3A3028;
}

.coin-tails {
    background: #40A0A0;
    color: #E8D8C0;
    transform: rotateY(180deg);
}

/* Result Stats */
.result-stats {
    display: flex;
    gap: 20px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #C0B0A0;
    margin: 10px 0;
}

.result-bar {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}

.bar-heads {
    height: 100%;
    background: #E0C040;
    transition: width 0.3s ease;
    width: 50%;
}

.bar-tails {
    height: 100%;
    background: #40A0A0;
    transition: width 0.3s ease;
    width: 50%;
}

/* Playground Dice */
.dice-display {
    width: 70px;
    height: 70px;
    margin: 10px auto;
}

.playground-dice {
    width: 70px;
    height: 70px;
    position: relative;
    cursor: pointer;
}

.playground-dice .dice-face {
    width: 70px;
    height: 70px;
    border-radius: 10px;
}

.playground-dice .dice-face.active {
    padding: 8px;
}

.playground-dice .dice-dot {
    width: 10px;
    height: 10px;
}

.playground-dice.rolling {
    animation: diceShake 0.15s infinite;
}

/* Dice Histogram */
.dice-histogram {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    width: 100%;
    height: 100px;
    margin-top: 10px;
}

.hist-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.hist-label {
    font-family: 'Righteous', sans-serif;
    font-size: 11px;
    color: #C0B0A0;
    order: 2;
    margin-top: 4px;
}

.hist-fill {
    width: 100%;
    background: #E05080;
    border-radius: 3px 3px 0 0;
    min-height: 0;
    transition: height 0.3s ease;
    order: 1;
}

.hist-count {
    font-family: 'Righteous', sans-serif;
    font-size: 10px;
    color: #E0C040;
    order: 0;
    margin-bottom: 2px;
}

/* Two Dice */
.two-dice-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    justify-content: center;
}

.mini-dice {
    width: 50px;
    height: 50px;
    position: relative;
}

.mini-dice .dice-face {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border-width: 2px;
}

.mini-dice .dice-face.active {
    padding: 6px;
}

.mini-dice .dice-dot {
    width: 8px;
    height: 8px;
}

.mini-dice.rolling {
    animation: diceShake 0.15s infinite;
}

.dice-plus, .dice-equals {
    font-family: 'Righteous', sans-serif;
    font-size: 20px;
    color: #C0B0A0;
}

.dice-sum {
    font-family: 'Righteous', sans-serif;
    font-size: 28px;
    color: #E0C040;
    min-width: 30px;
    text-align: center;
}

/* Sum Histogram */
.sum-histogram {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    width: 100%;
    height: 80px;
    margin-top: 10px;
}

.sum-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.sum-label {
    font-family: 'Righteous', sans-serif;
    font-size: 9px;
    color: #C0B0A0;
    order: 2;
    margin-top: 3px;
}

.sum-fill {
    width: 100%;
    background: #40A0A0;
    border-radius: 2px 2px 0 0;
    min-height: 0;
    transition: height 0.3s ease;
    order: 1;
}

.sum-count {
    font-family: 'Righteous', sans-serif;
    font-size: 9px;
    color: #E0C040;
    order: 0;
    margin-bottom: 2px;
}

/* Dancheong Cultural-Memphis Borders */
.dancheong-border {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
}

.dancheong-left {
    left: 0;
    background:
        repeating-linear-gradient(
            180deg,
            #E05080 0px, #E05080 8px,
            #40A0A0 8px, #40A0A0 16px,
            #E0C040 16px, #E0C040 24px,
            transparent 24px, transparent 32px
        );
    opacity: 0.3;
}

.dancheong-right {
    right: 0;
    background:
        repeating-linear-gradient(
            180deg,
            #E0C040 0px, #E0C040 8px,
            #40A0A0 8px, #40A0A0 16px,
            #E05080 16px, #E05080 24px,
            transparent 24px, transparent 32px
        );
    opacity: 0.3;
}

/* === FOOTER === */
#footer {
    position: relative;
    background: #8A7A60;
    padding: 40px 20px 30px;
}

.squiggle-border-top {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 20px;
}

.squiggle-border-top svg {
    width: 100%;
    height: 100%;
}

#footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

#footer-logo {
    margin-bottom: 20px;
}

.footer-kr {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 28px;
    color: #E8D8C0;
}

.footer-com {
    font-family: 'Righteous', sans-serif;
    font-size: 20px;
    color: #E0C040;
}

#footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.hex-nav-btn {
    font-family: 'Righteous', sans-serif;
    font-size: 13px;
    color: #E8D8C0;
    text-decoration: none;
    padding: 8px 18px;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
    background: rgba(232,216,192,0.15);
    transition: background 0.3s ease;
}

.hex-nav-btn:hover {
    background: rgba(224,80,128,0.4);
}

#footer-copy {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    color: #C0B0A0;
}

/* === CONFETTI === */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti-particle {
    position: absolute;
    pointer-events: none;
    animation: confettiFall 1.5s ease-out forwards;
}

.confetti-triangle {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid #E05080;
}

.confetti-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #40A0A0;
}

.confetti-square {
    width: 8px;
    height: 8px;
    background: #E0C040;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(200px) rotate(720deg) scale(0.2);
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #honeycomb-grid {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        padding: 20px;
    }

    .hex-cell {
        position: relative;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 130px;
        height: 130px;
    }

    .hex-cell-inner h3 {
        font-size: 15px;
    }

    .hex-cell-inner p {
        font-size: 11px;
    }

    .hex-formula {
        font-size: 10px;
    }

    #calculator {
        flex-direction: column;
        align-items: center;
    }

    .calc-card {
        width: 100%;
        max-width: 320px;
    }

    #playground-grid {
        flex-direction: column;
        align-items: center;
    }

    .playground-card {
        width: 100%;
        max-width: 340px;
    }

    #hex-frame {
        width: 200px;
        height: 175px;
    }

    #dice-container {
        width: 60px;
        height: 60px;
    }

    #dice {
        width: 60px;
        height: 60px;
    }

    .dice-face {
        border-radius: 10px;
    }

    .dice-dot {
        width: 9px;
        height: 9px;
    }
}

@media (max-width: 480px) {
    .hex-cell {
        width: 110px;
        height: 110px;
    }

    .hex-cell-inner {
        padding: 20px 10px;
    }

    .hex-cell-inner h3 {
        font-size: 13px;
    }

    .hex-formula {
        display: none;
    }

    .dancheong-border {
        width: 20px;
    }
}
