/* ================================================
   SJC Church Homepage - Design System
   ================================================ */

/* CSS Custom Properties */
:root {
    /* Starbucks-inspired warm retail palette */
    --starbucks-green: #006241;
    --green-accent: #00754A;
    --house-green: #1E3932;
    --green-uplift: #2b5148;
    --green-light: #d4e9e2;

    --gold-50: #faf6ee;
    --gold-100: #f5ead6;
    --gold-200: #dfc49d;
    --gold-300: #cba258;
    --gold-400: #b98e3f;
    --gold-500: #9b7431;
    --gold-600: #795820;
    --gold-700: #5f4318;

    --slate-50: #f9f9f9;
    --slate-100: #f2f0eb;
    --slate-200: #edebe9;
    --slate-300: #d6dbde;
    --slate-400: rgba(0, 0, 0, 0.38);
    --slate-500: rgba(0, 0, 0, 0.58);
    --slate-600: #33433d;
    --slate-700: #2b5148;
    --slate-800: #1E3932;
    --slate-900: #0f2a24;
    --slate-950: #071b16;

    --primary-color: var(--green-accent);
    --primary-hover: var(--starbucks-green);

    --primary: var(--starbucks-green);
    --primary-light: var(--green-accent);
    --primary-dark: var(--house-green);
    --primary-glow: rgba(0, 117, 74, 0.14);

    --accent: var(--green-accent);
    --accent-light: var(--green-light);
    --accent-dark: var(--house-green);

    --bg-primary: #f2f0eb;
    --bg-secondary: #edebe9;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;

    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.58);
    --text-muted: rgba(0, 0, 0, 0.42);
    --text-inverse: #ffffff;

    --border-light: rgba(0, 0, 0, 0.08);
    --border-medium: rgba(0, 0, 0, 0.18);

    --shadow-sm: 0 0 0.5px rgba(0, 0, 0, 0.14), 0 1px 1px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.10), 0 2px 2px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 0 6px rgba(0, 0, 0, 0.16), 0 8px 12px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 0 6px rgba(0, 0, 0, 0.24), 0 8px 12px rgba(0, 0, 0, 0.14);
    --shadow-glow: 0 0 6px rgba(0, 117, 74, 0.18), 0 8px 12px rgba(0, 0, 0, 0.10);

    --gradient-gold: var(--green-accent);
    --gradient-warm: var(--green-accent);
    --gradient-hero: rgba(30, 57, 50, 0.82);
    --gradient-page-hero: var(--house-green);

    --radius-sm: 8px; /* text field padding iOS */
    --radius-md: 12px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    --nav-height: 83px;
    --mobile-nav-height: 80px;
    --public-header-height: 258px;
}

@media (min-width: 769px) {
    :root {
        --public-header-height: 320px;
    }
}

/* ================================================
   Reset & Base
   ================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    letter-spacing: -0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes softFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 8px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

body:not(.admin-body, .bulletin-page, .daily-prayer-page) .page-hero-content,
body:not(.admin-body, .bulletin-page, .daily-prayer-page) .section > .container > .date-nav,
body:not(.admin-body) .section > .container > .status-badge,
body:not(.admin-body) .section > .container > .signup-card,
body:not(.admin-body) .mypage-card {
    animation: softFadeUp 0.3s ease-out both;
    will-change: opacity, transform;
}

body.daily-prayer-page .page-hero + .section {
    min-height: calc(100svh - 340px);
    box-sizing: border-box;
}

.content-load-status {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

h1, h2, h3, h4, .serif-font, .page-hero-title, .section-title, .hero-title, .db-card-label {
    font-family: 'Nanum Myeongjo', serif !important;
}

/* 읽기 전용 본문 및 리스트 항목 명조체 적용 */
.prayer-content-body, .prayer-dash-body, .worship-order-name, .sermon-title,
.news-item, .prayer-request-item, .bulletin-news-text, .bulletin-prayer-text,
#news-list span, #prayer-requests-list span, #prayer-list span {
    font-family: 'Nanum Myeongjo', serif;
}

.hero-subtitle, .page-hero-subtitle, .footer-text {
    font-family: 'Nanum Myeongjo', serif;
}

