@import url('https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@400;700&family=Nanum+Pen+Script&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; background: #0a0a0a; }
body { font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif; color: #ececec; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; word-break: keep-all; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.serif { font-family: 'Gowun Batang', serif; }
.hand { font-family: 'Nanum Pen Script', cursive; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.screen { position: fixed; inset: 0; display: none; }
.screen.on { display: block; }
.grain::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .09; mix-blend-mode: screen; z-index: 5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- 회차 목록 ---------- */
#home { overflow-y: auto; background: #0d0d0e; }
#home .top { display: flex; justify-content: space-between; align-items: center; padding: 22px 48px; border-bottom: 1px solid #2a2a2c; }
#home .brand { font-size: 18px; font-weight: 700; }
#home .brand span { font-size: 13px; color: #8e8e92; font-weight: 400; margin-left: 10px; }
#home .keys { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #cfcfcf; }
#home .keys b { color: #fff; font-size: 16px; }
.btn-line { border: 1px solid #58585b; color: #ececec; font-size: 13px; padding: 7px 12px; border-radius: 3px; }
.btn-solid { background: #ececec; color: #111; font-weight: 700; border-radius: 3px; }
#home .grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding: 28px 48px 48px; max-width: 1440px; }
.tabs { display: flex; gap: 6px; }
.tab { font-size: 14px; color: #8e8e92; padding: 8px 14px; border: 1px solid #2a2a2c; border-radius: 3px; white-space: nowrap; }
.tab.on { background: #ececec; color: #111; border-color: #ececec; font-weight: 600; }
.season { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-top: 22px; }
.season h1 { font-family: 'Gowun Batang', serif; font-size: 26px; font-weight: 700; }
.season p { font-size: 14px; color: #8e8e92; margin-top: 6px; }
.prog { text-align: right; font-size: 13px; color: #8e8e92; white-space: nowrap; }
.prog i { display: block; width: 180px; height: 3px; background: #2e2e30; margin-top: 8px; }
.prog b { display: block; height: 100%; width: 8.75%; background: #ececec; }
.cont { display: grid; grid-template-columns: 96px 1fr auto; gap: 22px; align-items: center; margin-top: 20px; padding: 16px 20px 16px 16px; background: #161617; border: 1px solid #2e2e30; border-radius: 4px; }
.cont img { width: 96px; height: 120px; display: block; }
.ck { font-size: 12.5px; color: #8e8e92; }
.ct { font-family: 'Gowun Batang', serif; font-size: 22px; font-weight: 700; margin-top: 4px; }
.cs { font-size: 13.5px; color: #bdbdbd; margin-top: 6px; }
.cont .btn-solid { font-size: 15px; padding: 12px 20px; }
.list { margin-top: 18px; border-top: 1px solid #2a2a2c; }
.ep { display: grid; grid-template-columns: 48px 1fr 150px; align-items: center; padding: 14px 4px; border-bottom: 1px solid #2a2a2c; width: 100%; text-align: left; }
.ep .n { font-size: 15px; color: #8e8e92; }
.ep .t { font-family: 'Gowun Batang', serif; font-size: 18px; }
.ep .t small { display: block; font-family: 'Pretendard'; font-size: 12.5px; color: #8e8e92; margin-top: 3px; }
.ep .st { justify-self: end; font-size: 13px; padding: 5px 11px; border-radius: 3px; border: 1px solid #46464a; color: #cfcfcf; white-space: nowrap; }
.ep .st.done { border-color: transparent; color: #8e8e92; }
.ep .st.now { background: #ececec; color: #111; border-color: #ececec; font-weight: 600; }
.ep .st.key { border-color: #ececec; color: #fff; }
.ep .st.soon { border-style: dashed; color: #8e8e92; }
.ep.locked .t { color: #bdbdbd; }
.pass { border: 1px solid #ececec; padding: 26px 26px 22px; border-radius: 4px; background: #131314; }
.pass .k { font-size: 13px; color: #8e8e92; }
.pass h2 { font-size: 24px; margin-top: 6px; }
.pass .price { font-size: 30px; font-weight: 700; margin-top: 14px; }
.pass .price span { font-size: 14px; font-weight: 400; color: #8e8e92; margin-left: 6px; }
.pass ul { list-style: none; margin-top: 16px; font-size: 14.5px; color: #d6d6d6; line-height: 1.95; }
.pass li::before { content: '— '; color: #6a6a6e; }
.pass .go { width: 100%; margin-top: 18px; font-size: 16px; padding: 15px; }
.pass .fine { font-size: 12px; color: #8e8e92; margin-top: 10px; text-align: center; }
.single { margin-top: 14px; border: 1px solid #2a2a2c; padding: 18px 20px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; }
.single span { color: #8e8e92; font-size: 13px; display: block; margin-top: 3px; }
.next { margin-top: 14px; font-size: 13px; color: #8e8e92; line-height: 1.6; }

/* ---------- 진료(시네마) ---------- */
#play { background: #000; cursor: pointer; user-select: none; -webkit-user-select: none; }
.bgl { position: absolute; inset: 0; background-size: cover; background-position: center 22%; opacity: 0; transition: opacity 1.2s ease; filter: brightness(.9); }
.bgl.on { opacity: 1; }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 16%, rgba(0,0,0,0) 44%, rgba(0,0,0,.82) 66%, rgba(0,0,0,.94) 100%); }
#play .top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 24px 48px; z-index: 6; }
.ept { font-size: 14px; color: #c9c9c9; }
.ept b { color: #fff; font-weight: 600; font-size: 16px; margin-right: 10px; }
.meter { display: flex; align-items: center; gap: 22px; font-size: 13px; color: #bdbdbd; }
.bar { display: flex; align-items: center; gap: 10px; position: relative; }
.bar i { display: block; width: 120px; height: 2px; background: rgba(255,255,255,.25); position: relative; }
.bar i em { position: absolute; left: 0; top: 0; bottom: 0; background: #fff; transition: width .8s ease; }
.bar b { color: #fff; font-weight: 600; min-width: 22px; text-align: right; }
.bar .fl { position: absolute; right: -4px; top: 18px; font-size: 12px; font-weight: 700; color: #fff; opacity: 0; transform: translateY(0); transition: opacity .3s, transform 1.4s; white-space: nowrap; }
.bar .fl.show { opacity: 1; transform: translateY(6px); }
.pause { border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 3px; }
.low { position: absolute; left: 48px; right: 48px; bottom: 44px; display: grid; grid-template-columns: 1fr 520px; gap: 56px; align-items: end; z-index: 6; }
.who { font-size: 14px; color: #bdbdbd; margin-bottom: 10px; min-height: 17px; }
.sub { font-size: 28px; line-height: 1.58; font-weight: 500; letter-spacing: -0.3px; text-shadow: 0 1px 10px rgba(0,0,0,.6); min-height: 1.58em; }
.sub.narr { font-size: 21px; font-weight: 400; color: #d0d0d0; line-height: 1.7; }
.caret { display: inline-block; width: 8px; height: 8px; margin-left: 10px; border-right: 2px solid #bbb; border-bottom: 2px solid #bbb; transform: rotate(45deg) translateY(-4px); opacity: 0; }
.caret.on { animation: blink 1.1s infinite; }
@keyframes blink { 0%,100% { opacity: .15; } 50% { opacity: .9; } }
.hint { font-size: 12.5px; color: #8a8a8a; margin-top: 14px; }
.ch { display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; pointer-events: none; }
.ch.on { opacity: 1; transform: none; pointer-events: auto; }
.ch .hd { display: flex; justify-content: space-between; font-size: 13px; color: #bdbdbd; margin-bottom: 4px; }
.ch .hd b { color: #fff; }
.row { display: grid; grid-template-columns: 30px 1fr; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); padding: 13px 16px; font-size: 16px; line-height: 1.5; border-radius: 3px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-align: left; transition: background .15s, color .15s; }
.row span { font-size: 13px; color: #9a9a9a; }
.row:hover { background: rgba(255,255,255,.16); }
.row.sel { background: #f0f0f0; color: #0d0d0d; border-color: #f0f0f0; }
.row.sel span { color: #555; }
.timeline { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.12); z-index: 6; }
.timeline i { display: block; width: 0; height: 100%; background: rgba(255,255,255,.75); }
.card { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; z-index: 7; opacity: 0; pointer-events: none; transition: opacity .9s; }
.card.on { opacity: 1; }
.card p { font-family: 'Gowun Batang', serif; font-size: 26px; color: #d8d8d8; }

/* ---------- 진료 기록지(엔딩) ---------- */
#chart { background: #0b0b0c; overflow-y: auto; }
#chart .bg { position: fixed; inset: 0; background: url('img/room.jpg') center / cover no-repeat; filter: brightness(.4) blur(1px); }
#chart .wrap { position: relative; z-index: 1; min-height: 100%; display: grid; grid-template-columns: 640px 440px; gap: 48px; justify-content: center; align-items: center; padding: 48px 0 80px; }
.sheet { background: #eeeeee; color: #161616; padding: 34px 38px 30px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.sheet .h { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #161616; padding-bottom: 10px; }
.sheet .h b { font-size: 20px; }
.sheet .h span { font-size: 13px; color: #666; }
.lab { font-size: 12px; color: #777; margin: 20px 0 6px; min-height: 14px; }
.warm { font-family: 'Nanum Pen Script', cursive; font-size: 30px; line-height: 1.22; color: #3a3a3a; min-height: 74px; }
.warm s { text-decoration: none; background-image: linear-gradient(#222, #222); background-repeat: no-repeat; background-position: 0 56%; background-size: 0% 3px; transition: background-size 1.4s ease; }
.warm.struck s { background-size: 100% 3px; }
.mid { font-size: 14px; color: #555; font-family: 'Gowun Batang', serif; margin-top: 10px; min-height: 20px; }
.cold { font-family: 'Gowun Batang', serif; font-size: 18px; line-height: 1.8; margin-top: 4px; min-height: 64px; }
.sign { text-align: right; font-size: 13px; color: #666; margin-top: 16px; }
.side { opacity: 0; transform: translateY(8px); transition: opacity .8s, transform .8s; }
.side.on { opacity: 1; transform: none; }
.side h2 { font-family: 'Gowun Batang', serif; font-size: 34px; font-weight: 700; line-height: 1.35; }
.side .s { font-size: 14px; color: #a7a7a7; margin-top: 8px; }
.res { margin-top: 26px; border-top: 1px solid #3a3a3c; }
.res .r { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #2b2b2d; font-size: 15px; }
.res .r span { color: #a7a7a7; }
.alt { margin-top: 18px; padding: 14px 16px; border: 1px solid #58585b; border-radius: 3px; font-size: 14px; line-height: 1.6; color: #d6d6d6; }
.btns { display: grid; gap: 10px; margin-top: 24px; }
.b1 { padding: 15px 18px; text-align: left; display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.b1 small { font-weight: 500; color: #555; font-size: 14px; white-space: nowrap; margin-left: 12px; }
.b2 { border: 1px solid #58585b; font-size: 15px; padding: 13px 18px; text-align: left; border-radius: 3px; }
.care { position: relative; z-index: 1; text-align: center; font-size: 13px; color: #9a9a9a; padding: 0 16px 28px; margin-top: -56px; }

/* ---------- 덮개 ---------- */
.veil { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.veil.on { display: flex; }
.dlg { background: #151516; border: 1px solid #333; border-radius: 6px; padding: 26px 26px 22px; width: 100%; max-width: 420px; }
.dlg h3 { font-size: 19px; }
.dlg p { font-size: 14.5px; color: #bdbdbd; line-height: 1.65; margin-top: 10px; }
.dlg .acts { display: grid; gap: 8px; margin-top: 20px; }
.dlg .acts button { padding: 13px; font-size: 15px; border-radius: 3px; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(10px); background: #ececec; color: #111; font-size: 14px; padding: 11px 16px; border-radius: 4px; opacity: 0; transition: opacity .25s, transform .25s; z-index: 60; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* ---------- 모바일 ---------- */
@media (max-width: 640px) {
  #home .top { padding: 14px 16px; }
  #home .brand { font-size: 16px; }
  #home .brand span, #home .keys .btn-line { display: none; }
  #home .grid { display: flex; flex-direction: column-reverse; padding: 12px 16px 32px; gap: 14px; }
  .tab { font-size: 12.5px; padding: 6px 10px; }
  .season { margin-top: 12px; }
  .season h1 { font-size: 18px; }
  .season p { font-size: 12px; margin-top: 3px; }
  .prog { font-size: 11.5px; }
  .prog i { width: 96px; }
  .cont { grid-template-columns: 48px 1fr auto; gap: 12px; padding: 10px 12px; margin-top: 12px; }
  .cont img { width: 48px; height: 60px; }
  .ck { font-size: 11px; }
  .ct { font-size: 16px; margin-top: 2px; }
  .cs { font-size: 11.5px; margin-top: 3px; }
  .cont .btn-solid { font-size: 13px; padding: 9px 12px; }
  .list { margin-top: 10px; }
  .ep { grid-template-columns: 30px 1fr auto; padding: 10px 0; gap: 8px; }
  .ep .n { font-size: 13px; }
  .ep .t { font-size: 15px; }
  .ep .t small { font-size: 11.5px; }
  .ep .st { font-size: 12px; padding: 4px 9px; }
  .pass { padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
  .pass .k { font-size: 11.5px; grid-column: 1; }
  .pass h2 { font-size: 17px; margin-top: 0; grid-column: 1; }
  .pass .price { font-size: 17px; margin-top: 0; grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .pass .price span { display: block; font-size: 11.5px; margin: 0; }
  .pass ul, .pass .fine, .single, .next { display: none; }
  .pass .go { grid-column: 1 / span 2; margin-top: 10px; font-size: 14.5px; padding: 12px; }

  .bgl { background-size: auto 62%; background-position: center top; background-repeat: no-repeat; }
  .bgl.wide { background-size: cover; background-position: center 30%; }
  .shade { background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 12%, rgba(0,0,0,0) 34%, rgba(0,0,0,.88) 52%, #000 63%, #000 100%); }
  #play .top { padding: 16px 18px; align-items: flex-start; }
  .ept { font-size: 12px; }
  .ept b { display: block; font-size: 15px; margin: 0 0 2px; }
  .meter { flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; }
  .bar i { width: 64px; }
  .bar .fl { top: -1px; right: auto; left: -46px; }
  .bar .fl.show { transform: translateX(-4px); }
  .pause { padding: 4px 9px; font-size: 12px; margin-top: 4px; }
  .low { left: 18px; right: 18px; bottom: 22px; grid-template-columns: 1fr; gap: 16px; }
  .who { font-size: 12px; margin-bottom: 6px; }
  .sub { font-size: 19px; line-height: 1.55; }
  .sub.narr { font-size: 16px; line-height: 1.65; }
  .hint { font-size: 11.5px; margin-top: 8px; }
  .row { font-size: 14.5px; padding: 11px 13px; grid-template-columns: 24px 1fr; }
  .card p { font-size: 20px; }

  #chart .wrap { display: block; padding: 18px 16px 24px; }
  .sheet { padding: 18px 18px 16px; }
  .sheet .h b { font-size: 16px; }
  .sheet .h span { font-size: 11.5px; }
  .lab { margin: 12px 0 4px; font-size: 11.5px; }
  .warm { font-size: 21px; min-height: 52px; }
  .mid { font-size: 12.5px; }
  .cold { font-size: 15px; line-height: 1.7; min-height: 52px; }
  .sign { font-size: 11.5px; margin-top: 8px; }
  .side { margin-top: 18px; }
  .side h2 { font-size: 22px; }
  .side .s { font-size: 12.5px; margin-top: 4px; }
  .res { margin-top: 12px; }
  .res .r { padding: 9px 0; font-size: 13.5px; }
  .alt { font-size: 13px; }
  .btns { margin-top: 14px; gap: 8px; }
  .b1 { font-size: 14.5px; padding: 13px 14px; }
  .b1 small { font-size: 12.5px; }
  .b2 { font-size: 14px; padding: 11px 14px; }
  .care { margin-top: 0; font-size: 12px; }
}

[hidden] { display: none !important; }
