/* =========================================================
   เสียงที่ไม่ได้ยิน — Design tokens
   แนว: นิตยสารออนไลน์ (อ้างอิงความโปรแบบ readthecloud.com)
   พื้นกระดาษขาว · แถบหัว/ท้ายสีกรมท่ายามค่ำ · หัวข้อไทยไม่มีหัว · ป้ายอังกฤษตัวเซอริฟ
   สีเน้น = ส้มผ้าพันคอหมี ใช้น้อย ๆ
   ========================================================= */
:root {
  --bg: #FFFFFF;
  --surface: #F4F5F8;
  --surface-2: #E9ECF2;
  --fg: #1E2533;
  --muted: #5E6676;
  --line: #E2E5EB;
  --ink: #111F39;          /* กรมท่ายามค่ำ: แถบหัว ท้าย พอดแคสต์ ปกการ์ด */
  --on-ink: #F2F4F8;
  --ink-muted: #A7B1C6;
  --ink-line: #24334F;
  --accent: #D9692E;       /* ส้มผ้าพันคอ */
  --accent-soft: #F8E6DA;
  --on-accent: #FFFFFF;
  --moon: #DCE3F0;
  --star: #DDE3F2;
  --shadow: 0 1px 2px rgba(17, 31, 57, .05), 0 12px 32px rgba(17, 31, 57, .07);

  --display: "Sukhumvit Set", "Sukhumvit Tadmai", "Anuphan", "Noto Sans Thai", system-ui, sans-serif;
  --body: "IBM Plex Sans Thai Looped", "Noto Sans Thai Looped", "Noto Sans Thai", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --wide: 1140px;
  --read: 680px;
  --radius: 4px;          /* นิตยสาร: มุมคมเกือบเหลี่ยม */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1422; --surface: #141D2F; --surface-2: #1C273C; --fg: #E6E9F0; --muted: #9AA3B5; --line: #232E44;
    --ink: #090F1B; --on-ink: #EEF1F6; --ink-muted: #8F9AB0; --ink-line: #1D2840;
    --accent: #F0955A; --accent-soft: #3A2A22; --on-accent: #1B1410; --moon: #C9D3E6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 32px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1422; --surface: #141D2F; --surface-2: #1C273C; --fg: #E6E9F0; --muted: #9AA3B5; --line: #232E44;
  --ink: #090F1B; --on-ink: #EEF1F6; --ink-muted: #8F9AB0; --ink-line: #1D2840;
  --accent: #F0955A; --accent-soft: #3A2A22; --on-accent: #1B1410; --moon: #C9D3E6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 32px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 17px; line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  transition: background .4s, color .4s;
}
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; margin: 0; line-height: 1.35; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
.poem { white-space: pre-line; margin: 0; font-size: 18px; line-height: 1.95; }

/* ป้าย: kicker อังกฤษเซอริฟ / label ไทยตัวเล็ก */
.kicker { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 20px; letter-spacing: .01em; color: var(--accent); line-height: 1.2; }
.label { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--on-ink);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner { max-width: var(--wide); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--on-ink); text-decoration: none; margin-right: auto; }
.brand-icon { width: 28px; height: 28px; flex: none; }
.brand small { font-weight: 400; font-size: 13px; color: var(--ink-muted); padding-left: 10px; border-left: 1px solid var(--ink-line); }
@media (max-width: 420px) { .brand small { display: none; } }
.nav-links { display: flex; gap: 22px; font-family: var(--display); font-size: 15px; }
.nav-links a { color: var(--ink-muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--on-ink); }
.theme-toggle, .icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid var(--ink-line); background: transparent; color: var(--on-ink);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-links a { white-space: nowrap; }
@media (min-width: 721px) and (max-width: 1180px) { .brand small { display: none; } }
@media (max-width: 960px) { .nav-links { display: none; } }

/* ---------- masthead ---------- */
.masthead { position: relative; background: var(--ink); color: var(--on-ink); overflow: hidden; }
/* ภาพปกเพจ: คนสองคนมองทะเล — เงากรมท่าด้านบนให้โลโก้อ่านชัด ด้านล่างเปิดให้เห็นขอบฟ้า */
.masthead-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 88%; }
.masthead-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--ink) 92%, transparent) 0%,
    color-mix(in srgb, var(--ink) 74%, transparent) 50%,
    color-mix(in srgb, var(--ink) 18%, transparent) 100%);
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.masthead-inner {
  position: relative; max-width: var(--wide); margin: 0 auto; padding: 72px 20px clamp(150px, 20vw, 240px);
  display: grid; justify-items: center; text-align: center; gap: 16px;
}
.logo-h1 { margin: 6px 0 4px; line-height: 0; color: var(--on-ink); }
.logo-mark { display: block; width: clamp(200px, 30vw, 300px); height: auto; aspect-ratio: 654 / 660; }
.masthead .kicker { color: var(--ink-muted); }
.masthead p { margin: 0; max-width: 34em; color: var(--ink-muted); font-size: 18px; }

/* ---------- sections ---------- */
.block { max-width: var(--wide); margin: 0 auto; padding: 72px 20px; }
.block + .block { border-top: 1px solid var(--line); }
.section-head { display: grid; justify-items: center; text-align: center; gap: 6px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 40px); }
.section-head .lede { margin: 4px 0 0; color: var(--muted); max-width: 34em; }

