@charset "UTF-8";

:root {
    --bg-night: #111015;
    --bg-deep: #18161f;
    --bg-surface: #211e2a;
    --bg-surface-soft: #292534;
    --border-subtle: rgba(235, 206, 155, 0.16);
    --border-gold: rgba(232, 184, 109, 0.42);
    --text-primary: #f4eee1;
    --text-secondary: #c4baa8;
    --text-muted: #938978;
    --gold: #e8b86d;
    --gold-bright: #f7d99c;
    --gold-deep: #b8843c;
    --lotus-pink: #e58ca4;
    --lotus-yellow: #f0c96e;
    --lotus-green: #7bc0a3;
    --lotus-white: #f4f1ea;
    --hanji-bg: #f6efe2;
    --hanji-border: #d5c4a1;
    --hanji-ink: #2b241c;
    --seal-red: #b23a32;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);
    --max-width: 1120px;
}

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

html {
    font-size: 16px;
    line-height: 1.65;
    scroll-behavior: smooth;
}

body.temple-body {
    margin: 0;
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-night);
    background-image:
        radial-gradient(circle at 50% -10%, rgba(232, 184, 109, 0.14), transparent 55%),
        radial-gradient(circle at 12% 35%, rgba(229, 140, 164, 0.06), transparent 45%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.serif-font {
    font-family: "Noto Serif KR", "Batang", "Gungsuh", Georgia, serif;
}

/* 운곡산사 고즈넉한 명조체 감성 안내 카드 (반투명 먹색 & 한지 질감) */
.temple-prose-card {
    margin: 1rem 0 1.65rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(20, 18, 26, 0.72);
    border: 1px solid rgba(232, 184, 109, 0.28);
    border-left: 3px solid var(--gold);
    font-family: "Noto Serif KR", "Batang", "Gungsuh", Georgia, serif;
    font-size: 0.99rem;
    line-height: 1.88;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.temple-prose-card p {
    margin: 0;
}

.temple-prose-card p + p {
    margin-top: 0.9rem;
}

.temple-intro-section {
    padding: 3.25rem 0;
    background: linear-gradient(180deg, rgba(24, 22, 31, 0.92) 0%, rgba(17, 16, 21, 0.98) 100%);
    border-top: 1px solid var(--border-subtle);
}

.temple-intro-hanji {
    max-width: 820px;
    margin: 0 auto;
    padding: 1.1rem;
    border-radius: var(--radius-md);
    background-color: var(--hanji-bg);
    background-image:
        radial-gradient(rgba(160, 130, 90, 0.09) 1px, transparent 0),
        linear-gradient(135deg, #faf4e8 0%, #efe5d1 100%);
    background-size: 16px 16px, 100% 100%;
    color: var(--hanji-ink);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.temple-intro-inner {
    border: 1.5px solid var(--hanji-border);
    padding: 2.1rem 2.2rem;
}

.temple-intro-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--hanji-border);
}

.temple-intro-title {
    margin: 0;
    font-family: "Noto Serif KR", "Batang", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #3a2d1f;
}

.temple-intro-body {
    font-family: "Noto Serif KR", "Batang", Georgia, serif;
    font-size: 1.02rem;
    line-height: 1.92;
    color: var(--hanji-ink);
}

.temple-intro-body p {
    margin: 0;
}

.temple-intro-body p + p {
    margin-top: 1.05rem;
}

.brand-hanja-sub {
    font-weight: 400;
    font-size: 0.64em;
    color: var(--gold);
    letter-spacing: 0.12em;
    margin-left: 0.35rem;
}

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

button,
input,
select,
textarea {
    font-family: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--gold);
    color: #191512;
    font-weight: 700;
    padding: 0.75rem 1rem;
    z-index: 1000;
}

.skip-link:focus {
    left: 0.75rem;
    top: 0.75rem;
    border-radius: var(--radius-sm);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background-color: rgba(17, 16, 21, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 1rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.brand-lotus {
    font-size: 1.35rem;
    line-height: 1;
}

.brand-text {
    font-family: "Noto Serif KR", "Batang", Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--gold-bright);
    letter-spacing: 0.03em;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    border-left: 1px solid var(--border-subtle);
    padding-left: 0.5rem;
}

.primary-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.15rem;
}

.nav-link {
    display: inline-block;
    padding: 0.42rem 0.62rem;
    border-radius: 999px;
    font-size: 0.87rem;
    color: var(--text-secondary);
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(232, 184, 109, 0.12);
    color: var(--text-primary);
}

.nav-link.is-active {
    background-color: rgba(232, 184, 109, 0.2);
    color: var(--gold-bright);
    font-weight: 700;
}

/* GNB 운곡선사 접견 드롭다운 */
.nav-item-dropdown {
    position: relative;
}

.nav-caret {
    font-size: 0.7rem;
    margin-left: 0.15rem;
    opacity: 0.8;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 196px;
    margin: 0;
    padding: 0.5rem;
    list-style: none;
    border-radius: var(--radius-md);
    background: rgba(19, 17, 23, 0.97);
    border: 1px solid var(--border-gold);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
    z-index: 300;
}

.nav-item-dropdown:hover > .nav-dropdown-menu,
.nav-item-dropdown:focus-within > .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.58rem 0.78rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-dropdown-link:hover,
.nav-dropdown-link.is-active {
    background-color: rgba(232, 184, 109, 0.16);
    color: var(--gold-bright);
}

.nav-dropdown-link.is-active {
    font-weight: 700;
}

.nav-dropdown-link.is-soon {
    color: var(--text-muted);
}

.nav-soon-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(232, 184, 109, 0.35);
    background: rgba(232, 184, 109, 0.1);
    color: var(--gold-bright);
}

/* 운곡선사 접견실 허브 페이지 및 복귀 링크 */
.reception-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.reception-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.reception-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.reception-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.reception-badge.is-open {
    background: rgba(123, 192, 163, 0.16);
    border: 1px solid rgba(123, 192, 163, 0.45);
    color: #a6e3c8;
}

