/* 독립서점 청춘기록 미니홈피 — 홈·공간대여 페이지가 함께 쓰는 디자인 */
:root {
  --sky: #d7e9ec;
  --paper: #fcfaf5;
  --white: #fffdf8;
  --line: #d8e3e4;
  --line-2: #a8c8cf;
  --ink: #294a52;
  --deep: #315e69;
  --soft: #719099;
  --mint: #edf4f2;
  --mint-2: #e7f0ef;
  --point: #82afba;
  --tab: #8eb9c4;
  --peach: #f4b9a3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 48px 20px 60px;
  background-color: var(--sky);
  background-image: radial-gradient(#ffffff80 1.2px, transparent 1.3px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: "Gowun Dodum", "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; }
a { color: var(--deep); }
button, input, textarea { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--deep); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 틀 */
.site { max-width: 1100px; margin: 0 auto; position: relative; padding-right: 104px; }
.window {
  background: var(--paper);
  border: 2px solid var(--line-2);
  border-radius: 24px;
  padding: 22px 26px 26px;
  box-shadow: 0 18px 48px #476a7524, inset 0 0 0 6px #ffffff;
}
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 0 4px 14px; margin-bottom: 18px; border-bottom: 1px dashed #c8d9db; }
.logo { font-size: 25px; font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: -.01em; }
.logo small { display: block; font-size: 11px; letter-spacing: .28em; color: var(--soft); font-weight: 400; }
.small { font-size: 12.5px; color: var(--soft); }
.header-meta { text-align: right; }
.header-meta > .small { letter-spacing: .12em; font-size: 11px; }
.visitor-counter { display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; font-size: 11px; letter-spacing: .06em; color: var(--soft); }
.visitor-counter span { white-space: nowrap; }
.visitor-counter b { margin-left: 4px; color: #d0675a; font-weight: 700; }
.layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 18px; }

/* 왼쪽 프로필 */
.profile { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; align-self: start; }
.profile-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.profile h2 { font-size: 19px; margin: 14px 0 2px; }
.profile .bio { font-size: 13px; line-height: 1.75; margin: 6px 0 0; }
.today { background: var(--mint-2); padding: 10px 12px; border-radius: 10px; font-size: 12px; margin: 14px 0; }
.today b { color: var(--deep); letter-spacing: .08em; }
.facts { list-style: none; padding: 0; margin: 0; font-size: 12.5px; line-height: 2; }
.socials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.socials a { font-size: 11.5px; text-decoration: none; border: 1px solid #c3d7da; border-radius: 20px; padding: 3px 10px; background: var(--paper); transition: background .2s; }
.socials a:hover { background: var(--mint); }
.bgm { margin-top: 14px; border: 1px dashed #c3d7da; border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: var(--soft); display: flex; align-items: center; gap: 8px; }
.bgm .eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.bgm .eq i { width: 3px; background: var(--point); border-radius: 2px; animation: eq 1.1s ease-in-out infinite; }
.bgm .eq i:nth-child(2) { animation-delay: .2s; }
.bgm .eq i:nth-child(3) { animation-delay: .45s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* 오른쪽 본문 */
.content { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px 30px; min-height: 560px; min-width: 0; }
.content:focus { outline: none; }
.page > :first-child { margin-top: 0; }
.page h2 { font-size: 23px; margin: 0 0 6px; line-height: 1.5; }
.page h3 { font-size: 16px; margin: 0 0 10px; }
.section-label { color: var(--soft); font-size: 11px; letter-spacing: .24em; margin-bottom: 8px; }
.page h2.section-label { font-size: 11px; font-weight: 400; line-height: 1.6; margin: 26px 0 8px; }
.site-h1 { font-size: 12px; font-weight: 400; letter-spacing: .14em; color: var(--soft); margin: 0 0 8px; }
.headline { font-size: 25px; font-weight: 700; line-height: 1.5; margin: 0 0 8px; }
.lead { margin: 0 0 18px; }
.hero { width: 100%; height: 320px; object-fit: cover; border-radius: 14px; margin: 16px 0; }
/* 청춘룸 그림 (room.js) */
.room { margin: 0; overflow: hidden; border: 1px solid var(--line); background: #fffdf6 radial-gradient(#efe4cc 1px, transparent 1.2px) 0 0 / 12px 12px; }
.room svg { display: block; width: 100%; height: auto; margin: -2% 0 -3%; }

/* 홈: 미니홈피 첫 화면 (소식 · 메뉴별 글 수 · 미니룸 · 방명록 한마디) */
.box-title { font-size: 14px !important; font-weight: 700; color: #3f9bb1; margin: 0 0 6px !important; letter-spacing: .01em; }
.box-title small { white-space: nowrap; font-size: 9.5px; font-weight: 400; color: #a3b4b8; letter-spacing: .12em; margin-left: 4px; text-transform: uppercase; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed #c8d9db; }
.news-list, .friends-list { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.95; }
.news-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-list li::before { content: "· "; color: var(--point); }
.news-list a, .friends-list a, .room-links a, .menu-count a { color: var(--ink); text-decoration: none; }
.news-list a:hover, .friends-list a:hover, .room-links a:hover, .menu-count a:hover { color: #3f9bb1; text-decoration: underline; }
.menu-count { width: 100%; border-collapse: collapse; font-size: 12.5px; align-self: start; margin-top: 4px; }
.menu-count th, .menu-count td { border: 1px solid #d5e3e5; padding: 5px 8px; text-align: left; }
.menu-count th { font-weight: 400; background: var(--paper); }
.menu-count td { width: 18%; color: #d0675a; text-align: right; }
.menu-count .new { display: inline-block; background: #f2994a; color: #fff; font-size: 9px; font-weight: 700; border-radius: 3px; padding: 0 4px; line-height: 1.6; }
.room-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.room-name { font-size: 13px; color: #3f9bb1; font-weight: 700; }
.home-cta { display: flex; gap: 8px; margin-top: 8px; }
.home-cta a { flex: 1; text-align: center; font-size: 12.5px; text-decoration: none; color: var(--deep); background: var(--paper); border: 1px solid #b9ced0; border-radius: 8px; padding: 7px 8px; min-height: 36px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.home-cta a:hover { background: var(--mint); }
.room-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--soft); padding: 6px 2px 12px; margin-bottom: 12px; border-bottom: 1px dashed #c8d9db; }
.friends-list li { border-bottom: 1px dotted #d5e3e5; padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friends-list b { color: var(--deep); }
.room noscript img { width: 100%; height: 320px; object-fit: cover; }
.cr-bob { animation: crbob 2.6s ease-in-out infinite; }
.cr-twinkle { animation: crtwinkle 1.8s ease-in-out infinite; }
.cr-glow { animation: crtwinkle 4s ease-in-out infinite; }
.cr-heart { animation: crheart 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.cr-note { animation: crheart 3s ease-in-out infinite; }
.cr-steam { animation: crtwinkle 2.2s ease-in-out infinite; }
@keyframes crbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes crtwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes crheart { 0% { transform: translateY(4px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateY(-10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cr-bob, .cr-twinkle, .cr-glow, .cr-heart, .cr-note, .cr-steam { animation: none; } }

.card { background: var(--mint); padding: 18px 20px; border-radius: 14px; margin-top: 14px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card p { margin: 6px 0; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.link { display: inline-block; background: var(--point); color: #fff; text-decoration: none; padding: 10px 16px; border-radius: 10px; border: 0; cursor: pointer; font-size: 14px; transition: background .2s, transform .2s; }
.link:hover { background: #6f9ea9; transform: translateY(-1px); }
.link.line { background: transparent; color: var(--deep); border: 1px solid #b9ced0; }
.link.line:hover { background: var(--paper); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.status { display: inline-block; border: 1px solid #b9ced0; border-radius: 20px; padding: 2px 10px; font-size: 11px; color: #597780; background: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.chips li { font-size: 12px; background: var(--paper); border: 1px solid #c3d7da; border-radius: 20px; padding: 2px 10px; }

/* 숫자 띠 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px dashed #bcd2d5; border-radius: 14px; margin: 4px 0 6px; background: var(--paper); }
.stat { text-align: center; padding: 12px 6px; border-right: 1px dashed #bcd2d5; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 20px; color: var(--deep); line-height: 1.4; }
.stat span { font-size: 11.5px; color: var(--soft); }

/* 두 칸 카드 */
.meeting-intro { border-left: 3px solid var(--point); padding-left: 14px; margin: 8px 0 0; }
.meeting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.meeting-grid .card { margin-top: 0; }
.meeting-grid p, .meeting-grid li { font-size: 13.5px; }
.rental-list { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.9; }
.rental-price { font-size: 21px; font-weight: 700; color: var(--deep); margin: 0 0 4px !important; }

/* 자주 묻는 질문 */
.faq { margin-top: 10px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 12px 40px 12px 16px; position: relative; font-weight: 700; font-size: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q. "; color: var(--point); }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--point); font-size: 18px; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 16px 14px; font-size: 13.5px; }
.faq .answer p { margin: 0; }

/* 사진첩 */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.photo-grid button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; position: relative; }
.photo-grid img { width: 100%; height: 190px; object-fit: cover; transition: transform .5s; }
.photo-grid button:hover img { transform: scale(1.05); }
.photo-grid span { position: absolute; left: 8px; bottom: 8px; font-size: 11px; background: #fcfaf5e6; border-radius: 20px; padding: 1px 9px; color: var(--ink); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1000px); }
.lightbox::backdrop { background: #1e3236cc; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 14px; }
.lightbox button { position: absolute; top: 10px; right: 10px; background: var(--paper); border: 0; border-radius: 20px; padding: 4px 12px; cursor: pointer; }

/* 방명록 */
.guest-form { background: var(--mint); padding: 18px; border-radius: 14px; margin: 16px 0; }
.guest-form input, .guest-form textarea { display: block; width: 100%; margin: 6px 0 12px; padding: 11px 12px; border: 1px solid #bdd4d8; border-radius: 10px; background: #fff; font-size: 15px; }
.guest-form textarea { min-height: 110px; resize: vertical; }
.guest-submit { background: var(--point); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; }
.guest-entry { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.guest-entry strong { overflow-wrap: anywhere; }
.guest-entry p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; }
.guest-date { font-size: 12px; color: var(--soft); }
.guest-feedback { font-size: 13px; color: var(--deep); }
.guest-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.guest-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.guest-pager button { min-height: 38px; padding: 4px 12px; background: var(--paper); color: var(--deep); border: 1px solid #b9ced0; border-radius: 8px; cursor: pointer; }
.guest-pager button:disabled, .guest-submit:disabled { opacity: .5; cursor: default; }
#guestLegacy { margin-top: 22px; }

/* 노션에서 불러온 사진첩·청춘일기·청춘책장 (notion-content.js) */
.sub-title { font-size: 13px; color: #3f9bb1; margin: 18px 0 0; }
.diary-post { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-top: 14px; }
.diary-head { display: flex; align-items: center; gap: 8px; border-bottom: 1px dashed #c8d9db; padding-bottom: 8px; margin-bottom: 8px; }
.diary-date { font-size: 12px; color: #d0675a; letter-spacing: .04em; }
.diary-post h3 { font-size: 16px; margin: 4px 0 8px; }
.diary-post h4 { font-size: 14px; margin: 12px 0 4px; }
.diary-post p { margin: 6px 0; font-size: 14px; white-space: pre-wrap; }
.diary-post ul { margin: 6px 0; padding-left: 18px; font-size: 14px; }
.diary-post blockquote { margin: 10px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--point); color: var(--soft); font-size: 14px; }
.diary-post hr { border: 0; border-top: 1px dashed #c8d9db; margin: 12px 0; }
.diary-post img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin: 8px 0; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.book { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.book-cover { width: 76px; aspect-ratio: 2 / 3; border-radius: 4px 8px 8px 4px; overflow: hidden; background: linear-gradient(90deg, #5f8f9a 0 8px, var(--point) 8px); display: flex; align-items: center; justify-content: center; box-shadow: 2px 3px 0 #c8d9db; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover span { color: #fff; font-size: 11px; line-height: 1.4; padding: 6px 6px 6px 12px; text-align: center; }
.book-info h3 { font-size: 14.5px; margin: 4px 0 0; line-height: 1.5; }
.book-info p { margin: 4px 0 0; font-size: 13px; }
.book-info .small { font-size: 11.5px; }

.meetup-list { list-style: none; margin: 0; padding: 0; }
.meetup { padding: 8px 0; border-bottom: 1px dashed #c8d9db; }
.meetup:last-child { border-bottom: 0; padding-bottom: 0; }
.meetup-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meetup-date { font-size: 12px; color: #d0675a; }
.meetup strong { display: block; font-size: 14px; margin-top: 2px; }
.meetup p { margin: 2px 0 0; }
.meetup .link { margin-top: 6px; padding: 6px 12px; font-size: 12.5px; }
.status.open { background: #e6f4e4; border-color: #9fd39a; color: #3f7a3a; }

/* 오시는 길 */
.info { margin: 0; }
.info div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px dashed #c8d9db; }
.info div:last-child { border-bottom: 0; }
.info dt { font-size: 12px; color: var(--soft); padding-top: 2px; }
.info dd { margin: 0; }

/* 빈 메뉴 */
.empty { text-align: center; padding: 34px 18px; border: 1px dashed #bcd2d5; border-radius: 14px; background: var(--paper); margin-top: 14px; }
.empty .icon { font-size: 30px; }

/* 오른쪽 세로 메뉴 */
.tabs { position: absolute; right: 0; top: 104px; width: 92px; display: flex; flex-direction: column; gap: 5px; }
.tabs a {
  display: block; text-align: center; text-decoration: none;
  border: 1px solid #8fb5be; border-left: none; border-radius: 0 11px 11px 0;
  padding: 12px 4px; min-height: 44px; background: var(--tab); color: #fff; font-size: 12.5px;
  transition: background .2s, color .2s, padding-left .2s;
}
.tabs a:hover, .tabs a.active { background: var(--paper); color: var(--deep); }
.tabs a.active { font-weight: 700; padding-left: 10px; }

.footer { margin-top: 18px; padding: 0 4px; font-size: 12px; color: #789198; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-block; color: var(--soft); font-size: 12.5px; text-decoration: none; margin-bottom: 10px; }
.back-link:hover { color: var(--deep); }

/* 자바스크립트가 켜지면 한 메뉴씩 보여 줌 (꺼져 있으면 모든 내용이 다 보임) */
.page[hidden] { display: none; }
.page { animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .page, .bgm .eq i { animation: none; }
  html { scroll-behavior: auto; }
}

/* 휴대폰: PC처럼 오른쪽 세로 메뉴 유지 */
@media (max-width: 760px) {
  body { padding: 14px 6px 30px; font-size: 14px; }
  .site { padding-right: 62px; }
  .window { padding: 14px 12px 16px; border-radius: 18px; box-shadow: 0 10px 30px #476a7524, inset 0 0 0 4px #fff; }
  .top { flex-wrap: wrap; align-items: flex-start; padding-bottom: 10px; margin-bottom: 12px; }
  .logo { font-size: 20px; }
  .header-meta { text-align: left; width: 100%; }
  .header-meta > .small { font-size: 9.5px; }
  .visitor-counter { justify-content: flex-start; gap: 14px; }
  .layout { grid-template-columns: 1fr; gap: 12px; }
  .profile { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 12px; padding: 12px; }
  .profile-photo { width: 64px; height: 64px; grid-row: 1 / 3; border-radius: 10px; }
  .profile h2 { margin: 0; font-size: 15px; align-self: end; }
  .profile .bio { grid-column: 2; font-size: 11.5px; margin: 0; line-height: 1.6; }
  .profile .today, .profile .facts, .profile .socials, .profile .bgm { grid-column: 1 / -1; }
  .profile .today { margin: 8px 0 4px; padding: 6px 10px; font-size: 11px; }
  .profile .facts { font-size: 11.5px; line-height: 1.8; }
  .profile .bgm { display: none; }
  .content { padding: 16px 14px 20px; min-height: 0; }
  .page h2 { font-size: 19px; }
  .headline { font-size: 20px; }
  .hero { height: 190px; margin: 12px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px dashed #bcd2d5; }
  .stat b { font-size: 17px; }
  .card { padding: 14px; }
  .meeting-grid { grid-template-columns: 1fr; }
  .photo-grid { gap: 6px; }
  .photo-grid img { height: 110px; }
  .link { font-size: 12.5px; padding: 9px 12px; max-width: 100%; }
  .guest-form { padding: 12px; }
  .guest-form input, .guest-form textarea { font-size: 16px; padding: 9px; }
  .tabs { top: 96px; width: 62px; gap: 4px; }
  .tabs a { font-size: 11px; padding: 11px 2px; white-space: nowrap; border-radius: 0 8px 8px 0; }
  .tabs a.active { padding-left: 4px; }
  .footer { font-size: 10.5px; }
  .meeting-intro br { display: none; }
  .home-top { grid-template-columns: 1fr; gap: 10px; }
  /* 손가락으로 누르기 쉽게: 홈의 작은 글자 링크 누르는 높이 늘리기 */
  .news-list a, .room-links a, .friends-list a { display: inline-block; padding: 7px 0; }
  .news-list { line-height: 1.5; }
  .menu-count td { padding: 9px 8px; }
  .menu-count th { padding: 0; }
  .menu-count th a { display: block; padding: 9px 8px; }
  .home-cta a { font-size: 12px; padding: 8px 6px; }
  .room-links { row-gap: 0; }
  .back-link { display: inline-block; padding: 10px 0; }
}
/* 아주 좁은 휴대폰(400px 이하): 버튼을 위아래로, 방 이름 한 줄로 */
@media (max-width: 400px) {
  .home-cta { flex-direction: column; gap: 6px; }
  .room-name { font-size: 12px; white-space: nowrap; }
  .room-bar .box-title small { display: none; }
  .news-list, .friends-list { font-size: 12.5px; }
  .info div { grid-template-columns: 62px 1fr; }
}