/* UI 요소는 고딕체 유지 */
.navbar, .btn, .nav-link, .mobile-nav-item, .form-input, .form-textarea, .stat-value, .date-display {
    font-family: 'Noto Sans KR', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

textarea, input {
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

select,
label,
summary,
[role="button"],
[tabindex],
.btn,
.mobile-nav-item,
.nav-link,
.date-nav-btn {
    -webkit-tap-highlight-color: transparent;
}

/* ================================================
   Layout
   ================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

/* ================================================
   Navigation
   ================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-base);
    background: #ffffff;
}

.navbar.scrolled {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    transition: transform var(--transition-fast);
}

.nav-logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: color var(--transition-base);
}

.navbar.scrolled .logo-text {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    position: relative;
}

.navbar.scrolled .nav-link {
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--green-light);
}

.navbar.scrolled .nav-link:hover {
    color: var(--primary);
    background: var(--slate-100);
}

.nav-link.active {
    color: var(--primary);
    background: var(--green-light);
    backdrop-filter: none;
}

.navbar.scrolled .nav-link.active {
    color: var(--primary);
    background: var(--green-light);
    font-weight: 600;
}

.nav-link i {
    font-size: 0.9rem;
}

#nav-admin-link[inert],
#nav-admin-btn-mobile[inert] {
    visibility: hidden;
}

/* 상단 내비 추가 버튼 (QR 및 관리자) */
.nav-qr-btn,
.nav-admin-btn {
    display: none !important;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    margin-left: auto;
    margin-right: 0;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.nav-admin-btn {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .nav-qr-btn.show,
    .nav-admin-btn {
        display: flex !important;
    }
}

/* Hamburger Toggle */
.nav-toggle {
    display: none;
    z-index: 10;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.hamburger {
    width: 22px;
    height: 2px;
    background: var(--text-inverse);
    border-radius: 2px;
    position: relative;
    transition: all var(--transition-base);
}

.navbar.scrolled .hamburger,
.navbar.scrolled .hamburger::before,
.navbar.scrolled .hamburger::after {
    background: var(--text-primary);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-inverse);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    background: #ffffff;
    box-shadow: var(--shadow-md);
    z-index: 5000;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom);
    user-select: none;
    /* 하단 바 덜컹거림 방지 및 성능 최적화 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    /* 클릭 시 덜컹거림을 줄이기 위해 트랜지션 범위 한정 */
    transition: color 0.1s ease, background-color 0.1s ease;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    max-width: 168px;
    touch-action: manipulation;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-icon {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    width: 64px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-bottom: 2px;
    overflow: hidden;
    /* 폰트 로딩 시 레이아웃 변형 완벽 차단 */
    max-width: 64px;
    max-height: 32px;
    text-overflow: clip;
}

.mobile-nav-item:active .mobile-nav-icon {
    background: var(--green-light);
}

.mobile-nav-item.active {
    color: var(--primary);
    font-weight: 500;
}

.mobile-nav-item.active .mobile-nav-icon {
    background: var(--green-light);
    color: var(--primary);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ================================================
   Buttons
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
    cursor: pointer;
    border: none;
    letter-spacing: -0.01em; /* typical SF font tracking */
}

/* Active touch feedback */
.btn:active {
    opacity: 0.9;
    transform: scale(0.95);
}

/* Filled Button (Primary) */
.btn-primary {
    background-color: var(--green-accent);
    color: var(--text-inverse);
    border: 1px solid var(--green-accent);
}

/* Tonal / Secondary Button */
.btn-secondary {
    background-color: var(--bg-card);
    color: var(--green-accent);
    border: 1px solid var(--green-accent);
}

/* Glass / Alternative */
.btn-glass {
    background: transparent;
    color: var(--green-accent);
    border: 1px solid var(--green-accent);
}
.btn-glass:active {
    background-color: rgba(0,0,0,0.05); /* iOS default tap feedback */
}

.btn-full {
    width: 100%;
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.12); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: var(--green-light);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    color: white;
    line-height: 1.3;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-title .highlight {
    background: linear-gradient(90deg, #ffffff, var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 40px; }
    50% { opacity: 1; height: 50px; }
}

/* ================================================
   Section Headers
   ================================================ */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--green-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ================================================
   Info Cards
   ================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-md); /* M3 Card Shape */
    padding: 32px;
    box-shadow: var(--shadow-sm); /* M3 Card Elevation */
    border: none;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--green-accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md); /* Hover state elevation */
}

.info-card:hover::before {
    opacity: 1;
}

.info-card.featured {
    background: var(--house-green);
    color: var(--text-inverse);
    border-color: transparent;
    box-shadow: var(--shadow-xl);
}

.info-card.featured::before {
    opacity: 1;
}

.info-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
    background: var(--slate-100);
    color: var(--primary);
}

.info-card.featured .info-card-icon {
    background: rgba(255, 255, 255, 0.12);
    color: var(--green-light);
}

.info-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-card.featured .info-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.info-card.featured .info-label {
    color: rgba(255, 255, 255, 0.5);
}