.reception-badge.is-soon {
    background: rgba(232, 184, 109, 0.12);
    border: 1px solid rgba(232, 184, 109, 0.38);
    color: var(--gold-bright);
}

.reception-card.is-coming-soon {
    opacity: 0.84;
    border-style: dashed;
}

.reception-card.is-coming-soon .space-cta {
    color: var(--text-muted);
}

.reception-back-row {
    margin-bottom: 0.75rem;
}

.reception-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(232, 184, 109, 0.35);
    background: rgba(24, 20, 18, 0.62);
    color: var(--gold-bright);
    font-size: 0.84rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.reception-back-link:hover {
    background: rgba(232, 184, 109, 0.16);
    border-color: var(--gold-bright);
    transform: translateX(-2px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.audio-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    border: 1px solid var(--border-gold);
    background-color: rgba(232, 184, 109, 0.08);
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-toggle-btn:hover {
    background-color: rgba(232, 184, 109, 0.18);
    color: var(--text-primary);
}

.audio-toggle-btn.is-on {
    background-color: var(--gold);
    color: #1a1510;
    border-color: var(--gold-bright);
    font-weight: 700;
}

.audio-state {
    font-weight: 700;
    font-size: 0.75rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--gold-bright);
}

/* Main */
.site-main {
    flex: 1 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.72rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.94rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-gold {
    background: linear-gradient(135deg, #e8b86d 0%, #c99242 100%);
    color: #1b150d;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #f5cd88 0%, #d8a14d 100%);
}

.btn-ghost {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-gold);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background-color: rgba(232, 184, 109, 0.14);
    border-color: var(--gold-bright);
}

.btn-sm {
    padding: 0.42rem 0.9rem;
    font-size: 0.84rem;
}

.btn-danger-outline {
    background: transparent;
    border-color: rgba(229, 115, 115, 0.45);
    color: #f19c9c;
}

.btn-danger-outline:hover {
    background: rgba(229, 115, 115, 0.14);
}

/* Notice Banner (DB Status) */
.mode-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(232, 184, 109, 0.1);
    border: 1px solid var(--border-gold);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(232, 184, 109, 0.2);
    color: var(--gold-bright);
    font-weight: 700;
    font-size: 0.78rem;
    margin-right: 0.4rem;
}

/* Daeungjeon Hero (Candlelight & Incense Smoke) */
.sanctuary-hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 3.75rem;
    border-bottom: 1px solid var(--border-subtle);
    background:
        radial-gradient(ellipse at 50% 78%, rgba(232, 165, 75, 0.18), transparent 58%),
        linear-gradient(180deg, #121018 0%, #1b1723 100%);
}

.sanctuary-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    align-items: center;
    gap: 2.5rem;
}

.hero-eyebrow {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-gold);
    background: rgba(232, 184, 109, 0.1);
    color: var(--gold-bright);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.hero-title {
    margin: 0 0 1rem;
    font-size: 2.35rem;
    line-height: 1.32;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-subtitle {
    margin: 0 0 1.85rem;
    color: var(--text-secondary);
    font-size: 1.03rem;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Candle & Incense Visual Stage */
.altar-visual {
    position: relative;
    min-height: 290px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: radial-gradient(circle at 50% 65%, rgba(240, 179, 84, 0.16), rgba(20, 18, 26, 0.92) 72%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem 1.5rem 1.75rem;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.incense-smoke-wrap {
    position: absolute;
    bottom: 92px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 170px;
    pointer-events: none;
}

.smoke-wisp {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 238, 225, 0.28), transparent 70%);
    filter: blur(5px);
    animation: riseSmoke 6.5s ease-in-out infinite;
}

.smoke-wisp.w2 {
    animation-delay: 2.1s;
    width: 24px;
    height: 24px;
}

.smoke-wisp.w3 {
    animation-delay: 4.2s;
    width: 16px;
    height: 16px;
}

@keyframes riseSmoke {
    0% {
        transform: translate(-50%, 0) scale(0.7);
        opacity: 0;
    }
    20% {
        opacity: 0.55;
    }
    60% {
        transform: translate(calc(-50% + 14px), -95px) scale(1.9);
        opacity: 0.3;
    }
    100% {
        transform: translate(calc(-50% - 10px), -165px) scale(2.8);
        opacity: 0;
    }
}

.altar-lamps {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2.25rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 2;
}

.candle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.candle-flame {
    position: relative;
    width: 15px;
    height: 28px;
    border-radius: 52% 52% 44% 44% / 64% 64% 36% 36%;
    background:
        radial-gradient(ellipse 46% 52% at 50% 76%, #fbbf24 0%, #f97316 58%, rgba(249, 115, 22, 0) 100%),
        radial-gradient(ellipse 88% 92% at 50% 62%, #f97316 0%, #ef4444 54%, #dc2626 100%);
    box-shadow:
        0 0 12px 4px rgba(239, 68, 68, 0.85),
        0 0 26px 8px rgba(220, 38, 38, 0.55);
    filter:
        drop-shadow(0 0 10px rgba(239, 68, 68, 0.85))
        drop-shadow(0 0 22px rgba(220, 38, 38, 0.55));
    transform-origin: 50% 92%;
    animation: flickerFlame 1.3s ease-in-out infinite;
    margin-bottom: 3px;
}

.candle-flame::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 2px;
    height: 6px;
    transform: translateX(-50%);
    border-radius: 1px;
    background: #292524;
}

.candle.side .candle-flame {
    width: 13px;
    height: 23px;
    animation-duration: 1.65s;
    animation-delay: -0.45s;
}

@keyframes flickerFlame {
    0% {
        transform: scale(0.95, 1.03) rotate(-2.4deg) skewX(-2deg);
        opacity: 0.92;
    }
    28% {
        transform: scale(1.04, 1.11) rotate(1.8deg) skewX(2.5deg);
        opacity: 1;
    }
    58% {
        transform: scale(0.96, 0.94) rotate(-1.6deg) skewX(-1.5deg);
        opacity: 0.88;
    }
    82% {
        transform: scale(1.05, 1.09) rotate(2.2deg) skewX(1.8deg);
        opacity: 0.98;
    }
    100% {
        transform: scale(0.95, 1.03) rotate(-2.4deg) skewX(-2deg);
        opacity: 0.92;
    }
}

.candle-body {
    width: 24px;
    height: 62px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.42) 0%, #f5dfd2 16%, #efe0c6 45%, #c8b08a 100%);
    border: 1px solid rgba(255, 224, 200, 0.28);
    box-shadow: inset 0 5px 10px rgba(239, 68, 68, 0.42);
}

.candle.side .candle-body {
    width: 20px;
    height: 46px;
}

.incense-burner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.incense-stick {
    width: 3px;
    height: 36px;
    background: linear-gradient(180deg, #ff9955 0%, #7d6654 25%, #534237 100%);
    border-radius: 2px;
    box-shadow: 0 -2px 8px rgba(255, 140, 60, 0.7);
}

.burner-bowl {
    width: 58px;
    height: 28px;
    border-radius: 0 0 28px 28px;
    background: linear-gradient(180deg, #5e4b3c 0%, #312720 100%);
    border: 1px solid var(--border-gold);
}

.altar-caption {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Status Metrics Bar */
.metrics-section {
    padding: 1.75rem 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-subtle);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.metric-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1.25;
}

.metric-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Sections & Cards */
.page-section {
    padding: 3.25rem 0;
}

.page-header {
    padding: 2.75rem 0 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(232, 184, 109, 0.08) 0%, transparent 100%);
}

.page-title {
    margin: 0 0 0.5rem;
    font-size: 1.9rem;
    color: var(--gold-bright);
}

.page-desc {
    margin: 0;
    color: var(--text-secondary);
    max-width: 680px;
}

.section-head {
    margin-bottom: 1.75rem;
}

.section-title {
    margin: 0 0 0.4rem;
    font-size: 1.45rem;
    color: var(--text-primary);
}

.section-desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.space-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.space-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-card);
}

.space-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-3px);
}

