/* ── 전역 변수 ── */
:root {
    --bg-color:      #EFE6D5;
    --card-bg:       #FDFAF5;
    --text-color:    #2C1E1A;
    --text-sub:      #5D4037;
    --accent-color:  #9C7A3C;
    --active-color:  #556B2F;
    --active-text:   #F4EBD0;
    --danger-color:  #A63D40;
    --border-color:  #D3C5B0;
    --tip-color:     #6D597A;
    --province-color:#5B7FA6;
    --fatigue-color: #8A8078;
    --active-border: #405220;
    --nav-bg: rgba(70, 65, 60, 0.97);
    --shadow-sm:     0 2px 6px rgba(0,0,0,0.08);
    --shadow-md:     0 4px 12px rgba(0,0,0,0.12);
    --radius:        8px;
    --transition:    0.15s ease-out;
}

/* ── 리셋 & 기본 ── */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* ── 상단 헤더 영역 (정렬 버튼 포함) ── */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

/* ── 한/영 정렬 전환 버튼 (SVG 아이콘 전용) ── */
.sort-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    color: var(--text-color);
    flex-shrink: 0; /* 공간이 좁아져도 버튼이 찌그러지지 않게 방지 */
    transition: all var(--transition);
}

/* SVG 아이콘 크기 및 색상 동기화 */
.sort-toggle-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

/* 마우스 오버 및 클릭 시 스타일 */
.sort-toggle-btn:hover, 
.sort-toggle-btn:active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* 클릭할 때 아이콘이 살짝 눌리는 애니메이션 효과 */
.sort-toggle-btn:active svg {
    transform: scale(0.85);
}

footer {
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 12px 16px;
    margin-top: 10px;
    font-size: 0.75em;
    color: var(--text-sub);
    opacity: 0.6;
    line-height: 1.5;
}

.header-left { display: flex; align-items: center; gap: 15px; }

.logo {
  width: 60px;
  height: auto;
  filter: invert(48%) sepia(60%) saturate(400%) hue-rotate(5deg) brightness(0.85);
}


.header-text h1 {
    font-size: 1.3em;
    margin: 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 3px;
}

.subtitle {
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    color: var(--text-sub);
    font-size: 0.6em;
    margin-top: 4px;
    line-height: 1.2;
    word-break: keep-all;
}

