/* ==========================================================================
   IEUM Hair V0.5 — 기본 스타일 (모바일 우선)
   ========================================================================== */

/* --------------------------------------------------------------------------
   ★ 매장 브랜드 설정 — 복제·브랜드 교체 시 이 블록만 바꾼다 ★
   (로고 파일이 오면 --primary / --accent 를 430 브랜드 색으로 교체)
   -------------------------------------------------------------------------- */
:root {
    /* 브랜드 색 */
    --primary:      #6b4a35;   /* 포인트 브라운 — 버튼·예약 밴드·강조 글자 */
    --primary-ink:  #ffffff;   /* --primary 위 글자색 */
    --accent:       #b89478;   /* 보조 카라멜 — 구분선·장식 (글자색으로 쓰지 않음) */
    --accent-soft:  #efe4d6;   /* 태그·카드 강조 배경 */

    /* 바탕·글자 */
    --bg:           #faf6ef;   /* 크림 배경 */
    --surface:      #ffffff;   /* 카드 배경 */
    --text:         #2b2420;   /* 본문 글자 */
    --muted:        #74685e;   /* 보조 글자 */
    --line:         #e6dccf;   /* 테두리·구분선 */

    /* 사진 자리표시 */
    --ph-from:      #eadfce;
    --ph-to:        #d9c7b1;
    --ph-ink:       #8a7662;

    /* 폰트 (Google Fonts 실패 시 시스템 폰트로 대체) */
    --font-serif: "Noto Serif KR", "AppleMyungjo", "Nanum Myeongjo", "Batang", serif;
    --font-sans:  "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

/* 시스템용 (보통 바꾸지 않음) */
:root {
    --todo:      #b3261e;
    --todo-bg:   #fdecea;
    --radius:    10px;
    --gap:       16px;
    --section-y: 64px;
    --cta-h:     60px;
}

/* 기본 ---------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    word-break: keep-all;
    overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.35; color: var(--text); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 섹션 라벨: 소문자 + 넓은 자간 */
.eyebrow {
    margin: 0 0 8px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .28em;
    text-transform: lowercase;
    color: var(--primary);
}
.eyebrow::after {
    content: "";
    display: block;
    width: 28px;
    height: 1px;
    margin-top: 10px;
    background: var(--accent);
}

/* 상단 ---------------------------------------------------------------------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; padding-top: 16px; padding-bottom: 8px; }
.site-name { font-family: var(--font-serif); font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
.site-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.site-nav a { display: block; padding: 8px 10px; color: var(--muted); text-decoration: none; font-size: 14px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }

/* 본문 공통 ----------------------------------------------------------------- */
.site-main { padding-bottom: var(--section-y); }
.page-head { padding-top: 48px; padding-bottom: 8px; }
.page-head h1 { font-size: 28px; margin: 0; }
.section { margin: var(--section-y) 0; }
.section h2 { font-size: 24px; margin: 0 0 20px; }
.lead { font-size: 17px; color: var(--text); }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0; }
.empty { color: var(--muted); }
.more { margin-top: 20px; }
.more a { font-size: 14px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* 버튼 */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 24px;
    border: 1px solid var(--primary); border-radius: 999px;
    font-weight: 500; font-size: 15px; text-decoration: none;
    color: var(--primary); background: transparent;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-line { background: transparent; color: var(--primary); }
.btn-invert { background: var(--primary-ink); color: var(--primary); border-color: var(--primary-ink); }
.btn-line-invert { background: transparent; color: var(--primary-ink); border-color: var(--primary-ink); }
.is-disabled { opacity: .5; pointer-events: none; }

/* 사진 자리표시 (실제 사진 도착 전) */
.ph {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, var(--ph-from), var(--ph-to));
    color: var(--ph-ink);
    font-size: 13px; letter-spacing: .1em;
}
.ph-square { aspect-ratio: 1 / 1; border-radius: var(--radius); }