.space-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.space-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--gold-bright);
}

.space-desc {
    margin: 0 0 1.25rem;
    color: var(--text-secondary);
    font-size: 0.94rem;
    flex: 1 0 auto;
}

.space-cta {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
}

.panel-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.65rem;
    box-shadow: var(--shadow-card);
}

/* Forms */
.form-grid {
    display: grid;
    gap: 1rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.field-input,
.field-textarea,
.field-select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-deep);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.field-textarea {
    resize: vertical;
    min-height: 100px;
}

.field-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Lantern Sanctuary */
.lantern-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.color-option {
    position: relative;
}

.color-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.color-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-deep);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

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

.dot-PINK { background: var(--lotus-pink); box-shadow: 0 0 12px rgba(229, 140, 164, 0.7); }
.dot-YELLOW { background: var(--lotus-yellow); box-shadow: 0 0 12px rgba(240, 201, 110, 0.7); }
.dot-GREEN { background: var(--lotus-green); box-shadow: 0 0 12px rgba(123, 192, 163, 0.7); }
.dot-WHITE { background: var(--lotus-white); box-shadow: 0 0 12px rgba(244, 241, 234, 0.65); }

.color-option input:checked + .color-chip {
    border-color: var(--gold-bright);
    background: rgba(232, 184, 109, 0.16);
    color: var(--text-primary);
    font-weight: 700;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pill-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.84rem;
    cursor: pointer;
}

.pill-btn.is-active,
.pill-btn:hover {
    border-color: var(--gold);
    background: rgba(232, 184, 109, 0.18);
    color: var(--gold-bright);
}

.lantern-sky {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.lantern-card {
    position: relative;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(35, 31, 46, 0.96) 0%, rgba(22, 20, 30, 0.98) 100%);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: floatLantern 6s ease-in-out infinite;
}

.lantern-card:nth-child(even) {
    animation-delay: 1.5s;
}

@keyframes floatLantern {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.lantern-card.color-PINK { border-top: 3px solid var(--lotus-pink); box-shadow: 0 8px 24px rgba(229, 140, 164, 0.12); }
.lantern-card.color-YELLOW { border-top: 3px solid var(--lotus-yellow); box-shadow: 0 8px 24px rgba(240, 201, 110, 0.12); }
.lantern-card.color-GREEN { border-top: 3px solid var(--lotus-green); box-shadow: 0 8px 24px rgba(123, 192, 163, 0.12); }
.lantern-card.color-WHITE { border-top: 3px solid var(--lotus-white); box-shadow: 0 8px 24px rgba(244, 241, 234, 0.12); }

.lantern-card.is-focused {
    border: 2px solid var(--gold-bright);
    box-shadow: 0 0 28px rgba(232, 184, 109, 0.28);
}

.lantern-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.lantern-nick {
    font-weight: 700;
    color: var(--gold-bright);
    font-size: 0.95rem;
}

.lantern-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.lantern-wish {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1 0 auto;
}

.lantern-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
}