/* ---------- เกี่ยวกับเรา ---------- */
.kicker-th { font-family: var(--display); font-style: normal; font-weight: 500; font-size: 17px; letter-spacing: .02em; }
.about-letter { max-width: var(--read); margin: 0 auto; display: grid; gap: 24px; }
.about-letter p { margin: 0; }
.about-poem { font-family: var(--display); font-size: 22px; line-height: 1.9; color: var(--fg); }
.about-letter > p:not(.poem) { color: var(--muted); font-size: 16px; }
.about-letter > .about-sign { color: var(--accent); font-family: var(--display); font-size: 15px; }
.about-promises { list-style: none; margin: 56px auto 0; max-width: 900px; padding: 28px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.about-promises li { display: grid; gap: 4px; align-content: start; min-width: 0; }
.about-promises h3 { font-size: 22px; }
.about-promises li:first-child h3 { color: var(--accent); }
.about-promises p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.about-start { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; margin-top: 36px; }
.about-start .label { margin-right: 6px; }
.about-start a { font-family: var(--display); font-size: 15px; text-decoration: none; color: var(--fg); padding: 7px 18px; border: 1px solid var(--line); border-radius: 999px; }
.about-start a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) {
  .about-promises { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; margin-top: 40px; }
}
@media (max-width: 420px) { .about-poem { font-size: 19px; } }

/* ---------- talk ---------- */
.talk-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .talk-grid { grid-template-columns: 1fr; } }

.companion {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 24px 18px; display: grid; gap: 18px; min-width: 0;
}
.chat { display: grid; gap: 20px; max-height: min(60vh, 540px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.msg { display: grid; gap: 6px; min-width: 0; }
.who { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--muted); letter-spacing: .03em; }
.avatar { width: 20px; height: 20px; color: var(--accent); flex: none; }
.msg-me { justify-items: end; }
.msg-me p {
  margin: 0; max-width: 85%; padding: 10px 16px; border-radius: 16px 16px 4px 16px;
  background: var(--surface); white-space: pre-line; overflow-wrap: anywhere; font-size: 16px; line-height: 1.65;
}
.thinking { color: var(--muted); font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.suggest {
  margin-top: 8px; display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center;
  padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.suggest > div { min-width: 0; }
.suggest .mini-cover { width: 76px; aspect-ratio: 1; border-radius: 2px; background: var(--ink); position: relative; overflow: hidden; }
.suggest-title { font-family: var(--display); font-weight: 500; font-size: 18px; line-height: 1.35; }
.suggest-meta { font-size: 14px; color: var(--muted); }
@media (max-width: 480px) { .suggest { grid-template-columns: 64px 1fr; } .suggest .mini-cover { width: 64px; } .suggest .btn { grid-column: 1 / -1; } }

.crisis { margin-top: 8px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--accent-soft); display: grid; gap: 6px; font-size: 15px; }
.crisis b { font-family: var(--display); font-weight: 600; }

.composer {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 8px 16px; background: var(--surface);
  transition: border-color .2s;
}
.composer:focus-within { border-color: var(--accent); }
.composer textarea {
  font: inherit; font-size: 16px; line-height: 1.6; border: 0; outline: 0; resize: none; background: transparent;
  color: var(--fg); min-height: 52px; max-height: 180px; padding: 6px 0; min-width: 0;
}
.composer textarea::placeholder { color: var(--muted); }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.send:disabled { opacity: .45; cursor: default; }
.quick { display: grid; gap: 10px; }
.moods { display: flex; flex-wrap: wrap; gap: 8px; }
.mood {
  font-family: var(--display); font-size: 15px; padding: 6px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; transition: border-color .2s, color .2s;
}
.mood:hover { border-color: var(--accent); color: var(--accent); }
.fineprint { margin: 0; font-size: 13px; color: var(--muted); }

.aside { display: grid; gap: 20px; min-width: 0; }
.today { margin: 0; padding: 26px 24px; background: var(--surface); border-radius: var(--radius); display: grid; gap: 12px; position: relative; }
.today::before { content: "\201C"; font-family: var(--serif); font-size: 84px; line-height: .6; color: var(--accent); height: 30px; }
.today blockquote { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.6vw, 27px); line-height: 1.55; white-space: pre-line; }
.today figcaption { font-size: 14px; color: var(--muted); }
.help-mini { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 4px; }
.help-mini p { margin: 0 0 4px; color: var(--muted); font-size: 15px; }
.help-mini .help-or { margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.page-chat-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-chat { margin-top: 10px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); display: grid; gap: 6px; }
.page-chat .poem { font-size: 15px; line-height: 1.8; }
.page-chat .btn { font-size: 14px; padding: 6px 14px; }
.help-number { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.1; color: var(--fg); text-decoration: none; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--display); font-size: 15px; font-weight: 500; padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; white-space: nowrap;
}
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.06); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fade { animation: fade .5s ease; }
@keyframes fade { from { opacity: .2; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- journey cards (ปกแบบภาพนิตยสาร) ---------- */
.journey-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
@media (max-width: 900px) { .journey-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .journey-grid { grid-template-columns: 1fr; gap: 32px; } }
.jcard { font: inherit; text-align: left; color: var(--fg); background: none; border: 0; padding: 0; cursor: pointer; display: grid; gap: 12px; align-content: start; }
.jcover {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 2px; overflow: hidden;
  background: var(--ink); color: var(--on-ink);
}
.jcover .jmoon {
  position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; background: var(--moon); overflow: hidden;
  transition: transform .6s ease;
}
/* เงาที่ตัดพระจันทร์ให้เป็นเสี้ยว: --ph = ระยะเลื่อนเป็น % (0 = เต็มดวง) */
.jcover .jmoon::after {
  content: ""; position: absolute; inset: -12%; border-radius: 50%; background: var(--ink);
  transform: translateX(var(--ph, 200%));
}
/* ปก Journey = ภาพถ่ายจากเพจที่ไม่มีข้อความ + เงาด้านล่างให้คำบนปกอ่านชัด */
.jcover .jbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.jcover .jshade { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 10%, transparent) 30%, color-mix(in srgb, var(--ink) 78%, transparent)); }
.jcover.has-img .jmoon { display: none; }
.jcard:hover .jbg { transform: scale(1.06); }
.jcover .jscarf { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--accent); }
.jcover .jword {
  position: absolute; left: 20px; bottom: 14px; font-family: var(--display); font-weight: 500;
  font-size: clamp(34px, 4vw, 46px); line-height: 1.1; color: var(--on-ink);
}
.jcover .jchip {
  position: absolute; left: 16px; top: 16px; display: grid; justify-items: center; min-width: 46px; padding: 6px 6px 4px;
  border: 1px solid rgba(255, 255, 255, .35); color: var(--on-ink); line-height: 1;
}
.jchip b { font-family: var(--serif); font-weight: 600; font-size: 24px; }
.jchip small { font-size: 11px; margin-top: 3px; opacity: .8; }
.jcover .jdots { position: absolute; inset: 0; }
.jcard:hover .jmoon { transform: translateY(-6px); }
/* การ์ดเด่นใบแรก กว้างเต็มแถว */
.jcard.feature { grid-column: 1 / -1; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 36px; align-items: center; }
.jcard.feature .jcover { grid-row: span 4; aspect-ratio: 16 / 9; }
.jcard.feature h3 { font-size: clamp(26px, 3vw, 34px); }
.jcard.feature p { font-size: 17px; }
.jcard.feature .jword { font-size: clamp(44px, 6vw, 72px); left: 28px; bottom: 20px; }
.jcard .start { justify-self: start; margin-top: 8px; font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--accent); }
@media (max-width: 720px) {
  .jcard.feature { grid-template-columns: 1fr; row-gap: 12px; }
  .jcard.feature .jcover { grid-row: auto; aspect-ratio: 4 / 3; }
}
.jcard .label { color: var(--accent); }
.jcard h3 { font-size: 22px; }
.jcard p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.65; }
.jcard:hover h3 { color: var(--accent); }

