/* 하단 시트형 — 분홍빛 흙색 + 코코아 잉크 + 붉은 벽돌 한 점. 고운바탕 제목, 엄지 영역에 모이는 조작 */
@font-face { font-family: 'Pretendard Variable'; src: url('/fonts/PretendardVariable.woff2') format('woff2-variations'); font-weight: 45 920; font-display: swap; }

:root {
  --bg: #F7ECE6;
  --card: #FFF8F4;
  --ink: #3A2620;
  --soft: #806A62;
  --line: #E6D2C8;
  --brick: #B9503F;
  --brick-dk: #923A2C;
  --sage: #8E9E85;
  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.65 var(--sans); letter-spacing: -0.2px; word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden; }
body.is-locked { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; letter-spacing: -0.5px; }

.hd { display: flex; justify-content: space-between; align-items: center; max-width: 1080px; margin: 0 auto; padding: 16px 20px; }
.hd__name { font-family: var(--serif); font-size: 22px; font-weight: 700; text-decoration: none; }
.hd__owner { padding: 6px 12px; border: 1px solid var(--ink); border-radius: 99px; font-size: 13px; font-weight: 600; text-decoration: none; }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px 140px; }

/* 첫 화면 — 그림 타일 + 큰 제목 */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 12px 0 40px; }
.hero__art { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; aspect-ratio: 5 / 4.4; }
.tile { width: 100%; height: 100%; border-radius: 18px; display: block; }
.tile--a { grid-row: 1 / 3; }
.tile svg, .tile { object-fit: cover; }
.hero__kicker { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--brick); }
.hero h1 { font-size: 44px; line-height: 1.25; }
.hero__lead { margin: 18px 0 18px; color: var(--soft); max-width: 460px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hero__facts li { padding: 5px 12px; border-radius: 99px; background: var(--card); font-size: 13.5px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }

.sec { padding: 36px 0; border-top: 1px solid var(--line); }
.sec h2 { margin-bottom: 18px; font-size: 26px; }
.cls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cl { display: flex; flex-direction: column; padding: 20px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.cl h3 { font-size: 19px; }
.cl p { flex: 1; margin: 8px 0 16px; font-size: 14.5px; color: var(--soft); }
.cl__ft { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.cl__go { flex: none; padding: 7px 12px; border: 0; border-radius: 99px; background: var(--ink); color: var(--card); font-size: 13px; font-weight: 600; cursor: pointer; }
.cl__go:hover { background: var(--brick); }
.note { margin: 14px 0 0; font-size: 13.5px; color: var(--soft); }
.story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.story li { counter-increment: s; font-size: 14.5px; color: var(--soft); }
.story li::before { content: '0' counter(s); display: block; margin-bottom: 6px; font-family: var(--serif); font-size: 22px; color: var(--brick); }
.story b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }
.sec--visit p { margin: 0; }
.maker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 8px; padding: 18px 20px; border-radius: 16px; background: #EFDCD2; font-size: 13.5px; color: var(--soft); }
.maker p { flex: 1 1 420px; margin: 0; }
.maker b { color: var(--ink); }
.maker a { font-weight: 700; color: var(--brick-dk); }
.foot { margin: 20px 0 0; font-size: 13px; color: var(--soft); }

/* 아래 고정 바 */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,248,244,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 1080px; margin: 0 auto; }
.bar__txt { display: flex; flex-direction: column; min-width: 0; margin: 0; line-height: 1.35; }
.bar__txt b { font-size: 16px; }
.bar__txt span { font-size: 13px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__btn { flex: none; min-width: 132px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--brick); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.bar__btn:hover { background: var(--brick-dk); }

/* 시트 */
.scrim { position: fixed; inset: 0; z-index: 1100; background: rgba(40,24,20,.42); opacity: 0; transition: opacity .25s; }
.scrim.is-on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1110; display: flex; flex-direction: column;
  max-width: 560px; max-height: min(88vh, 860px); margin: 0 auto; border-radius: 22px 22px 0 0; background: var(--card);
  box-shadow: 0 -20px 50px -20px rgba(40,24,20,.45); transform: translateY(105%); visibility: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s .3s;
}
.sheet.is-open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sheet__grab { width: 40px; height: 5px; margin: 10px auto 0; border-radius: 99px; background: var(--line); }
.sheet__hd { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; padding: 6px 12px 10px; border-bottom: 1px solid var(--line); }
.sheet__back, .sheet__x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 22px; line-height: 1; cursor: pointer; }
.sheet__back:hover, .sheet__x:hover { background: #F3E3DA; }
.sheet__ttl { text-align: center; }
.sheet__ttl h2 { font-size: 18px; }
.crumbs { display: flex; justify-content: center; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 12px; color: #B9A79F; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line); }
.crumbs .is-now { color: var(--brick); font-weight: 700; }
.crumbs .is-done { color: var(--ink); }
.sheet__bd { overflow-y: auto; padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sh__q { margin: 4px 0 10px; font-weight: 700; }
.sh__q small { margin-left: 6px; font-weight: 400; font-size: 12.5px; color: var(--soft); }

.mlist { display: grid; gap: 8px; }
.mi { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.mi span { display: flex; flex-direction: column; }
.mi i { font-style: normal; font-size: 12.5px; color: var(--soft); }
.mi em { font-style: normal; font-weight: 700; white-space: nowrap; }
.mi:hover, .mi.is-on { border-color: var(--brick); }

.drow { display: flex; gap: 6px; margin: 0 -18px 14px; padding: 0 18px 4px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.drow::-webkit-scrollbar { display: none; }
.dc { flex: none; display: flex; flex-direction: column; align-items: center; width: 56px; padding: 8px 0; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; scroll-snap-align: start; cursor: pointer; }
.dc i { font-style: normal; font-size: 11.5px; color: var(--soft); }
.dc b { font-size: 18px; line-height: 1.3; }
.dc small { font-size: 11px; color: var(--sage); font-weight: 700; }
.dc.is-off { border-color: transparent; background: #F2E5DE; color: #B9A79F; cursor: default; }
.dc.is-off small { color: #B9A79F; font-weight: 400; }
.dc.is-on { border-color: var(--ink); background: var(--ink); color: var(--card); }
.dc.is-on i, .dc.is-on small { color: #F1D9CF; }
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tc { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.tc b { font-size: 16px; }
.tc small { font-size: 11.5px; color: var(--soft); }
.tc--open:hover { border-color: var(--brick); }
.tc--taken { border-color: transparent; background: #EADBD3; color: var(--soft); cursor: default; }
.tc--taken b { text-decoration: line-through; font-weight: 500; }
.tc--blocked { border-style: dashed; background: transparent; color: var(--soft); cursor: default; }
.tc--past { border-color: transparent; background: transparent; color: #C2B2AA; cursor: default; }
.tc.is-on { border-color: var(--brick); background: var(--brick); color: #fff; }
.key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; font-size: 12px; color: var(--soft); }
.k { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }
.k--open { border: 1.5px solid var(--line); background: #fff; } .k--taken { background: #EADBD3; } .k--blocked { border: 1.5px dashed #C9B3A8; } .k--past { background: #F6EEE9; }

.sh__next { display: block; width: 100%; min-height: 52px; margin-top: 16px; border: 0; border-radius: 14px; background: var(--brick); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.sh__next:hover { background: var(--brick-dk); }
.sh__next:disabled { background: #E3CFC6; color: #fff; cursor: default; }
.sh__line { display: block; width: 100%; min-height: 50px; margin-top: 8px; border: 1.5px solid var(--ink); border-radius: 14px; background: transparent; font-weight: 700; cursor: pointer; }

.pill { display: flex; flex-direction: column; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: #F3E3DA; }
.pill span { font-size: 13px; color: var(--soft); }
.fld { display: block; margin-bottom: 12px; }
.fld span { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 600; }
.fld i { font-style: normal; font-weight: 400; color: var(--soft); }
.fld input, .fld textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 16px; color: inherit; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--brick); }
.err { min-height: 1.2em; margin: 0; font-size: 14px; font-weight: 600; color: var(--brick-dk); }
.err:empty { min-height: 0; }
.err--top { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: #F8DCD5; }
.fine { margin: 10px 0 0; font-size: 12.5px; color: var(--soft); text-align: center; }

.dn__badge { display: inline-block; padding: 4px 10px; border-radius: 99px; background: #F6E3A9; color: #66490F; font-size: 12.5px; font-weight: 700; }
.dn h3 { margin: 10px 0 12px; font-size: 22px; }
.dn dl { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 6px 10px; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #F3E3DA; }
.dn dt { font-size: 13px; color: var(--soft); } .dn dd { margin: 0; font-weight: 600; }
.dn p { margin: 0 0 10px; font-size: 14px; color: var(--soft); }
.dn__link { font-weight: 700; color: var(--brick-dk); }

/* PC — 오른쪽 서랍 */
@media (min-width: 900px) {
  .sheet { left: auto; right: 0; top: 0; bottom: 0; width: 440px; max-width: none; max-height: none; margin: 0; border-radius: 22px 0 0 22px; transform: translateX(105%); }
  .sheet__grab { display: none; }
  .sheet__hd { padding-top: 16px; }
  .sheet__bd { flex: 1; padding: 22px 24px 28px; }
  .drow { margin: 0 -24px 14px; padding: 0 24px 4px; }
  .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 4px; }
  .hero__art { aspect-ratio: 5 / 3.6; }
  .cls { display: flex; gap: 12px; margin: 0 -20px; padding: 0 20px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cls::-webkit-scrollbar { display: none; }
  .cl { flex: 0 0 82%; scroll-snap-align: start; }
  .story { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 560px) {
  .hd { padding: 14px 16px; }
  main { padding: 0 16px 130px; }
  .cls { margin: 0 -16px; padding: 0 16px 6px; }
  .hero h1 { font-size: 31px; }
  .sec h2 { font-size: 22px; }
  .bar__btn { min-width: 112px; }
}
.sheet__back:focus, .sheet__x:focus { outline: none; }
.sheet__back:focus-visible, .sheet__x:focus-visible { outline: 2px solid var(--brick); outline-offset: 1px; }
