/* ===== ฟอนต์ (โฮสต์เอง ไม่เรียกบริการภายนอก) ===== */
@font-face { font-family: 'Mitr'; font-weight: 600; font-display: swap; src: url(/fonts/mitr-thai-600-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Mitr'; font-weight: 600; font-display: swap; src: url(/fonts/mitr-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Sarabun'; font-weight: 400; font-display: swap; src: url(/fonts/sarabun-thai-400-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 400; font-display: swap; src: url(/fonts/sarabun-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Sarabun'; font-weight: 700; font-display: swap; src: url(/fonts/sarabun-thai-700-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 700; font-display: swap; src: url(/fonts/sarabun-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --paper: #fff1c9; --ink: #14052e; --purple: #7a2cff; --lime: #c6ff2e; --pink: #ff4fa3;
  --orange: #ff8a1f; --sky: #3ee0ff; --lav: #e6d9ff; --white: #fffdf6; --danger: #d4103f;
  --ink-soft: #cfc3e8; --level: 0;
  --b: 3px solid var(--ink); --sh: 6px 6px 0 var(--ink); --sh-s: 3px 3px 0 var(--ink);
  --display: 'Mitr', 'Sarabun', 'Thonburi', 'Leelawadee UI', system-ui, sans-serif;
  --font: 'Sarabun', 'Thonburi', 'Leelawadee UI', 'Tahoma', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 17px/1.55 var(--font); min-height: 100dvh; background: var(--paper); overflow-x: hidden; position: relative; }
/* ลายจุดฮาล์ฟโทน + ก้อนสีที่ขยับตามเสียงไมค์ */
body::before { content: ''; position: fixed; inset: 0; z-index: -2; background-image: radial-gradient(var(--pink) 2px, transparent 2.5px), radial-gradient(var(--sky) 2px, transparent 2.5px); background-size: 26px 26px; background-position: 0 0, 13px 13px; opacity: .35; }
body::after { content: ''; position: fixed; z-index: -1; width: 70vmax; height: 70vmax; left: 50%; top: 40%; translate: -50% -50%; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background: radial-gradient(circle at 30% 30%, var(--lime), transparent 60%), radial-gradient(circle at 70% 70%, var(--pink), transparent 60%);
  opacity: .28; scale: calc(.8 + var(--level) * .6); transition: scale .08s linear; animation: blob 14s ease-in-out infinite alternate; }
@keyframes blob { to { rotate: 120deg; border-radius: 63% 37% 41% 59% / 56% 59% 41% 44%; } }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 .5rem; }
a { color: var(--purple); }
.muted { color: #4b3a72; } .small { font-size: .88rem; }
.loading { text-align: center; padding: 4rem 1rem; font-family: var(--display); font-size: 1.4rem; animation: wob 1s infinite; }
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
[hidden] { display: none !important; }
@keyframes wob { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
@keyframes pop { 0% { scale: .6; opacity: 0; } 70% { scale: 1.08; } 100% { scale: 1; opacity: 1; } }

/* ===== ปุ่ม ===== */
.btn { background: var(--white); border: var(--b); border-radius: 14px; padding: .4rem 1rem; box-shadow: var(--sh-s); font-family: var(--display); text-decoration: none; color: var(--ink); display: inline-block; min-height: 46px; transition: transform .12s; }
.btn:hover:not(:disabled) { transform: translate(-1px, -2px) rotate(-1.5deg); }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--purple); color: #fff; }
.btn.big { padding: .75rem 1.4rem; font-size: 1.15rem; width: 100%; border-radius: 18px; box-shadow: var(--sh); }
.link { background: none; border: 0; color: var(--purple); text-decoration: underline wavy; text-underline-offset: 4px; padding: .5rem .25rem; min-height: 44px; font-weight: 700; }
.link.danger { color: var(--danger); }
.icon-btn { border: var(--b); border-radius: 50%; width: 46px; height: 46px; font-size: 1.4rem; line-height: 1; background: var(--white); box-shadow: var(--sh-s); font-family: var(--display); }

/* ===== โครงหน้า ===== */
.shell { max-width: 640px; margin: 0 auto; padding: 0 14px 130px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 10px; gap: 10px; }
.brand { font-family: var(--display); font-size: 2.1rem; color: var(--purple); text-decoration: none; display: inline-flex; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--lime); cursor: pointer; }
.brand span, .logo span { display: inline-block; animation: wave 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .12s); }
@keyframes wave { 0%, 100% { translate: 0 0; rotate: 0deg; } 25% { translate: 0 -6px; rotate: -6deg; } 75% { translate: 0 3px; rotate: 5deg; } }
.me-chip { text-decoration: none; color: var(--ink); background: var(--lime); border: var(--b); border-radius: 999px; padding: .15rem .9rem; font-weight: 700; display: inline-flex; gap: .5rem; align-items: baseline; max-width: 58%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-shadow: var(--sh-s); rotate: 2deg; }
.me-chip small { opacity: .75; }
.ticker { overflow: hidden; background: var(--ink); color: var(--lime); border-block: var(--b); rotate: -1.4deg; margin: 4px -20px 14px; padding: .25rem 0; font-family: var(--display); white-space: nowrap; user-select: none; }
.ticker div { display: inline-block; padding-left: 100%; animation: tick 28s linear infinite; animation-delay: -9s; }
@keyframes tick { to { transform: translateX(-100%); } }
.page-title { margin: .4rem 0 .8rem; font-size: 2rem; display: inline-block; background: var(--lime); border: var(--b); padding: 0 .7rem; rotate: -1.5deg; box-shadow: var(--sh-s); }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); z-index: 5; pointer-events: none; }
.nav-item { pointer-events: auto; flex: 1; max-width: 130px; text-align: center; padding: .5rem; border: var(--b); border-radius: 16px; background: var(--white); color: var(--ink); text-decoration: none; font-family: var(--display); min-height: 48px; box-shadow: var(--sh-s); }
.nav-item:nth-child(1) { rotate: -3deg; } .nav-item:nth-child(3) { rotate: 3deg; } .nav-item:nth-child(4) { rotate: -2deg; background: var(--sky); }
.nav-item.on { background: var(--lime); }
.nav-item.rec { max-width: 120px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: var(--pink); font-size: 1.5rem; box-shadow: var(--sh); animation: wob 2.2s ease-in-out infinite; translate: 0 -12px; }
.nav-item.rec.on { background: var(--orange); }