/* ── 공지사항 접이식 박스 ── */
.notice-box {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--active-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.notice-header {
    padding: 12px 14px;
    font-size: 0.9em;
    font-weight: 700;
    color: var(--active-color);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 사파리 브라우저용 기본 화살표 숨김 */
.notice-header::-webkit-details-marker {
    display: none;
}

/* 커스텀 화살표 아이콘 설정 */
.notice-toggle-icon::after {
    content: '▲';
    font-size: 0.8em;
    color: var(--text-sub);
    display: inline-block;
    transition: transform 0.3s ease;
}

/* 박스가 접혔을 때 화살표 방향 변경 */
.notice-box:not([open]) .notice-toggle-icon::after {
    transform: rotate(180deg);
}

.notice-content {
    padding: 0 14px 14px 14px;
    font-size: 0.82em;
    color: var(--text-sub);
    line-height: 1.6;
}

/* ── 그리드 ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(80px, 20vw, 120px), 1fr));
    gap: 8px;
    width: 100%;
    max-width: 800px;
}

/* ── 초성 구분선 ── */
.category-header {
    grid-column: 1 / -1;
    font-weight: 700;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 5px 5px 5px;
    margin-top: 10px;
    font-size: 1.05em;
    letter-spacing: 1px;
}

/* ── 검색 타겟 강조 애니메이션 ── */
@keyframes target-highlight {
    0%   { background: transparent; color: var(--accent-color); padding-left: 5px; }
    15%  { background: var(--active-color); color: var(--active-text); padding-left: 12px; border-radius: 4px; }
    70%  { background: var(--active-color); color: var(--active-text); padding-left: 12px; border-radius: 4px; }
    100% { background: transparent; color: var(--accent-color); padding-left: 5px; }
}

.category-header.target-focus {
    animation: target-highlight 1.5s ease-out;
}

/* ── 스킬 카드 ── */
.skill-card {
    background-color: var(--card-bg);
    border: 1px solid #D7CCC8;
    border-top: 1px solid #FFF;
    border-bottom: 2px solid #C9BBAF;
    padding: 12px 5px;
    text-align: center;
    cursor: pointer;
    border-radius: var(--radius);
    font-size: clamp(14px, 2.4vw, 17px);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 58px;
    transition: all var(--transition);
    position: relative;
    top: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.skill-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.skill-card.active {
    background-color: var(--active-color);
    color: var(--active-text);
    font-weight: 700;
    border-color: var(--active-border);
    box-shadow: 0 4px 10px rgba(78, 93, 48, 0.35);
}

.skill-card.active small { opacity: 0.7; color: var(--active-text); }

.skill-card:active {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom-width: 1px;
    transform: translateY(2px);
}

.skill-card:not(.active):active {
    transform: translateY(0);
}

.skill-card small {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 8px;
    opacity: 0.55;
    margin-top: 3px;
    letter-spacing: 0.5px;
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ────────────────────────────────────────
 * 영문(A-Z) 모드 전용 스킬 카드 스타일
 * ──────────────────────────────────────── */
/* 영어 모드일 때 메인 이름(영어) 크기 및 자간 축소 */
.skill-card.en-mode span {
    font-size: 0.82em;       /* 기존 폰트보다 작게 (필요시 0.78em 등 조절 가능) */
    letter-spacing: -0.5px;  /* 글자 사이 간격을 좁혀서 공간 확보 */
    white-space: nowrap;     /* 강제로 한 줄 유지 */
    overflow: hidden;        /* 혹시라도 넘치면 숨김 */
    text-overflow: ellipsis; /* 그래도 넘치면 말줄임표(...) 처리 */
}

/* 영어 모드일 때 서브 이름(한글) 크기도 비율에 맞춰 살짝 축소 */
.skill-card.en-mode small {
    font-size: 0.7em;
}

/* ── 퀘스트 전용 스킬 마커 ── */
.quest-mark {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0.8em;
    height: 0.8em;
    fill: var(--accent-color); 
    pointer-events: none;
}

.summary-quest-badge {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 0.65em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ── 퀘스트 유닛 스킬 범례 (Legend) ── */
.quest-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    gap: 5px;
    padding-right: 4px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-sub);

    margin-bottom: -48px;     
    position: relative;
    z-index: 10;              
    pointer-events: none;     
}

.quest-legend svg {
    width: 1.2em;
    height: 1.2em;
    fill: var(--accent-color);
    transform: translateY(-1px);
}

/* ── 인라인 아코디언 (상세 정보) ── */
.accordion-btn {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 0.75em;
    color: var(--accent-color);
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s;
}

.accordion-btn:hover, .accordion-btn.active {
    background: var(--accent-color);
    color: var(--card-bg);
}

.accordion-content {
    max-height: 0;           /* 평소에는 높이가 0이라 보이지 않음 */
    overflow: hidden;        /* 넘치는 내용은 숨김 */
    transition: max-height 0.3s ease-out; /* 0.3초 동안 부드럽게 열림 */
    margin-top: 0;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--text-sub);
}

/* 아코디언이 열렸을 때 (open 클래스 추가) */
.accordion-content.open {
    max-height: 1000px;       /* 내용이 들어갈 만큼 충분한 넉넉한 높이 */
    margin-top: 6px;
    padding: 8px 10px;
}

/* ── 섹션 공통 ── */
.summary-section,
.icons-section {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.05em;
    letter-spacing: 0.5px;
}

/* ── 활성 목록 아이템 ── */
.active-list-item {
    position: relative;
    margin-bottom: 12px;
    padding: 14px 44px 14px 16px;
    background: var(--bg-color);
    border-radius: 6px;
    border-left: 5px solid var(--active-color);
    animation: slideIn 0.2s ease-out;
    line-height: 1.5;
}

.active-list-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--active-color);
    font-size: 0.95em;
}

.active-list-item p {
    margin: 0;
    font-size: 0.88em;
    color: var(--text-sub);
    line-height: 1.6;
}

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