/* ---------- การ์ดฮีลใจ ---------- */
.deck { display: flex; justify-content: center; align-items: flex-start; padding: 24px 0 36px; min-height: 300px; }
.hcard { position: relative; width: 160px; aspect-ratio: 2 / 3; max-width: 100%; border-radius: 10px; }
.hcard-back {
  flex: none; padding: 0; border: 0; background: none; cursor: pointer; margin-left: -54px; perspective: 1000px;
  transform: translateY(var(--y)) rotate(var(--r)); transform-origin: 50% 120%;
  transition: transform .35s ease, opacity .5s ease;
}
.hcard-back:first-child { margin-left: 0; }
.hcard-back:hover, .hcard-back:focus-visible { transform: translateY(calc(var(--y) - 16px)) rotate(var(--r)); z-index: 2; }
.hcard-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.hcard-side { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; overflow: hidden; }
.hcard-side.back {
  background-color: var(--ink); color: var(--on-ink);
  background-image: radial-gradient(circle at 20% 30%, var(--ink-muted) 0 1px, transparent 1.5px), radial-gradient(circle at 70% 75%, var(--ink-muted) 0 1px, transparent 1.5px), radial-gradient(circle at 80% 20%, var(--ink-muted) 0 1px, transparent 1.5px);
  background-size: 60px 60px, 80px 80px, 50px 50px;
  box-shadow: inset 0 0 0 7px var(--ink), inset 0 0 0 8px var(--accent), 0 6px 18px rgba(9, 15, 27, .25);
}
.hcard-side.back .hcard-icon { width: 46%; height: auto; aspect-ratio: 558 / 537; color: var(--accent); }
.hcard-side.front { transform: rotateY(180deg); background: var(--c-bg); color: var(--c-fg); box-shadow: inset 0 0 0 7px var(--c-bg), inset 0 0 0 8px var(--c-accent); padding: 14px; text-align: center; }
.hcard-side.front .hcard-name { position: relative; font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.3; }
.front-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.front-shade { position: absolute; inset: 0; background: var(--c-bg); opacity: .55; }
.deck.picked .hcard-back:not(.chosen) { opacity: .18; pointer-events: none; }
.deck.picked .hcard-back.chosen { transform: translateY(-24px) rotate(0) scale(1.12); z-index: 3; }
.hcard-back.chosen .hcard-inner { transform: rotateY(180deg); }
.deck-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; }
@media (max-width: 900px) { .deck { min-height: 250px; } .hcard-back { width: 120px; margin-left: -46px; } }
@media (max-width: 560px) {
  .deck { min-height: 210px; padding-top: 16px; }
  .hcard-back { width: 94px; margin-left: -64px; }
  .hcard-side.front .hcard-name { font-size: 16px; }
}

