/* ...existing code... */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;700&family=Noto+Serif+KR:wght@400;600;700&display=swap');
:root{
    /* Accent (warm ink / bookstore vibe) */
    --orange-strong: #c45a1a;
    --orange-soft: #e6b07d;

    /* Navigation (paper-like header) */
    --nav-soft: #f3eadf;
    --nav-strong: #e7d8c6;

    /* Surfaces */
    --bg: #fbf7f0;
    --card: #fffefb;

    /* Text */
    --text: #2f2f2f;
    --muted: #5f5f5f;

    /* UI primitives */
    --border: rgba(0,0,0,0.10);
    --radius: 12px;
    --shadow-sm: 0 6px 18px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.06);
}

html,body{height:100%; margin:0; font-family:'Noto Serif KR','Noto Sans KR',system-ui,Arial; color:var(--text); background:var(--bg);}
body{
    line-height:1.65;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    /* subtle paper grain without images */
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.018) 1px, transparent 1px);
    background-size:18px 18px;
}

header{background:linear-gradient(180deg,var(--nav-soft),var(--nav-strong)); padding:18px 24px; box-shadow:0 2px 10px rgba(0,0,0,0.06);}
.container{max-width:1100px; margin:0 auto;}
.topbar{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.brand{display:flex; align-items:center; gap:12px;}
.logo{
    width:56px; height:56px; border-radius:12px; background:linear-gradient(135deg,var(--orange-strong),#ffb366);
    display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

/* 브랜드 로고 이미지 스타일 */
.brand .brand-logo{
    display:block;
    width:auto;
    height:44px;            /* 기본 높이: topbar의 로고와 균형 맞춤 */
    max-height:56px;        /* 데스크탑에서 .logo 높이와 맞춤 */
    object-fit:contain;
    border-radius:8px;
}

.site-title{font-size:1.2rem; font-weight:700;}
nav ul{list-style:none; margin:0; padding:0; display:flex; gap:16px; align-items:center;}
nav a{color:var(--text); text-decoration:none; padding:8px 12px; border-radius:10px; font-weight:600; letter-spacing:-0.01em;}
nav a:hover{background:rgba(0,0,0,0.04);}
.auth{display:flex; gap:8px; align-items:center;}
.btn{
    appearance:none;
    -webkit-appearance:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    background:var(--orange-strong);
    color:#fff;
    border:1px solid rgba(0,0,0,0.08);
    padding:9px 14px;
    border-radius:12px;
    cursor:pointer;
    font-weight:800;
    letter-spacing:-0.01em;
    text-decoration:none;
    line-height:1.1;
    box-shadow:0 8px 20px rgba(0,0,0,0.10);
    transition:transform .12s ease, filter .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover{filter:brightness(0.98); box-shadow:0 10px 26px rgba(0,0,0,0.12);}
.btn:active{transform:translateY(1px); box-shadow:0 6px 14px rgba(0,0,0,0.10);}
.btn:focus{outline:none;}
.btn:focus-visible{outline:3px solid rgba(196,90,26,0.22); outline-offset:2px;}
.btn[disabled],
.btn[aria-disabled="true"]{opacity:0.55; cursor:not-allowed; box-shadow:none;}

.btn.ghost{
    background:rgba(255,255,255,0.66);
    color:var(--text);
    border:1px solid var(--border);
    box-shadow:none;
}
.btn.ghost:hover{background:rgba(255,255,255,0.86); box-shadow:0 6px 16px rgba(0,0,0,0.06);}

a{color:inherit; text-decoration-thickness:from-font; text-underline-offset:3px;}

main{padding:28px 24px;}

h1{margin:0 0 12px 0; font-size:2.0rem; line-height:1.25; letter-spacing:-0.02em;}
h2{margin:18px 0 10px 0; font-size:1.35rem; line-height:1.3; letter-spacing:-0.015em;}
h3{margin:0 0 6px 0; font-size:1.05rem; line-height:1.35; letter-spacing:-0.01em;}
p{margin:0 0 12px 0;}

input, textarea, select{
    font-family:inherit;
    color:var(--text);
}

.board-input, .board-select,
.upload-form input[type="text"],
.upload-form input[type="file"],
.upload-form textarea,
.form-group input{
    border-color:var(--border);
}
.hero{display:flex; gap:24px; align-items:center; background:linear-gradient(180deg,rgba(255,255,255,0.9),transparent); padding:22px; border-radius:var(--radius); box-shadow:0 6px 30px rgba(0,0,0,0.04);}
.profile-hero{align-items:flex-start;}
.hero-left{flex:1;}
.hero-right{width:320px; display:flex; gap:12px; flex-direction:column; align-items:center;}
.hero h1{margin:0 0 8px 0; font-size:1.9rem; color:var(--text);}
.hero p{margin:0; color:var(--muted); line-height:1.6;}
.cover{width:100%; border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,0.08);}

/* Home banner slider (public/index.html) */
.home-hero{flex-direction:row-reverse;}
.home-hero .hero-right{width:460px; align-items:stretch;}

/* Home: books list as vertical stack */
.home-hero .books{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.home-hero .card{width:100%;}
.home-hero .card img{width:84px; height:120px;}

.banner{
    position:relative;
    width:100%;
    height:320px;
    overflow:hidden;
    border-radius:var(--radius);
    background:linear-gradient(180deg,rgba(255,255,255,0.92),transparent);
    border:1px solid rgba(0,0,0,0.04);
    box-shadow:var(--shadow-md);
}

.banner-track{
    list-style:none;
    padding:0;
    margin:0;
    height:100%;
    display:flex;
    transition:transform 280ms ease;
}

.banner-slide{min-width:100%; height:100%; position:relative;}
.banner-link{display:block; width:100%; height:100%; text-decoration:none; color:inherit;}

.banner-img{width:100%; height:100%; object-fit:contain; display:block; background:var(--bg); filter:saturate(0.98);}

.banner-overlay{
    position:absolute;
    left:0; right:0; bottom:0;
    padding:14px 14px 42px 14px;
    background:linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.42));
    color:#fff;
}

.banner-title{font-weight:900; letter-spacing:-0.01em; font-size:1.02rem;}
.banner-sub{margin-top:6px; font-size:0.9rem; opacity:0.95; line-height:1.45;}

.banner-controls{
    position:absolute;
    right:12px;
    bottom:12px;
    display:flex;
    gap:8px;
    align-items:center;
    z-index:3;
}

.banner-btn{
    appearance:none;
    -webkit-appearance:none;
    border:none;
    background:rgba(0,0,0,0.32);
    color:#fff;
    padding:8px;
    border-radius:999px;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.banner-btn:hover{background:rgba(0,0,0,0.42);}
.banner-btn:focus-visible{outline:3px solid rgba(255,255,255,0.28); outline-offset:2px;}

.banner-pager{
    display:flex;
    align-items:center;
    gap:6px;
    background:rgba(0,0,0,0.32);
    color:#fff;
    padding:6px 10px;
    border-radius:999px;
}
.banner-index{font-size:0.9rem;}

@media (max-width:980px){
    .home-hero .hero-right{width:380px;}
}

@media (max-width:720px){
    .home-hero .hero-right{width:100%;}
    .home-hero{flex-direction:column;}
    .banner{height:240px;}
}

/* Profile (public/profile.html) */
.profile-page-title{margin:0 0 12px 0;}

.profile-layout{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:18px;
    align-items:start;
}

.profile-card{
    background:var(--card);
    border-radius:var(--radius);
    padding:16px;
    border:1px solid var(--border);
    box-shadow:var(--shadow-md);
}

.profile-photo{display:flex; justify-content:flex-start;}
.profile-photo img{
    width:100%;
    max-width:220px;
    height:280px;
    object-fit:cover;
    border-radius:12px;
    box-shadow:var(--shadow-sm);
}

.profile-identity{margin-top:12px;}
.profile-name{font-size:1.25rem; font-weight:800; letter-spacing:-0.01em;}
.profile-role{margin-top:4px; color:var(--muted); font-weight:700; font-size:0.95rem;}

.profile-summary{margin:12px 0 0 0; color:var(--muted); font-size:0.95rem; line-height:1.65;}
.profile-caption{margin-top:10px;}

.profile-contact{margin-top:14px; padding-top:12px; border-top:1px solid var(--border);}
.profile-contact-title{font-weight:800; margin-bottom:6px;}

.profile-actions{margin-top:14px; display:flex; gap:10px; align-items:center;}
.profile-actions .btn{flex:1; justify-content:center;}

.profile-main{min-width:0;}
.profile-section{
    background:var(--card);
    border-radius:var(--radius);
    padding:16px;
    border:1px solid rgba(0,0,0,0.04);
    box-shadow:var(--shadow-sm);
}
.profile-section + .profile-section{margin-top:14px;}

.profile-section-title{margin:0 0 10px 0; font-size:1.1rem;}
.profile-body{color:var(--text); line-height:1.75;}

.profile-list{
    margin:0;
    padding-left:18px;
    color:var(--text);
}
.profile-list li{margin:6px 0;}

@media (max-width:900px){
    .profile-layout{grid-template-columns:1fr;}
    .profile-photo img{max-width:240px; height:300px;}
    .profile-actions{flex-direction:column; align-items:stretch;}
}

.books{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:18px; margin-top:20px;}
.card{background:var(--card); border-radius:12px; padding:12px; box-shadow:var(--shadow-sm); border:1px solid rgba(0,0,0,0.04); display:flex; gap:12px; align-items:flex-start;}
.card img{width:90px; height:130px; object-fit:cover; border-radius:6px;}
.meta h3{margin:0 0 6px 0; font-size:1rem;}
.meta p{margin:0; color:var(--muted); font-size:0.95rem;}

footer{padding:18px 24px; margin-top:26px; background:rgba(255,255,255,0.72); border-top:1px solid rgba(0,0,0,0.05);}
.footer-inner{display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; max-width:1100px; margin:0 auto;}
.contacts{color:var(--muted); font-size:0.95rem;}

/* 로그인 모달 */
.modal-backdrop{position:fixed; inset:0; background:rgba(0,0,0,0.4); display:none; align-items:center; justify-content:center; padding:20px; z-index:60;}
.modal{background:var(--card); border-radius:14px; padding:18px; width:100%; max-width:420px; box-shadow:0 18px 60px rgba(0,0,0,0.18); border:1px solid rgba(0,0,0,0.06);}
.modal h2{margin:0 0 8px 0;}
.form-group{display:flex; flex-direction:column; gap:6px; margin-bottom:12px;}
.form-group input{padding:10px; border-radius:10px; border:1px solid var(--border); font-size:0.95rem; background:var(--card);}
.modal-actions{display:flex; gap:8px; justify-content:flex-end;}
.small{font-size:0.85rem; color:var(--muted); margin-top:8px;}

/* 게시판 */
.board-toolbar{display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin-bottom:14px;}
.board-filters{display:flex; gap:12px; align-items:center; margin-bottom:12px;}
.board-input{flex:1; padding:10px; border-radius:12px; border:1px solid var(--border); background:var(--card); font-size:0.95rem;}
.board-select{padding:10px; border-radius:12px; border:1px solid var(--border); background:var(--card); font-size:0.95rem;}
.board-list{display:flex; flex-direction:column; gap:10px;}

.board-post{background:var(--card); border-radius:14px; padding:14px; box-shadow:var(--shadow-sm); border:1px solid rgba(0,0,0,0.04);}
.board-post.is-notice{border-left:4px solid rgba(255,122,0,0.55);}

.board-post details{margin:0;}
.board-post summary{list-style:none; cursor:pointer; display:flex; justify-content:space-between; align-items:flex-start; gap:12px;}
.board-post summary::-webkit-details-marker{display:none;}

.post-title{margin:0; font-size:1.02rem; line-height:1.35; font-weight:700;}
.post-meta{margin-top:6px; color:var(--muted); font-size:0.88rem;}
.post-actions{display:flex; gap:8px; align-items:center; flex:0 0 auto;}

.post-content{margin-top:12px; color:var(--text); line-height:1.7; white-space:pre-wrap; word-break:break-word;}

@media (max-width:720px){
    .board-toolbar{flex-direction:column; align-items:stretch;}
    .board-filters{flex-direction:column; align-items:stretch;}
    .board-select{width:100%;}
}

/* eBooks 업로드/목록 레이아웃 */
.ebooks-layout{display:flex; gap:24px; align-items:flex-start; background:linear-gradient(180deg,rgba(255,255,255,0.9),transparent); padding:22px; border-radius:var(--radius); box-shadow:0 6px 30px rgba(0,0,0,0.04);}
.ebooks-upload{width:360px; background:var(--card); border-radius:14px; padding:16px; box-shadow:var(--shadow-sm); border:1px solid rgba(0,0,0,0.04);}
.ebooks-list{flex:1; min-width:0;}
.section-title{margin:0 0 12px 0; font-size:1.15rem;}

.upload-form .form-group{display:flex; flex-direction:column; gap:6px; margin-bottom:12px;}
.upload-form input[type="text"],
.upload-form input[type="file"]{padding:10px; border-radius:10px; border:1px solid var(--border); font-size:0.95rem; background:var(--card);}
.upload-form input[type="file"]{padding:8px;}

.upload-form textarea{
    padding:10px;
    border-radius:10px;
    border:1px solid var(--border);
    font-size:0.95rem;
    background:var(--card);
    resize:vertical;
    min-height:92px;
}

.cover-preview-row{display:flex; gap:12px; align-items:center; margin-top:10px;}
.form-actions{display:flex; justify-content:flex-end; margin-top:6px;}
.upload-status{margin-top:10px; color:var(--muted);}
.upload-status progress{width:100%;}

@media (max-width:720px){
    .ebooks-layout{flex-direction:column;}
    .ebooks-upload{width:100%;}
}

/* eBooks 목록(서점 전시 스타일) */
.ebooks-catalog{background:linear-gradient(180deg,rgba(255,255,255,0.92),transparent); padding:18px; border-radius:var(--radius); box-shadow:var(--shadow-md); border:1px solid rgba(0,0,0,0.04);}
.catalog-list{display:flex; flex-direction:column; gap:14px;}

/* Admin upload page */
.admin-upload-wrap{max-width:720px; margin:0 auto;}
.admin-upload-panel{background:var(--card); border-radius:12px; padding:16px; box-shadow:0 6px 18px rgba(0,0,0,0.04);}

.catalog-item{
    background:var(--card);
    border-radius:12px;
    padding:14px;
    box-shadow:var(--shadow-sm);
    border:1px solid rgba(0,0,0,0.04);
    display:flex;
    gap:16px;
    align-items:flex-start;
}

.catalog-cover{
    width:150px;
    height:225px;
    object-fit:cover;
    border-radius:10px;
    box-shadow:0 10px 28px rgba(0,0,0,0.10);
    background:#fff;
    cursor:pointer;
    flex:0 0 auto;
}

.catalog-meta{flex:1; min-width:0;}
.catalog-title{margin:0; font-size:1.15rem; line-height:1.35;}
.catalog-sub{margin:6px 0 0 0; color:var(--muted); font-size:0.92rem;}
.catalog-desc{margin:10px 0 0 0; color:var(--muted); font-size:0.95rem; line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;}
.catalog-actions{display:flex; gap:8px; margin-top:12px; max-width:360px;}
.catalog-actions .btn{flex:1; justify-content:center;}

.ebooks-pager{display:flex; gap:8px; justify-content:center; align-items:center; margin-top:16px;}
.pager-label{color:var(--muted); font-size:0.9rem;}

@media (max-width:980px){
    .catalog-cover{width:130px; height:195px;}
}
@media (max-width:720px){
    .catalog-item{flex-direction:row;}
    .catalog-cover{width:120px; height:180px;}
    .catalog-actions{max-width:none;}
}

@media (max-width:720px){
    .hero{flex-direction:column; align-items:stretch;}
    .hero-right{width:100%;}
    nav ul{display:flex; flex-wrap:wrap; gap:8px; justify-content:center;}
    nav a{padding:6px 8px; font-size:0.92rem;}
    /* 모바일에서는 로고를 조금 더 작게 */
    .brand .brand-logo{ height:36px; max-height:40px; }
}

/* 클릭 가능한 로고 링크 스타일 */
.brand .home-link{
    display:inline-block;
    line-height:0;
    text-decoration:none;
}
.brand .home-link:focus{
    outline:3px solid rgba(47,125,50,0.18);
    border-radius:8px;
}

/* 로그인 버튼도 테마 버튼을 그대로 사용 (파란색 오버라이드 제거) */