/* ── 제거 버튼 ── */
.remove-btn {
    position: absolute;
    right: 10px;
    top: 12px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    width: 26px;
    height: 26px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
}

.remove-btn:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #fff;
}

/* ── 상태 박스 (요약) ── */
.status-box {
    background: rgba(0,0,0,0.05);
    padding: 10px 12px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.88em;
    border-left: 3px solid var(--accent-color);
    color: var(--text-color);
}


/* ── 참조표 상위 탭 ── */
.ref-tab-bar {
    display: flex;
    border-bottom: 2px solid var(--accent-color);
    margin: 0 0 12px 0;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    overflow-y: hidden;
    touch-action: pan-x;
    overscroll-behavior-y: none;
}

.ref-tab-bar::-webkit-scrollbar {
    display: none; 
}

.ref-tab-btn {
    flex: 1 0 auto; 
    white-space: nowrap; 
    word-break: keep-all;   
    padding: 9px 10px; 
    font-size: 0.82em; 
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    color: var(--text-sub);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -2px;
}

.ref-tab-btn:hover { color: var(--accent-color); }

.ref-tab-btn.active {
    color: var(--active-color);
    border-bottom-color: var(--active-color);
}

/* ── 보상 목록 ── */
.reward-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.reward-list li {
    margin-bottom: 5px;
    font-size: 0.9em;
    color: var(--text-sub);
    display: block;
    padding: 3px 0;
}

/* ── 하단 내비게이션 ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: stretch;
    z-index: 2000;
    background: var(--nav-bg);
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    max-width: 800px;
    justify-content: space-around;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--active-text); opacity: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 5px 8px;
    transition: color var(--transition), transform var(--transition);
    flex: 1;
    gap: 3px;
    -webkit-tap-highlight-color: transparent;
}

.nav-btn svg { width: 20px; height: 20px; }

.nav-btn span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: 'Noto Sans KR', sans-serif;
}

.nav-btn:hover { color: var(--active-text); opacity: 1; }
.nav-btn:active { color: #FFF; transform: scale(0.88); }
.nav-btn.btn-danger { color: #FF8A8A; opacity: 0.9; } 
.nav-btn.btn-danger:hover { color: #FF5252; opacity: 1; }

/* ── 배지 ── */
.badge {
    position: absolute;
    top: 2px;
    right: 18%;
    background: var(--danger-color);
    color: white;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1e1410;
    font-weight: 700;
    padding: 0 3px;
}

/* ── 초성 메뉴 래퍼 (nav-btn과 분리) ── */
.cho-menu-wrapper {
    position: relative;
    display: flex;
    flex: 1;
}

/* ── 초성 메뉴 ── */
.cho-menu {
    position: fixed; 
    bottom: calc(75px + env(safe-area-inset-bottom)); 
    left: 50%; 
    transform: translateX(-50%); 
    
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 14px;
    padding: 14px;
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 7px;
    width: 88vw;
    max-width: 420px;
    box-shadow: var(--shadow-md);
    z-index: 3000;
}

.cho-menu.show {
    display: grid;
    animation: popUp 0.18s ease-out;
}

@keyframes popUp {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 초성 메뉴 내 TOP 버튼 전용 스타일 */
.cho-menu .btn-top-wide {
    grid-column: span 2;
    aspect-ratio: auto;
    min-height: 40px;
    height: 100%;
    background: var(--active-color);
    border-color: #405220;
    color: var(--active-text);
    font-weight: 700;
}

.cho-menu .btn-top-wide:hover {
    background: #3d4e20;
    border-color: #2e3a17;
    color: var(--active-text);
}

.cho-menu button {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 40px;
    font-size: clamp(13px, 3.5vw, 17px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
}

.cho-menu button:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* ── 구분선 ── */
.custom-hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, rgba(0,0,0,0.6), transparent);
    margin: 40px 0;
    width: 100%;
    max-width: 800px;
}