.lantern-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* 108 Bow Room */
.bow-stage {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.sutra-box {
    min-height: 122px;
    padding: 1.45rem 1.65rem;
    border-radius: var(--radius-md);
    background: rgba(20, 18, 26, 0.78);
    border: 1px solid var(--border-gold);
    margin-bottom: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sutra-content-wrap {
    transition: opacity 0.24s ease, transform 0.24s ease;
    opacity: 1;
    transform: translateY(0);
}

.sutra-content-wrap.is-fading {
    opacity: 0;
    transform: translateY(5px);
}

.sutra-stage-badge {
    display: inline-block;
    margin-bottom: 0.6rem;
    padding: 0.22rem 0.85rem;
    border-radius: 999px;
    background: rgba(232, 184, 109, 0.18);
    border: 1px solid rgba(232, 184, 109, 0.48);
    color: var(--gold-bright);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sutra-text {
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.sutra-source {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.bow-ring-btn {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 2px solid var(--border-gold);
    background: radial-gradient(circle, rgba(232, 184, 109, 0.16) 0%, var(--bg-surface) 72%);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0.5rem auto 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    user-select: none;
}

.bow-ring-btn:hover {
    box-shadow: 0 0 36px rgba(232, 184, 109, 0.25);
}

.bow-ring-btn.is-pulsing {
    transform: scale(0.95);
    box-shadow: 0 0 42px rgba(232, 184, 109, 0.45);
}

.bow-ring-btn.is-cooldown {
    opacity: 0.72;
    cursor: wait;
}

.bow-ring-svg {
    position: absolute;
    inset: -6px;
    width: 252px;
    height: 252px;
    transform: rotate(-90deg);
    pointer-events: none;
}

.bow-count-num {
    font-size: 3.1rem;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1.1;
}

.bow-count-goal {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.bow-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.bow-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.bow-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-top: 1.5rem;
}

/* Meditation Room */
.meditation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.breath-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.breath-circle-wrap {
    position: relative;
    width: 210px;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 1.4rem;
}

.breath-aura {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 192, 163, 0.42), rgba(232, 184, 109, 0.14) 70%);
    border: 1px solid rgba(123, 192, 163, 0.6);
    transition: transform 1s linear;
}

.breath-core {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.breath-phase {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.breath-timer {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-top: 0.25rem;
}

.mixer-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mixer-row {
    display: grid;
    grid-template-columns: 120px 1fr 44px;
    align-items: center;
    gap: 0.85rem;
}

.mixer-label {
    font-size: 0.92rem;
    color: var(--text-primary);
}

.mixer-slider {
    width: 100%;
    accent-color: var(--gold);
    cursor: pointer;
}

.mixer-val {
    text-align: right;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Fortune / Mind Prescription (Hanji Card) */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.mood-btn {
    padding: 1.15rem 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.2s ease;
}

.mood-icon {
    font-size: 1.55rem;
    line-height: 1;
    flex-shrink: 0;
}

.mood-btn:hover,
.mood-btn.is-active {
    border-color: var(--gold-bright);
    background: rgba(232, 184, 109, 0.16);
}

.mood-title {
    display: block;
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--gold-bright);
    line-height: 1.45;
}

.mood-sub {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* 한지 질감 마음 처방전 카드 컨테이너 */
.hanji-prescription-card {
    position: relative;
    max-width: 460px;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem;
    border-radius: 6px;
    background: radial-gradient(circle at 20% 15%, #FAF7F0 0%, #F3EDE0 65%, #EAE1D0 100%);
    color: #2B2623;
    font-family: "Noto Serif KR", "Batang", serif;
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.35),
        inset 0 0 40px rgba(168, 145, 112, 0.16);
    border: 1px solid rgba(155, 132, 102, 0.35);
    overflow: hidden;
}

/* 한지 내부 이중 전통 테두리선 */
.hanji-prescription-card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(139, 115, 85, 0.28);
    pointer-events: none;
    z-index: 1;
}

/* 닥나무 한지 섬유 결 노이즈 오버레이 */
.hanji-prescription-card::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.055;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='hanjiNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23hanjiNoise)'/%3E%3C/svg%3E");
}

.hanji-prescription-card.is-entering {
    animation: hanjiFloatUp 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hanji-prescription-card.is-entering .ungok-seal {
    animation: sealStampDown 0.36s cubic-bezier(0.2, 0.85, 0.35, 1) 0.2s both;
}

@keyframes hanjiFloatUp {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sealStampDown {
    0% {
        opacity: 0;
        transform: scale(1.26) rotate(-6.5deg);
    }
    65% {
        opacity: 0.96;
        transform: scale(0.94) rotate(-3.2deg);
    }
    100% {
        opacity: 0.9;
        transform: scale(1) rotate(-3.5deg);
    }
}

.hanji-prescription-card.is-updated {
    animation: hanjiUpdateHighlight 0.6s ease-out both;
}

.hanji-prescription-card.is-entering.is-updated {
    animation:
        hanjiFloatUp 0.48s cubic-bezier(0.22, 1, 0.36, 1) both,
        hanjiUpdateHighlight 0.6s ease-out both;
}

@keyframes hanjiUpdateHighlight {
    0% {
        opacity: 0.72;
        border-color: #e8b86d;
        box-shadow:
            0 0 0 3px rgba(232, 184, 109, 0.55),
            0 16px 38px rgba(232, 184, 109, 0.32),
            inset 0 0 40px rgba(232, 184, 109, 0.24);
    }
    45% {
        opacity: 1;
        border-color: #f3c97b;
        box-shadow:
            0 0 0 4px rgba(243, 201, 123, 0.48),
            0 16px 38px rgba(232, 184, 109, 0.28),
            inset 0 0 40px rgba(232, 184, 109, 0.20);
    }
    100% {
        opacity: 1;
        border-color: rgba(155, 132, 102, 0.35);
        box-shadow:
            0 14px 34px rgba(0, 0, 0, 0.35),
            inset 0 0 40px rgba(168, 145, 112, 0.16);
    }
}

.fortune-modal-close-btn {
    display: none;
}

@media (max-width: 768px) {
    body[data-page="fortune"] .page-section {
        padding-bottom: 96px;
    }

    body[data-page="fortune"].fortune-modal-locked {
        overflow: hidden;
    }

    body[data-page="fortune"].fortune-modal-locked .temple-toast {
        z-index: 1300;
    }

    body[data-page="fortune"] #prescriptionResultWrap.is-mobile-modal-open {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 16px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(3px);
    }

    body[data-page="fortune"] #prescriptionResultWrap.is-mobile-modal-open .fortune-modal-dialog {
        position: relative;
        width: 100%;
        max-width: 460px;
        max-height: 82vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    body[data-page="fortune"] #prescriptionResultWrap.is-mobile-modal-open .hanji-prescription-card {
        max-width: 100%;
        padding: 2.6rem 1.35rem 1.65rem;
    }

    body[data-page="fortune"] #prescriptionResultWrap.is-mobile-modal-open .hanji-emotion-badge {
        max-width: calc(100% - 84px);
    }

    body[data-page="fortune"] #prescriptionResultWrap.is-mobile-modal-open .fortune-modal-close-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        position: absolute;
        top: 14px;
        right: 14px;
        z-index: 5;
        padding: 6px 11px;
        border-radius: 999px;
        border: 1px solid rgba(122, 99, 72, 0.42);
        background: rgba(250, 247, 240, 0.94);
        color: #3A322C;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(43, 38, 35, 0.14);
    }

    body[data-page="fortune"] #prescriptionResultWrap.is-mobile-modal-open .hero-actions {
        margin-top: 1rem !important;
        gap: 0.5rem;
    }
}

.hanji-card-inner {
    position: relative;
    z-index: 2;
}

/* 상단 감정 태그 */
.hanji-emotion-badge {
    display: inline-block;
    font-size: 0.8rem;
    color: #7A6348;
    border-bottom: 1px solid rgba(122, 99, 72, 0.35);
    padding-bottom: 0.25rem;
    margin-bottom: 1.1rem;
    letter-spacing: 0.04em;
}

/* 처방전 핵심 제목 */
.hanji-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.45;
    color: #1F1B18;
    margin: 0 0 1.25rem 0;
    word-break: keep-all;
}