/* HOME 히어로 --------------------------------------------------------------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-media img, .ph-hero { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-body { padding-top: 36px; padding-bottom: 48px; }
.hero h1 { font-size: 32px; margin: 0 0 12px; }
.hero-lead { font-family: var(--font-serif); font-size: 18px; color: var(--muted); margin: 0; }

/* 카드 ---------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); list-style: none; margin: 0; padding: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 19px; margin: 0 0 14px; }

.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.price-list li:first-child { border-top: 0; }
.price { font-weight: 700; color: var(--primary); white-space: nowrap; }
.price-from { font-weight: 500; }

.designer-card { padding: 0; overflow: hidden; }
.designer-card .designer-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.designer-card h2, .designer-card h3 { font-size: 19px; margin: 18px 20px 0; }
.designer-card .meta, .designer-card > p, .designer-card .tags { margin-left: 20px; margin-right: 20px; }
.designer-card > :last-child { margin-bottom: 20px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; }
.tags li { background: var(--accent-soft); color: var(--text); padding: 3px 12px; border-radius: 999px; font-size: 13px; }

.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
.style-grid a { color: var(--text); text-decoration: none; }
.style-grid img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; border-radius: var(--radius); }
.style-grid span { display: block; font-size: 14px; margin-top: 8px; }

/* 예약 안내 밴드 (포인트색 배경) ------------------------------------------- */
.band { background: var(--primary); color: var(--primary-ink); padding: var(--section-y) 0; }
.band h2 { color: var(--primary-ink); font-size: 26px; margin: 0 0 20px; }
.band .eyebrow { color: var(--primary-ink); opacity: .85; }
.band .eyebrow::after { background: var(--primary-ink); opacity: .5; }
.band a { color: var(--primary-ink); }
.band-info { display: grid; grid-template-columns: 72px 1fr; gap: 10px 16px; margin: 0; }
.band-info dt { opacity: .8; }
.band-info dd { margin: 0; }
.band .ieum-todo { background: var(--primary-ink); }

/* 정보 페이지 표·목록 ------------------------------------------------------- */
.info-list { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; margin: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; }

.price-table, .hours-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.price-table th, .price-table td, .hours-table th, .hours-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.price-table thead th { font-size: 13px; color: var(--muted); font-weight: 500; }
.price-table td:last-child { text-align: right; white-space: nowrap; font-weight: 700; color: var(--primary); }
.hours-table th { width: 40%; font-weight: 500; color: var(--muted); }

.faq-list dt { font-family: var(--font-serif); font-weight: 700; font-size: 17px; margin-top: 28px; }
.faq-list dd { margin: 8px 0 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.link-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; margin: 32px 0; padding: 0; }
.link-cards a { display: block; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 500; }

/* ==========================================================================
   게시판 (style = gallery 스킨 / notice = basic 스킨)
   - 스킨 파일은 수정하지 않고, 스킨의 클래스에 테마 디자인을 입힌다.
   - 스킨이 기대하는 그누보드 기본 default.css 는 싣지 않으므로 필요한 공용 클래스만 여기서 정의한다.
   - 스킨 style.css 보다 우선하도록 body.ieum 으로 시작한다.
   ========================================================================== */