.reveal { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 48px; align-items: center; max-width: 920px; margin-inline: auto; }
@media (max-width: 760px) { .reveal { grid-template-columns: 1fr; gap: 28px; justify-items: center; } }
.hcard-face {
  position: relative; overflow: hidden;
  width: 100%; max-width: 300px; background: var(--c-bg); color: var(--c-fg); padding: 26px 24px;
  display: grid; grid-template-rows: auto 1fr auto; box-shadow: inset 0 0 0 10px var(--c-bg), inset 0 0 0 11px var(--c-accent), var(--shadow);
}
.hface-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hface-shade { position: absolute; inset: 0; background: var(--c-bg); opacity: 0; }
.hcard-face.has-photo .hface-shade { opacity: .58; }
.hcard-face > .hcard-top, .hcard-face > .hcard-name, .hcard-face > .hcard-foot { position: relative; }
.hcard-face.has-photo { box-shadow: inset 0 0 0 10px transparent, var(--shadow); }
.hcard-top .hcard-icon { width: 34px; height: auto; aspect-ratio: 558 / 537; color: var(--c-accent); display: block; }
.hcard-face .hcard-name { align-self: center; font-family: var(--display); font-weight: 500; font-size: clamp(34px, 5vw, 44px); line-height: 1.2; text-wrap: balance; }
.hcard-foot { font-size: 12px; color: var(--c-sub); letter-spacing: .04em; }
.reveal-text { display: grid; gap: 14px; min-width: 0; }
@media (max-width: 760px) { .reveal-text { justify-self: stretch; } }
.reveal-text .label { color: var(--accent); }
.reveal-text h3 { font-size: clamp(28px, 4vw, 36px); }
.reveal-text .poem { font-size: 18px; }
.todo { border-left: 3px solid var(--accent); background: var(--surface); padding: 14px 18px; display: grid; gap: 4px; }
.todo p { margin: 0; }
.say { margin: 0; color: var(--muted); }
.say span { font-family: var(--display); font-weight: 500; font-size: 20px; color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .hcard-back, .hcard-inner { transition: none; } }

/* ---------- ห้องพักใจ ---------- */
.quiet { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); }
.quiet-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quiet-shade { position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 88%, transparent) 0%, color-mix(in srgb, var(--ink) 55%, transparent) 55%, color-mix(in srgb, var(--ink) 15%, transparent) 100%); }
.quiet-inner { position: relative; max-width: var(--wide); margin: 0 auto; padding: 112px 20px; display: grid; gap: 14px; justify-items: start; }
.quiet-inner h2 { font-size: clamp(34px, 5vw, 52px); }
.quiet-inner p { margin: 0; max-width: 30em; color: var(--on-ink); opacity: .85; }
.quiet .hint { color: var(--ink-muted); }
@media (max-width: 560px) { .quiet-inner { padding: 88px 20px; } .quiet-shade { background: color-mix(in srgb, var(--ink) 70%, transparent); } }

.quietroom { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--ink); color: var(--on-ink); overflow: hidden; }
.quietroom::backdrop { background: var(--ink); }
.qr-stage { position: absolute; inset: 0; }
.qr-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2.4s ease; }
.qr-img.on { opacity: 1; animation: kenburns 16s ease-out both; }
.quietroom.paused .qr-img.on { animation-play-state: paused; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
.qr-shade { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 35%, transparent) 0%, transparent 30%, transparent 55%, color-mix(in srgb, var(--ink) 80%, transparent) 100%); }
.qr-breath { position: absolute; left: clamp(20px, 6vw, 72px); top: calc(28px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 16px; color: var(--on-ink); }
.qr-breath i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); transform: scale(1); transition: transform 5s ease-in-out; }
.qr-breath.out i { transform: scale(.45); }
.qr-line {
  position: absolute; left: clamp(20px, 6vw, 72px); right: 20px; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); margin: 0;
  font-family: var(--display); font-weight: 500; font-size: clamp(26px, 4.2vw, 50px); line-height: 1.4; white-space: pre-line; max-width: 18em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(8px); transition: opacity 1.6s ease, transform 1.6s ease;
}
.qr-line.on { opacity: 1; transform: none; }
.qr-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px clamp(20px, 6vw, 72px) calc(22px + env(safe-area-inset-bottom, 0px));
}
.qr-cap { font-size: 14px; color: var(--ink-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-ctl { display: flex; gap: 10px; flex: none; }
.qr-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--on-ink) 35%, transparent); background: color-mix(in srgb, var(--ink) 40%, transparent); color: var(--on-ink); cursor: pointer; padding: 0; backdrop-filter: blur(6px); }
.qr-btn:hover { border-color: var(--accent); color: var(--accent); }
.qr-btn .i-play, .qr-btn.is-paused .i-pause { display: none; }
.qr-btn.is-paused .i-play { display: block; }
@media (prefers-reduced-motion: reduce) {
  .qr-img { transition: none; }
  .qr-img.on { animation: none; }
  .qr-line, .qr-breath i { transition: none; }
}