/* 경전·법문 인용 박스 */
.hanji-scripture-box {
    background: rgba(139, 115, 85, 0.08);
    border-left: 3px solid #9E7B56;
    padding: 0.95rem 1.1rem;
    margin: 0 0 1.35rem 0;
    border-radius: 0 4px 4px 0;
}

.hanji-scripture-text {
    font-size: 0.96rem;
    line-height: 1.75;
    color: #3A322C;
    margin: 0 0 0.4rem 0;
    word-break: keep-all;
}

.hanji-scripture-source {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: #7D6B57;
}

/* 따뜻한 위로 본문 */
.hanji-comfort-msg {
    font-size: 0.95rem;
    line-height: 1.85;
    color: #2E2925;
    margin: 0 0 1.4rem 0;
    word-break: keep-all;
}

/* 오늘의 작은 실천 팁 */
.hanji-action-tip {
    background: rgba(255, 255, 255, 0.55);
    border: 1px dashed rgba(139, 115, 85, 0.4);
    border-radius: 4px;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #4A3F35;
    margin-bottom: 1.75rem;
    word-break: keep-all;
}

.hanji-tip-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #7A6348;
    margin-bottom: 0.28rem;
}

/* 하단 합장 문구 및 붉은 낙관 영역 */
.hanji-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(139, 115, 85, 0.2);
}

.hanji-footer-date {
    font-size: 0.78rem;
    color: #7D6B57;
}

.hanji-footer-sign {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
}

.hanji-footer-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #4A3F35;
    letter-spacing: 0.08em;
}

/* 사람이 직접 찍은 듯 살짝 기울어진 낙관 연출 */
.ungok-seal {
    transform: rotate(-3.5deg);
    opacity: 0.9;
    flex-shrink: 0;
}