.info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-card.featured .info-value {
    color: var(--text-inverse);
}

.verse-text {
    font-size: 1.05rem;
    line-height: 1.8;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    padding-left: 16px;
    border-left: 3px solid var(--green-light);
}

.verse-ref {
    font-size: 0.85rem;
    color: var(--green-light);
    font-weight: 500;
    font-style: normal;
}

/* ================================================
   Page Hero (Sub pages)
   ================================================ */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: pageTransition 0.5s ease;
}

@keyframes pageTransition {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-hero {
    position: relative;
    height: var(--public-header-height);
    min-height: var(--public-header-height);
    max-height: var(--public-header-height);
    padding-top: var(--nav-height);
    box-sizing: border-box;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
}

.page-hero-bg.prayer-bg {
    background: var(--house-green);
}

.page-hero-bg.bulletin-bg {
    background: var(--house-green);
}

.page-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 769px) {
    .page-hero {
        padding-top: 0;
    }

    .page-hero-content {
        padding: var(--nav-height) 24px 0;
    }
}

.page-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--green-light);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.page-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.page-hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.70);
    font-weight: 300;
}

/* ================================================
   Date Navigation
   ================================================ */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 48px;
}

.date-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.date-nav-btn:hover {
    background: var(--green-light);
    color: var(--primary);
    transform: scale(1.08);
}

.date-display {
    text-align: center;
    min-width: 200px;
}

.date-display .date-main {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.date-display .date-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ================================================
   Daily Prayer Page
   ================================================ */
.prayer-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.prayer-card {
    background: var(--bg-card);
    border-radius: var(--radius-md); /* M3 radius */
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-sm); /* M3 elevation */
}

.prayer-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 32px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
}

.prayer-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.prayer-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.prayer-card-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.prayer-verse-box {
    margin: 24px 32px;
    padding: 24px;
    background: var(--house-green);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--green-light);
}

.prayer-verse-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prayer-verse-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-bottom: 8px;
}

.prayer-verse-ref {
    font-size: 0.85rem;
    color: var(--green-light);
    font-style: normal;
    font-weight: 500;
}

.prayer-content-body {
    padding: 24px 32px;
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-secondary);
}

.prayer-topics {
    padding: 24px 32px 32px;
    border-top: 1px solid var(--border-light);
}

.prayer-topics h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prayer-topics h3 i {
    color: var(--primary);
}

.prayer-topics ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prayer-topics li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.prayer-topics li:hover {
    background: var(--slate-100);
}

.prayer-topics li::before {
    content: '✦';
    color: var(--accent);
    font-size: 0.7rem;
    margin-top: 4px;
    flex-shrink: 0;
}

/* Prayer Sidebar */
.prayer-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.prayer-response-card,
.prayer-history-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: none;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.prayer-response-card h3,
.prayer-history-card h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.prayer-response-card h3 i {
    color: var(--primary);
}

.prayer-history-card h3 i {
    color: var(--accent);
}

.prayer-response-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.prayer-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.7;
    resize: vertical;
    background: #fff;
    color: var(--text-primary);
    transition: all var(--transition-base);
    margin-bottom: 16px;
}

.prayer-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: white;
}

.prayer-textarea::placeholder {
    color: var(--text-muted);
}

.prayer-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.prayer-history-item {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.prayer-history-item .history-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.prayer-history-item .history-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================================
   Bulletin Page
   ================================================ */
.bulletin-worship-orders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.bulletin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

.bulletin-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.bulletin-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
}

.bulletin-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.bulletin-icon-wrap.sermon-icon {
    background: var(--green-light);
    color: var(--primary);
}

.bulletin-icon-wrap.news-icon {
    background: var(--green-light);
    color: var(--primary);
}

.bulletin-icon-wrap.schedule-icon {
    background: var(--green-light);
    color: var(--primary);
}

.bulletin-card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Worship Order */
.worship-order-list {
    padding: 8px 0;
}

