/* 예하 Studio Gallery — 첨부 시안(예하 갤러리_1.3) 디자인을 그대로 따르고
   반응형·접근성·작품 보호 기능을 더한 스타일 */
:root {
    --primary-color: #5c4033;   /* 전통 민화 느낌의 딥 브라운 */
    --accent-color: #c29b61;    /* 은은한 골드브라운 포인트 */
    --accent-text: #8a6630;     /* 흰 바탕 글씨용 골드 (명도 대비 4.5:1 이상) */
    --bg-color: #fcfbfa;
    --text-color: #333333;
    --muted: #666666;
    --gray-light: #f4f3f0;
    --border-color: #e2dfdc;
    --wall: #efebe5;            /* 상세 화면 벽 색 */
    --header-h: 118px;          /* JS가 실제 높이로 바꿔 줌 */
    --row-h: clamp(220px, 44vh, 460px);   /* 가로 전시 작품 높이 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* 접근성: 키보드 초점 표시, 본문 바로가기, 화면에는 안 보이고 스크린리더만 읽는 글 */
:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 2px; }
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 1000;
    background: var(--primary-color); color: #fff; padding: 10px 16px; border-radius: 4px;
}
.skip-link:focus { top: 12px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── 8. 헤더 ─────────────────────────────────────────── */
header.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
}
.header-top, .header-nav {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px;
}
.header-nav { padding-top: 0; padding-bottom: 15px; gap: 20px; }
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 48px; height: 48px; flex: none; object-fit: contain; }
.logo-text h1 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.5px; line-height: 1.3; }
.logo-text span { font-size: 0.8rem; color: var(--muted); }
.user-auth { display: flex; align-items: center; gap: 15px; font-size: 0.9rem; color: var(--muted); }
.user-auth a:hover, .user-auth button:hover { color: var(--primary-color); }
.user-auth form { display: inline; }
.user-auth button { background: none; border: 0; cursor: pointer; color: inherit; font-size: inherit; }
.nav-links {
    display: flex; gap: 30px; font-weight: 500; font-size: 0.95rem;
    overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { display: inline-block; padding: 2px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent-text); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-color); }
.nav-icons { display: flex; gap: 20px; font-size: 1.2rem; flex: none; }
.nav-icons a { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; }