.modal-dialog-hanji {
    max-width: 560px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.modal-dialog-hanji .hanji-prescription-card {
    max-width: 100%;
}

/* Guestbook */
.guestbook-list {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.gb-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.4rem;
}

.gb-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.gb-tag {
    display: inline-block;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    margin-right: 0.45rem;
}

.tag-PEACE { background: rgba(123, 192, 163, 0.2); color: #9cd9be; }
.tag-EXAM { background: rgba(240, 201, 110, 0.2); color: #f7d99c; }
.tag-HEALTH { background: rgba(229, 140, 164, 0.2); color: #f3b1c3; }
.tag-THANKS { background: rgba(164, 179, 240, 0.2); color: #c4d0fb; }

.gb-content {
    margin: 0 0 0.85rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.gb-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

/* Next-Step Flow Banner */
.next-flow-box {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(232, 184, 109, 0.1), rgba(123, 192, 163, 0.08));
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.next-flow-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    color: var(--gold-bright);
}

.next-flow-desc {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 7, 11, 0.78);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-dialog {
    width: 100%;
    max-width: 460px;
    background: var(--bg-surface);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    box-shadow: var(--shadow-card);
}

.modal-title {
    margin: 0 0 0.65rem;
    font-size: 1.2rem;
    color: var(--gold-bright);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* Footer */
.site-footer {
    background: #0c0b0f;
    border-top: 1px solid var(--border-subtle);
    padding: 2.25rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.footer-title {
    margin: 0 0 0.35rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.footer-desc {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
    max-width: 560px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--gold-bright);
}

/* Toast */
.temple-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 16px);
    background: rgba(34, 30, 44, 0.96);
    border: 1px solid var(--gold);
    color: var(--text-primary);
    padding: 0.72rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 600;
    max-width: 92vw;
    text-align: center;
}

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

.temple-toast.is-gentle-warn {
    background: linear-gradient(135deg, rgba(48, 30, 38, 0.96), rgba(40, 31, 26, 0.96));
    border-color: #e9a6b3;
    color: #fde8d5;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(233, 166, 179, 0.22);
}

/* Responsive */
@media (max-width: 1080px) {
    .brand-sub {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .primary-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(17, 16, 21, 0.98);
        border-bottom: 1px solid var(--border-subtle);
        padding: 0.85rem 1.25rem 1.15rem;
    }

    .primary-nav.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav-link {
        display: block;
        padding: 0.72rem 0.95rem;
    }

    .nav-item-dropdown > .nav-dropdown-menu {
        display: block;
        position: static;
        min-width: 0;
        margin: 0.2rem 0 0.45rem 0.85rem;
        padding: 0.25rem 0 0.25rem 0.65rem;
        border: none;
        border-left: 2px solid var(--border-gold);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .nav-dropdown-link {
        padding: 0.52rem 0.75rem;
    }

    .sanctuary-inner,
    .lantern-layout,
    .meditation-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .reception-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .metrics-grid,
    .space-grid,
    .lantern-sky,
    .mood-grid,
    .form-row-2,
    .bow-stats {
        grid-template-columns: 1fr;
    }

    .mixer-row {
        grid-template-columns: 96px 1fr 40px;
    }

    .hanji-inner,
    .temple-intro-inner {
        padding: 1.4rem 1.15rem;
    }

    .hanji-quote {
        font-size: 1.12rem;
    }

    .temple-prose-card,
    .temple-intro-body {
        font-size: 0.94rem;
        line-height: 1.82;
    }
}

/* ============================================================================
   운곡산사 2.5D 가상 도량 (/space)
   ============================================================================ */
.space-stage-wrap {
    position: relative;
    width: 100%;
    height: calc(100vh - 68px);
    min-height: 540px;
    background: #0e0d14;
    overflow: hidden;
    user-select: none;
}

.space-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    touch-action: none;
}

/* 상단 플로팅 HUD */
.space-hud-top {
    position: absolute;
    top: 0.9rem;
    left: 1rem;
    right: 1rem;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    pointer-events: none;
}

.space-hud-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
}

.space-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 0.95rem;
    border-radius: 999px;
    background: rgba(17, 16, 22, 0.84);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-gold);
    color: var(--gold-bright);
    font-family: "Noto Serif KR", "Batang", serif;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.space-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lotus-green);
    box-shadow: 0 0 8px rgba(123, 192, 163, 0.9);
}

.space-hud-select,
.space-hud-btn {
    padding: 0.44rem 0.82rem;
    border-radius: 999px;
    background: rgba(17, 16, 22, 0.84);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(235, 206, 155, 0.32);
    color: var(--text-primary);
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.space-hud-select:hover,
.space-hud-btn:hover {
    border-color: var(--gold-bright);
    background: rgba(34, 30, 44, 0.92);
}

.space-hud-btn.is-on {
    background: var(--gold);
    color: #19140e;
    border-color: var(--gold-bright);
    font-weight: 700;
}

.space-hint-pill {
    position: absolute;
    right: 1rem;
    bottom: 5.15rem;
    z-index: 15;
    padding: 0.38rem 0.82rem;
    border-radius: 999px;
    background: rgba(17, 16, 22, 0.72);
    border: 1px solid rgba(235, 206, 155, 0.18);
    color: var(--text-secondary);
    font-size: 0.78rem;
    pointer-events: none;
}

/* 좌측 하단 접이식 차담 나누기 창 */
.space-chat-box {
    position: absolute;
    left: 1rem;
    bottom: 1.15rem;
    z-index: 26;
    width: 290px;
    border-radius: var(--radius-md);
    background: rgba(18, 20, 28, 0.72);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(235, 206, 155, 0.3);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    user-select: text;
}

.space-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.48rem 0.75rem;
    border-bottom: 1px solid rgba(235, 206, 155, 0.16);
    background: rgba(14, 15, 22, 0.55);
}

.space-chat-box.is-collapsed .space-chat-header {
    border-bottom: none;
}

.space-chat-box.is-collapsed .space-chat-body {
    display: none;
}

.space-chat-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.space-chat-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.02em;
}

.space-chat-unread-dot {
    display: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f2c96b;
    box-shadow: 0 0 0 0 rgba(242, 201, 107, 0.72);
    flex-shrink: 0;
}

.space-chat-preview {
    display: none;
}

@keyframes spaceChatDotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(242, 201, 107, 0.75);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(242, 201, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(242, 201, 107, 0);
    }
}

