/* 조변 PD의 채널 건강검진 · 2026-09-19 전면 개편(옛 index.html 인라인 CSS 폐기)
   재미 앱 표준(헌법 §7): 크림 바탕 + 사선 줄무늬 · 흰 카드 · 검정 테두리 3px · 오프셋 그림자 · 제목만 Black Han Sans */
:root {
  --cream: #FFF6E5; --cream-2: #FCEFD5; --ink: #1B1B1F; --ink-2: #3A3530; --mute: #6E6456; --paper: #FFFFFF;
  --red: #E8332A; --yellow: #FFD13F; --navy: #2E4374; --line: #1B1B1F;
  --gA: #2E8B57; --gB: #54B8EC; --gC: #FFD13F; --gD: #FF9F43; --gF: #E8332A;
  --title: 'Black Han Sans', 'Malgun Gothic', sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); line-height: 1.6; word-break: keep-all; background-color: var(--cream);
  background-image: repeating-linear-gradient(135deg, transparent 0 22px, rgba(233, 196, 128, .16) 22px 44px); min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shin-header { display: block; padding: 9px 0; }
.shin-header-inner { max-width: 820px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-size: 17px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--red); }
.brand-name { font-weight: 800; font-size: .95rem; }
.head-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); font-size: 16px; line-height: 1; text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.tool-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.tool-btn[aria-pressed="false"] { opacity: .55; }

.wrap { max-width: 820px; margin: 0 auto; padding: 4px 16px 40px; }
.card { background: var(--paper); border: 3px solid var(--line); border-radius: 18px; box-shadow: 5px 5px 0 var(--line); padding: 20px 18px; margin: 22px 0; }
.label { margin: 0 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; color: var(--mute); }
.hint { margin: 4px 0 8px; font-size: .82rem; color: var(--mute); }
.section-title { font-family: var(--title); font-weight: 400; font-size: 1.35rem; margin: 0 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 16px; border-radius: 14px; border: 3px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 800; font-size: .98rem; text-decoration: none; box-shadow: 4px 4px 0 var(--line); transition: transform .12s, box-shadow .12s; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 4px 4px 0 var(--line); }
.btn.primary { background: var(--yellow); }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border-style: dashed; }

.hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-top: 8px; }
.kicker { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--yellow); font-size: .76rem; font-weight: 800; }
.logo { font-family: var(--title); font-weight: 400; margin: 0; line-height: 1.06; font-size: clamp(2.2rem, 9.5vw, 3.8rem); text-shadow: 3px 3px 0 var(--yellow); }
.logo .red { color: var(--red); }
.tagline { margin: 10px 0 0; font-size: 1.02rem; color: var(--ink-2); }
.tagline b { color: var(--ink); background: linear-gradient(transparent 58%, rgba(255, 209, 63, .75) 58%); }
.hero-jo { position: relative; margin: 0; width: clamp(140px, 32vw, 250px); }
.hero-jo img { display: block; width: 100%; height: auto; }
.bubble { position: absolute; right: 84%; top: 18%; width: max-content; max-width: 170px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 14px; padding: 7px 10px; font-size: .8rem; font-weight: 800; line-height: 1.4; box-shadow: 3px 3px 0 var(--ink); }
.bubble::after { content: ''; position: absolute; right: -11px; top: 14px; width: 14px; height: 14px; background: var(--paper); border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg); }
@media (max-width: 560px) {
  .hero { grid-template-columns: 1fr; position: relative; }
  .hero-jo { position: absolute; right: -6px; top: 44px; width: 124px; }
  .hero-copy { position: relative; z-index: 1; padding-right: 108px; }
  .bubble { display: none; }
  .tagline { font-size: .95rem; }
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.tabs button { min-height: 46px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--cream-2); font-weight: 800; font-size: .95rem; box-shadow: 3px 3px 0 var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--red); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field .lab { font-size: .86rem; font-weight: 800; }
.field input { width: 100%; font-size: 16px; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: #FFFDF8; min-height: 48px; }
.field input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.limit-note { margin: 12px 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(128, 128, 128, .12); font-size: .84rem; }
.btn.go { width: 100%; min-height: 60px; background: var(--red); color: #fff; font-family: var(--title); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; }
.left { margin: 8px 0 0; text-align: center; font-size: .84rem; font-weight: 800; color: var(--ink-2); }
.safe { margin: 12px 0 0; font-size: .8rem; color: var(--mute); }

.loading { display: grid; place-items: center; gap: 8px; text-align: center; }
.clap { font-size: 3.4rem; animation: clap .5s ease-in-out infinite alternate; transform-origin: 20% 80%; }
@keyframes clap { from { transform: rotate(-12deg); } to { transform: rotate(8deg); } }
.loading p { margin: 0; font-family: var(--title); font-size: 1.15rem; }
.notice p { margin: 0 0 8px; }

/* 채널 머리 */
.ch-head { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.ch-head img, .ch-head .ph { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; background: var(--cream-2); display: grid; place-items: center; font-family: var(--title); font-size: 1.6rem; }
.ch-title { margin: 0; font-family: var(--title); font-weight: 400; font-size: 1.35rem; line-height: 1.2; }
.ch-meta { margin: 2px 0 0; font-size: .82rem; color: var(--mute); font-weight: 700; }
.ch-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.ch-stats div { border: 2px solid var(--ink); border-radius: 10px; padding: 6px; text-align: center; background: #FFFCF4; }
.ch-stats small { display: block; font-size: .7rem; font-weight: 800; color: var(--mute); }
.ch-stats b { font-size: .95rem; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .ch-stats { grid-template-columns: repeat(2, 1fr); } }

/* 성적표 */
.report { position: relative; background: #FFFDF6; background-image: linear-gradient(rgba(46, 67, 116, .06) 1px, transparent 1px); background-size: 100% 30px; }
.report-top { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.stamp { width: 92px; height: 92px; border-radius: 50%; border: 5px solid currentColor; display: grid; place-items: center; font-family: var(--title); font-size: 2.8rem; transform: rotate(-10deg); background: rgba(255, 255, 255, .8); line-height: 1; }
.stamp small { display: block; font-size: .7rem; font-family: var(--body); font-weight: 900; margin-top: -10px; }
.stamp.pop { animation: pop .45s cubic-bezier(.3, 1.6, .4, 1) both; }
@keyframes pop { from { transform: rotate(-10deg) scale(2.2); opacity: 0; } to { transform: rotate(-10deg) scale(1); opacity: 1; } }
.verdict { margin: 0; font-family: var(--title); font-weight: 400; font-size: 1.4rem; line-height: 1.25; }
.g-A { color: var(--gA); } .g-B { color: #1C7FB6; } .g-C { color: #B58900; } .g-D { color: #D46A00; } .g-F { color: var(--gF); }
.rows { display: grid; gap: 8px; margin: 12px 0; }
.row { display: grid; grid-template-columns: 70px 42px 1fr; gap: 8px; align-items: center; }
.row .nm { font-weight: 900; font-size: .9rem; }
.row .gd { width: 40px; height: 40px; border-radius: 10px; border: 2.5px solid var(--ink); display: grid; place-items: center; font-family: var(--title); font-size: 1.35rem; color: #fff; }
.gd.A { background: var(--gA); } .gd.B { background: var(--gB); } .gd.C { background: var(--gC); color: var(--ink); } .gd.D { background: var(--gD); } .gd.F { background: var(--gF); } .gd.N { background: #BDB5A8; }
.row .tx { font-size: .84rem; color: var(--ink-2); }
.row .bar { height: 8px; border-radius: 99px; background: #EEE6D6; overflow: hidden; margin-top: 3px; }
.row .bar i { display: block; height: 100%; background: var(--navy); }
.pd-say { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: end; margin-top: 8px; border-top: 2px dashed rgba(27, 27, 31, .25); padding-top: 10px; }
.pd-say img { width: 90px; height: auto; display: block; }
.pd-say p { margin: 0 0 6px; font-size: .95rem; font-weight: 700; }
.pd-say .label { margin: 0 0 4px; }

.rx { display: grid; gap: 10px; }
.rx-item { position: relative; border: 2.5px solid var(--ink); border-radius: 14px; padding: 12px 14px 12px 54px; background: #FFFFFF; box-shadow: 3px 3px 0 var(--ink); }
.rx-item::before { content: '℞'; position: absolute; left: 12px; top: 8px; font-family: Georgia, serif; font-size: 1.9rem; color: var(--red); font-weight: 700; }
.rx-item b { display: block; font-size: 1rem; }
.rx-item p { margin: 4px 0 0; font-size: .9rem; color: var(--ink-2); }
.titles { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.titles li { display: flex; align-items: center; gap: 8px; border: 2px dashed var(--ink); border-radius: 12px; padding: 8px 10px; background: #FFFCF4; font-weight: 800; }
.titles li span { flex: 1; }
.titles button { flex: none; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); font-size: .78rem; font-weight: 800; padding: 3px 8px; }
.tops { display: grid; gap: 8px; }
.top { display: grid; grid-template-columns: 30px 96px 1fr; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); }
.top .rk { font-family: var(--title); font-size: 1.4rem; color: var(--red); text-align: center; }
.top img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); background: #ddd; }
.top b { font-size: .88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top small { display: block; font-size: .76rem; color: var(--mute); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.facts div { border: 2px solid var(--ink); border-radius: 12px; padding: 8px; text-align: center; background: #FFFCF4; }
.facts small { display: block; font-size: .72rem; font-weight: 800; color: var(--mute); }
.facts b { font-size: 1.05rem; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-items: end; height: 70px; margin-top: 10px; }
.days div { display: grid; grid-template-rows: 1fr auto; gap: 2px; height: 100%; text-align: center; font-size: .72rem; font-weight: 800; color: var(--mute); }
.days i { align-self: end; background: var(--navy); border-radius: 4px 4px 0 0; min-height: 2px; }
.days div.top-day i { background: var(--red); }

/* 맞대결 */
.vs-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-align: center; }
.vs-head .side img, .vs-head .side .ph { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; margin: 0 auto; display: grid; place-items: center; background: var(--cream-2); font-family: var(--title); font-size: 1.6rem; }
.vs-head .side b { display: block; font-size: .95rem; margin-top: 4px; line-height: 1.25; }
.vs-head .side small { display: block; font-size: .74rem; color: var(--mute); font-weight: 700; }
.vs-head .mid { font-family: var(--title); font-size: 2rem; color: var(--red); }
.vs-table { width: 100%; border-collapse: collapse; margin: 14px 0 6px; font-size: .88rem; }
.vs-table th, .vs-table td { border: 2px solid var(--ink); padding: 6px 4px; text-align: center; }
.vs-table th { background: var(--cream-2); }
.vs-table td.win { background: #FFF1B8; font-weight: 900; }
.vs-table .gd { display: inline-grid; width: 32px; height: 32px; border-radius: 8px; border: 2px solid var(--ink); place-items: center; font-family: var(--title); font-size: 1.1rem; color: #fff; vertical-align: middle; }
.vs-table .gd.C { color: var(--ink); }
.vs-table .crown { margin-left: 4px; vertical-align: middle; }
.vs-table td small { display: block; margin-top: 3px; font-size: .72rem; font-weight: 700; color: var(--mute); }
.score { text-align: center; font-family: var(--title); font-size: 1.6rem; margin: 8px 0; }
.winner { text-align: center; margin: 4px 0 0; font-weight: 900; }
.tipbox { display: grid; gap: 8px; margin-top: 10px; }
.tipbox p { margin: 0; padding: 8px 10px; border-radius: 10px; background: #EAF6FF; font-size: .9rem; }

.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.cta { display: grid; gap: 12px; background: #FFF1B8; }
.cta p { margin: 0; font-size: .93rem; }
.cta .btn { justify-self: start; }
.fine { margin: 26px 0 0; font-size: .8rem; color: var(--mute); line-height: 1.7; }
.fine p { margin: 0 0 6px; }
.foot { border-top: 3px solid var(--ink); background: var(--ink); color: #EDE6D8; padding: 20px 16px 28px; text-align: center; font-size: .82rem; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.foot a { color: #fff; text-decoration: none; font-weight: 700; }
.foot p { margin: 0; opacity: .8; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px); z-index: 80; max-width: min(88vw, 420px); padding: 10px 18px; border-radius: 12px; border: 2.5px solid var(--ink); background: var(--yellow); color: var(--ink); font-weight: 800; font-size: .9rem; text-align: center; box-shadow: 3px 3px 0 var(--ink); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 640px) { .card { padding: 22px 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
