@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&family=Noto+Sans+Thai:wght@400;600;700;900&display=swap');

:root { --ink: #16151a; --paper: #fffaf0; --yellow: #ffd84d; --pink: #ff4f91; --line: 3px solid var(--ink); }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #25232a; font-family: 'Noto Sans Thai', sans-serif; }
.site-header, .site-footer { text-align: center; color: #fff; }
.site-header { padding: 4rem 1.5rem 2rem; }
.home-link { display: inline-block; margin-top: 1rem; padding: .45rem .8rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); color: var(--ink) !important; text-decoration: none !important; font-size: 1rem; font-weight: 900; box-shadow: 3px 3px 0 var(--ink); }
.coming-soon { width: fit-content; margin: 1rem auto 0; padding: .55rem 1rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); color: var(--ink); font-weight: 900; box-shadow: 3px 3px 0 var(--ink); }
.eyebrow, .page-heading span, .the-end { font-family: 'Chakra Petch', sans-serif; letter-spacing: .12em; font-weight: 700; }
.eyebrow { color: var(--yellow); font-size: .8rem; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .1rem; font-size: clamp(2.5rem, 7vw, 5rem); line-height: .95; }
.subtitle { color: var(--pink); font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 900; }
.lead { max-width: 42rem; margin: 1rem auto 0; color: #d8d3dd; }
.manga-book { width: min(100% - 2rem, 1000px); margin: 0 auto 3rem; }
.page { position: relative; margin: 2rem 0; padding: clamp(1rem, 3vw, 2rem); background: var(--paper); box-shadow: 0 12px 0 #111; overflow: hidden; }
.page-heading { display: flex; align-items: baseline; gap: 1rem; border-bottom: var(--line); margin-bottom: 1rem; padding-bottom: .5rem; }
.page-heading span { color: var(--pink); font-size: .8rem; }
.page-heading h2 { margin: 0; font-size: clamp(1.2rem, 3vw, 2rem); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.illustrated-page { position: relative; border: var(--line); overflow: hidden; background: #fff; line-height: 1.35; }
.illustrated-page { aspect-ratio: 2 / 3; container-type: inline-size; }
.illustrated-page > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.page-copy { position: absolute; z-index: 2; margin: 0; padding: .5rem .65rem; border: 2px solid var(--ink); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 3px 3px 0 var(--ink); font-size: clamp(.5rem, 1vw, .72rem); font-weight: 900; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.page-one-caption { top: 2%; left: 3%; width: 42%; background: var(--yellow); }
.page-one-goal { top: 25%; right: 3%; width: 42%; }
.page-one-plan { top: 51%; left: 3%; width: 44%; }
.page-one-assignment { top: 76%; right: 3%; width: 42%; background: var(--yellow); }
.page-one-reply { left: 3%; bottom: 2%; max-width: 38%; padding: .35rem .5rem; font-size: clamp(.48rem, .9vw, .64rem); }
.page-two-sfx { top: 5%; left: 4%; padding: .35rem .55rem; background: var(--yellow); }
.page-two-knee { top: 5%; right: 4%; }
.page-two-warning { bottom: 5%; left: 4%; width: 42%; }
.page-two-pass { right: 4%; bottom: 15%; width: 42%; background: var(--yellow); }
.page-two-standard { right: 4%; bottom: 5%; width: 42%; padding: .35rem .5rem; font-size: clamp(.48rem, .9vw, .64rem); }
.page-three-setting { top: 5%; left: 4%; width: 42%; }
.page-three-max { top: 5%; right: 4%; width: 42%; background: var(--yellow); }
.page-three-sfx { bottom: 5%; left: 4%; width: 34%; color: var(--pink); background: rgba(255,255,255,.9); }
.page-three-question { right: 4%; bottom: 16%; width: 38%; }
.page-three-reply { right: 4%; bottom: 5%; width: 42%; padding: .35rem .5rem; font-size: clamp(.48rem, .9vw, .64rem); background: var(--yellow); }
.panel { position: relative; min-height: 250px; border: var(--line); overflow: hidden; background: #f2d59b; }
.panel-art { position: absolute; inset: 0; background-image: linear-gradient(135deg, rgba(255,235,181,.2), rgba(74,136,103,.18)), url('../../locations/gym-v2.webp'); background-size: cover; background-position: center; filter: saturate(1.05); }
.panel::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 45%, rgba(21,19,25,.18)); }
.bubble, .caption, .sfx { position: absolute; z-index: 2; margin: 0; }
.bubble { max-width: 82%; width: fit-content; padding: .5rem .65rem; border: 2px solid var(--ink); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 3px 3px 0 var(--ink); font-size: clamp(.55rem, 1.1vw, .78rem); font-weight: 900; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.bubble-top { top: 5%; left: 4%; }
.bubble-center { top: 38%; left: 50%; transform: translateX(-50%); }
.bubble-small { right: 4%; bottom: 5%; max-width: 44%; padding: .3rem .45rem; border-radius: 12px; font-size: clamp(.48rem, .95vw, .66rem); }
.caption { left: 4%; top: 5%; max-width: 44%; padding: .5rem .65rem; background: rgba(255,255,255,.9); font-size: clamp(.55rem, 1.1vw, .78rem); font-weight: 700; line-height: 1.4; }
.sfx { right: 7%; bottom: 8%; color: var(--pink); font: 900 clamp(1.5rem, 4vw, 3rem) 'Chakra Petch', sans-serif; transform: rotate(-8deg); text-shadow: 2px 2px 0 var(--ink); }
.the-end { width: fit-content; margin: 1.5rem auto 0; padding: .7rem 1.5rem; border: var(--line); background: var(--ink); color: var(--yellow); transform: rotate(-3deg); }
.site-footer { padding: 1rem; color: #bdb7c5; font-size: .8rem; }
.episode-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: 1rem auto 0; padding: 0 1rem; }
.episode-nav a { padding: .55rem .9rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); color: var(--ink); text-decoration: none; font-weight: 900; box-shadow: 3px 3px 0 var(--ink); }
@media (max-width: 620px) {
  .site-header { padding-top: 2.5rem; }
  .manga-book { width: min(100% - 1rem, 1000px); }
  .page { padding: .65rem; margin: 1rem 0; box-shadow: 0 7px 0 #111; }
  .grid { gap: .4rem; }
  .panel { min-height: 190px; }
  .page-copy { padding: .3rem .4rem; border-width: 1px; box-shadow: 2px 2px 0 var(--ink); font-size: .5rem; }
  .page-one-reply { font-size: .46rem; }
  .bubble { padding: .32rem .42rem; font-size: .56rem; }
  .bubble-small { max-width: 44%; font-size: .5rem; }
  .caption { max-width: 44%; padding: .32rem .42rem; font-size: .52rem; }
}
@media print {
  body { background: #fff; }
  .site-header { color: var(--ink); padding: 1rem; }
  .lead { color: var(--ink); }
  .manga-book { width: 100%; }
  .page { min-height: 100vh; margin: 0; box-shadow: none; page-break-after: always; }
  .site-footer { color: var(--ink); }
}