/* ===== หน้าแรก / ฟอร์ม ===== */
.hero { max-width: 460px; margin: 0 auto; padding: 30px 16px 40px; text-align: center; }
.logo { font-family: var(--display); font-size: 5rem; line-height: 1; color: var(--purple); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--lime), 9px 9px 0 var(--pink); display: inline-flex; cursor: pointer; margin-bottom: .4rem; }
.tagline { font-family: var(--display); font-size: 1.7rem; margin: .4rem 0; display: inline-block; background: var(--orange); border: var(--b); padding: 0 .8rem; rotate: 2deg; box-shadow: var(--sh-s); }
.card { background: var(--white); border: var(--b); border-radius: 20px; box-shadow: var(--sh); padding: 16px; margin: 16px 0; text-align: left; }
.card.auth { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; rotate: -.8deg; }
input[type=text], input[type=email], input[type=password] { width: 100%; border: var(--b); border-radius: 14px; padding: .65rem .85rem; background: #fff; min-height: 48px; box-shadow: inset 3px 3px 0 var(--lav); }
input:focus { background: #fffce6; }
.form-error, .rec-error { color: var(--danger); font-weight: 700; min-height: 1.2em; }
.id-card { background: var(--lime); text-align: center; rotate: -1.5deg; }
.big-code { font-family: var(--display); font-size: 3.2rem; letter-spacing: .04em; -webkit-text-stroke: 1px var(--ink); color: var(--white); text-shadow: 4px 4px 0 var(--ink); }
.who { margin-bottom: .6rem; }

/* ===== โพสต์ ===== */
.post { --tilt: 0deg; --tint: var(--white); background: var(--tint); border: var(--b); border-radius: 22px; box-shadow: var(--sh); padding: 14px; margin: 24px 0; position: relative; rotate: var(--tilt); transition: rotate .2s, translate .2s; }
.list > .post:nth-of-type(4n+2) { --tint: #fff0fa; } .list > .post:nth-of-type(4n+3) { --tint: #f1ffd0; } .list > .post:nth-of-type(4n) { --tint: #e9fbff; }
.post:hover, .post:focus-within, .post:has(.player.playing) { rotate: 0deg; translate: 0 -2px; }
.post:has(.player.playing) { animation: groove .6s ease-in-out infinite alternate; }
@keyframes groove { from { rotate: -.6deg; } to { rotate: .6deg; } }
.post.reply { --tilt: 0deg !important; box-shadow: 3px 3px 0 var(--ink); margin: 14px 0; background: #fbf8ff; padding: 10px; border-radius: 16px; }
.post-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.who-line { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.alias { font-family: var(--display); font-size: 1.15rem; }
.code { font-size: .85rem; font-weight: 700; background: var(--ink); color: var(--lime); border-radius: 8px; padding: 0 .45rem; text-decoration: none; }
.revealed { font-size: .8rem; font-weight: 700; background: var(--sky); border: 2px solid var(--ink); border-radius: 8px; padding: 0 .45rem; rotate: -1.5deg; }
.when { font-size: .8rem; color: #4b3a72; white-space: nowrap; }
.sticker { display: inline-block; background: var(--pink); border: var(--b); border-radius: 10px; padding: 0 .7rem; font-family: var(--display); font-size: .95rem; rotate: -3deg; margin: 8px 0 2px; box-shadow: var(--sh-s); }
.post:nth-of-type(3n+2) .sticker { background: var(--orange); rotate: 2deg; } .post:nth-of-type(3n) .sticker { background: var(--sky); rotate: -1deg; }
.post-img { width: 100%; max-height: 320px; object-fit: cover; border: var(--b); border-radius: 14px; margin: 8px 0; rotate: -.8deg; box-shadow: var(--sh-s); }
.post-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.post-actions .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.belief-row { display: flex; gap: 10px; }
.belief { width: 58px; height: 52px; border: var(--b); border-radius: 16px; background: var(--white); font-size: 1.6rem; font-family: var(--display); box-shadow: var(--sh-s); transition: transform .12s, background .12s; }
.belief:hover { transform: rotate(-6deg) scale(1.06); }
.belief:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.belief.yes.on { background: var(--lime); transform: rotate(-5deg) scale(1.12); } .belief.no.on { background: var(--pink); transform: rotate(5deg) scale(1.12); }
.stamp { position: absolute; left: 50%; top: 42%; translate: -50% -50%; rotate: -12deg; font-family: var(--display); font-size: 3.4rem; line-height: 1; padding: .1em .35em; border: 7px solid var(--ink); border-radius: 18px; background: var(--lime); color: var(--ink); pointer-events: none; z-index: 3; animation: stamp 1.1s ease-out forwards; text-shadow: 3px 3px 0 #fff8; }
.stamp.no { background: var(--pink); rotate: 10deg; }
@keyframes stamp { 0% { scale: 3; opacity: 0; } 18% { scale: .92; opacity: 1; } 28% { scale: 1.04; } 70% { scale: 1; opacity: 1; } 100% { scale: 1; opacity: 0; } }
.shake { animation: shake .4s; } @keyframes shake { 25% { translate: -7px 0; } 50% { translate: 6px 0; } 75% { translate: -4px 0; } }
.menu { margin-top: 10px; padding-top: 10px; border-top: 3px dashed var(--ink); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.menu-label { font-family: var(--display); }
.replies { margin-top: 14px; padding-left: 12px; border-left: 6px solid var(--purple); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { border: var(--b); border-radius: 12px; background: var(--white); padding: .25rem .85rem; min-height: 42px; font-weight: 700; box-shadow: var(--sh-s); transition: transform .1s; }
.chip:nth-child(odd) { rotate: -1.5deg; } .chip:nth-child(even) { rotate: 1.5deg; }
.chip:active { transform: translate(2px, 2px); }
.chip.on { background: var(--lime); transform: scale(1.06); }
.empty { text-align: center; padding: 28px 10px; display: flex; flex-direction: column; gap: 14px; align-items: center; font-family: var(--display); font-size: 1.3rem; }
.audit { padding-left: 1.2rem; font-size: .88rem; }

/* ===== เครื่องเล่น ===== */
.player { --bar-done: var(--lime); --bar-rest: #8a78b8; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border: var(--b); border-radius: 16px; padding: 8px 10px; margin-top: 8px; box-shadow: var(--sh-s); }
.player .play { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; background: var(--lime); color: var(--ink); font-size: 1.15rem; flex: none; transition: transform .15s; }
.player .play:hover { transform: rotate(-12deg) scale(1.08); }
.player.playing .play { background: var(--pink); animation: wob .5s infinite; }
.player .wave { flex: 1; min-width: 0; width: 100%; height: 48px; cursor: pointer; }
.player .time { font-size: .8rem; min-width: 5.4em; text-align: right; font-variant-numeric: tabular-nums; }
.player .speed { border: 2px solid #fff; border-radius: 10px; background: var(--purple); color: #fff; min-width: 46px; min-height: 38px; font-family: var(--display); font-size: .85rem; }
.player.compact .play { width: 42px; height: 42px; } .player.compact .wave { height: 36px; }
@media (max-width: 420px) { .player .time { display: none; } .logo { font-size: 4.2rem; } }

/* ===== ตัวอัด ===== */
.recorder { background: var(--white); border: var(--b); border-radius: 24px; box-shadow: var(--sh); padding: 20px; margin: 16px 0; }
.recorder.inline { box-shadow: 3px 3px 0 var(--ink); padding: 12px; border-radius: 16px; }
.rec-idle, .rec-live, .rev { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.mic-btn { width: 150px; height: 150px; border-radius: 50%; border: 5px solid var(--ink); background: conic-gradient(from 0deg, var(--purple), var(--pink), var(--orange), var(--lime), var(--sky), var(--purple)); font-size: 3.6rem; box-shadow: var(--sh); animation: wob 1.8s ease-in-out infinite; position: relative; }
.mic-btn::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 4px dashed var(--ink); animation: spin 12s linear infinite; pointer-events: none; }
@keyframes spin { to { rotate: 360deg; } }
.mic-btn:hover { scale: 1.06; } .mic-btn:active { scale: .94; }
.recorder.inline .mic-btn { width: 96px; height: 96px; font-size: 2.4rem; }
.rec-hint { font-family: var(--display); font-size: 1.5rem; }
.rec-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.rev > * { width: 100%; } .rev .rec-actions, .rev .chips { justify-content: center; }
.rev-title { font-family: var(--display); font-size: 1.4rem; }
canvas.wave.live { width: 100%; background: var(--ink); border: var(--b); border-radius: 14px; touch-action: none; }
canvas.wave.editor { width: 100%; background: var(--white); border: var(--b); border-radius: 14px; touch-action: none; cursor: col-resize; }
.timer { font-family: var(--display); font-size: 3rem; font-variant-numeric: tabular-nums; line-height: 1; }
.rec-status { display: flex; gap: 8px; align-items: center; font-family: var(--display); font-size: 1.2rem; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: var(--danger); border: 3px solid var(--ink); animation: pulse .7s infinite; }
.rec-status.paused .dot { animation: none; background: #999; }
@keyframes pulse { 50% { scale: 1.5; opacity: .5; } }
.editor-hint { font-size: .88rem; color: #4b3a72; }
.img-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== ข้อความแจ้ง / ละอองพ่น ===== */
#toast { position: fixed; left: 50%; bottom: 112px; translate: -50% 20px; background: var(--lime); color: var(--ink); border: var(--b); box-shadow: var(--sh); font-family: var(--display); padding: .5rem 1.2rem; border-radius: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 30; max-width: 90vw; text-align: center; rotate: -2deg; }
#toast.show { opacity: 1; translate: -50% 0; }
.splat { position: fixed; z-index: 40; pointer-events: none; font-size: 1.8rem; will-change: transform, opacity; }
.shell > main { position: relative; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .post, .page-title, .tagline, .card.auth, .id-card, .me-chip, .ticker, .nav-item, .sticker, .chip { rotate: 0deg !important; }
  body::after { scale: 1; }
}

/* ===== คำตอบแบบกระชับ + หน้าอัดไม่มีเมนูล่าง ===== */
.shell.no-nav { padding-bottom: 40px; }
.post.reply { padding: 8px 10px; margin: 10px 0; }
.post.reply .alias { font-size: .98rem; } .post.reply .code { font-size: .75rem; } .post.reply .when { font-size: .72rem; }
.reply-row { display: flex; align-items: center; gap: 8px; }
.reply-row .player { flex: 1; min-width: 0; margin-top: 4px; padding: 4px 8px; gap: 8px; border-radius: 12px; box-shadow: 2px 2px 0 var(--ink); }
.reply-row .player .speed, .reply-row .player .time { display: none; }
.reply-row .player.compact .play { width: 34px; height: 34px; font-size: .9rem; border-width: 2px; }
.reply-row .player.compact .wave { height: 28px; }
.reply-row .post-actions { margin: 4px 0 0; flex-wrap: nowrap; flex: none; gap: 6px; }
.reply-row .belief { width: 40px; height: 38px; font-size: 1.15rem; border-radius: 12px; }
.reply-row .belief-row { gap: 6px; }
.reply-row .icon-btn { width: 38px; height: 38px; }
.replies { padding-left: 10px; border-left-width: 5px; margin-top: 10px; }

/* ===== คำตอบ: แถวเดียว เล็ก คนละสีกับโพสต์หลัก ===== */
.post.reply { background: #e3d8ff; border-color: var(--purple); box-shadow: 2px 2px 0 var(--purple); padding: 6px 8px; margin: 8px 0; border-radius: 14px; }
.reply-row { display: flex; align-items: center; gap: 8px; }
.reply-who { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; flex: none; max-width: 27%; min-width: 0; }
.reply-who .alias { font-size: .82rem; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-who .code { font-size: .62rem; line-height: 1.3; }
.post.reply .player { --bar-done: #fff; --bar-rest: #b9a6ff; background: var(--purple); border-color: var(--ink); margin: 0; padding: 3px 6px; gap: 6px; border-radius: 10px; box-shadow: none; }
.post.reply .player.compact .play { width: 28px; height: 28px; font-size: .7rem; border-width: 2px; }
.post.reply .player.compact .wave { height: 22px; }
.post.reply .reply-row .post-actions { margin: 0; }
.post.reply .reply-row .icon-btn { width: 30px; height: 30px; font-size: 1rem; box-shadow: 1px 1px 0 var(--ink); }
.post.reply .reply-row .belief { width: 34px; height: 30px; font-size: 1rem; border-radius: 10px; box-shadow: 1px 1px 0 var(--ink); }
.replies { border-left-color: var(--purple); }
/* รอบปรับ: เล็กลงอีก + สีชัดขึ้น */
.post.reply { background: #cdbcff; padding: 4px 6px; margin: 6px 0; border-radius: 12px; border-width: 2px; }
.reply-who .alias { font-size: .74rem; } .reply-who .code { font-size: .58rem; padding: 0 .3rem; }
.post.reply .player { padding: 2px 5px; gap: 5px; border-radius: 9px; border-width: 2px; }
.post.reply .player.compact .play { width: 24px; height: 24px; font-size: .6rem; border-width: 2px; }
.post.reply .player.compact .wave { height: 18px; }
.post.reply .reply-row .icon-btn { width: 26px; height: 26px; font-size: .85rem; border-width: 2px; }
.post.reply .reply-row .belief { width: 30px; height: 26px; font-size: .9rem; border-width: 2px; }
.replies { margin-top: 6px; padding-left: 8px; border-left-width: 4px; }

/* ===== ปุ่มความรู้สึก ===== */
.react-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.react { border: 2px solid var(--ink); border-radius: 999px; background: var(--white); min-height: 38px; padding: 0 .65rem; font-size: 1.1rem; display: inline-flex; gap: .3rem; align-items: center; box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, background .12s; }
.react:active { transform: translate(2px, 2px); box-shadow: none; }
.react.on { background: var(--lime); transform: rotate(-3deg) scale(1.06); }
.react-name { font-size: .78rem; font-weight: 700; }
.react:not(.on) .react-name { display: none; }
.react-label { font-size: .8rem; font-weight: 700; color: #4b3a72; }
.react-got { background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 0 .5rem; font-size: 1rem; }
.react-got small { font-weight: 700; font-size: .7rem; }

.feed-tabs { margin: 0 0 6px; }
.mask-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 10px; }
.mask-row small { flex-basis: 100%; }

/* หัวข้อที่ AI สรุป / ข้อความถอดของเจ้าของ / ค้นหาด้วยเสียง */
.topic { margin: 6px 2px 2px; font-size: .92rem; font-weight: 700; opacity: .85; }
.transcript { margin: 4px 2px; font-size: .85rem; } .transcript summary { cursor: pointer; opacity: .7; } .transcript p { margin: 6px 0 0; white-space: pre-wrap; }
.search-btn { display: block; text-align: center; margin: 4px 0 10px; }
.heard { margin: 8px 0; font-size: .95rem; text-align: center; }
.mic-btn.rec-on { animation: wob .5s ease-in-out infinite; outline: 6px solid var(--pink); }

/* แผงเทป: แต่ละคนเลือกได้ ใช้กับโพสต์หลักของเจ้าของ (ตัวเลือกในหน้า "ฉัน" ใช้ data-skin เดียวกัน) */
.post[data-skin="cassette"] .player, .skin-pick[data-skin="cassette"] .player { --bar-done: #ff4fa3; --bar-rest: #c9a36a; background: linear-gradient(#f3dfb4 0 80%, #2b1b0e 80%); color: #2b1b0e; border-radius: 10px; }
.post[data-skin="cassette"] .player .play, .skin-pick[data-skin="cassette"] .play { background: #ff4fa3; color: #fff; border-color: #2b1b0e; }
.post[data-skin="radio"] .player, .skin-pick[data-skin="radio"] .player { --bar-done: #ffd23f; --bar-rest: #7a4a22; background: repeating-linear-gradient(90deg, #8b5a2b 0 6px, #7a4a22 6px 12px); border-radius: 22px 22px 10px 10px; }
.post[data-skin="radio"] .player .play, .skin-pick[data-skin="radio"] .play { background: #ffd23f; border-radius: 12px; }
.post[data-skin="lcd"] .player, .skin-pick[data-skin="lcd"] .player { --bar-done: #0a2a0a; --bar-rest: #7da067; background: #9bbc7a; color: #0a2a0a; border-radius: 4px; box-shadow: inset 0 0 0 3px #5c7a45, var(--sh-s); }
.post[data-skin="lcd"] .player .play, .skin-pick[data-skin="lcd"] .play { background: #0a2a0a; color: #9bbc7a; border-radius: 6px; border-color: #0a2a0a; }
.post[data-skin="lcd"] .player .speed, .skin-pick[data-skin="lcd"] .speed { background: #0a2a0a; border-color: #0a2a0a; }
.post[data-skin="neon"] .player, .skin-pick[data-skin="neon"] .player { --bar-done: #3ee0ff; --bar-rest: #4b2a8a; background: #0b0220; border-color: #3ee0ff; box-shadow: 0 0 12px #3ee0ff, 0 0 2px #3ee0ff inset; }
.post[data-skin="neon"] .player .play, .skin-pick[data-skin="neon"] .play { background: transparent; color: #ff4fa3; border-color: #ff4fa3; box-shadow: 0 0 10px #ff4fa3; }
.post[data-skin="paper"] .player, .skin-pick[data-skin="paper"] .player { --bar-done: #14052e; --bar-rest: #c8bfae; background: #fffdf6; color: #14052e; border-style: dashed; border-radius: 6px; box-shadow: none; }
.post[data-skin="paper"] .player .play, .skin-pick[data-skin="paper"] .play { background: #14052e; color: #fffdf6; border-color: #14052e; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.skin-pick { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: var(--b); border-radius: 14px; background: var(--white); font-family: var(--display); }
.skin-pick.on { outline: 4px solid var(--pink); }
.skin-pick .player.mini { margin: 0; padding: 6px 8px; gap: 8px; pointer-events: none; }
.skin-pick .play { width: 30px; height: 30px; font-size: .8rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; background: var(--lime); color: var(--ink); }
.skin-pick .bars { letter-spacing: 1px; color: var(--bar-done, var(--lime)); }
.skin-name { font-size: .85rem; }

/* แถบเลื่อนเสียง */
.voice-ctl { display: grid; gap: 10px; margin: 8px 0; } .voice-ctl.busy { opacity: .6; }
.voice-ctl .slide { display: grid; gap: 2px; } .slide-name { font-family: var(--display); font-size: .95rem; } .slide-name output { color: var(--purple); }
.voice-ctl input[type=range] { width: 100%; height: 34px; accent-color: var(--purple); }
.slide-ends { display: flex; justify-content: space-between; font-size: .78rem; opacity: .7; }

/* ความปลอดภัย */
.safety { display: grid; gap: .6rem; margin-bottom: .8rem; }
.card.notice { border-left: 6px solid var(--accent, #f5a623); }
.card.care { border-left: 6px solid #4aa3a0; }
.big-tel { font-weight: 800; font-size: 1.25em; text-decoration: underline; }
.hidden-row { display: grid; gap: .4rem; padding: .6rem 0; border-top: 1px dashed currentColor; }

/* รูปประจำตัวสร้างอัตโนมัติ */
.avatar { flex: none; display: block; }
.who-wrap { display: flex; gap: 8px; align-items: center; min-width: 0; }
.me-chip .avatar { align-self: center; }

/* ขณะอัดเสียงตอบกลับ ซ่อนแถบเมนูล่าง ไม่ให้บังปุ่มส่ง */
body:has(.replies .recorder) .bottom { display: none; }
body:has(.replies .recorder) .shell { padding-bottom: 40px; }
