/* ミセルラボ日誌: 읽기 우선. 색은 team/brand.md(게임과 같은 mint·gold), 밝은 화면 기본 + 다크 모드 */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #24212b;
  --muted: #6b6676;
  --line: #e7e3dc;
  --accent: #177a6c;        /* mint를 밝은 배경용으로 진하게(대비 약 5.0:1, 노아 10/19) */
  --accent-soft: #e3f6f2;
  --mark: #bfeee4;          /* strong 형광펜 */
  --gold: #8a6508;          /* 대비 약 5.3:1 */
  --code-bg: #f3f1ec;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic UI", Meiryo, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0d14;
    --surface: #1b1823;
    --text: #edeae4;
    --muted: #9c96a8;
    --line: #2c2836;
    --accent: #5fd6c0;
    --accent-soft: #17302c;
    --mark: #17302c;
    --gold: #f2c94c;
    --code-bg: #221e2b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.9;
  font-feature-settings: "palt" 0; overflow-wrap: anywhere; line-break: strict;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* 머리·꼬리 */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.site-head nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 10px 10px; border-radius: 8px; }
.site-head nav a:hover { color: var(--text); background: var(--accent-soft); }
.site-foot { margin-top: 80px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-foot a { color: var(--muted); display: inline-block; padding: 10px 6px; }
.site-foot .wrap { padding-top: 16px; padding-bottom: 40px; }
.hero h1, .post h1, .list .t { word-break: auto-phrase; text-wrap: balance; }

/* 첫 화면 */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: 30px; line-height: 1.4; margin: 0 0 12px; letter-spacing: .02em; }
.hero p { color: var(--muted); margin: 0; font-size: 16px; }
.list { list-style: none; margin: 16px 0 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:last-child { border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; padding: 22px 0; color: var(--text); text-decoration: none; }
.list .thumb { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--accent-soft); display: block; }
.list .meta { display: grid; gap: 4px; min-width: 0; }
.list time { color: var(--muted); font-size: 14px; }
.list .t { font-size: 19px; font-weight: 700; line-height: 1.5; }
.list a:hover .t { color: var(--accent); }
.list .d { color: var(--muted); font-size: 15px; line-height: 1.7; }

/* 글 */
.post { padding-top: 40px; }
.post .date { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.post h1 { font-size: 28px; line-height: 1.45; margin: 0 0 32px; }
.content h2 { font-size: 22px; line-height: 1.5; margin: 56px 0 18px; padding: 0 0 10px 0; border-bottom: 3px solid var(--line); position: relative; scroll-margin-top: 16px; }
.content h2::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 72px; height: 3px; background: var(--accent); }
.content h3 { font-size: 18px; margin: 36px 0 8px; }
.content p { margin: 0 0 1.4em; }
.content ul, .content ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.content li { margin: .3em 0; }
.content img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.content blockquote { margin: 0 0 1.4em; padding: 12px 16px; background: var(--accent-soft); border-radius: 10px; }
.content blockquote p:last-child { margin: 0; }
.content code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--code-bg); padding: .1em .4em; border-radius: 4px; }
.content pre { background: var(--code-bg); padding: 16px; border-radius: 10px; overflow-x: auto; line-height: 1.6; }
.content pre code { background: none; padding: 0; }
.content table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; display: block; overflow-x: auto; }
.content th, .content td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; }
.content th { color: var(--muted); font-weight: 600; }
.content strong { background: linear-gradient(transparent 60%, var(--mark) 60%); }

/* 빵부스러기·공유·대표 이미지·목차·맨 위로 (참고: WEB学園 by お名前.com 글 페이지 구성) */
.crumbs { padding-top: 20px; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); }
.post .date .upd { margin-left: 8px; }
.share { display: flex; gap: 10px; margin: 0 0 24px; }
.share a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; font-family: Arial, sans-serif; }
.share a:hover { opacity: .85; }
.share .s-x { background: #000; }
.share .s-line { background: #06c755; font-size: 11px; }
.share .s-hatena { background: #00a4de; }
.share .s-fb { background: #1877f2; font-size: 20px; }
.share-label { margin: 48px 0 10px; font-weight: 700; font-size: 15px; }
.eyecatch { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); margin: 0 0 28px; }
.toc { margin: 0 0 36px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.toc-title { margin: 0 0 6px; font-weight: 700; color: var(--accent); }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 4px 0; font-size: 15px; line-height: 1.6; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.totop { position: fixed; right: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 50%; background: var(--text); opacity: .75; }
.totop::after { content: ""; position: absolute; left: 17px; top: 20px; width: 12px; height: 12px; border-left: 3px solid var(--bg); border-top: 3px solid var(--bg); transform: rotate(45deg); }
.totop:hover { opacity: 1; }
html { scroll-behavior: smooth; }

/* 유튜브 쇼츠 카드: 누르기 전에는 포스터만 */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 260px)); justify-content: center; gap: 16px; margin: 8px 0 1.6em; }
.yt { margin: 0; }
.yt-play, .yt iframe { display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; border-radius: 14px; overflow: hidden; background: #000; }
.yt-play { position: relative; padding: 0; cursor: pointer; box-shadow: 0 2px 10px rgb(0 0 0 / .12); }
.yt-play img { width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; display: block; }
.yt-icon { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgb(0 0 0 / .62); transition: transform .15s; }
.yt-icon::after { content: ""; position: absolute; left: 26px; top: 20px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.yt-play:hover .yt-icon, .yt-play:focus-visible .yt-icon { transform: scale(1.08); background: rgb(0 0 0 / .78); }
.yt-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.yt figcaption { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); text-align: center; }

/* 글 아래 */
.cta { margin-top: 48px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.cta p { margin: 0; font-size: 15px; }
.cta .cta-title { font-weight: 700; margin-bottom: 4px; color: var(--gold); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); font-size: 14px; line-height: 1.6; }
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; color: var(--muted); font-size: 13px; }
.pager .newer { text-align: right; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding-top: 32px; }
  .hero h1 { font-size: 25px; }
  .post h1 { font-size: 23px; }
  .content h2 { font-size: 20px; margin-top: 44px; }
  .list a { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .list .t { font-size: 17px; }
  .list .d { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pager .newer { text-align: left; }
}