.space-chat-toggle {
    padding: 0.18rem 0.56rem;
    border-radius: 999px;
    border: 1px solid rgba(235, 206, 155, 0.3);
    background: rgba(232, 184, 109, 0.1);
    color: var(--text-secondary);
    font-size: 0.73rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.space-chat-toggle:hover {
    border-color: var(--gold-bright);
    color: var(--gold-bright);
}

.space-chat-log {
    max-height: 130px;
    min-height: 76px;
    overflow-y: auto;
    padding: 0.55rem 0.72rem;
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    font-size: 0.8rem;
    line-height: 1.48;
    color: var(--text-primary);
}

.space-chat-item {
    word-break: break-word;
}

.space-chat-item.is-system {
    color: #a9a7b4;
    font-size: 0.75rem;
    font-style: italic;
}

.space-chat-time {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.space-chat-nick {
    color: var(--gold-bright);
    font-weight: 600;
}

.space-chat-item.is-mine .space-chat-nick {
    color: #9cd9be;
}

.space-chat-form {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
    border-top: 1px solid rgba(235, 206, 155, 0.14);
    background: rgba(12, 13, 20, 0.55);
}

.space-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(235, 206, 155, 0.24);
    background: rgba(25, 27, 38, 0.88);
    color: var(--text-primary);
    font-size: 0.79rem;
}

.space-chat-input::placeholder {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.space-chat-send {
    flex-shrink: 0;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid var(--border-gold);
    background: rgba(232, 184, 109, 0.22);
    color: var(--gold-bright);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.space-chat-send:hover {
    background: var(--gold);
    color: #19140e;
}

/* 하단 중앙 비언어 제스처 바 */
.space-gesture-bar {
    position: absolute;
    left: 50%;
    bottom: 1.15rem;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    background: rgba(17, 16, 22, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48);
    max-width: calc(100vw - 1.5rem);
    overflow-x: auto;
}

.gesture-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.92rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(232, 184, 109, 0.1);
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.gesture-btn:hover {
    background: rgba(232, 184, 109, 0.24);
    border-color: var(--border-gold);
    color: var(--gold-bright);
    transform: translateY(-1px);
}

.gesture-btn:active {
    transform: scale(0.96);
}

/* 반투명 입장 오버레이 */
.space-entry-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(11, 10, 16, 0.76);
    backdrop-filter: blur(8px);
}

.space-entry-overlay.is-hidden {
    display: none;
}

.space-entry-card {
    width: 100%;
    max-width: 560px;
    background: linear-gradient(180deg, rgba(31, 28, 40, 0.96) 0%, rgba(20, 18, 27, 0.98) 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 1.85rem 1.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.avatar-style-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.avatar-style-option {
    position: relative;
    display: block;
}

.avatar-style-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.avatar-style-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.42rem;
    height: 100%;
    padding: 1.05rem 0.55rem 0.9rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: rgba(16, 15, 22, 0.85);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.avatar-style-chip:hover {
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}

.avatar-selected-badge {
    display: none;
    position: absolute;
    top: 7px;
    right: 7px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #d4af37;
    color: #18130d;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    pointer-events: none;
    z-index: 2;
}

.avatar-style-icon {
    font-size: 1.55rem;
    line-height: 1;
}

/* 캐릭터 실제 정면 스프라이트 80x80 미리보기 영역 */
.avatar-sprite-stage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 60%, rgba(212, 175, 55, 0.16), rgba(12, 11, 16, 0.42) 74%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    overflow: hidden;
    flex-shrink: 0;
}

/* 128x128 스프라이트 시트 아바타 정면(Col 0) 크롭 (512x640 -> 80px 축소: 320x400) */
.avatar-sprite-thumb {
    display: block;
    width: 80px;
    height: 80px;
    background-image: url("/sprite-sansa.png?v=20261127");
    background-size: 320px 400px;
    background-repeat: no-repeat;
}

.avatar-sprite-thumb.thumb-monk-a {
    background-position: 0 0;
}

.avatar-sprite-thumb.thumb-monk-b {
    background-position: 0 -80px;
}

.avatar-sprite-thumb.thumb-lantern {
    background-position: 0 -160px;
}

.avatar-style-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f6efe2;
    line-height: 1.3;
}

.avatar-style-sub {
    font-size: 0.74rem;
    color: #bfb5a6;
    line-height: 1.42;
    word-break: keep-all;
}

.avatar-style-option.is-selected .avatar-style-chip,
.avatar-style-option input:checked + .avatar-style-chip {
    border: 2px solid #d4af37;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.08) 100%);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.28);
}

.avatar-style-option.is-selected .avatar-selected-badge,
.avatar-style-option input:checked + .avatar-style-chip .avatar-selected-badge {
    display: inline-block;
}

.avatar-style-option input:checked + .avatar-style-chip .avatar-sprite-stage {
    border-color: rgba(212, 175, 55, 0.55);
    background: radial-gradient(circle at 50% 60%, rgba(242, 208, 108, 0.26), rgba(16, 14, 20, 0.35) 76%);
}

.avatar-style-option input:checked + .avatar-style-chip .avatar-sprite-thumb {
    animation: avatarPreviewBreathe 2.1s ease-in-out infinite;
}

.avatar-style-option input:checked + .avatar-style-chip .avatar-style-name {
    color: #f8de8b;
}

@keyframes avatarPreviewBreathe {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@media (max-width: 768px) {
    .space-entry-overlay {
        z-index: 1050;
        align-items: flex-start;
        overflow-y: auto;
        padding: 14px 12px 96px;
    }

    .space-entry-card {
        margin: auto 0;
        padding: 1.35rem 0.95rem 1.4rem;
    }

    .avatar-style-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .avatar-style-chip {
        padding: 0.95rem 0.3rem 0.72rem;
        gap: 0.32rem;
    }

    .avatar-selected-badge {
        top: 4px;
        right: 4px;
        padding: 1px 5px;
        font-size: 0.62rem;
    }

    .avatar-sprite-stage {
        width: 72px;
        height: 72px;
    }

    .avatar-sprite-thumb {
        width: 72px;
        height: 72px;
        background-size: 288px 360px;
    }

    .avatar-sprite-thumb.thumb-monk-a {
        background-position: 0 0;
    }

    .avatar-sprite-thumb.thumb-monk-b {
        background-position: 0 -72px;
    }

    .avatar-sprite-thumb.thumb-lantern {
        background-position: 0 -144px;
    }

    .avatar-style-name {
        font-size: 0.84rem;
    }

    .avatar-style-sub {
        font-size: 0.68rem;
        line-height: 1.32;
    }
}

@media (max-width: 768px) {
    .space-stage-wrap {
        height: calc(100vh - 68px);
        min-height: 500px;
    }

    .space-hud-top {
        top: 0.65rem;
        left: 0.65rem;
        right: 0.65rem;
    }

    .space-status-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .space-hint-pill {
        display: none;
    }

    /* 모바일(768px 이하) 차담 나누기 슬림 접이식 / 반투명 유리 모드 */
    .space-chat-box {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 96px;
        border-radius: 14px;
        background: rgba(18, 16, 14, 0.74);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(235, 206, 155, 0.34);
        transition: border-radius 0.2s ease, bottom 0.2s ease;
    }

    .space-chat-header {
        gap: 8px;
        padding: 0.42rem 0.68rem;
        background: rgba(18, 16, 14, 0.42);
    }

    .space-chat-log {
        max-height: 64px;
        min-height: 44px;
        padding: 0.4rem 0.68rem;
        gap: 0.22rem;
        font-size: 0.77rem;
        line-height: 1.42;
    }

    .space-chat-form {
        padding: 0.38rem 0.5rem;
        background: rgba(14, 12, 10, 0.46);
    }

    .space-chat-input {
        padding: 0.34rem 0.58rem;
        font-size: 0.78rem;
        background: rgba(24, 21, 19, 0.78);
    }

    .space-chat-send {
        padding: 0.34rem 0.68rem;
        font-size: 0.76rem;
    }

    /* 접힘 상태: 하단 44px 이내 슬림 1줄 미니 바 (미읽음 점 + 최근 1줄 미리보기) */
    .space-chat-box.is-collapsed {
        bottom: 54px;
        height: 42px;
        max-height: 44px;
        border-radius: 999px;
        background: rgba(18, 16, 14, 0.74);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        cursor: pointer;
    }

    .space-chat-box.is-collapsed .space-chat-header {
        height: 40px;
        padding: 0 10px 0 8px;
        gap: 8px;
        background: transparent;
    }

    .space-chat-box.is-collapsed .space-chat-title {
        display: none;
    }

    .space-chat-box.is-collapsed .space-chat-title-wrap {
        order: 2;
        gap: 0;
    }

    .space-chat-box.is-collapsed .space-chat-toggle {
        order: 1;
        flex-shrink: 0;
        padding: 0.26rem 0.66rem;
        background: rgba(232, 184, 109, 0.18);
        border-color: rgba(235, 206, 155, 0.42);
        color: var(--gold-bright);
        font-weight: 700;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .space-chat-box.is-collapsed .space-chat-unread-dot.is-visible {
        display: inline-block;
        animation: spaceChatDotPulse 1.6s ease-out infinite;
    }

    .space-chat-box.is-collapsed .space-chat-preview {
        order: 3;
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.76rem;
        color: rgba(244, 238, 226, 0.86);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 접힘 상태에서는 동작 바도 숨겨 마당 하단 캐릭터 시야 확보 */
    .space-chat-box.is-collapsed ~ .space-gesture-bar {
        display: none;
    }

    /* 펼침 상태: 동작 버튼 1줄 가로 스크롤 바 (스크롤바 시각 숨김) */
    .space-gesture-bar {
        left: 10px;
        right: 10px;
        bottom: 52px;
        transform: none;
        width: auto;
        max-width: none;
        border-radius: 999px;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 5px 8px;
        background: rgba(18, 16, 14, 0.74);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .space-gesture-bar::-webkit-scrollbar {
        display: none;
    }

    .gesture-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.36rem 0.68rem;
        font-size: 0.76rem;
    }
}

/* ============================================================================
   운곡산사 3D 대웅전 참배 (/daeungjeon-3d)
   ============================================================================ */
.d3d-stage-wrap {
    position: relative;
    width: 100%;
    height: calc(100vh - 68px);
    min-height: 540px;
    background: #0d1018;
    overflow: hidden;
    user-select: none;
}

.d3d-canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: grab;
    touch-action: none;
}

.d3d-canvas-container:active {
    cursor: grabbing;
}

.d3d-canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.d3d-fallback-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.d3d-hud-top {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    pointer-events: none;
}

.d3d-title-card {
    pointer-events: auto;
    max-width: 440px;
    padding: 0.78rem 1.05rem;
    border-radius: var(--radius-md);
    background: rgba(15, 16, 23, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.d3d-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.d3d-title-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-bright);
    box-shadow: 0 0 10px rgba(242, 196, 90, 0.85);
    flex-shrink: 0;
}

.d3d-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.02em;
}

.d3d-guide-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
    word-break: keep-all;
}

.d3d-controls-group {
    pointer-events: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.d3d-preset-btn {
    padding: 0.46rem 0.88rem;
    border-radius: 999px;
    background: rgba(15, 16, 23, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(235, 206, 155, 0.3);
    color: var(--text-primary);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.d3d-preset-btn:hover {
    border-color: var(--gold-bright);
    background: rgba(34, 30, 44, 0.92);
    color: var(--gold-bright);
}

.d3d-preset-btn.is-active,
.d3d-sound-btn.is-on {
    background: var(--gold);
    color: #19140e;
    border-color: var(--gold-bright);
    font-weight: 700;
}

.d3d-action-log {
    position: absolute;
    left: 50%;
    bottom: 5.15rem;
    transform: translateX(-50%);
    z-index: 18;
    padding: 0.45rem 1.05rem;
    border-radius: 999px;
    background: rgba(15, 16, 23, 0.78);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(235, 206, 155, 0.28);
    color: var(--text-primary);
    font-size: 0.84rem;
    text-align: center;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
    transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.d3d-action-log.is-highlighted {
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    background: rgba(24, 21, 32, 0.9);
}

.d3d-action-bar {
    position: absolute;
    left: 50%;
    bottom: 1.2rem;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.52rem 0.72rem;
    border-radius: 999px;
    background: rgba(15, 16, 23, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.52);
    max-width: calc(100vw - 1.5rem);
}

.d3d-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.52rem 0.98rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(232, 184, 109, 0.12);
    color: var(--text-primary);
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.d3d-action-btn:hover {
    background: rgba(232, 184, 109, 0.26);
    border-color: var(--border-gold);
    color: var(--gold-bright);
    transform: translateY(-1px);
}

.d3d-action-btn:active {
    transform: scale(0.96);
}

.d3d-action-primary {
    background: linear-gradient(135deg, rgba(232, 184, 109, 0.95), rgba(201, 148, 66, 0.95));
    color: #1a140d;
    border-color: var(--gold-bright);
    font-weight: 700;
}

.d3d-action-primary:hover {
    background: linear-gradient(135deg, #f3ce88, #d9a452);
    color: #16100a;
}

@media (max-width: 720px) {
    .d3d-stage-wrap {
        height: calc(100vh - 68px);
        min-height: 500px;
    }

    .d3d-hud-top {
        top: 0.65rem;
        left: 0.65rem;
        right: 0.65rem;
        gap: 0.5rem;
    }

    .d3d-title-card {
        width: 100%;
        max-width: 100%;
        padding: 0.62rem 0.85rem;
    }

    .d3d-title {
        font-size: 0.92rem;
    }

    .d3d-guide-text {
        font-size: 0.74rem;
    }

    .d3d-controls-group {
        width: 100%;
        justify-content: flex-start;
        gap: 0.35rem;
    }

    .d3d-preset-btn {
        padding: 0.38rem 0.68rem;
        font-size: 0.76rem;
    }

    .d3d-action-log {
        bottom: 6.4rem;
        font-size: 0.76rem;
        padding: 0.36rem 0.78rem;
    }

    .d3d-action-bar {
        width: calc(100% - 1.3rem);
        border-radius: 18px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.45rem 0.5rem;
        gap: 0.35rem;
        bottom: 0.75rem;
    }

    .d3d-action-btn {
        padding: 0.44rem 0.72rem;
        font-size: 0.79rem;
    }
}