/* ── 알림 메시지 ─────────────────────────────────────── */
.flashes { max-width: 1200px; margin: 16px auto 0; padding: 0 20px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 6px; font-size: 0.95rem; border: 1px solid; }
/* 저장 완료 등 알림: 화면 위쪽 가운데에 떠서 바로 눈에 띔 */
.toast-box {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 500;
    width: min(560px, calc(100% - 32px)); margin: 0; padding: 0;
}
.toast-box .flash {
    display: flex; align-items: flex-start; gap: 12px; font-weight: 600; font-size: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); padding: 16px 18px; transition: opacity 0.3s, transform 0.3s;
}
.toast-box .flash span { flex: 1; }
.toast-box .flash.hide { opacity: 0; transform: translateY(-10px); }
.flash-close { background: none; border: 0; cursor: pointer; font-size: 1rem; line-height: 1.4; opacity: 0.7; padding: 0 2px; }
.flash-close:hover { opacity: 1; }
.flash.ok { background: #eef6ee; border-color: #b9d8b9; color: #24572a; }
.flash.warn { background: #fdf6e7; border-color: #ecd49b; color: #6d4f10; }
.flash.error { background: #fbecea; border-color: #e7b6ae; color: #8a2a1b; }

/* ── 9. 바디: 화면 전체 폭 가로 스크롤 전시 ─────────────── */
.section-title {
    font-size: 1.4rem; font-weight: 700; margin-bottom: 20px;
    display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
}
.section-title span { font-size: 0.85rem; color: var(--muted); font-weight: 400; }

.fullwidth-slider-section {
    width: 100%;                     /* 100vw 대신 100% — 윈도우 스크롤바 때문에 생기는 가로 넘침 방지 */
    background: #fff;
    padding: 40px 0;
    margin-bottom: 50px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.fullwidth-slider-section + .fullwidth-slider-section { margin-top: -50px; border-top: 0; }
.slider-header-inner {
    max-width: 1200px; margin: 0 auto 20px; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
}
.slider-label { font-size: 0.85rem; color: var(--accent-text); font-weight: 600; display: block; margin-bottom: 4px; }
.slider-header-inner h2 { font-size: 1.4rem; font-weight: 700; }
.slider-controls { display: flex; gap: 10px; flex: none; }
.ctrl-btn {
    width: 40px; height: 40px;
    background: var(--gray-light); border: 1px solid var(--border-color); border-radius: 4px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #555; transition: background 0.2s;
}
.ctrl-btn:hover:not(:disabled) { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.ctrl-btn:disabled { opacity: 0.35; cursor: default; }

/* 좌우 여백 없이 화면 끝에서 끝까지 이어지는 트랙 */
.slider-track {
    display: flex; gap: 6px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 0;
    scrollbar-width: none;
    cursor: grab;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.slider-track.dragging a { pointer-events: none; }
.slider-track > li { flex: none; scroll-snap-align: start; }

.art-card { display: block; cursor: pointer; transition: transform 0.2s; }
.art-card:hover { transform: translateY(-5px); }
.slider-track .art-card:hover { transform: none; }
.slider-track .art-card:hover .art-img-box img { transform: scale(1.03); }

.art-img-box {
    background-color: var(--gray-light);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.art-img-box img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s; }

/* 가로 트랙: 높이는 같게, 폭은 작품 원래 비율대로 → 잘리거나 찌그러지지 않음 */
.slider-track .art-img-box { height: var(--row-h); }
.slider-track .art-info { padding: 10px 12px 0; text-align: left; max-width: 100%; }

.art-info { margin-top: 10px; text-align: center; }
.art-title { font-size: 0.95rem; font-weight: 600; overflow-wrap: anywhere; }
.art-author { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* 작품 보호: 끌어서 저장·길게 눌러 저장 막기 */
img.protect {
    -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.protect-wrap { position: relative; }
.protect-wrap::after { content: ""; position: absolute; inset: 0; }   /* 그림 위 투명 막 */

/* ── 이달의 우수 작품: 필터 + 그리드 ─────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.category-filter { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn {
    display: inline-block; padding: 8px 16px; background: #fff; border: 1px solid var(--border-color);
    border-radius: 20px; font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
}
.filter-btn[aria-pressed="true"], .filter-btn[aria-current="page"], .filter-btn:hover {
    background: var(--primary-color); color: #fff; border-color: var(--primary-color);
}
.grid-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px; margin-bottom: 50px;
}
.grid-gallery .art-img-box {
    aspect-ratio: 4 / 5; border-radius: 4px; padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}
.grid-gallery .art-info { text-align: left; }
.grid-gallery li[hidden] { display: none; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ── 작품 상세: 그림을 최대한 크게 ─────────────────────── */
.viewer {
    position: relative;
    background: var(--wall);
    height: calc(100svh - var(--header-h));
    min-height: 320px;
    display: flex; align-items: center; justify-content: center;
    padding: clamp(12px, 3vw, 40px) clamp(0px, 4vw, 72px);
}
.viewer .protect-wrap { max-width: 100%; max-height: 100%; display: flex; }
.viewer img {
    max-width: 100%; max-height: calc(100svh - var(--header-h) - 2 * clamp(12px, 3vw, 40px));
    width: auto; height: auto; object-fit: contain;
    box-shadow: 0 12px 40px rgba(40, 25, 15, 0.18);
    background: #fff;
}
.viewer:fullscreen { height: 100vh; background: #1d1a17; padding: 0; }
.viewer:fullscreen img { max-height: 100vh; box-shadow: none; }
.viewer-bar {
    position: absolute; top: 12px; left: 12px; right: 12px;
    display: flex; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 2;
}
.viewer-bar > * { pointer-events: auto; }
.v-btn {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 0 14px;
    background: rgba(255, 255, 255, 0.92); border: 1px solid var(--border-color); border-radius: 20px;
    font-size: 0.9rem; color: #444; cursor: pointer; backdrop-filter: blur(4px);
}
.v-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.v-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.92); border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #444;
}
.v-nav:hover { background: var(--primary-color); color: #fff; }
.v-nav.prev { left: 12px; }
.v-nav.next { right: 12px; }
.admin-preview {
    background: #6d4f10; color: #fff; text-align: center; padding: 8px; font-size: 0.9rem;
}

#detailPage { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.detail-container {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px;
    background: #fff; padding: 40px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); border: 1px solid var(--border-color);
}
.detail-info-box h2 { font-size: 1.8rem; font-weight: 700; color: var(--primary-color); margin-bottom: 10px; line-height: 1.35; }
.detail-author {
    font-size: 1.1rem; color: var(--muted); margin-bottom: 25px; padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.detail-author a:hover { color: var(--primary-color); text-decoration: underline; }
.detail-spec-list { margin-bottom: 10px; }
.spec-item { display: flex; margin-bottom: 12px; font-size: 0.95rem; }
.spec-label { width: 100px; flex: none; color: #6b6b6b; font-weight: 500; }
.spec-value { color: #333; font-weight: 600; }
.detail-desc-box {
    background: var(--bg-color); padding: 20px; border-radius: 6px;
    font-size: 0.95rem; color: #555; margin-bottom: 30px; line-height: 1.7; white-space: pre-line;
}
.detail-price { font-size: 1.3rem; font-weight: 700; color: var(--primary-color); margin-bottom: 16px; }
.sold-badge { display: inline-block; background: #eee; color: #555; padding: 4px 12px; border-radius: 14px; font-size: 0.85rem; margin-bottom: 16px; }
.detail-actions { display: flex; gap: 15px; }
.action-btn {
    flex: 1; padding: 14px; border-radius: 4px; font-size: 1rem; font-weight: 600;
    cursor: pointer; text-align: center; border: none; transition: all 0.2s;
}
.btn-cart { background: #fff; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-cart:hover { background: #f4efe9; }
.btn-inquiry { background: var(--primary-color); color: #fff; }
.btn-inquiry:hover { background: #463026; }
.copyright-note { margin-top: 18px; font-size: 0.8rem; color: #6b6b6b; }
.more-works { max-width: 1200px; margin: 0 auto 20px; padding: 0 20px; }
.more-works .slider-track { --row-h: 200px; gap: 12px; }

/* ── 작가·검색 ──────────────────────────────────────── */
.page-head { max-width: 1200px; margin: 40px auto 24px; padding: 0 20px; }
.page-head h2 { font-size: 1.6rem; color: var(--primary-color); }
.page-head p { color: var(--muted); margin-top: 6px; white-space: pre-line; }
.search-form { display: flex; gap: 8px; margin-top: 16px; max-width: 520px; }
.search-form input {
    flex: 1; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 1rem;
}
.search-form button { padding: 0 20px; border: 0; border-radius: 4px; background: var(--primary-color); color: #fff; cursor: pointer; }
.message-box { max-width: 640px; margin: 80px auto; padding: 0 20px; text-align: center; }
.message-box h2 { color: var(--primary-color); margin-bottom: 10px; }
.message-box a { display: inline-block; margin-top: 20px; color: var(--accent-text); text-decoration: underline; }

/* ── 10. 푸터 ───────────────────────────────────────── */
footer.site-footer {
    background-color: #fff; border-top: 1px solid var(--border-color);
    padding: 40px 20px; font-size: 0.85rem; color: #555; margin-top: 60px;
}
.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 25px; }
.footer-info { line-height: 1.8; font-style: normal; }
.footer-sns { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sns-link { display: inline-flex; align-items: center; gap: 6px; color: #444; font-weight: 500; }
.sns-link:hover { color: var(--primary-color); text-decoration: underline; }
.sns-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sns-link svg .dot { fill: currentColor; stroke: none; }
.footer-qr { margin: 0; text-align: center; }
.footer-qr img { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--border-color); border-radius: 6px; background: #fff; }
.footer-qr figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.footer-info a:hover { text-decoration: underline; }
.footer-brand { font-weight: bold; margin-top: 15px; font-size: 0.95rem; }
.footer-legal { margin-top: 8px; font-size: 0.8rem; color: #6b6b6b; }

/* ── 반응형: 태블릿 ─────────────────────────────────── */
@media (max-width: 900px) {
    .detail-container { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
}
/* ── 반응형: 휴대폰 ─────────────────────────────────── */
@media (max-width: 640px) {
    :root { --row-h: clamp(220px, 52vh, 380px); }
    .header-top { padding: 10px 16px; }
    .header-nav { padding: 0 0 10px 16px; }
    .nav-links { gap: 20px; font-size: 0.9rem; padding-right: 16px; }
    .nav-icons { display: none; }          /* 휴대폰에서는 아래 메뉴 줄에 검색 링크가 있음 */
    .notice-ticker { margin: 0 16px 0 0; height: 34px; }
    .comments { padding: 20px 16px; }
    .comment-reply { margin-left: 8px; }
    .logo-text h1 { font-size: 1rem; }
    .logo-text span { display: none; }
    .user-auth { gap: 8px; font-size: 0.85rem; }
    .fullwidth-slider-section { padding: 28px 0; }
    .slider-header-inner { padding: 0 16px; }
    .slider-header-inner h2 { font-size: 1.15rem; }
    .slider-controls { display: none; }    /* 손가락으로 밀어서 넘김 */
    .container, .more-works, .page-head, #detailPage { padding: 0 16px; }
    .grid-gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .grid-gallery .art-img-box { padding: 6px; }
    .viewer { height: auto; min-height: 0; padding: 0; }
    .viewer img { max-height: 80svh; box-shadow: none; }
    .viewer-bar { top: 8px; left: 8px; right: 8px; }
    .v-nav { width: 40px; height: 40px; }
    .v-nav.prev { left: 6px; } .v-nav.next { right: 6px; }
    #detailPage { margin: 20px auto; }
    .detail-container { padding: 20px; }
    .detail-info-box h2 { font-size: 1.4rem; }
    .detail-actions { flex-direction: column; }
}
.nav-mobile-only { display: none; }
@media (max-width: 640px) { .nav-mobile-only { display: list-item; } }

/* ── 전시실 2부터: 모자이크 전시 ─────────────────────── */
.room { max-width: 1200px; margin: 0 auto 70px; padding: 20px 20px 0; }
.room-head { text-align: center; margin-bottom: 36px; }
.room-head h2, .room-head h3 { font-size: 1.6rem; font-weight: 700; color: #222; line-height: 1.35; }
.room-head p { margin-top: 12px; color: var(--muted); white-space: pre-line; line-height: 1.7; }
.room-head .room-count { font-size: 0.9rem; margin-top: 6px; }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; grid-auto-flow: dense; }
.mosaic + .mosaic { margin-top: 8px; }
.mosaic li { aspect-ratio: 1 / 1; min-width: 0; }
.mosaic.full li.big { grid-column: 3 / 5; grid-row: 1 / 3; aspect-ratio: auto; position: relative; }
.mosaic.full li.big > .mosaic-item { position: absolute; inset: 0; }   /* 큰 그림이 줄 높이를 밀어내지 않게 */
.mosaic.full.flip li.big { grid-column: 1 / 3; }
.mosaic.part.n1 { grid-template-columns: minmax(0, 600px); justify-content: center; }
.mosaic.part.n2 { grid-template-columns: repeat(2, 1fr); }
.mosaic.part.n3 { grid-template-columns: repeat(3, 1fr); }
.mosaic-item { display: block; width: 100%; height: 100%; overflow: hidden; background: var(--gray-light); }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.mosaic-item::before {                     /* 마우스를 올리면 어두워지는 막 */
    content: ""; position: absolute; inset: 0; background: rgba(20, 14, 10, 0.45);
    opacity: 0; transition: opacity 0.25s; z-index: 1;
}
.mosaic-cap {
    position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px; padding: 12px; text-align: center;
    color: #fff; opacity: 0; transition: opacity 0.25s; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.mosaic-cap b { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.mosaic li.big .mosaic-cap b { font-size: 1.6rem; }
.mosaic-cap span { font-size: 0.95rem; }
.mosaic-item:hover::before, .mosaic-item:focus-visible::before,
.mosaic-item:hover .mosaic-cap, .mosaic-item:focus-visible .mosaic-cap { opacity: 1; }
.mosaic-item:hover img { transform: scale(1.04); }
@media (hover: none) {                     /* 휴대폰: 아래쪽에 작품명을 늘 표시 */
    .mosaic-item::before { opacity: 1; background: linear-gradient(transparent 55%, rgba(20, 14, 10, 0.6)); }
    .mosaic-cap { opacity: 1; justify-content: flex-end; align-items: flex-start; text-align: left; }
    .mosaic-cap b, .mosaic li.big .mosaic-cap b { font-size: 0.95rem; }
    .mosaic-cap span { font-size: 0.8rem; }
}
.more-wrap { text-align: center; margin-top: 44px; }
.more-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 240px; min-height: 60px; padding: 0 28px; border: 1px solid #aaa; border-radius: 30px;
    font-size: 1.05rem; font-weight: 600; color: #222; background: #fff; transition: all 0.2s;
}
.more-btn:hover { border-color: var(--primary-color); background: var(--primary-color); color: #fff; }

/* ── 머리말 알림 전광판 ───────────────────────────────── */
.notice-ticker {
    flex: 1 1 auto; min-width: 0; max-width: 520px; height: 36px; margin: 0 24px;
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--border-color); border-radius: 18px; background: var(--bg-color); padding: 0 6px 0 14px;
}
.ticker-label { flex: none; font-size: 0.8rem; font-weight: 700; color: var(--accent-text); }
.ticker-label::after { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--border-color); margin-left: 10px; vertical-align: -1px; }
.ticker-list { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; }
.ticker-list li {
    position: absolute; inset: 0; display: flex; align-items: center;
    transform: translateY(-100%); opacity: 0; visibility: hidden;
    transition: transform 0.6s ease, opacity 0.6s ease, visibility 0s 0.6s;
}
.ticker-list li.on { transform: none; opacity: 1; visibility: visible; transition: transform 0.6s ease, opacity 0.6s ease; }
.ticker-list li.out { transform: translateY(100%); opacity: 0; }
.ticker-list li.reset { transition: none; }
.ticker-list a { display: flex; align-items: center; gap: 8px; min-width: 0; width: 100%; font-size: 0.9rem; }
.ticker-list a:hover .ticker-title { text-decoration: underline; color: var(--primary-color); }
.ticker-list .badge { flex: none; font-size: 0.72rem; padding: 1px 8px; }
.ticker-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
    .ticker-list li, .ticker-list li.on { transition: none; }
}
/* 태블릿·펼친 폴더블·좁은 PC 창: 메뉴와 같은 줄에 두면 전광판이 '알림' 글자만 남으므로
   메뉴 아래 한 줄로 내린다 (휴대폰과 같은 배치) */
@media (max-width: 1100px) {
    .header-nav { flex-wrap: wrap; row-gap: 10px; }
    .nav-links { flex: 1 1 auto; min-width: 0; }
    .nav-icons { order: 2; }
    .notice-ticker { order: 3; flex: 1 1 100%; max-width: none; margin: 0; }
}

/* ── 원데이 신청·문의 댓글 ───────────────────────────── */
.comments { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 26px 28px; margin-bottom: 40px; }
.comments h3 { color: var(--primary-color); font-size: 1.15rem; margin-bottom: 14px; }
.comments h3 .count { display: inline-block; min-width: 26px; padding: 0 8px; border-radius: 12px; background: var(--primary-color); color: #fff; font-size: 0.85rem; text-align: center; margin-left: 4px; }
.comment-list { margin-bottom: 22px; }
.comment { padding: 14px 0; border-top: 1px solid var(--border-color); }
.comment:first-child { border-top: 0; padding-top: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.comment-head .notice-date { margin-left: auto; }
.comment-body { margin-top: 6px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.7; }
.comment-phone { margin-top: 4px; font-size: 0.9rem; color: #24572a; }
.comment-reply { margin: 10px 0 0 18px; padding: 10px 14px; background: #f8f2ec; border-left: 3px solid var(--accent-color); border-radius: 4px; }
.comment-reply b { color: var(--primary-color); font-size: 0.9rem; margin-right: 8px; }
.comment-reply p { margin-top: 4px; white-space: pre-line; }
.comment .badge.few { margin-top: 8px; }
.comment-tools { display: flex; gap: 14px; align-items: flex-start; margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.comment-tools summary { cursor: pointer; }
.comment-tools form { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-top: 6px; }
.comment-tools textarea { width: min(520px, 70vw); padding: 8px; border: 1px solid #cfcac4; border-radius: 4px; font: inherit; }
.comment-tools input { padding: 6px 8px; border: 1px solid #cfcac4; border-radius: 4px; margin-left: 6px; }
.comment-tools button { padding: 6px 12px; border: 1px solid var(--primary-color); color: var(--primary-color); background: #fff; border-radius: 4px; cursor: pointer; }
.comment-tools .link-danger { border: 0; padding: 0; color: #b3402a; background: none; text-decoration: underline; }
.comment-form { margin-bottom: 0; scroll-margin-top: calc(var(--header-h) + 16px); }
.comment-form h4 { color: var(--primary-color); margin-bottom: 12px; }
.check-inline { display: flex; align-items: center; gap: 8px; margin-top: 26px; font-size: 0.92rem; cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--primary-color); }
#comments { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ── 좋아요 ───────────────────────────────────────── */
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.title-row h2 { margin-bottom: 0; }
.like-btn {
    flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
    border: 1px solid var(--border-color); border-radius: 20px; background: #fff; cursor: pointer;
    font-size: 1rem; color: #555; transition: all 0.2s;
}
.like-btn .heart { font-size: 1.3rem; line-height: 1; color: #c0392b; }
.like-btn[aria-pressed="true"] { border-color: #e7b6ae; background: #fbecea; color: #8a2a1b; }
.like-btn:hover { border-color: #c0392b; }
.like-btn.pop .heart { animation: pop 0.35s ease; }
@keyframes pop { 50% { transform: scale(1.45); } }
.like-mini { color: #b0453a; font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.mosaic-cap b small { font-size: 0.8em; font-weight: 500; }

/* ── 이용후기 ──────────────────────────────────────── */
.review-summary { margin-top: 10px; font-weight: 600; }
.stars { color: #d9a420; letter-spacing: 1px; }
.stars .off { color: #ddd; }
.review-form { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 24px; margin-bottom: 30px; }
.review-form h3 { color: var(--primary-color); margin-bottom: 14px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.rf { display: block; margin-bottom: 14px; font-size: 0.92rem; font-weight: 500; border: 0; padding: 0; }
.rf em { color: #b3402a; font-style: normal; }
.rf small { color: var(--muted); font-weight: 400; }
.rf input:not([type=radio]), .rf select, .rf textarea {
    display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #cfcac4;
    border-radius: 4px; font: inherit; font-weight: 400; background: #fff;
}
.rf.short { max-width: 340px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.star-pick legend { margin-bottom: 4px; }
.star-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 2px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { font-size: 2rem; color: #ddd; cursor: pointer; line-height: 1; padding: 0 2px; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: #d9a420; }
.star-pick input:focus-visible + label { outline: 3px solid var(--accent-color); outline-offset: 2px; }
.muted-small { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.review-form .action-btn { width: 100%; max-width: 320px; }
.review-list { display: grid; gap: 12px; margin-bottom: 30px; }
.review-item { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 18px 20px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.review-head .notice-date { margin-left: auto; }
.review-body { margin-top: 10px; white-space: pre-line; line-height: 1.75; overflow-wrap: anywhere; }
.review-del { margin-top: 8px; font-size: 0.85rem; color: var(--muted); }
.review-del summary { cursor: pointer; display: inline-block; }
.review-del form { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.review-del input { padding: 6px 8px; border: 1px solid #cfcac4; border-radius: 4px; margin-left: 6px; }
.review-del button { padding: 6px 12px; border: 1px solid #b3402a; color: #b3402a; background: #fff; border-radius: 4px; cursor: pointer; }
.pager { display: flex; gap: 6px; justify-content: center; margin-bottom: 40px; }
.pager a { min-width: 36px; padding: 6px 10px; text-align: center; border: 1px solid var(--border-color); border-radius: 4px; background: #fff; }
.pager a[aria-current="page"] { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ── 원데이 클래스 ─────────────────────────────────── */
.oneday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 40px; }
.oneday-card a { display: block; background: #fff; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; height: 100%; transition: box-shadow 0.2s; }
.oneday-card a:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08); }
.oneday-card.past { opacity: 0.6; }
.oneday-photo { position: relative; aspect-ratio: 4 / 3; background: var(--gray-light); display: flex; align-items: center; justify-content: center; }
.oneday-photo img { width: 100%; height: 100%; object-fit: cover; }
.oneday-photo > span[aria-hidden] { font-size: 2.4rem; color: var(--accent-color); font-weight: 700; }
.oneday-photo .badge { position: absolute; top: 10px; left: 10px; }
.oneday-body { padding: 14px 16px 18px; }
.oneday-body h3 { font-size: 1.05rem; line-height: 1.4; margin-bottom: 6px; }
.oneday-meta { font-size: 0.9rem; color: var(--muted); }
.past-title { margin-top: 10px; }
.oneday-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: var(--bg-color); border-radius: 6px; padding: 16px; margin-bottom: 22px; }
.oneday-info dt { font-size: 0.82rem; color: var(--muted); }
.oneday-info dd { font-weight: 600; }
.oneday-apply { margin-top: 24px; }
.oneday-apply .action-btn { display: inline-block; min-width: 240px; }
.back-link.flush { margin-bottom: 0; }

/* ── 수업시간 지도 ───────────────────────────────────── */
.map-card { grid-column: 1 / -1; }
.map-img { margin-top: 10px; border-radius: 6px; border: 1px solid var(--border-color); width: 100%; max-width: 720px; }

/* ── 회원님들 ───────────────────────────────────────── */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-bottom: 40px; }
.member-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.member-photo { aspect-ratio: 4 / 5; background: var(--gray-light); display: flex; align-items: center; justify-content: center; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-photo .no-photo { font-size: 2.6rem; color: var(--accent-color); font-weight: 700; }
.member-body { padding: 18px 20px 20px; }
.member-ho { font-size: 1.3rem; font-weight: 700; color: var(--primary-color); line-height: 1.3; }
.member-name { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.member-career { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-color); font-size: 0.9rem; color: #555; }
.member-career li { position: relative; padding-left: 12px; margin: 3px 0; }
.member-career li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-color); }
.member-link { display: inline-block; margin-top: 12px; font-size: 0.9rem; color: var(--accent-text); text-decoration: underline; }

/* ── 수업시간 ───────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 30px; }
.info-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 18px 20px; }
.info-card h3 { font-size: 0.95rem; color: var(--accent-text); margin-bottom: 6px; }
.info-card p { white-space: pre-line; font-size: 0.95rem; }
.timetable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border-color); margin-bottom: 30px; }
.timetable th, .timetable td { border-top: 1px solid var(--border-color); padding: 14px 16px; text-align: left; vertical-align: top; }
.timetable thead th { background: var(--gray-light); font-size: 0.9rem; border-top: 0; }
.timetable tbody th { width: 96px; white-space: nowrap; color: var(--primary-color); font-size: 1.05rem; }
.slot { display: grid; grid-template-columns: 120px 1fr auto; gap: 6px 14px; align-items: center; padding: 6px 0; }
.slot + .slot { border-top: 1px dashed var(--border-color); }
.slot-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.slot-name { font-weight: 600; }
.slot-meta { color: var(--muted); font-size: 0.88rem; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.badge.open { background: #e3f0e3; color: #24572a; }
.badge.few { background: #fdf0d5; color: #6d4f10; }
.badge.full { background: #eee; color: #555; }
.badge.cat { background: #f4efe9; color: var(--primary-color); }
.badge.pin { background: var(--primary-color); color: #fff; }
.cta-box { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 22px; text-align: center; margin-bottom: 40px; }
.cta-box .action-btn { display: inline-block; max-width: 320px; width: 100%; margin-top: 12px; }

/* ── 화실에서 알림 ─────────────────────────────────── */
.notice-list { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 40px; }
.notice-list li + li { border-top: 1px solid var(--border-color); }
.notice-list a { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: center; padding: 16px 20px; }
.notice-list a:hover .notice-title { color: var(--primary-color); text-decoration: underline; }
.notice-title { font-weight: 600; overflow-wrap: anywhere; }
.notice-date { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.notice-list li.pinned { background: #fbf8f3; }
.notice-article { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 32px; margin-bottom: 30px; }
.notice-article h2 { color: var(--primary-color); font-size: 1.5rem; margin: 10px 0 6px; line-height: 1.4; }
.notice-article .notice-date { display: block; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.notice-body { white-space: pre-line; line-height: 1.8; }
.notice-article img { margin: 0 auto 24px; max-height: 80vh; width: auto; border-radius: 4px; }
.back-link { display: inline-block; margin-bottom: 40px; color: var(--accent-text); text-decoration: underline; }

@media (max-width: 640px) {
    .timetable thead { display: none; }
    .timetable, .timetable tbody, .timetable tr, .timetable th, .timetable td { display: block; width: 100%; }
    .timetable tbody th { border-top: 1px solid var(--border-color); background: var(--gray-light); padding: 8px 16px; width: 100%; }
    .slot { grid-template-columns: 1fr auto; }
    .slot-time { grid-column: 1 / -1; }
    .notice-list a { grid-template-columns: auto 1fr; }
    .notice-date { grid-column: 2; }
    .notice-article { padding: 20px; }
    .room { padding: 10px 16px 0; margin-bottom: 50px; }
    .room-head h2, .room-head h3 { font-size: 1.3rem; }
    .mosaic, .mosaic.part.n3 { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .mosaic.full li.big, .mosaic.full.flip li.big { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 1 / 1; }
    .more-btn { min-width: 200px; min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {   /* 인쇄해도 그림은 나오지 않게 */
    .viewer, .slider-track, .grid-gallery { display: none !important; }
}