/* ---------- studio: เขียนการ์ด ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; align-items: start; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; gap: 36px; } }
.studio-form { display: grid; gap: 36px; min-width: 0; }
.stage { display: grid; gap: 12px; min-width: 0; }
.stage-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.stage-no { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--fg); font-family: var(--serif); font-weight: 600; font-size: 19px; font-variant-numeric: lining-nums; flex: none; }
.stage-head h3 { font-size: 22px; }
.stage .label { margin-top: 6px; }
.field {
  font: inherit; font-size: 16px; line-height: 1.75; width: 100%; min-width: 0; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); resize: vertical;
}
.field:focus { outline: none; border-color: var(--accent); }
.field::placeholder { color: var(--muted); }
.starters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 14px; padding: 5px 13px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.mood-row { display: grid; gap: 8px; }
.mood[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.hint { color: var(--muted); font-size: 14px; }
.swatches { display: flex; gap: 12px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; position: relative; padding: 0; }
.swatch::after { content: ""; position: absolute; right: 9px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.swatch[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 3px; }
.photo-pick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.photo-opt { flex: none; width: 56px; height: 56px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 0; overflow: hidden; cursor: pointer; font-family: var(--display); font-size: 11px; line-height: 1.2; }
.photo-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-opt[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; justify-self: start; }
.seg-btn { font-family: var(--display); font-size: 15px; padding: 6px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--fg); cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.studio-preview { position: sticky; top: 84px; display: grid; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .studio-preview { position: static; } }
.preview-frame { position: relative; justify-self: center; width: 100%; max-width: 420px; }
.preview-frame canvas { display: block; width: 100%; height: auto; border-radius: 2px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.sample-tag { position: absolute; left: 12px; top: 12px; font-family: var(--display); font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.preview-actions { justify-content: center; }
.notebook { margin-top: 56px; display: grid; gap: 40px; }
.notebook .ep-list-head { border-color: var(--line); }
.notebook .label { color: var(--fg); }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 18px; }
.note { margin: 0; display: grid; gap: 8px; min-width: 0; }
.note-open { padding: 0; border: 0; background: none; cursor: pointer; }
.note-open img { width: 100%; display: block; border-radius: 2px; border: 1px solid var(--line); }
.note figcaption { display: grid; gap: 2px; font-size: 14px; }
.note-title { font-family: var(--display); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-date { color: var(--muted); font-size: 13px; }
.note-del { justify-self: start; background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.note-del[data-armed] { color: var(--accent); }
.card-link { justify-self: start; margin-top: 4px; background: none; border: 0; padding: 0; font-family: var(--display); font-size: 15px; color: var(--accent); cursor: pointer; }
.save-sheet { width: min(520px, calc(100% - 32px)); }
.save-inner { padding: 28px 24px 24px; display: grid; gap: 10px; justify-items: center; text-align: center; position: relative; max-height: calc(100vh - 48px); overflow-y: auto; }
.save-inner h2 { font-size: 22px; }
.save-inner .hint { margin: 0 0 6px; }
.save-inner img { width: 100%; max-width: 380px; height: auto; border: 1px solid var(--line); }

/* ---------- แถบภาพจากเพจ ---------- */
.strip { padding-block: 64px; border-top: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.strip-head { max-width: var(--wide); margin: 0 auto 28px; padding-inline: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 24px; }
.strip-head h2 { font-size: clamp(24px, 3.4vw, 32px); margin-top: 4px; }
.strip-viewport { overflow: hidden; }
.strip-track { display: flex; gap: 16px; width: max-content; padding-inline: 20px; animation: marquee 120s linear infinite; }
.strip:hover .strip-track, .strip:focus-within .strip-track { animation-play-state: paused; }
.strip-item { flex: none; width: 220px; aspect-ratio: 4 / 5; max-width: 100%; padding: 0; border: 0; border-radius: 2px; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.strip-item:hover img { transform: scale(1.04); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 560px) { .strip-item { width: 156px; } .strip { padding-block: 48px; } }
@media (prefers-reduced-motion: reduce) {
  .strip-viewport { overflow-x: auto; scroll-snap-type: x mandatory; }
  .strip-track { animation: none; }
  .strip-item { scroll-snap-align: start; }
  .strip-item[aria-hidden="true"] { display: none; }
}

/* โพสต์เด่นในคลัง */
.word.lead { grid-column: 1 / -1; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: 1fr auto auto auto 1fr; column-gap: 48px; row-gap: 10px; margin-bottom: 12px; }
.word.lead .word-open { grid-column: 1; grid-row: 1 / -1; }
.word.lead .label { grid-column: 2; grid-row: 2; }
.word.lead h3 { grid-column: 2; grid-row: 3; }
.word.lead .excerpt { grid-column: 2; grid-row: 4; }
.word.lead .word-img { aspect-ratio: 4 / 5; }
.word.lead h3 { font-size: clamp(26px, 3.2vw, 36px); }
.word.lead .excerpt { -webkit-line-clamp: 6; font-size: 17px; line-height: 1.85; }
@media (max-width: 720px) {
  .word.lead { grid-template-columns: 1fr; grid-template-rows: none; }
  .word.lead .word-open, .word.lead .label, .word.lead h3, .word.lead .excerpt { grid-column: 1; grid-row: auto; }
  .word.lead .excerpt { display: -webkit-box; }
}


/* ---------- words ---------- */
.word-tools { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font-family: var(--display); font-size: 15px; padding: 6px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.search { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 4px 2px; color: var(--muted); min-width: min(100%, 280px); }
.search:focus-within { border-color: var(--accent); }
.search input { font: inherit; font-size: 15px; border: 0; outline: 0; background: transparent; color: var(--fg); width: 100%; min-width: 0; }
.word-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
@media (max-width: 1000px) { .word-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; } }
.word { display: grid; gap: 8px; align-content: start; min-width: 0; }
.word-open { padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; color: inherit; text-decoration: none; }
.word-img { position: relative; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; border-radius: 2px; background: var(--surface-2); }
.word-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.word-open:hover img { transform: scale(1.03); }
.word-img.text-only { background: var(--ink); color: var(--on-ink); display: grid; align-content: end; padding: 18px; text-align: left; }
.word-quote { font-family: var(--display); font-weight: 500; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.5; white-space: pre-line; position: relative; }
.jmoon-sm { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--moon); box-shadow: inset -9px -3px 0 0 var(--accent); }
.word .label { color: var(--accent); margin-top: 6px; }
.word h3 { font-size: 18px; line-height: 1.45; }
.word .excerpt { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) { .word h3 { font-size: 16px; } .word .excerpt { display: none; } }
.empty { text-align: center; color: var(--muted); margin: 24px 0 0; }
.more-row { display: flex; justify-content: center; margin-top: 44px; }

/* reader */
.reader { width: min(1000px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--fg); box-shadow: var(--shadow); }
.reader::backdrop { background: rgba(9, 15, 27, .72); }
.reader-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-height: calc(100vh - 48px); overflow-y: auto; }
.reader-img { margin: 0; background: var(--surface-2); position: sticky; top: 0; align-self: start; }
.reader-img img { display: block; width: 100%; height: auto; }
.reader-text { padding: 40px 36px 32px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.reader-text .label { color: var(--accent); }
.reader-text h2 { font-size: clamp(24px, 3vw, 30px); padding-right: 36px; }
.reader-text .poem { font-size: 17px; line-height: 1.95; }
.tagline { color: var(--muted); font-size: 14px; }
.reader-text .btn { text-decoration: none; display: inline-flex; }
.reader-nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); }
.reader-close { position: absolute; right: 14px; top: 14px; z-index: 2; background: var(--bg); border-color: var(--line); color: var(--fg); }
.reader-close:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) {
  .reader { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .reader-inner { grid-template-columns: 1fr; max-height: 100vh; height: 100%; }
  .reader-img { position: static; }
  .reader-img img { max-height: 62vh; width: 100%; object-fit: contain; }
  .reader-text { padding: 26px 20px calc(28px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- podcast band ---------- */
.band { background: var(--ink); color: var(--on-ink); }
.band-inner { max-width: var(--wide); margin: 0 auto; padding: 80px 20px; display: grid; gap: 40px; }
.band .kicker { color: var(--accent); }
.band .label { color: var(--ink-muted); }
.pod-head { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: end; justify-content: space-between; }
.pod-head > div:first-child { display: grid; gap: 8px; max-width: 36em; min-width: 0; }
.pod-head h2 { font-size: clamp(30px, 4.4vw, 44px); }
.pod-head p { margin: 0; color: var(--ink-muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { font-family: var(--display); text-decoration: none; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--ink-line); color: var(--on-ink); font-size: 15px; }
.links a:hover { border-color: var(--accent); color: var(--accent); }

.player-card { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 44px; align-items: center; padding-block: 8px; }
@media (max-width: 760px) { .player-card { grid-template-columns: 1fr; gap: 24px; } }
.ep-art { margin: 0; aspect-ratio: 1; max-width: 100%; border-radius: 2px; overflow: hidden; background: var(--ink-line); }
@media (max-width: 760px) { .ep-art { max-width: 300px; } }
.ep-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-info { display: grid; gap: 12px; min-width: 0; }
.ep-info .label { color: var(--accent); font-variant-numeric: tabular-nums; }
.ep-info h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.ep-desc { margin: 0; color: var(--ink-muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.controls { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.ctl { display: grid; place-items: center; border: 0; background: none; color: var(--on-ink); cursor: pointer; padding: 0; }
.ctl-skip { width: 42px; height: 42px; border-radius: 50%; }
.ctl-skip:hover { color: var(--accent); }
.ctl-play { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.ctl-play:hover { filter: brightness(1.06); }
.ctl-play.sm { width: 42px; height: 42px; }
.ctl-play .i-pause, .ctl-play.is-playing .i-play { display: none; }
.ctl-play.is-playing .i-pause { display: block; }
.ctl-speed { margin-left: auto; font-family: var(--serif); font-weight: 600; font-size: 18px; min-width: 52px; height: 34px; border: 1px solid var(--ink-line); border-radius: 999px; font-variant-numeric: lining-nums; }
.ctl-speed:hover { border-color: var(--accent); color: var(--accent); }
.seek { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.seek input { width: 100%; min-width: 0; accent-color: var(--accent); height: 4px; cursor: pointer; }

.ep-list-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--ink-line); padding-bottom: 12px; margin-bottom: -28px; }
.more-link { font-family: var(--display); font-size: 15px; color: var(--accent); text-decoration: none; }
#epCount { font-weight: 400; margin-left: 6px; }
.band .btn { border-color: var(--ink-line); color: var(--on-ink); background: transparent; }
.band .btn:hover { border-color: var(--accent); color: var(--accent); }
.band .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.band .more-row { margin-top: 32px; }
#epOut { justify-self: start; }
.ep-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
@media (max-width: 760px) { .ep-list { grid-template-columns: 1fr; } }
.ep-row {
  width: 100%; font: inherit; color: var(--on-ink); background: none; border: 0; border-bottom: 1px solid var(--ink-line); cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 22px; gap: 16px; align-items: center; padding: 14px 0;
}
.ep-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 2px; background: var(--ink-line); }
.ep-text { display: grid; gap: 2px; min-width: 0; }
.ep-no { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--accent); font-variant-numeric: lining-nums; line-height: 1.2; }
.ep-title { font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-sub { font-size: 13px; color: var(--ink-muted); }
.ep-row:hover .ep-title, .ep-row.is-current .ep-title { color: var(--accent); }
.eq { display: flex; gap: 3px; align-items: end; height: 16px; opacity: 0; }
.eq i { width: 3px; height: 100%; background: var(--accent); transform-origin: bottom; transform: scaleY(.35); }
.ep-row.is-current .eq { opacity: 1; }
.ep-row.is-playing .eq i { animation: eq 1s ease-in-out infinite; }
.ep-row.is-playing .eq i:nth-child(2) { animation-delay: .2s; } .ep-row.is-playing .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* แถบเล่นด้านล่าง */
.mini {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(560px, calc(100% - 24px)); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 10px 8px 8px; border-radius: 6px; background: var(--ink); color: var(--on-ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); overflow: hidden;
}
.mini img { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; }
.mini-text { display: grid; min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; }
.mini-text .label { color: var(--accent); font-size: 12px; }
.mini-text span:last-child { font-family: var(--display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--ink-muted); border-top: 1px solid var(--ink-line); font-size: 15px; }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: 56px 20px 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { display: grid; gap: 8px; align-content: start; }
.footer-brand p { margin: 0; }
.footer-logo { width: 120px; height: auto; aspect-ratio: 654 / 660; color: var(--on-ink); margin-bottom: 8px; }
.sig { font-family: var(--display); font-weight: 500; font-size: 17px; color: var(--on-ink); }
.footer .label { color: var(--on-ink); }
.help { display: grid; gap: 12px; align-content: start; }
.help-lines { display: grid; gap: 10px; }
.help-line { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; }
.help-line a { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1; text-decoration: none; color: var(--on-ink); font-variant-numeric: lining-nums tabular-nums; }
.help-line span { font-size: 14px; }
.crisis .help-line a { color: var(--fg); }
.footer-base { max-width: var(--wide); margin: 0 auto; padding: 18px 20px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ink-line); font-size: 14px; }

/* ---------- journey player ---------- */
.player { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--fg); }
.player::backdrop { background: var(--ink); }
.player[open] { display: grid; }
.player-inner {
  width: 100%; max-width: var(--read); margin: 0 auto; min-height: 100%;
  display: grid; grid-template-rows: auto auto 1fr auto;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(18px + env(safe-area-inset-bottom, 0px));
}
.player-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.player-head .label { color: var(--accent); }
.player-title { font-family: var(--display); font-weight: 500; font-size: 20px; line-height: 1.35; }
.player .icon-btn { border-color: var(--line); color: var(--fg); }
.player .icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 18px 0 8px; }
.progress i { height: 3px; background: var(--line); transition: background .4s; }
.progress i.done { background: var(--accent); }
.player-body { display: grid; align-content: center; gap: 20px; padding-block: 32px; min-width: 0; }
.player-body h2 { font-size: clamp(30px, 6vw, 40px); }
.player-body .hint { margin: 0; color: var(--muted); }
.player-body .poem { font-size: 19px; }
.player-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }

/* step: breathe */
.breathe { display: grid; justify-items: center; gap: 20px; padding-block: 8px; }
.orb {
  width: 190px; height: 190px; border-radius: 50%; background: var(--ink); color: var(--on-ink);
  box-shadow: 0 0 0 12px var(--surface), 0 0 0 13px var(--line);
  display: grid; place-items: center; text-align: center; transform: scale(.72); transition: transform 4s ease-in-out;
}
.orb span { font-family: var(--display); font-weight: 500; font-size: 20px; line-height: 1.3; }
.orb small { display: block; font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.orb.in, .orb.hold { transform: scale(1); }
.orb.out { transform: scale(.72); }

/* step: do */
.checks { display: grid; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; cursor: pointer; padding: 14px 2px; border-top: 1px solid var(--line); }
.check:last-child { border-bottom: 1px solid var(--line); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.check:has(input:checked) span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }

/* step: write */
.write-box {
  font: inherit; font-size: 17px; line-height: 1.85; width: 100%; min-height: 190px; resize: vertical;
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  transition: opacity 1.2s ease, transform 1.2s ease, filter 1.2s ease;
}
.write-box:focus { outline: none; border-color: var(--accent); }
.write-box.released { opacity: 0; transform: translateY(-24px); filter: blur(4px); }

/* step: ground */
/* ผ่อนร่างกายทีละส่วน */
.scan-now { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.5; color: var(--accent); min-height: 1.5em; }
.scan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scan-list li { padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; color: var(--muted); transition: color .6s, border-color .6s, background .6s; }
.scan-list li.on { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.scan-list li.done { color: var(--fg); border-color: var(--fg); }
/* นั่งเงียบ ๆ กับภาพ */
.still { position: relative; margin: 0; border-radius: 2px; overflow: hidden; background: var(--ink); color: var(--on-ink); min-height: 220px; display: grid; align-items: end; }
.still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform 60s linear; }
.still.on img { transform: scale(1.08); }
.still figcaption { position: relative; padding: 48px 22px 20px; background: linear-gradient(transparent, color-mix(in srgb, var(--ink) 80%, transparent)); font-size: 18px; }
.still-time { font-family: var(--serif); font-weight: 600; font-size: 26px; font-variant-numeric: lining-nums tabular-nums; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .still img, .still.on img { transition: none; transform: none; } }
/* พูดกับตัวเอง */
.say-list { display: flex; flex-wrap: wrap; gap: 8px; }
.say-list .chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.say-big { margin: 4px 0 0; padding: 20px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--display); font-weight: 500; font-size: clamp(24px, 5vw, 32px); line-height: 1.45; }
/* แนะนำหลังจบ Journey */
.recs { display: grid; gap: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.rec-block { display: grid; gap: 10px; }
.rec-ep { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); text-align: left; cursor: pointer; font: inherit; }
.rec-ep img { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; display: block; }
.rec-text { display: grid; gap: 0; min-width: 0; }
.rec-text .label { color: var(--accent); }
.rec-text b { font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.45; }
.rec-go { font-family: var(--display); font-size: 14px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; }
.rec-ep:hover .rec-go { border-color: var(--accent); color: var(--accent); }
.rec-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rec-post { display: grid; gap: 4px; align-content: start; padding: 0; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; font: inherit; min-width: 0; }
.rec-img { display: block; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; border-radius: 2px; background: var(--surface-2); }
.rec-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.rec-post:hover img { transform: scale(1.03); }
.rec-img.text-only { background: var(--ink); color: var(--on-ink); display: grid; align-content: end; padding: 10px; font-family: var(--display); font-size: 13px; line-height: 1.45; white-space: pre-line; }
.rec-post .label { color: var(--accent); margin-top: 4px; }
.rec-post b { font-family: var(--display); font-weight: 500; font-size: 15px; line-height: 1.4; }
@media (max-width: 480px) { .rec-posts { gap: 10px; } .rec-post b { font-size: 13.5px; } }
.senses { display: grid; }
.sense { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 2px; border-top: 1px solid var(--line); }
.sense:last-child { border-bottom: 1px solid var(--line); }
.sense > span { min-width: 0; }
.dots { display: flex; gap: 6px; }
.dots button { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; cursor: pointer; padding: 0; }
.dots button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
@media (max-width: 400px) { .sense { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade, .thinking i { animation: none; }
  .orb, .write-box, .jmoon, .word-img img, .jbg, .strip-item img { transition: none; }
  .ep-row.is-playing .eq i { animation: none; transform: scaleY(.7); }
}

/* ---------- หน้าโพสต์ / พอดแคสต์ / คลัง (สร้างโดย scripts/build.mjs) ---------- */
.page { max-width: var(--wide); margin: 0 auto; padding: 28px 20px 96px; display: grid; gap: 56px; }
.page h1 { font-size: clamp(28px, 4.2vw, 42px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--display); font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.page > .crumbs { margin-bottom: -32px; }
.post { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.post-media { margin: 0; position: sticky; top: 84px; }
.post-media img { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--surface-2); }
.post-media .word-img { aspect-ratio: 4 / 5; }
.post-text { display: grid; gap: 16px; align-content: start; min-width: 0; max-width: var(--read); }
.post-text .label { color: var(--accent); }
.post-text .poem { font-size: 18px; }
.post-text .tagline { margin: 0; }
.post-text .btn { text-decoration: none; }
.post-text audio { width: 100%; margin: 4px 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 20px; margin-top: 12px; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 2px; color: var(--fg); text-decoration: none; font-family: var(--display); font-size: 16px; line-height: 1.5; }
.pager a:hover { color: var(--accent); }
.pager .next { text-align: right; }
.related { display: grid; gap: 28px; padding-top: 40px; border-top: 1px solid var(--line); }
.related h2, .cat-block h2 { font-size: clamp(22px, 2.6vw, 28px); }
.word h3 a { color: inherit; text-decoration: none; }
.word h3 a:hover { color: var(--accent); }
.page .section-head { margin-bottom: 0; }
.page .section-head .filters, .page .section-head .row { justify-content: center; margin-top: 12px; }
a.filter { text-decoration: none; }
.cat-block { display: grid; gap: 28px; scroll-margin-top: 84px; }
.cat-block h2 a, .post-text .label a, .related h2 a { color: inherit; text-decoration: none; }
.cat-block h2 a:hover, .post-text .label a:hover, .related h2 a:hover { color: var(--accent); }
.cat-more { margin: 0; }
.filter[aria-current="page"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.cat-block h2 .muted { font-family: var(--body); font-size: 15px; margin-left: 6px; }
.ep-index { list-style: none; margin: 0 auto; padding: 0; display: grid; width: 100%; max-width: 820px; }
.ep-index li { border-top: 1px solid var(--line); }
.ep-index li:last-child { border-bottom: 1px solid var(--line); }
.ep-index a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px 0; color: var(--fg); text-decoration: none; }
.ep-index a:hover strong { color: var(--accent); }
.ep-index img { width: 96px; height: 96px; object-fit: cover; border-radius: 2px; display: block; }
.ep-index a > span { display: grid; gap: 2px; min-width: 0; }
.ep-index strong { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.45; }
.ep-index .excerpt { font-size: 14.5px; color: var(--muted); line-height: 1.7; }
.lost { display: grid; gap: 16px; justify-items: start; max-width: var(--read); padding-block: 48px; }
@media (max-width: 760px) {
  .page { padding-top: 20px; gap: 44px; }
  .page > .crumbs { margin-bottom: -28px; }
  .post { grid-template-columns: 1fr; gap: 28px; }
  .post-media { position: static; }
  .post-media img { max-height: 70vh; width: auto; max-width: 100%; margin: 0 auto; }
  .episode .post-media img { width: min(320px, 100%); }
}
@media (max-width: 480px) {
  .ep-index a { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .ep-index img { width: 72px; height: 72px; }
  .ep-index .excerpt { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
}

/* แถบขอความยินยอมคุกกี้ (เฉพาะเมื่อเปิด GA4) */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  max-width: 560px; margin: 0 auto; padding: 18px 20px; display: grid; gap: 12px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: 15px; line-height: 1.7;
}
.consent p { margin: 0; }
