/* ทอล์คปลดทุกข์ · หน้าแรก · สีของช่อง: ดำ น้ำตาลเข้ม อำพัน ครีม เท่านั้น */
@font-face { font-family: Mitr; src: url(../assets/fonts/Mitr-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Mitr; src: url(../assets/fonts/Mitr-Medium.ttf) format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Mitr; src: url(../assets/fonts/Mitr-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --ink: #130D06; --ink2: #2B2013; --ink3: #4A3A24; --paper: #E3CF9C; --cream: #FFF4D8;
  --mid: #B9955C; --glow: #FFE2A0; --amber: #F3C45A; --deep-gold: #7A4A0C;
  --gutter: clamp(16px, 4vw, 48px);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .75 0 0 0 0 .55 0 0 0 0 .28 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { background: var(--ink); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--ink); color: var(--cream);
  font-family: Mitr, 'Noto Sans Thai', system-ui, sans-serif; font-weight: 400; line-height: 1.7;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.gold { color: var(--amber); }
.nw { white-space: nowrap; }
.kicker { margin: 0 0 .6em; font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--mid); }
h2 { margin: 0 0 .5em; font-weight: 600; font-size: clamp(30px, 5.4vw, 60px); line-height: 1.25; text-wrap: balance; }

/* ---------- ตะเกียงตามเมาส์ + ฝุ่นแสง ---------- */
.lantern {
  position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; z-index: 39;
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity .8s ease;
  background: radial-gradient(circle, rgba(243,196,90,.16) 0%, rgba(243,196,90,.06) 35%, rgba(243,196,90,0) 70%);
}
.lantern.is-on { opacity: 1; }
#dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
#dust.is-on { opacity: 1; }
@media (hover: none) { .lantern { display: none; } }

/* ---------- แถบบน ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 20px;
  padding: 12px var(--gutter); padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(rgba(19,13,6,.82), rgba(19,13,6,.45) 60%, rgba(19,13,6,0));
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav-logo img { height: 52px; width: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,.5)); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--paper); position: relative; padding: 4px 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .45s ease; }
.nav-links a:hover::after { transform: scaleX(1); }
.sound {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  background: rgba(19,13,6,.55); border: 1px solid rgba(243,196,90,.35); font-size: 14px; color: var(--paper);
  transition: border-color .3s, background .3s;
}
.sound:hover { border-color: var(--amber); }
.sound-bars { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; }
.sound-bars i { width: 3px; height: 4px; background: var(--amber); border-radius: 2px; transition: height .3s; }
.sound[aria-pressed="true"] .sound-bars i { animation: bar 1.1s ease-in-out infinite; }
.sound[aria-pressed="true"] .sound-bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .sound-bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .sound-bars i:nth-child(4) { animation-delay: -.9s; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (max-width: 720px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .nav-logo img { height: 44px; }
  .sound { margin-left: auto; }
}

/* ---------- ฉากเปิด ---------- */
.hero { position: relative; height: 330vh; }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.beat {
  position: absolute; left: 50%; top: 17%; width: min(92vw, 900px); transform: translateX(-50%);
  text-align: center; pointer-events: none;
  /* ตัวหนังสือเป็นเงากระดาษสีหมึกบนจอที่มีแสง + รัศมีครีมรอบตัว อ่านออกทั้งตรงที่สว่างและมืด */
  color: var(--ink);
  text-shadow: 0 0 2px rgba(255,236,190,.9), 0 0 22px rgba(255,236,190,.65), 0 0 60px rgba(255,226,160,.4);
}
.beat .gold { color: var(--deep-gold); }
.beat .kicker { color: var(--ink3); font-size: clamp(13px, 1.6vw, 16px); }
.title { margin: 0; font-weight: 600; font-size: clamp(46px, 11vw, 132px); line-height: 1.15; }
.title .cut { display: inline-block; padding: 0 .08em; }
.slogan { margin: .2em 0 0; font-size: clamp(22px, 3.6vw, 40px); font-weight: 500; }
.beat-2, .beat-3, .beat-4 { opacity: 0; top: 20%; }
.beat-4 { top: 14%; }
.beat .hint { margin: .5em 0 0; font-size: clamp(15px, 1.8vw, 18px); font-weight: 500; color: var(--ink2); }
.sign-hit {
  position: absolute; left: 0; top: 0; z-index: 3; padding: 0; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; pointer-events: none; transform-origin: 50% 50%; -webkit-tap-highlight-color: transparent;
}
.sign-hit.is-on { pointer-events: auto; }
.sign-hit:focus-visible { outline: 2px dashed var(--amber); outline-offset: 2px; }
.beat-2 p { margin: 0; font-size: clamp(18px, 2.4vw, 24px); font-weight: 500; color: var(--ink); }
.scroll-hint {
  position: absolute; left: 50%; bottom: max(28px, 4vh); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--paper); font-size: 14px; text-align: center;
  text-shadow: 0 1px 8px rgba(0,0,0,.8); pointer-events: none;
}
.scroll-hint i { width: 1px; height: 46px; background: linear-gradient(var(--amber), transparent); animation: drip 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- พื้นกระดาษมืด (ใช้ซ้ำ) ---------- */
.shelf, .about, .foot, .modal { position: relative; isolation: isolate; }
.shelf::before, .about::before, .foot::before, .modal::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .14; background-image: var(--noise);
}

/* ---------- ชั้นหนังสือนิทาน ---------- */
.shelf { padding: clamp(80px, 12vw, 150px) var(--gutter) clamp(90px, 12vw, 160px); background: radial-gradient(120% 60% at 50% 0%, #24180B 0%, var(--ink) 60%); }
.shelf-head { max-width: 1200px; margin: 0 auto clamp(40px, 6vw, 70px); text-align: center; }
.random {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--amber); background: rgba(243,196,90,.08); color: var(--glow); font-size: 15px; font-weight: 500;
  transition: background .35s, transform .35s;
}
.random:hover { background: rgba(243,196,90,.18); transform: translateY(-2px); }
.random svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ทางแยก: เรื่องภายนอก / เรื่องภายใน */
.paths { max-width: 1200px; margin: 0 auto clamp(70px, 10vw, 130px); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: center; }
.path {
  display: block; text-decoration: none; color: var(--cream); background: var(--ink2);
  clip-path: polygon(.8% 1.2%, 24% .4%, 51% 1.4%, 77% .3%, 99.2% 1.1%, 99.6% 34%, 98.9% 67%, 99.5% 98.9%, 75% 99.6%, 49% 98.7%, 23% 99.7%, .6% 98.8%, 1.3% 66%, .4% 33%);
  transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .5s ease;
}
.path:hover, .path:focus-visible { transform: translateY(-8px); filter: drop-shadow(0 0 26px rgba(243,196,90,.35)); }
.path:focus-visible { outline: none; filter: drop-shadow(0 0 0 2px var(--amber)) drop-shadow(0 0 26px rgba(243,196,90,.5)); }
.path-art { display: block; width: 100%; aspect-ratio: 16 / 10; }
.path-text { display: flex; flex-direction: column; gap: 4px; padding: clamp(18px, 2.4vw, 28px) clamp(20px, 2.6vw, 32px) clamp(22px, 2.8vw, 32px); }
.path-text .kicker { margin: 0; }
.path-name { font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; line-height: 1.25; }
.path-desc { color: var(--paper); font-size: clamp(15px, 1.4vw, 17px); }
.path-go { margin-top: 10px; color: var(--amber); font-weight: 500; font-size: 15px; transition: letter-spacing .5s ease, color .3s; }
.path:hover .path-go { color: var(--glow); }
.path-or { font-size: 18px; color: var(--mid); text-align: center; }
.path-or::before, .path-or::after { content: ''; display: block; width: 1px; height: 60px; margin: 10px auto; background: linear-gradient(transparent, rgba(243,196,90,.5), transparent); }
@media (max-width: 760px) {
  .paths { grid-template-columns: 1fr; }
  .path-or::before, .path-or::after { display: inline-block; vertical-align: middle; width: 60px; height: 1px; margin: 0 14px; background: linear-gradient(90deg, transparent, rgba(243,196,90,.5), transparent); }
}
.track { max-width: 1200px; margin: 0 auto; scroll-margin-top: 90px; }
.track + .track { margin-top: clamp(80px, 11vw, 140px); }
.track-head { display: flex; flex-wrap: wrap; gap: 16px 30px; align-items: flex-end; justify-content: space-between; margin-bottom: clamp(28px, 4vw, 44px); padding-bottom: 22px; border-bottom: 1px solid rgba(243,196,90,.18); }
.track-head h3 { margin: 0; font-size: clamp(32px, 4.6vw, 54px); font-weight: 600; line-height: 1.2; }
.track-head p:not(.kicker) { margin: 6px 0 0; color: var(--paper); font-size: clamp(15px, 1.5vw, 18px); max-width: 32em; }
.tales { max-width: 1200px; margin: 0 auto; display: grid; grid-auto-flow: dense; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(18px, 3vw, 34px); }
@media (max-width: 520px) { .tales { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tale { all: unset; display: block; cursor: pointer; text-align: left; perspective: 900px; --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%; }
.tale[hidden] { display: none; }
.tale.is-wide { grid-column: span 2; }
.tale.is-wide .tale-frame { aspect-ratio: 16 / 9; }
.shelf-more { max-width: 1200px; margin: clamp(40px, 6vw, 70px) auto 0; text-align: center; }
.shelf-more a { color: var(--glow); text-decoration: none; border-bottom: 1px solid rgba(243,196,90,.45); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.shelf-more a:hover { color: var(--cream); border-color: var(--amber); }
.tale:focus-visible .tale-frame { outline: 2px solid var(--amber); outline-offset: 6px; }
.tale-frame {
  position: relative; aspect-ratio: 9 / 16; transform: rotateX(var(--rx)) rotateY(var(--ry)) translateY(0);
  transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .5s ease;
}
.tale-back { position: absolute; inset: -7px -6px -8px -7px; background: #3A2A16; clip-path: var(--clip-back); transform: rotate(-1.6deg) translateZ(-1px); }
.tale-mount { position: absolute; inset: 0; clip-path: var(--clip); background: var(--ink2); overflow: hidden; }
.tale-mount img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.2) brightness(.78) contrast(1.05); transform: scale(1.04); transition: filter .6s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.tale-mount::after {
  content: ''; position: absolute; inset: 0; mix-blend-mode: screen; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255,226,160,.42), rgba(243,196,90,.08) 38%, rgba(0,0,0,0) 62%);
}
.tale:hover .tale-frame, .tale:focus-visible .tale-frame { transform: rotateX(var(--rx)) rotateY(var(--ry)) translateY(-10px); }
.tale:hover .tale-mount img { filter: sepia(.05) brightness(1) contrast(1.05); transform: scale(1.09); }
.tale:hover .tale-mount::after { opacity: 1; }
.tale.is-pick .tale-frame { filter: drop-shadow(0 0 22px rgba(243,196,90,.85)); transform: translateY(-10px) scale(1.03); }
.tale-meta { padding: 16px 4px 0; }
.tale-tag { display: inline-block; font-size: 12px; font-weight: 500; color: var(--amber); margin-bottom: 4px; }
.tale h3 { margin: 0; font-size: clamp(15px, 1.5vw, 17px); font-weight: 500; line-height: 1.5; color: var(--paper); transition: color .4s, text-shadow .4s; }
.tale:hover h3 { color: var(--cream); text-shadow: 0 0 18px rgba(243,196,90,.45); }

/* ---------- ช่องนี้คืออะไร ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 90px); align-items: center;
  max-width: 1160px; margin: 0 auto; padding: clamp(60px, 10vw, 140px) var(--gutter);
}
.about-art { aspect-ratio: 4 / 5; clip-path: polygon(1.5% 2%, 22% .6%, 48% 1.8%, 74% .4%, 98.6% 1.6%, 99.4% 26%, 98.2% 52%, 99.6% 78%, 98.4% 98.8%, 72% 99.6%, 47% 98.2%, 23% 99.5%, .8% 98.4%, 1.8% 74%, .4% 49%, 1.6% 24%); }
#aboutStage { width: 100%; height: 100%; display: block; }
.about-text p:not(.kicker) { color: var(--paper); font-size: clamp(16px, 1.6vw, 18px); max-width: 34em; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } .about-art { max-width: 440px; width: 100%; margin: 0 auto; } }

/* ---------- ท้ายเว็บ ---------- */
.foot { min-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 80px var(--gutter) 40px; text-align: center; overflow: hidden; }
.foot-glow {
  position: absolute; left: 50%; top: 42%; width: 90vmin; height: 90vmin; transform: translate(-50%, -50%); z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,130,.34) 0%, rgba(243,196,90,.12) 30%, rgba(243,196,90,0) 65%);
  animation: flicker 3.4s ease-in-out infinite;
}
@keyframes flicker { 0%, 100% { filter: brightness(1); } 23% { filter: brightness(.86); } 27% { filter: brightness(1.05); } 61% { filter: brightness(.93); } }
.foot-logo { width: min(220px, 52vw); filter: drop-shadow(0 6px 24px rgba(0,0,0,.6)); }
.foot-line { margin: 0; font-size: clamp(22px, 3.4vw, 36px); font-weight: 500; line-height: 1.4; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.socials a { text-decoration: none; padding: 10px 20px; border-radius: 999px; border: 1px solid rgba(243,196,90,.35); color: var(--paper); font-size: 15px; transition: background .35s, color .35s; }
.socials a:hover { background: var(--amber); color: var(--ink); }
.foot-small { margin: 30px 0 0; font-size: 13px; color: var(--ink3); color: #7d6643; }

/* ---------- หน้าต่างนิทาน ---------- */
#ink { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.modal { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: radial-gradient(90% 70% at 30% 40%, #2A1D0E, var(--ink) 70%); display: grid; place-items: center; padding: 70px var(--gutter) 40px; }
.modal[hidden] { display: none; }
.modal-close { position: fixed; top: max(14px, env(safe-area-inset-top)); right: var(--gutter); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(243,196,90,.4); background: rgba(19,13,6,.6); font-size: 28px; line-height: 1; color: var(--glow); z-index: 2; }
.modal-close:hover { background: var(--amber); color: var(--ink); }
.modal-card { display: flex; gap: clamp(24px, 5vw, 64px); align-items: center; max-width: 1000px; width: 100%; }
.modal-cover { flex: 0 0 auto; width: min(340px, 40vw); aspect-ratio: 9 / 16; clip-path: polygon(1% 1.4%, 30% .3%, 62% 1.2%, 99% .5%, 99.6% 30%, 98.6% 64%, 99.4% 99.2%, 66% 99.6%, 34% 98.8%, .6% 99.5%, 1.4% 66%, .4% 33%); }
.modal-cover { position: relative; background: var(--ink2); }
.modal-cover.is-wide { width: min(560px, 52vw); aspect-ratio: 16 / 9; }
.modal-cover img { width: 100%; height: 100%; object-fit: cover; }
.modal-cover iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-cover.is-playing img, .modal-cover.is-playing .play { display: none; }
.play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: radial-gradient(circle, rgba(19,13,6,.15), rgba(19,13,6,.5)); }
.play span { display: grid; place-items: center; width: 78px; height: 78px; padding-left: 6px; border-radius: 50%; background: var(--amber); color: var(--ink); font-size: 28px; box-shadow: 0 0 40px rgba(243,196,90,.55); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.play:hover span { transform: scale(1.1); }
.modal-body h3 { margin: 0 0 .4em; font-size: clamp(28px, 4vw, 48px); font-weight: 600; line-height: 1.3; }
.modal-body p:not(.kicker) { color: var(--paper); font-size: 17px; }
.watch { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 18px; padding: 12px 24px; border-radius: 999px; background: var(--amber); color: var(--ink); text-decoration: none; font-weight: 500; }
@media (max-width: 700px) { .modal-card { flex-direction: column; text-align: center; } .modal-cover { width: min(260px, 66vw); } .modal-cover.is-wide { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- ทางแยก / ชั้นของแต่ละทาง ---------- */
.fork[hidden], .track[hidden] { display: none; }
.track-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.back {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(243,196,90,.3); background: transparent; color: var(--paper); font-size: 15px; transition: border-color .3s, color .3s, transform .35s;
}
.back:hover { border-color: var(--amber); color: var(--glow); transform: translateX(-3px); }
.track-foot { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center; margin-top: clamp(40px, 6vw, 64px); padding-top: 24px; border-top: 1px solid rgba(243,196,90,.18); }
.switch { color: var(--glow); text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(243,196,90,.45); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.switch:hover { color: var(--cream); border-color: var(--amber); }
.shelf[data-path="ภายนอก"] { background: radial-gradient(120% 60% at 50% 0%, #1F1C17 0%, var(--ink) 60%); }
.shelf[data-path="ภายใน"] { background: radial-gradient(120% 60% at 50% 0%, #2C1C08 0%, var(--ink) 60%); }

/* ---------- หน้าต่างคลิป: เรื่องก่อนหน้า / ต่อไป ---------- */
.m-nav { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.m-nav button { padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(243,196,90,.35); background: transparent; color: var(--paper); font-size: 15px; transition: background .3s, color .3s, opacity .3s; }
.m-nav button:hover:not(:disabled) { background: var(--amber); color: var(--ink); }
.m-nav button:disabled { opacity: .3; cursor: default; }
.m-pos { font-size: 14px; color: var(--mid); }
@media (max-width: 700px) { .m-nav { justify-content: center; } }

/* ---------- ไส้ตะเกียงบอกตำแหน่ง ---------- */
.wick { position: fixed; right: clamp(10px, 1.6vw, 22px); top: 50%; transform: translateY(-50%); height: 46vh; width: 24px; z-index: 45; --k: 0; }
.wick-line { position: absolute; right: 11px; top: 0; bottom: 0; width: 2px; background: rgba(243,196,90,.14); border-radius: 2px; }
.wick-fill { position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--k)); background: linear-gradient(var(--mid), var(--amber)); border-radius: 2px; }
.wick-flame {
  position: absolute; left: 50%; top: calc(var(--k) * 100%); width: 10px; height: 14px; margin: -10px 0 0 -5px;
  background: radial-gradient(ellipse at 50% 65%, #FFF4D8 0%, var(--amber) 45%, rgba(243,196,90,0) 72%); border-radius: 50% 50% 45% 45%;
  filter: drop-shadow(0 0 8px rgba(243,196,90,.9)); animation: flame 1.6s ease-in-out infinite;
}
@keyframes flame { 0%, 100% { transform: scale(1) rotate(-3deg); } 40% { transform: scale(1.15, 1.25) rotate(3deg); } 70% { transform: scale(.92, 1.05) rotate(-1deg); } }
.wick-marks { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.wick-marks li { position: absolute; right: 0; transform: translateY(-50%); }
.wick-marks button {
  position: relative; display: block; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; font-size: 0; color: transparent; cursor: pointer;
}
.wick-marks button::before { content: ''; position: absolute; right: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); border: 1.5px solid rgba(243,196,90,.45); transition: background .3s, border-color .3s, transform .3s; }
.wick-marks li.is-past button::before { background: var(--amber); border-color: var(--amber); }
.wick-marks li.is-here button::before { transform: scale(1.35); box-shadow: 0 0 10px rgba(243,196,90,.8); }
.wick-marks button::after {
  content: attr(aria-label); position: absolute; right: 28px; top: 50%; transform: translate(6px, -50%); white-space: nowrap;
  font-size: 13px; color: var(--paper); background: rgba(19,13,6,.85); padding: 4px 10px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
}
.wick-marks button:hover::after, .wick-marks button:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.wick-here { position: absolute; right: 30px; bottom: -34px; white-space: nowrap; font-size: 12px; color: var(--mid); text-shadow: 0 1px 6px rgba(0,0,0,.9); }
@media (max-width: 1100px) { .wick-here { display: none; } }
@media (max-width: 720px) {
  .wick { height: 34vh; right: 4px; }
  .wick-marks button::after { display: none; }
}

/* ---------- ปุ่มข้ามฉากเปิด ---------- */
.skip {
  position: fixed; right: clamp(48px, 5vw, 70px); bottom: max(22px, env(safe-area-inset-bottom)); z-index: 45;
  padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(243,196,90,.45); background: rgba(19,13,6,.6); color: var(--glow); font-size: 14px;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .6s ease, transform .6s ease, background .3s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.skip.is-on { opacity: 1; transform: none; pointer-events: auto; }
.skip:hover { background: var(--amber); color: var(--ink); }
@media (max-width: 720px) { .skip { right: 50%; transform: translate(50%, 10px); bottom: max(70px, env(safe-area-inset-bottom)); } .skip.is-on { transform: translate(50%, 0); } }

/* ปุ่มในหน้าต่างคลิป: อ่านเป็นบทความ / ดูบน YouTube */
.m-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.m-acts .watch { margin-top: 0; }
.watch[hidden] { display: none; }
.watch--ghost { background: transparent; border: 1px solid rgba(243,196,90,.45); color: var(--paper); }
.watch--ghost:hover { border-color: var(--amber); color: var(--glow); }
.tale-tag b { font-weight: 500; color: var(--glow); }
@media (max-width: 700px) { .m-acts { justify-content: center; } }

/* ติดต่อทางไลน์ */
.contact { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 14px; text-align: left; }
.contact-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* QR ไลน์: การ์ดกระดาษครีมขอบตัดมือ เห็นชัดแต่ไม่แย่งซีน · มือถือซ่อน (สแกนจอตัวเองไม่ได้ ใช้ปุ่มแทน) */
.line-qr { margin: 0; padding: 10px 10px 6px; background: var(--paper); transform: rotate(-2deg); transition: transform .5s cubic-bezier(.2,.7,.2,1);
  clip-path: polygon(2% 1%, 30% 0, 62% 1.6%, 99% .4%, 98.4% 35%, 99.6% 70%, 98.6% 99.2%, 66% 98.4%, 33% 99.6%, .8% 98.8%, 1.6% 64%, .2% 32%);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); }
.line-qr:hover { transform: rotate(0) scale(1.04); }
.line-qr img { display: block; width: 132px; height: 132px; image-rendering: pixelated; }
.line-qr figcaption { margin-top: 2px; font-size: 12px; text-align: center; color: var(--ink2); }
@media (max-width: 720px) { .contact { flex-direction: column; } .contact-text { align-items: center; } }
@media (hover: none) and (pointer: coarse) { .line-qr { display: none; } }
.contact .kicker { margin: 0 0 6px; }
.line-add {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 999px;
  background: var(--amber); color: var(--ink); text-decoration: none; font-size: 16px; transition: background .3s, transform .35s;
}
.line-add b { font-weight: 600; }
.line-add svg { width: 22px; height: 22px; fill: currentColor; }
.line-add:hover { background: var(--glow); transform: translateY(-2px); }

.sound[hidden] { display: none; }