/* ── 모달 (초기화 확인) ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 28px 24px 20px;
    width: min(340px, 90vw);
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    transform: scale(0.92);
    transition: transform 0.2s;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-box h4 {
    margin: 0 0 10px;
    font-size: 1.05em;
}

.modal-box p {
    margin: 0 0 20px;
    font-size: 0.9em;
    color: var(--text-sub);
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    flex: 1;
    padding: 10px;
    border-radius: 7px;
    border: none;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Noto Sans KR', sans-serif;
}

.modal-btn.cancel {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.modal-btn.cancel:hover { background: var(--border-color); }

.modal-btn.confirm {
    background: var(--danger-color);
    color: #fff;
}

.modal-btn.confirm:hover { background: var(--danger-color); filter: brightness(0.85); }

/* ── 빈 상태 메시지 ── */
.empty-msg {
    color: var(--text-sub);
    text-align: center;
    padding: 24px 0;
    font-size: 0.92em;
    line-height: 1.6;
}

/* ── 지역 고유 스킬 섹션 ── */
.province-hint {
    margin: 8px 0 0 0;
    font-size: 0.78em;
    color: var(--text-sub);
    line-height: 1.6;
    opacity: 0.8;
}

.province-section {
    width: 100%;
    max-width: 800px;
    background: transparent;
    padding: 1px;
    border-radius: 12px;
    border: none;
    margin-bottom: 20px;
    box-shadow: none;
}

.province-dropdown-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.province-label {
    font-size: 0.88em;
    font-weight: 700;
    color: var(--text-sub);
    white-space: nowrap;
    flex-shrink: 0;
}

.province-select-wrap {
    flex: 1;
    position: relative;
}

.province-select-wrap::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--accent-color);
    font-size: 0.9em;
}

.province-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 7px;
    padding: 10px 34px 10px 14px;
    font-size: 0.92em;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.province-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(141, 110, 99, 0.18);
}

.province-select option { font-family: sans-serif; }

/* ── 아이콘 칩 ── */
.icon-chip {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 1px 0 1px;
    line-height: 1.3;
    font-size: 1em;
    white-space: nowrap;
    vertical-align: -0.1em;
}

.icon-chip .status-icon {
    height: 1.1em;
    margin: 0;
}


/* ────────────────────────────────────────
 * 바텀 시트 (지역 정보 / 업데이트 로그 공용)
 * ──────────────────────────────────────── */
/* 💡 오버레이(배경): 평소에는 display: none과 opacity: 0으로 완벽히 숨김 */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.55);
    z-index: 4000; /* 일반 화면(2000)보다 위, 초기화 모달(5000)보다 아래 */
    display: none;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

/* active 세팅 시 투명도 회복 */
.bottom-sheet-overlay.show {
    opacity: 1;
}

/* 💡 바텀 시트 박스: 평소에는 화면 아래(100%)로 내려가 숨겨져 있음 */
.bottom-sheet-box {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--card-bg);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 부모 오버레이가 열릴 때 부드럽게 위로 미끄러져 올라옴 */
.bottom-sheet-overlay.show .bottom-sheet-box {
    transform: translateY(0);
}

/* 모바일 상단 핸들 바 (터치 영역 확장 적용) */
.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 12px auto 12px auto;
    flex-shrink: 0;
    position: relative;
}

.bottom-sheet-handle::before {
    content: '';
    position: absolute;
    top: -15px;
    bottom: -15px;
    left: -30px;
    right: -30px;
}

.bottom-sheet-box iframe {
    width: 100%;
    flex: 1; /* 남은 공간을 꽉 채움 */
    border: none;
    background: var(--card-bg);
}

/* ── 하단 고정 푸터 (추후 버튼 추가될 영역) ── */
.bottom-sheet-navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    gap: 8px; /* 추후 버튼이 추가될 때의 간격 */
}

.bottom-sheet-navbar .bottom-sheet-btn {
    padding: 12px 4px;
    font-size: 0.88em;
}
.bottom-sheet-navbar .bottom-sheet-btn.active {
    background: var(--active-color) !important;
    color: var(--active-text) !important;
    border-color: var(--active-border) !important;
}

/* 닫기 버튼 */
.bottom-sheet-btn {
    flex: 1;
    padding: 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.bottom-sheet-btn:active {
    background: var(--border-color);
    transform: scale(0.98);
}
