/*
  미니홈피 기본 틀: 한 화면에 고정된 수첩 + 탭.
  틀은 화면 크기에 맞춰 고정하고, 탭을 누르면 안쪽 내용만 바뀐다. 긴 내용은 안쪽 칸에서만 넘긴다.
  색은 아래 값 몇 개로 바뀐다. 나중에 꾸미기(배경색, 테마 아이템)가 이 값을 바꾼다.
  글꼴 Jua: SIL Open Font License 1.1 (fonts/Jua-OFL.txt)
*/
@font-face {
  font-family: "Jua";
  src: url("fonts/Jua-Regular.783758a968ec.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --accent: #FFC2B4;   /* 바탕, 버튼 */
  --wall: #CDEFE8;     /* 미니룸 벽 */
  --tab: #FFE9A8;      /* 고르지 않은 탭 */
  --ink: #3A3550;
  --sub: #5C5672;
  --line: #E5DCEF;
  --cute: "Jua", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  background-color: var(--accent);
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 3px, transparent 3px);
  background-size: 34px 34px;
}
html.js, html.js body { height: 100%; overflow: hidden; }
html.js body { height: 100dvh; }
a { color: var(--ink); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

.preview { flex: 0 0 auto; background: #FFD24A; font-weight: 700; text-align: center; padding: 6px 16px; font-size: 14px; }
.trybar { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 6px 12px; background: #23233A; color: #fff; font-size: 13px; }
.try-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.trybar a { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border: 1px solid #8B8BA8; border-radius: 999px; color: #fff; text-decoration: none; }
.trybar a[aria-current] { background: #fff; color: #23233A; border-color: #fff; font-weight: 700; }
.trybar a.sw { width: 28px; padding: 0; border: 2px solid #fff; }
.trybar a.sw[aria-current] { outline: 3px solid #FFD24A; outline-offset: 1px; }
.topbar { flex: 0 0 auto; width: 100%; max-width: 1160px; margin: 0 auto; padding: 8px 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.brand { font-weight: 700; text-decoration: none; padding: 6px 0; }

/* ----- 수첩 ----- */
.stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px 24px 22px; }
.book { flex: 1 1 auto; min-width: 0; min-height: 0; height: 100%; max-width: 1112px; max-height: 760px; display: flex; gap: 20px; }
.side { flex: 0 0 300px; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 14px; background: #fff; border: 3px solid var(--ink); border-radius: 26px; padding: 16px; box-shadow: 6px 6px 0 rgba(58, 53, 80, 0.25); overflow: auto; }
.room { flex: 0 0 auto; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; }
.room-svg { display: block; width: 100%; height: auto; }
.room-wall { fill: var(--wall); }
.room-photo { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; object-fit: cover; }
.who { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.area { font-size: 14px; font-weight: 700; color: var(--sub); }
h1 { font-family: var(--cute); font-weight: 400; font-size: 27px; line-height: 1.25; }
.tagline { background: #FFF3B8; border: 3px solid var(--ink); border-radius: 16px 16px 16px 4px; padding: 7px 14px; font-family: var(--cute); font-size: 17px; line-height: 1.35; }
.cover { flex: 1 1 0; min-height: 0; align-self: center; max-width: 86%; display: flex; background: #fff; padding: 7px 7px 20px; border-radius: 5px; box-shadow: 0 5px 12px rgba(58, 53, 80, 0.22); transform: rotate(-2deg); }
.cover img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; background: #EDE7F6; }
.quick { flex: 0 0 auto; margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.quick li { flex: 1 1 calc(50% - 4px); min-width: 0; }
.q { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 10px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 14px; text-decoration: none; font-family: var(--cute); font-size: 16px; line-height: 1.2; box-shadow: 0 3px 0 var(--ink); transition: transform 0.12s, box-shadow 0.12s; }
.q:hover { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.q-phone { background: #C8F0C0; }
.q-kakao { background: #FEE500; }
.q-instagram { background: #FFB7C5; }
.q-blog { background: #BFE8FF; }
.q-youtube { background: #FFB7B0; }
.q-band { background: #C8F0C0; }
.q-cafe { background: #FFDDA8; }

.main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.tabs { flex: 0 0 auto; display: flex; gap: 5px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; min-height: 44px; display: flex; align-items: center; padding: 6px 18px; background: var(--tab); border: 3px solid var(--ink); border-bottom: 0; border-radius: 14px 14px 0 0; text-decoration: none; font-family: var(--cute); font-size: 18px; white-space: nowrap; position: relative; top: 3px; }
.tabs a[aria-selected="true"] { background: #fff; z-index: 1; }
html:not(.js) .tabs a:first-child { background: #fff; }
.panels { flex: 1 1 auto; min-height: 0; background: #fff; border: 3px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 rgba(58, 53, 80, 0.25); overflow: hidden; display: flex; flex-direction: column; }
.panel { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.panel[hidden] { display: none; }
html:not(.js) .panel + .panel { border-top: 3px dashed var(--line); }

.tape { align-self: flex-start; margin-left: -6px; transform: rotate(-2deg); padding: 4px 18px; font-family: var(--cute); font-weight: 400; font-size: 19px; box-shadow: 0 2px 0 rgba(58, 53, 80, 0.15); }
.tape-1 { background: #FFE27A; }
.tape-2 { background: #D9C8FF; }
.tape-3 { background: #FFB7C5; }
.tape-4 { background: #A6E4D8; }
.tape-5 { background: #BFE8FF; }

/* ----- 홈: 한눈에 보기 ----- */
.dash { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(0, 1fr); gap: 14px; }
.tile { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border: 2px dashed var(--ink); border-radius: 18px; background: #FFFDF7; text-decoration: none; transition: transform 0.12s, background 0.12s; }
.tile:hover { background: #FFF7E0; transform: translateY(-2px); }
.tile-intro { grid-column: 1 / -1; }
.tile .tape { font-size: 17px; padding: 3px 14px; }
.clamp { font-size: 15px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.small { font-size: 14px; color: var(--sub); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-family: var(--cute); font-size: 15px; }
.mini-notices { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.mini-notices li { display: flex; justify-content: space-between; gap: 10px; }
.mini-notices span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-notices time { flex-shrink: 0; color: var(--sub); }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 2px; }
.thumbs li { background: #fff; padding: 4px 4px 10px; border-radius: 4px; box-shadow: 0 3px 8px rgba(58, 53, 80, 0.2); }
.thumbs li:nth-child(odd) { transform: rotate(-2deg); }
.thumbs li:nth-child(even) { transform: rotate(2deg); }
.thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #EDE7F6; }

/* ----- 탭 안쪽 ----- */
.intro { font-size: 17px; }
.intro p { margin: 0 0 12px; }
.intro p:last-child { margin-bottom: 0; }
.courses { display: flex; flex-wrap: wrap; gap: 12px; }
.courses li { flex: 1 1 200px; min-width: 0; border: 2px dashed var(--ink); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: #F2FBF9; }
.courses li:nth-child(3n+2) { background: #FFF9E6; }
.courses li:nth-child(3n) { background: #FFF1F4; }
.courses strong { font-family: var(--cute); font-weight: 400; font-size: 19px; }
.courses span { font-size: 15px; color: var(--sub); }
.hours { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 16px; }
.hours div { display: flex; gap: 10px; min-width: 0; }
.hours dt { font-family: var(--cute); flex-shrink: 0; }
.notices li { border-bottom: 2px dashed #D9D2E9; }
.notices li:last-child { border-bottom: 0; }
.notices summary, .notices li > p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 12px 0; font-weight: 500; font-size: 16px; }
.notices summary { cursor: pointer; }
.notices time { color: var(--sub); font-size: 14px; font-weight: 400; }
.notice-body { padding: 0 0 14px; font-size: 16px; color: var(--sub); }
.notice-body p { margin: 0 0 8px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; padding: 6px 4px; }
.album li { min-width: 0; transform: rotate(var(--tilt, 0deg)); transition: transform 0.15s; }
.album li:hover, .album li:focus-within { transform: rotate(0deg) scale(1.04); }
.album a { display: block; background: #fff; padding: 8px 8px 10px; border-radius: 6px; box-shadow: 0 5px 12px rgba(58, 53, 80, 0.2); text-decoration: none; }
.album img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #EDE7F6; }
.album span { display: block; padding-top: 6px; text-align: center; font-family: var(--cute); font-size: 14px; line-height: 1.3; }
.info { display: flex; flex-direction: column; gap: 12px; }
.info dt { font-size: 14px; color: var(--sub); }
.info dd { font-weight: 500; font-size: 17px; }
.info dd a { text-decoration: underline; text-underline-offset: 3px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 6px; }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; background: var(--accent); border: 3px solid var(--ink); border-radius: 999px; text-decoration: none; font-family: var(--cute); font-size: 17px; box-shadow: 0 4px 0 var(--ink); transition: transform 0.12s, box-shadow 0.12s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.extra { margin-top: auto; border: 2px solid var(--line); border-radius: 16px; padding: 2px 18px; }
.extra summary { cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 14px; color: var(--sub); }
.extra-list { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 4px 0 10px; font-size: 15px; }
.extra-list div { display: flex; gap: 8px; min-width: 0; }
.extra-list dt { color: var(--sub); flex-shrink: 0; }
.extra-list dd { font-weight: 500; }
.source { padding-bottom: 14px; font-size: 13px; color: var(--sub); }

@media (prefers-reduced-motion: reduce) { .q, .btn, .tile, .album li { transition: none; } }

/* 화면 높이가 낮은 노트북: 틈을 줄인다 */
@media (max-height: 700px) and (min-width: 821px) {
  .stage { padding-bottom: 14px; }
  .side { gap: 10px; padding: 12px; }
  .cover { padding: 5px 5px 14px; }
  h1 { font-size: 24px; }
  .panel { padding: 16px 20px 18px; gap: 10px; }
  .dash { gap: 10px; }
  .tile { padding: 10px 14px 12px; gap: 6px; }
}

/* ----- 휴대폰: 위에 이름과 미니룸, 가운데 탭, 아래 내용 ----- */
@media (max-width: 820px) {
  .topbar { padding: 4px 14px 0; font-size: 13px; }
  .addr { display: none; }
  .stage { padding: 6px 10px 10px; }
  .book { flex-direction: column; gap: 10px; max-height: none; }
  .side { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px; border-radius: 20px; box-shadow: 4px 4px 0 rgba(58, 53, 80, 0.25); overflow: visible; }
  .room { flex: 0 0 38%; max-width: 170px; border-radius: 14px; }
  .who { flex: 1 1 0; gap: 4px; }
  .area { font-size: 12px; }
  h1 { font-size: 20px; }
  .tagline { font-size: 14px; padding: 4px 10px; border-width: 2px; }
  .quick { flex: 1 1 100%; margin-top: 0; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .quick li { flex: 1 0 auto; }
  .q { min-height: 40px; font-size: 15px; white-space: nowrap; padding: 4px 12px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); }
  .tabs { padding: 0 6px; gap: 3px; }
  .tabs a { padding: 4px 10px; font-size: 15px; min-height: 40px; border-radius: 12px 12px 0 0; }
  .panels { border-radius: 20px; box-shadow: 4px 4px 0 rgba(58, 53, 80, 0.25); }
  .panel { padding: 14px 14px 16px; gap: 10px; }
  .dash { flex: 0 0 auto; gap: 8px; grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .tile { padding: 9px 12px 11px; gap: 6px; border-radius: 14px; }
  .tile-map, .tile-class .small, .cover { display: none; }
  .chips { flex-wrap: nowrap; overflow: hidden; }
  .chips li { white-space: nowrap; }
  .tile .tape { font-size: 15px; padding: 2px 12px; }
  .clamp { font-size: 14px; }
  .chips li { font-size: 14px; padding: 1px 10px; }
  .thumbs { gap: 6px; }
  .thumbs li { padding: 3px 3px 8px; }
  .album { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .btns .btn { flex: 1 1 100%; }
  html:not(.js) .book { max-height: none; }
}
html:not(.js) .book { max-height: none; }
html:not(.js) .panels, html:not(.js) .panel { overflow: visible; }