/* 화면에는 숨기고 스크린리더에만 읽히는 글자 (그누보드 공용 클래스) */
.sound_only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.ieum .tbl_wrap caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 글 0개: "준비 중입니다" 카드만 보이게 (스킨 목록 UI 전체 숨김) */
.board-empty { margin: 8px 0 32px; padding: 48px 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.board-empty p { margin: 0; }
.board-empty-admin { margin-top: 20px !important; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.is-board-empty .page-body > :not(.board-empty) { display: none !important; }

/* 상단 줄: 왼쪽 글 수 / 오른쪽 버튼 */
body.ieum #bo_btn_top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
body.ieum #bo_list_total { float: none; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
body.ieum #bo_list_total span { color: var(--text); font-weight: 500; margin-right: 6px; }

/* 버튼 묶음 (검색·옵션·글쓰기 등) — 작은 원형 외곽선, 글쓰기만 글자 있는 알약형 */
body.ieum .btn_bo_user { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; float: none; position: relative; }
body.ieum .btn_bo_user > li { position: relative; margin: 0; float: none; }
body.ieum .btn_bo_user .btn,
body.ieum .btn_bo_user button.btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; min-height: 0; padding: 0;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer;
}
body.ieum .btn_bo_user .btn:hover { border-color: var(--primary); color: var(--primary); }
body.ieum .btn_bo_user a[href*="write.php"] { width: auto; padding: 0 16px; gap: 6px; background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
body.ieum .btn_bo_user a[href*="write.php"] .sound_only { position: static !important; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; font-size: 14px; font-weight: 500; }

/* 관리자 옵션 펼침 메뉴: 기본 숨김 (스킨 스크립트가 버튼 클릭 시 열어줌) */
body.ieum .more_opt { display: none; position: absolute; right: 0; top: 44px; z-index: 20; min-width: 140px; margin: 0; padding: 6px 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
body.ieum .more_opt li { margin: 0; }
body.ieum .more_opt a, body.ieum .more_opt button { display: block; width: 100%; padding: 8px 14px; border: 0; background: none; text-align: left; font: inherit; font-size: 14px; color: var(--text); text-decoration: none; cursor: pointer; }
body.ieum .more_opt a:hover, body.ieum .more_opt button:hover { background: var(--bg); }

/* 관리자 선택 체크박스: 기본 체크박스 그대로 작게 */
body.ieum .chk_box label span { display: none; }
body.ieum .chk_box input[type="checkbox"] { position: static; opacity: 1; width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
body.ieum #gall_allchk { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

/* 검색창: 기본 숨김, 검색 버튼 누르면 화면 가운데 카드로 (스킨 스크립트가 열고 닫음) */
body.ieum .bo_sch_wrap { display: none; position: fixed; inset: 0; z-index: 200; }
body.ieum .bo_sch_bg { position: absolute; inset: 0; background: rgba(43,36,32,.45); }
body.ieum .bo_sch { position: relative; z-index: 1; width: calc(100% - 40px); max-width: 420px; margin: 20vh auto 0; padding: 24px; background: var(--surface); border: 0; border-radius: var(--radius); }
body.ieum .bo_sch h3 { margin: 0 0 14px; font-size: 18px; }
body.ieum .bo_sch select, body.ieum .bo_sch .sch_input { width: 100%; min-height: 44px; margin: 0 0 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); }
body.ieum .bo_sch .sch_bar { display: flex; gap: 6px; }
body.ieum .bo_sch .sch_btn { min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: var(--primary); color: var(--primary-ink); cursor: pointer; }
body.ieum .bo_sch .bo_sch_cls { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; }

/* 분류 탭 (분류를 쓸 때만 나옴) */
body.ieum #bo_cate ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; }
body.ieum #bo_cate a { display: block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; }
body.ieum #bo_cate #bo_cate_on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

/* style 게시판 — 갤러리 카드 (모바일 2열 / PC 3열) */
body.ieum #gall_ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; }
body.ieum #gall_ul:after { display: none; }
body.ieum #gall_ul .gall_li { float: none; width: auto !important; margin: 0; padding: 0; clear: none !important; }
body.ieum .gall_box { position: relative; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
body.ieum .gall_box .gall_chk { position: absolute; top: 8px; left: 8px; z-index: 2; }
body.ieum .gall_img { margin: 0; border: 0; background: var(--ph-from); aspect-ratio: 1 / 1; overflow: hidden; }
body.ieum .gall_img a, body.ieum .gall_img span { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--ph-ink); font-size: 13px; }
body.ieum .gall_img img { width: 100%; height: 100%; object-fit: cover; }
body.ieum .gall_text_href { padding: 12px 14px 0; margin: 0; }
body.ieum .gall_text_href .bo_tit { display: block; color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; line-height: 1.5; }
body.ieum .gall_text_href .bo_cate_link { display: inline-block; margin-bottom: 4px; font-size: 12px; color: var(--primary); text-decoration: none; }
body.ieum .gall_info { padding: 6px 14px 14px; margin: 0; font-size: 12px; color: var(--muted); }
body.ieum .gall_info .sv_member, body.ieum .gall_info .sv_guest { display: none; }  /* 글쓴이는 매장 관리자뿐이라 숨김 */

/* notice 게시판 — 카드형 목록 */
body.ieum .tbl_head01 { margin: 0; }
body.ieum .tbl_head01 table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
body.ieum .tbl_head01 thead th { padding: 12px 14px; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; }
body.ieum .tbl_head01 td { padding: 16px 14px; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
body.ieum .tbl_head01 tbody tr:last-child td { border-bottom: 0; }
body.ieum .tbl_head01 .td_subject { color: var(--text); }
body.ieum .tbl_head01 .td_subject a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
body.ieum .tbl_head01 .td_subject a:hover { color: var(--primary); }
body.ieum .tbl_head01 .td_datetime { white-space: nowrap; }
body.ieum .tbl_head01 .bo_notice td { background: var(--accent-soft); }

/* 페이지 번호 */
body.ieum .pg_wrap { display: flex; justify-content: center; margin: 28px 0 0; float: none; }
body.ieum .pg { display: flex; flex-wrap: wrap; gap: 4px; }
body.ieum .pg a, body.ieum .pg strong { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; text-decoration: none; }
body.ieum .pg .pg_current { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

@media (max-width: 768px) {
    /* notice: 모바일은 제목·날짜만 카드처럼 */
    body.ieum .tbl_head01 thead { display: none; }
    body.ieum .tbl_head01 tbody tr { display: block; padding: 14px; border-bottom: 1px solid var(--line); }
    body.ieum .tbl_head01 tbody tr:last-child { border-bottom: 0; }
    body.ieum .tbl_head01 tbody td { display: none; padding: 0; border: 0; }
    body.ieum .tbl_head01 tbody td.td_subject,
    body.ieum .tbl_head01 tbody td.td_datetime,
    body.ieum .tbl_head01 tbody td.td_chk { display: block; }
    body.ieum .tbl_head01 tbody td.td_datetime { margin-top: 4px; font-size: 13px; }
}
@media (min-width: 769px) {
    body.ieum #gall_ul { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* 미확정 값 표시 — 공개 전 반드시 0개가 되어야 함 */
.ieum-todo { color: var(--todo); background: var(--todo-bg); padding: 0 4px; border-radius: 4px; font-family: var(--font-sans); font-size: .85em; font-weight: 600; }

/* 푸터 ---------------------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
.footer-name { font-family: var(--font-serif); font-weight: 700; font-size: 18px; color: var(--text); margin: 0 0 12px; }
.footer-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.footer-info dd { margin: 0; color: var(--text); }
.footer-sns { list-style: none; margin: 0; padding: 0; }
.footer-sns li { margin: 4px 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-legal { margin: 16px 0 0; font-size: 12px; line-height: 1.8; }
.footer-legal .sep { margin: 0 8px; color: var(--line); }

/* 모바일 하단 고정 버튼 ------------------------------------------------------ */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; height: var(--cta-h); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.cta-btn { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; border-right: 1px solid var(--line); }
.cta-btn:last-child { border-right: 0; }
.cta-primary { background: var(--primary); color: var(--primary-ink); }
body.ieum { padding-bottom: var(--cta-h); }

/* 태블릿·PC ----------------------------------------------------------------- */
@media (min-width: 769px) {
    :root { --section-y: 96px; }
    .mobile-cta { display: none; }
    body.ieum { padding-bottom: 0; }
    .site-nav { width: auto; margin-left: auto; }
    .page-head { padding-top: 72px; }
    .page-head h1 { font-size: 36px; }
    .section h2 { font-size: 30px; }
    .hero-media img, .ph-hero { aspect-ratio: 21 / 9; max-height: 560px; }
    .hero-body { padding-top: 56px; padding-bottom: 72px; }
    .hero h1 { font-size: 44px; }
    .hero-lead { font-size: 20px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .designer-grid { grid-template-columns: repeat(3, 1fr); }
    .style-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .link-cards { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: 2fr 2fr 1fr; }
}
@media (min-width: 1024px) {
    .card-grid:not(.designer-grid) { grid-template-columns: repeat(3, 1fr); }
}