.worship-order-item {
    display: flex;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.worship-order-item:last-child {
    border-bottom: none;
}

.worship-order-item:hover {
    background: var(--slate-50);
}

.worship-order-num {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 숫자를 우측 정렬하여 이름과 가깝게 */
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: 16px;
    flex-shrink: 0;
}

.worship-order-item.highlight .worship-order-num {
    color: var(--primary);
    font-weight: 800;
}

.worship-order-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.worship-order-item.highlight .worship-order-name {
    font-weight: 700;
}

.worship-order-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Sermon Info */
.sermon-info {
    padding: 24px 28px;
}

.sermon-title-box {
    padding: 20px;
    background: var(--house-green);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.sermon-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.sermon-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    line-height: 1.5;
}

.sermon-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sermon-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sermon-detail-row i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

/* News */
.news-list {
    padding: 16px 28px 24px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.news-item:last-child {
    border-bottom: none;
}


/* Schedule */
.schedule-list {
    padding: 8px 28px 24px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-day {
    width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.schedule-day-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schedule-day-num {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.schedule-info {
    flex: 1;
}

.schedule-event {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.schedule-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ================================================
   Admin Section
   ================================================ */
.admin-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--slate-300); /* MD divider */
}

.admin-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.admin-toggle:hover {
    background: var(--slate-50);
}

.admin-toggle i {
    color: var(--text-muted);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin-left: auto;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--slate-300);
    border-radius: 26px;
    transition: var(--transition-base);
}

.slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-base);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.switch input:checked + .slider {
    background: var(--gradient-warm);
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* Admin Panel */
.admin-panel {
    margin-top: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-md); /* Elevated surface */
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}

.admin-tab {
    flex: 1;
    padding: 16px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-tab:hover {
    color: var(--text-primary);
    background: var(--slate-50);
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--slate-50);
}

.admin-tab-content {
    display: none;
    padding: 32px;
}

.admin-tab-content.active {
    display: block;
}

.admin-tab-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: #fff;
    color: var(--text-primary);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

/* Dropdown arrow custom styling */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23555555'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center; /* Arrow position */
    background-size: 18px;
    padding-right: 44px; /* Space for the arrow + margin on the right */
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
}

.form-textarea {
    resize: vertical;
    line-height: 1.7;
}

/* ================================================
   Footer
   ================================================ */
.footer {
    background: var(--house-green);
    padding: 60px 0;
    margin-top: 0;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 12px;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-logo span {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-divider {
    width: 40px;
    height: 2px;
    background: var(--gradient-gold);
    margin: 24px auto;
    border-radius: 1px;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ================================================
   Toast Notification
   ================================================ */
.toast-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--accent);
    animation: toastIn 0.4s ease, toastOut 0.4s ease 2.6s forwards;
    max-width: 360px;
}

.toast i {
    color: var(--accent);
    font-size: 1.1rem;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* ================================================
   Responsive Design
   ================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .prayer-layout {
        grid-template-columns: 1fr;
    }

    .bulletin-worship-orders {
        grid-template-columns: 1fr;
    }

    .bulletin-layout {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-card:last-child {
        grid-column: span 2;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    select.form-input {
        width: 100%;
        min-height: 48px;
        padding: 13px 46px 13px 16px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 12px;
        background-color: #fff;
        background-position: right 16px center;
        background-size: 18px;
        font-size: 16px;
        line-height: 1.25;
        box-shadow: none;
    }

    select.form-input:focus {
        background-color: #fff;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-glow);
    }

    .page-hero {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
    }

    .page-hero + .section {
        padding-top: var(--nav-height);
    }

    body.daily-prayer-page .page-hero + .section {
        min-height: calc(100svh - var(--mobile-nav-height));
    }

    .footer {
        display: none !important;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: none;
    }

    /* Mobile menu overlay */
    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 12, 5, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        align-items: center;
        justify-content: center;
        gap: 16px;
        z-index: 5;
    }

    .nav-links.mobile-open .nav-link {
        font-size: 1.2rem;
        padding: 16px 32px;
        color: white;
    }

    .mobile-nav {
        display: flex;
    }

    body {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    }

    .hero {
        height: calc(100vh - var(--mobile-nav-height));
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        padding: 14px 24px;
        font-size: 0.9rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-card:last-child {
        grid-column: span 1;
    }

    .section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .prayer-card-header {
        padding: 20px 20px;
    }

    .prayer-verse-box {
        margin: 16px 20px;
        padding: 20px;
    }

    .prayer-content-body {
        padding: 20px;
    }

    .prayer-topics {
        padding: 20px;
    }

    .prayer-response-card,
    .prayer-history-card {
        padding: 20px;
    }

    .date-nav {
        gap: 16px;
        margin-bottom: 32px;
    }

    .date-display .date-main {
        font-size: 1.1rem;
    }

    .page-hero {
        height: 260px;
    }

    .bulletin-card-header {
        padding: 20px;
    }

    .bulletin-slide-link {
        display: none;
    }

    .worship-order-item {
        padding: 12px 20px;
    }

    .sermon-info {
        padding: 20px;
    }

    .news-list {
        padding: 16px 20px;
    }

    .schedule-list {
        padding: 8px 20px 20px;
    }

    .admin-tab-content {
        padding: 20px;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .toast-container {
        bottom: calc(var(--mobile-nav-height) + 16px);
        right: 16px;
        left: 16px;
    }

    .toast {
        max-width: 100%;
    }

    .hero-scroll-indicator {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .container, .nav-container {
        padding: 0 16px;
    }

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

    .section-title {
        font-size: 1.5rem;
    }

    .page-hero-title {
        font-size: 1.8rem;
    }

    .info-card {
        padding: 24px;
    }
}

/* ================================================
   Scrollbar
   ================================================ */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* ================================================
   Selection
   ================================================ */
::selection {
    background: rgba(234, 179, 8, 0.2);
    color: var(--text-primary);
}

/* ================================================
   Supplemental - Separate Page Support
   ================================================ */

/* 서브 페이지는 nav 높이만큼 상단 패딩 */
body > .page-hero,
body > .section {
    padding-top: 0;
}

.page-hero {
    margin-top: 0;
}

/* 빈 상태 메시지 */
.empty-msg {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.empty-history {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
}

.empty-history i {
    font-size: 2rem;
    opacity: 0.25;
    margin-bottom: 10px;
    display: block;
}

.empty-history p {
    font-size: 0.85rem;
}

/* 공개 페이지 상태 뱃지 */
.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
}

/* ================================================
   Modals & Overlays (Cupertino)
   ================================================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    margin: 20px;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.status-badge.warning i { color: #f59e0b; }

/* 모바일: page-hero 높이 조정 */
@media (max-width: 768px) {
    .page-hero {
        margin-top: 0;
    }
}

/* ================================================
   Custom Global Modal (Alert/Confirm replacement)
   ================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: white;
    width: 90%;
    max-width: 360px;
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: scale(0.9);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalIn {
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.modal-icon.info { background: #f0f9ff; color: #0284c7; }
.modal-icon.success { background: #f0fdf4; color: #16a34a; }
.modal-icon.warning { background: #fffbeb; color: #d97706; }
.modal-icon.danger { background: #fef2f2; color: #dc2626; }

.modal-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    word-break: keep-all;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s;
}

.modal-btn-cancel { background: #f1f3f5; color: #495057; }
.modal-btn-confirm { background: var(--primary); color: white; }
.modal-btn-danger { background: #dc2626; color: white; }

.modal-btn:active { transform: scale(0.96); opacity: 0.8; }

@media (max-width: 768px) {
    .modal-overlay {
        align-items: center;
        padding: 16px 16px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 16px);
    }

    .modal-card {
        max-height: calc(100svh - var(--mobile-nav-height) - env(safe-area-inset-bottom) - 32px);
        overflow-y: auto;
    }

    .sidebar-overlay[style*="display: flex"] {
        z-index: 9000 !important;
        align-items: center;
        padding: 16px 16px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 16px);
    }

    .sidebar-overlay[style*="display: flex"] .admin-form-card {
        max-height: calc(100svh - var(--mobile-nav-height) - env(safe-area-inset-bottom) - 32px);
        margin: 0;
    }
}

.btn-kakao {
    background-color: #FEE500;
    color: #000000;
    opacity: 0.85;
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-kakao:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(254, 229, 0, 0.3);
}

.navbar #btn-kakao-login,
.navbar .btn-kakao {
    display: none !important;
}

.sjc-flutter-app .mobile-nav,
.sjc-flutter-app #pwa-install-banner {
    display: none !important;
}

/* ── PWA 설치 안내 배너 ── */
#pwa-install-banner {
    display: none;
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 400px);
    max-width: 400px;
    background: rgba(30, 57, 50, 0.96);
    color: white;
    padding: 14px 16px;
    border-radius: 16px;
    z-index: 6000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    animation: pwaSlideUp 0.4s ease-out;
}
@media (min-width: 768px) {
    #pwa-install-banner {
        display: none !important;
    }
}
@keyframes pwaSlideUp {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}
.pwa-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.pwa-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    filter: brightness(0) invert(1);
    flex: none;
}
.pwa-text {
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: normal;
}
.pwa-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
}
.pwa-btn-install {
    min-width: 64px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary);
    border: none;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}
.pwa-btn-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: transparent;
    color: white;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.82;
}

@media (max-width: 360px) {
    #pwa-install-banner {
        padding: 12px;
        gap: 10px;
    }

    .pwa-icon {
        width: 36px;
        height: 36px;
    }

    .pwa-text {
        font-size: 0.84rem;
    }

    .pwa-btn-install {
        min-width: 58px;
        padding: 0 12px;
    }
}
