*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:#141a22;
  color:#f4efe4;
  font-family:"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.7;
  overflow-x:hidden;
}
.site-header{padding:10px 16px 8px;border-bottom:1px solid #2b3542;max-width:1100px;margin:0 auto}
.ep-label{margin:0 0 2px;color:#f0a92e;font-size:11px;letter-spacing:.18em;text-transform:uppercase}
h1{font-size:17px;margin:0 0 4px;line-height:1.45}
.sub{margin:6px 0 0;font-size:12px;color:#b9c6d2}
.gallery{max-width:720px;margin:0 auto;padding:0 12px 20px}
.count{margin:10px 4px 6px;font-size:14px;color:#f4efe4}
.art-wrap{margin:0;background:#1a2330;border:1px solid #2b3542;border-radius:12px;padding:12px;min-height:120px}
#art{display:block;width:100%;max-width:560px;height:auto;margin:0 auto;object-fit:contain;aspect-ratio:4/5;max-height:calc(100vh - 170px);max-height:calc(100dvh - 170px);transition:opacity 120ms ease-out}
#art.is-fading{opacity:0}
.loading{margin:8px 0;text-align:center;color:#b9c6d2;font-size:14px}
.art-error{margin:8px 0;text-align:center;color:#ffb4a2;font-size:15px}
.caption-panel{background:#faf5ea;color:#232a33;border-radius:12px;margin:12px 0 0;padding:14px 16px}
.first-title{border-left:4px solid #0e7c86;padding-left:10px;margin-bottom:8px}
.first-title strong{display:block;font-size:17px}
.first-title span{display:block;font-size:14px;color:#41505f}
.panel-heading{font-size:16px;margin:0 0 8px}
.anno{display:inline-block;margin:0 0 8px;border:1px solid #0e7c86;border-radius:999px;padding:2px 10px;font-size:13px;font-weight:700;color:#0e5a61;background:#eef7f6}
.anno[hidden]{display:none}
.dialogue{font-size:17px;line-height:1.8}
.dialogue p{margin:6px 0}
.dialogue .line-ko{font-weight:600}
.dialogue .line-en{color:#2f3b47}
.sfx{margin:10px 0 0;font-size:15px;color:#41505f}
.edit-note{margin:10px 0 0;font-size:12px;color:#6b7885}
.toolbar{position:sticky;bottom:0;z-index:10;background:#101722;border-top:1px solid #2b3542;padding:8px 12px calc(8px + env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:center;align-items:center}
.toolbar-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:end}
.toolbar-row.btns{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.toolbar-row.btns button{flex:1 1 auto}
.ctl{display:grid;gap:4px;font-size:13px;color:#b9c6d2}
select,button{min-height:44px;font:inherit;font-size:15px;border:1px solid #5b6571;background:#1d2935;color:#fff3df;border-radius:9px;padding:8px 12px;max-width:100%}
button{min-width:44px;cursor:pointer}
button:disabled{opacity:.4;cursor:default}
button:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid #0e7c86;outline-offset:2px}
select option{color:#111}
.site-footer{max-width:720px;margin:0 auto;padding:16px;text-align:center;font-size:13px;color:#a7b6c5}
.site-footer a{display:inline-block;min-height:44px;line-height:44px;color:#8fd6dd}
.ep-nav{display:flex;gap:4px 20px;justify-content:center;flex-wrap:wrap}
.next-prep{margin:8px 0 0}
@media (min-width:900px){
  .gallery{max-width:1100px;display:grid;grid-template-columns:minmax(0,7fr) minmax(300px,5fr);gap:16px;align-items:start}
  .count{grid-column:1/-1}
  .caption-panel{margin:0}
  .toolbar{flex-wrap:nowrap;gap:16px}
  .toolbar-row{flex-wrap:nowrap}
  .toolbar-row.btns{flex-wrap:nowrap}
  .toolbar-row.btns button{flex:0 0 auto}
}
@media (prefers-reduced-motion:reduce){
  #art{transition:none}
}
