/*
 * มหรสพเจ็ดหน้ากาก — /seven-masks
 * ทิศทางภาพล็อกจาก concept-06…concept-10 (modern masked performance arena)
 *
 * กฎเหล็กของหน้านี้
 *   ๑ คำบาลีเป็นพระเอก — panel งาช้างอยู่เหนือระดับตัวละครเสมอ ไม่มีอะไรทับ
 *   ๒ เน้นเฉพาะส่วนที่สอน ไม่ระบายทั้งบรรทัด ไม่ปล่อย particle หลังข้อความ
 *   ๓ แยกตัวละครด้วย silhouette + prop + pose ไม่ใช้สีเป็นสัญญาณเดียว
 *   ๔ ปุ่มแตะ ≥ ๔๔px · กว้าง ๓๒๐px ไม่ล้น · reduced-motion เล่นได้ครบ
 */

:root {
	--sm-night: #0d0620;
	--sm-night-2: #150a34;
	--sm-night-3: #1e1046;
	--sm-indigo: #4338ca;
	--sm-violet: #7c5cf5;
	--sm-violet-soft: #a78bfa;
	--sm-coral: #f0806e;
	--sm-mint: #6fd3bd;
	--sm-gold: #e8c78a;
	--sm-gold-dim: #b99a63;
	--sm-ivory: #f7f0e1;
	--sm-ivory-2: #fdf9ef;
	--sm-ink: #2b1d6b;
	--sm-ink-soft: #5b5080;
	--sm-ok: #34a684;
	--sm-warn: #d98324;

	--sm-panel-radius: 22px;
	--sm-shadow-deep: 0 26px 60px -28px rgba(4, 2, 16, .85);
	--sm-shadow-panel: 0 18px 40px -22px rgba(8, 4, 30, .7);
	--sm-focus: 0 0 0 3px rgba(232, 199, 138, .85);
	--sm-scale: var(--reading-scale, 1);
}

[v-cloak] { display: none; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body.sm-body {
	margin: 0;
	background: var(--sm-night);
	color: var(--sm-ivory);
	font-family: "Sarabun", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
	min-height: 100vh;
	overflow-x: hidden;
}

.sm-app { position: relative; min-height: 100vh; }

/* ------------------------------------------------------------- primitives */

.sm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 44px;
	padding: .6em 1.15em;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: calc(1rem * var(--sm-scale));
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: transform .14s ease, background-color .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.sm-btn:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-btn:disabled { opacity: .45; cursor: not-allowed; }

.sm-btn-primary {
	background: linear-gradient(180deg, var(--sm-violet) 0%, #5b3fd6 100%);
	color: #fff;
	border-color: rgba(232, 199, 138, .5);
	box-shadow: 0 10px 26px -14px rgba(124, 92, 245, .95);
}
.sm-btn-primary:hover:not(:disabled) { transform: translateY(-1px); }

.sm-btn-go {
	background: linear-gradient(180deg, #2f9e85 0%, #1d7864 100%);
	color: #fff;
	border-color: rgba(232, 199, 138, .5);
}

.sm-btn-ghost {
	background: rgba(255, 255, 255, .06);
	color: var(--sm-ivory);
	border-color: rgba(232, 199, 138, .35);
}
.sm-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }

/* ปุ่ม ghost บนแผงงาช้างต้องกลับเป็นหมึกคราม ไม่ใช่ตัวขาวบนครีม (อ่านไม่ออก) */
.sm-panel .sm-btn-ghost,
.sm-answer-sheet .sm-btn-ghost {
	color: var(--sm-ink);
	background: rgba(43, 29, 107, .07);
	border-color: rgba(43, 29, 107, .28);
}
.sm-panel .sm-btn-ghost:hover:not(:disabled),
.sm-answer-sheet .sm-btn-ghost:hover:not(:disabled) { background: rgba(43, 29, 107, .14); }

.sm-btn-lg { font-size: calc(1.08rem * var(--sm-scale)); padding: .75em 1.5em; min-height: 52px; }
.sm-btn-sm { min-height: 44px; padding: .45em .9em; font-size: calc(.92rem * var(--sm-scale)); }

.sm-icon-btn {
	width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid rgba(232, 199, 138, .32);
	background: rgba(13, 6, 32, .68);
	color: var(--sm-ivory);
	cursor: pointer;
	transition: background-color .14s ease, border-color .14s ease;
}
.sm-icon-btn:hover { background: rgba(124, 92, 245, .3); }
.sm-icon-btn:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-icon-btn.is-off { color: var(--sm-ink-soft); border-color: rgba(255, 255, 255, .12); }

.sm-sr {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ system state */

.sm-system {
	min-height: 100vh;
	display: grid;
	place-content: center;
	gap: .75rem;
	text-align: center;
	padding: 2rem 1.25rem;
	background: radial-gradient(circle at 50% 30%, var(--sm-night-3) 0%, var(--sm-night) 70%);
}
.sm-system i { font-size: 2.4rem; color: var(--sm-gold); }
.sm-system h1 { margin: 0; font-size: calc(1.4rem * var(--sm-scale)); }
.sm-system p { margin: 0; color: #c9c0e4; max-width: 32rem; }
.sm-system .sm-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
@keyframes sm-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.sm-system .sm-loading { animation: sm-pulse 1.4s ease-in-out infinite; }

/* ----------------------------------------------------------------- top bar */

.sm-top {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: .5rem;
	padding: .55rem .75rem;
	background: linear-gradient(180deg, rgba(13, 6, 32, .96) 0%, rgba(13, 6, 32, .78) 100%);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(232, 199, 138, .18);
}
.sm-brand {
	display: inline-flex; align-items: center; gap: .5rem;
	padding: .3rem .8rem .3rem .35rem;
	border-radius: 999px;
	background: rgba(30, 16, 70, .8);
	border: 1px solid rgba(232, 199, 138, .35);
	text-decoration: none;
	color: var(--sm-ivory);
	flex-shrink: 0;
}
.sm-brand span[aria-hidden] { font-size: 1.2rem; line-height: 1; }
.sm-brand strong { font-size: calc(.95rem * var(--sm-scale)); white-space: nowrap; }
.sm-brand small { display: block; font-size: .68rem; color: var(--sm-gold-dim); }
.sm-top-spacer { flex: 1 1 auto; min-width: 0; }
.sm-top-tools { display: flex; align-items: center; gap: .45rem; justify-content: flex-end; }

.sm-sync {
	display: inline-flex; align-items: center; gap: .35rem;
	font-size: .74rem;
	padding: .3rem .65rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .12);
	color: #cfc7e8;
	white-space: nowrap;
}
.sm-sync.is-saved { color: #8fe3c6; border-color: rgba(52, 166, 132, .5); }
.sm-sync.is-error { color: #f6b8ae; border-color: rgba(240, 128, 110, .5); }

/* การตั้งค่า — รวมเครื่องมือที่เคยกระจายบนแถบด้านบนไว้ในที่เดียว */
.sm-settings-wrap { position: relative; flex: 0 0 auto; }
.sm-settings-button.is-open {
	background: var(--sm-gold);
	border-color: var(--sm-gold);
	color: var(--sm-night);
}
.sm-settings-panel {
	position: absolute;
	top: calc(100% + .65rem);
	right: 0;
	width: min(25rem, calc(100vw - 1.5rem));
	padding: .85rem;
	border-radius: 16px;
	background: #181035;
	color: var(--sm-ivory);
	box-shadow: 0 22px 52px -18px rgba(0, 0, 0, .72);
	z-index: 60;
}
.sm-settings-panel::before {
	content: "";
	position: absolute;
	top: -6px;
	right: 16px;
	width: 12px;
	height: 12px;
	background: #181035;
	transform: rotate(45deg);
}
.sm-settings-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) 36px; align-items: center; gap: .65rem; padding: .15rem .1rem .8rem; }
.sm-settings-mark, .sm-setting-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(232, 199, 138, .13);
	color: var(--sm-gold);
}
.sm-settings-mark { width: 38px; height: 38px; border-radius: 12px; }
.sm-settings-head h2 { margin: 0; font-size: calc(1.02rem * var(--sm-scale)); }
.sm-settings-head p { margin: .08rem 0 0; color: #bdb3d8; font-size: .76rem; }
.sm-settings-close {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .07);
	color: var(--sm-ivory);
	cursor: pointer;
}
.sm-settings-close:hover { background: rgba(255, 255, 255, .13); }
.sm-settings-close:focus-visible,
.sm-stepper button:focus-visible,
.sm-sound-toggle:focus-visible { outline: 3px solid var(--sm-gold); outline-offset: 2px; }
.sm-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .8rem .1rem; border-top: 1px solid rgba(255, 255, 255, .09); }
.sm-setting-copy { display: flex; align-items: center; min-width: 0; gap: .6rem; }
.sm-setting-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; }
.sm-setting-copy h3, .sm-sound-settings h3 { margin: 0; font-size: calc(.9rem * var(--sm-scale)); }
.sm-setting-copy p { margin: .08rem 0 0; color: #bdb3d8; font-size: .7rem; line-height: 1.35; }
.sm-stepper {
	display: grid;
	grid-template-columns: 38px minmax(68px, auto) 38px;
	align-items: stretch;
	min-height: 40px;
	padding: 2px;
	border-radius: 12px;
	background: #0d0820;
}
.sm-stepper button, .sm-stepper-value {
	min-width: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--sm-ivory);
	font: inherit;
	font-size: .78rem;
	font-weight: 700;
}
.sm-stepper button { cursor: pointer; }
.sm-stepper button:hover:not(:disabled) { background: rgba(232, 199, 138, .13); color: var(--sm-gold); }
.sm-stepper button:disabled { opacity: .28; cursor: not-allowed; }
.sm-stepper .sm-stepper-value { padding-inline: .35rem; color: var(--sm-gold); white-space: nowrap; }
.sm-sound-settings { padding: .8rem .1rem .1rem; border-top: 1px solid rgba(255, 255, 255, .09); }
.sm-sound-settings h3 { display: flex; align-items: center; gap: .4rem; margin-bottom: .55rem; color: #d9d2eb; }
.sm-sound-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.sm-sound-toggle {
	min-width: 0;
	min-height: 62px;
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	align-items: center;
	gap: .1rem .35rem;
	padding: .55rem;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, .06);
	color: #aca3c6;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.sm-sound-toggle i { grid-row: 1 / 3; color: #77708f; }
.sm-sound-toggle span { font-size: .72rem; line-height: 1.2; }
.sm-sound-toggle b { font-size: .66rem; color: #8f87a8; }
.sm-sound-toggle.is-on { background: rgba(111, 211, 189, .12); color: var(--sm-ivory); }
.sm-sound-toggle.is-on i, .sm-sound-toggle.is-on b { color: #8fe3c6; }

/* --------------------------------------------------------------- backstage */

.sm-home {
	position: relative;
	min-height: calc(100vh - 58px);
	padding: 1.4rem .8rem 5.5rem;
	background: var(--sm-night);
}
.sm-home-bg {
	position: absolute; inset: 0;
	background-image: var(--sm-home-image);
	background-size: cover;
	background-position: center;
	opacity: .66;
}
.sm-home-bg::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(13, 6, 32, .28) 0%, rgba(13, 6, 32, .76) 48%, var(--sm-night) 100%);
}
.sm-home-inner { position: relative; max-width: 62rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }

.sm-home-hero { max-width: 47rem; margin: 0 auto; text-align: center; padding: 1rem .75rem .2rem; }
.sm-home-hero h1 {
	margin: 0;
	color: var(--sm-ivory-2);
	font-size: clamp(2.25rem, calc(5vw * var(--sm-scale)), 4.7rem);
	line-height: 1.04;
	letter-spacing: -.025em;
	text-wrap: balance;
}
.sm-home-hero h1 em { display: inline; margin-inline-start: .25em; color: var(--sm-gold); font-style: normal; }
.sm-home-hero > p {
	max-width: 42rem;
	margin: .75rem auto 0;
	color: #ded7ef;
	font-size: calc(1rem * var(--sm-scale));
	line-height: 1.7;
}
.sm-home-facts {
	display: inline-grid;
	grid-template-columns: repeat(3, minmax(7.4rem, 1fr));
	margin: 1rem auto 0;
	padding: 0;
	border-radius: 14px;
	background: rgba(13, 6, 32, .76);
	box-shadow: 0 14px 32px -24px rgba(0, 0, 0, .9);
	overflow: hidden;
}
.sm-home-facts > div { padding: .7rem .9rem; }
.sm-home-facts > div + div { border-left: 1px solid rgba(232, 199, 138, .2); }
.sm-home-facts dt { color: #bcb3d5; font-size: .72rem; }
.sm-home-facts dd { margin: .08rem 0 0; color: var(--sm-gold); font-size: calc(1.05rem * var(--sm-scale)); font-weight: 700; }
.sm-hero-queue {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin-top: .85rem;
	color: #e6e0f2;
	font-size: calc(.9rem * var(--sm-scale));
}
.sm-hero-queue i { color: var(--sm-mint); }
.sm-hero-actions { margin-top: .9rem; }
.sm-home-hero .sm-btn-ghost { background: rgba(13, 6, 32, .7); }

/* บัตรเข้าชมมหรสพ — ใช้เป็นทั้งสถานะรอบและจุดเลือกคลังบท */
.sm-admission-ticket {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 104px;
	width: min(100%, 58rem);
	margin: .15rem auto .2rem;
	overflow: hidden;
	border-radius: 14px;
	background:
		linear-gradient(90deg, rgba(91, 57, 17, .045) 1px, transparent 1px) 0 0 / 8px 100%,
		linear-gradient(180deg, #fbf2da 0%, #ead6a8 100%);
	color: #3f2c14;
	box-shadow: 0 22px 46px -18px rgba(0, 0, 0, .78), inset 0 0 0 1px rgba(97, 62, 18, .42);
}
.sm-admission-ticket::before,
.sm-admission-ticket::after {
	content: "";
	position: absolute;
	z-index: 5;
	top: 50%;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #0d0620;
}
.sm-admission-ticket::before { left: -12px; }
.sm-admission-ticket::after { right: -12px; }
.sm-ticket-face { min-width: 0; padding: 13px 16px 14px; }
.sm-ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(100, 64, 18, .32); }
.sm-ticket-head > div { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.sm-ticket-kind { display: flex; align-items: center; gap: 6px; color: #815d20; font-size: .69rem; font-weight: 800; letter-spacing: .05em; }
.sm-ticket-kind i { color: #9a6915; }
.sm-ticket-head strong { color: #38250e; font-size: calc(.94rem * var(--sm-scale)); line-height: 1.3; }
.sm-ticket-head strong i { margin: 0 5px; color: #9a6915; font-size: .72em; }
.sm-ticket-serial { flex: 0 0 auto; color: #765828; font-size: .64rem; font-weight: 800; letter-spacing: .1em; }
.sm-ticket-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 9px 0; border-bottom: 1px solid rgba(100, 64, 18, .28); }
.sm-ticket-status span { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 0 5px; padding: 0 9px; color: #6f5430; font-size: .72rem; line-height: 1.3; }
.sm-ticket-status span + span { border-left: 1px solid rgba(100, 64, 18, .25); }
.sm-ticket-status i { grid-row: 1 / 3; color: #9a6915; }
.sm-ticket-status b { color: #4d3517; font-size: .66rem; }
.sm-ticket-bank { display: grid; grid-template-columns: minmax(12rem, .8fr) minmax(18rem, 1.2fr); align-items: center; gap: 12px; padding-top: 10px; }
.sm-ticket-bank-copy { min-width: 0; padding-inline: 8px; }
.sm-ticket-bank-copy .sm-bank-title { margin: 0; text-align: left; color: #5d431a; font-size: .7rem; font-weight: 800; letter-spacing: .03em; }
.sm-ticket-bank-copy small { display: block; margin-top: 2px; color: #765c34; font-size: .68rem; line-height: 1.35; }
.sm-admission-ticket .sm-bank-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 2px; border-radius: 12px; background: #171a33; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.sm-admission-ticket .sm-bank-option { min-height: 48px; padding: .35rem .55rem; border: 0; border-radius: 10px; background: transparent; color: #bbb9c9; text-align: center; }
.sm-admission-ticket .sm-bank-option strong { color: #e6e1ee; font-size: calc(.86rem * var(--sm-scale)); }
.sm-admission-ticket .sm-bank-option small { color: #aaa5bd; font-size: .68rem; }
.sm-admission-ticket .sm-bank-option:hover { background: rgba(255, 255, 255, .07); }
.sm-admission-ticket .sm-bank-option.is-on { background: #f0cf7d; box-shadow: none; }
.sm-admission-ticket .sm-bank-option.is-on strong { color: #33240e; }
.sm-admission-ticket .sm-bank-option.is-on small { color: #674b1f; }
.sm-ticket-stub {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 10px 8px;
	border-left: 1px dashed rgba(100, 64, 18, .58);
	background: rgba(224, 188, 109, .36);
	text-align: center;
}
.sm-ticket-stub > span { color: #674719; font-size: .58rem; font-weight: 900; letter-spacing: .13em; writing-mode: vertical-rl; }
.sm-ticket-stub > strong { color: #4b3514; font-size: 1.65rem; line-height: 1; }
.sm-ticket-barcode { display: block; width: 48px; height: 19px; background: repeating-linear-gradient(90deg, #3d2b10 0 2px, transparent 2px 4px, #3d2b10 4px 5px, transparent 5px 8px); }
.sm-ticket-stub small { color: #65491e; font-size: .72rem; font-weight: 700; }

.sm-panel {
	min-width: 0;
	background: linear-gradient(180deg, var(--sm-ivory-2) 0%, var(--sm-ivory) 100%);
	color: var(--sm-ink);
	border-radius: var(--sm-panel-radius);
	border: 1px solid rgba(232, 199, 138, .75);
	box-shadow: var(--sm-shadow-panel);
	padding: 1.1rem 1rem;
}
.sm-panel-title {
	margin: 0 0 .2rem;
	text-align: center;
	font-size: calc(1.35rem * var(--sm-scale));
	color: var(--sm-ink);
	letter-spacing: .01em;
}
.sm-panel-sub { margin: 0; text-align: center; color: var(--sm-ink-soft); font-size: calc(.94rem * var(--sm-scale)); }

.sm-queue {
	margin-top: .9rem;
	border-radius: 16px;
	border: 1px dashed rgba(124, 92, 245, .45);
	background: rgba(124, 92, 245, .07);
	padding: .8rem;
	text-align: center;
}
.sm-queue strong { display: block; font-size: calc(1.05rem * var(--sm-scale)); }
.sm-queue-faces { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .6rem; }
.sm-queue-face {
	width: 62px; height: 62px;
	border-radius: 16px;
	overflow: hidden;
	border: 2px solid rgba(232, 199, 138, .8);
	background: var(--sm-night-2);
	position: relative;
}
.sm-queue-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-queue-face b {
	position: absolute; inset: auto 0 0 0;
	background: rgba(13, 6, 32, .82);
	color: var(--sm-gold);
	font-size: .66rem;
	padding: .1rem 0;
	text-align: center;
}

.sm-home-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* เลือกคลังที่จะเล่น (เน้นข้อสอบ / ทั้งคลัง) */
.sm-bank { margin-top: .9rem; }
.sm-bank-title {
	display: block;
	text-align: center;
	font-size: .82rem;
	letter-spacing: .04em;
	color: var(--sm-ink-soft);
	margin-bottom: .4rem;
}
.sm-bank-switch {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: .5rem;
}
.sm-bank-option {
	display: grid;
	gap: .1rem;
	min-height: 60px;
	padding: .55rem .8rem;
	border-radius: 14px;
	border: 1px solid rgba(43, 29, 107, .22);
	background: rgba(43, 29, 107, .05);
	color: var(--sm-ink-soft);
	font: inherit;
	text-align: start;
	cursor: pointer;
	transition: border-color .14s ease, background-color .14s ease, color .14s ease;
}
.sm-bank-option strong { font-size: calc(.98rem * var(--sm-scale)); color: var(--sm-ink); font-weight: 700; }
.sm-bank-option small { font-size: .8rem; }
.sm-bank-option:hover { border-color: rgba(43, 29, 107, .4); }
.sm-bank-option:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-bank-option.is-on {
	border-color: var(--sm-indigo);
	background: rgba(67, 56, 202, .12);
	box-shadow: 0 0 0 1px var(--sm-indigo) inset;
}
.sm-bank-option.is-on strong { color: var(--sm-indigo); }
.sm-bank-note {
	margin: .45rem 0 0;
	text-align: center;
	font-size: .84rem;
	color: var(--sm-ink-soft);
}

/* ศัพท์ตัวอย่างจากตำรา (ใช้ตอนยังไม่มีรูปวิเคราะห์ให้เล่น) */
.sm-book-example {
	margin: .4rem 0 0;
	font-size: calc(.92rem * var(--sm-scale));
	line-height: 1.85;
	color: var(--sm-ink-soft);
}
.sm-book-example b { color: var(--sm-indigo); font-size: calc(1.1rem * var(--sm-scale)); }
.sm-book-example em { font-style: normal; font-size: .8rem; color: var(--sm-gold-dim); }
.sm-def-source { margin: 0; font-size: .78rem; color: var(--sm-gold-dim); }

/* troupe gallery */
.sm-troupe {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
	gap: .6rem;
}
.sm-troupe-card {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid rgba(232, 199, 138, .4);
	background: linear-gradient(180deg, var(--sm-night-3) 0%, var(--sm-night) 100%);
	padding: 0;
	cursor: pointer;
	text-align: center;
	color: var(--sm-ivory);
	transition: transform .14s ease, border-color .14s ease;
}
.sm-troupe-card:hover { transform: translateY(-2px); border-color: var(--sm-gold); }
.sm-troupe-card:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-troupe-card.is-locked { filter: grayscale(.8); opacity: .6; cursor: default; }
.sm-troupe-art { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.sm-troupe-body { padding: .45rem .4rem .6rem; }
.sm-troupe-body strong { display: block; font-size: calc(.86rem * var(--sm-scale)); }
.sm-troupe-body small { display: block; font-size: .72rem; color: var(--sm-gold-dim); }
.sm-troupe-badge {
	position: absolute; top: .4rem; right: .4rem;
	min-width: 28px; height: 28px; padding: 0 .35rem;
	border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center; gap: .15rem;
	font-size: .74rem; font-weight: 700;
	background: rgba(13, 6, 32, .85);
	border: 1px solid rgba(232, 199, 138, .55);
	color: var(--sm-gold);
}
.sm-troupe-badge.is-fluent { background: var(--sm-ok); border-color: #bff0dd; color: #fff; }
.sm-troupe-badge.is-due { background: var(--sm-warn); border-color: #f7dcb4; color: #2b1a02; }

/* venue strip */
.sm-venue { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.sm-venue-row { display: flex; gap: .5rem; align-items: stretch; overflow-x: auto; padding-bottom: .25rem; }
.sm-venue-step {
	flex: 1 1 0;
	min-width: 108px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba(232, 199, 138, .3);
	background: var(--sm-night-2);
	position: relative;
	opacity: .45;
	filter: saturate(.4);
	transition: opacity .2s ease, filter .2s ease;
}
.sm-venue-step.is-open { opacity: 1; filter: none; }
.sm-venue-step.is-current { border-color: var(--sm-gold); box-shadow: 0 0 0 2px rgba(232, 199, 138, .35); }
.sm-venue-step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.sm-venue-step figcaption {
	padding: .3rem .4rem .45rem;
	font-size: .72rem;
	text-align: center;
	color: var(--sm-ivory);
	background: rgba(13, 6, 32, .7);
}
.sm-venue-step figcaption b { display: block; color: var(--sm-gold); font-size: .78rem; }

/* --------------------------------------------------------------- act atlas */

.sm-atlas {
	position: relative;
	min-height: calc(100vh - 58px);
	padding: 1rem .8rem 5.5rem;
}
.sm-atlas-bg {
	position: absolute; inset: 0;
	background-image: var(--sm-atlas-image);
	background-size: cover; background-position: center;
	opacity: .45;
}
.sm-atlas-bg::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(13, 6, 32, .6) 0%, rgba(13, 6, 32, .9) 100%);
}
.sm-atlas-inner { position: relative; max-width: 62rem; margin: 0 auto; }
.sm-atlas-head { text-align: center; margin-bottom: 1rem; }
.sm-atlas-head h1 { margin: .2rem 0; font-size: calc(1.5rem * var(--sm-scale)); }
.sm-atlas-head p { margin: 0 auto; max-width: 40rem; color: #cbc2e6; font-size: calc(.94rem * var(--sm-scale)); }

.sm-act-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.sm-act-card {
	display: grid;
	grid-template-columns: 62px 1fr auto;
	align-items: center;
	gap: .75rem;
	width: 100%;
	text-align: start;
	padding: .7rem .8rem;
	border-radius: 18px;
	border: 1px solid rgba(232, 199, 138, .3);
	background: linear-gradient(100deg, rgba(30, 16, 70, .92) 0%, rgba(13, 6, 32, .92) 100%);
	color: var(--sm-ivory);
	cursor: pointer;
	transition: transform .14s ease, border-color .14s ease;
}
.sm-act-card:hover:not(:disabled) { transform: translateX(2px); border-color: var(--sm-gold); }
.sm-act-card:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-act-card:disabled { cursor: not-allowed; opacity: .5; }
.sm-act-card::before {
	content: "";
	position: absolute;
}
.sm-act-faces { display: flex; }
.sm-act-face {
	width: 54px; height: 54px;
	border-radius: 14px;
	overflow: hidden;
	border: 2px solid var(--sm-act-hue, var(--sm-violet));
	background: var(--sm-night-3);
}
.sm-act-face + .sm-act-face { margin-inline-start: -18px; }
.sm-act-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-act-copy { min-width: 0; }
.sm-act-copy .sm-act-no { font-size: .74rem; color: var(--sm-gold); letter-spacing: .08em; }
.sm-act-copy strong { display: block; font-size: calc(1.06rem * var(--sm-scale)); }
.sm-act-copy small { display: block; color: #b9afd8; font-size: calc(.86rem * var(--sm-scale)); }
.sm-act-teach {
	display: inline-block;
	margin-top: .3rem;
	font-size: .78rem;
	padding: .12rem .55rem;
	border-radius: 999px;
	background: rgba(124, 92, 245, .22);
	border: 1px solid rgba(167, 139, 250, .45);
	color: #ddd3ff;
}
.sm-act-samples { display: none; }
@media (min-width: 720px) {
	/* บนจอกว้าง โชว์บทจริงของงก์นั้น — พื้นที่ว่างเปลี่ยนเป็นการสอน ไม่ใช่ที่โล่ง */
	.sm-act-samples { display: flex; flex-wrap: wrap; gap: .1rem .8rem; margin-top: .35rem; }
	.sm-act-samples b {
		font-size: calc(1.02rem * var(--sm-scale));
		font-weight: 700;
		line-height: 1.7;
		color: #cfc0ff;
	}
}
.sm-act-meter { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .12); margin-top: .45rem; overflow: hidden; }
.sm-act-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--sm-mint), var(--sm-gold)); }
.sm-act-right { display: grid; gap: .3rem; justify-items: end; text-align: end; }
.sm-act-right b { font-size: .8rem; color: var(--sm-gold); white-space: nowrap; }
.sm-act-right em { font-size: .74rem; color: #a99fc9; font-style: normal; }

.sm-special { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; margin-top: 1rem; }
.sm-special-card {
	display: grid; gap: .15rem;
	padding: .75rem .8rem;
	border-radius: 16px;
	border: 1px dashed rgba(232, 199, 138, .45);
	background: rgba(30, 16, 70, .6);
	color: var(--sm-ivory);
	cursor: pointer;
	text-align: start;
}
.sm-special-card:hover { background: rgba(60, 34, 128, .7); }
.sm-special-card:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-special-card strong { font-size: calc(1rem * var(--sm-scale)); }
.sm-special-card small { color: #b9afd8; font-size: .8rem; }

/* --------------------------------------------------------- rehearsal room */

.sm-rehearsal { max-width: 44rem; margin: 0 auto; padding: 1.2rem .8rem 5.5rem; }
.sm-rehearsal .sm-panel + .sm-panel { margin-top: .8rem; }
.sm-teach-row { display: flex; gap: .8rem; align-items: center; }
.sm-teach-art {
	width: 96px; height: 96px; flex: 0 0 auto;
	border-radius: 18px; overflow: hidden;
	border: 2px solid var(--sm-gold);
	background: var(--sm-night-2);
}
.sm-teach-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-teach-copy { min-width: 0; }
.sm-teach-copy h2 { margin: 0 0 .1rem; font-size: calc(1.2rem * var(--sm-scale)); color: var(--sm-ink); }
.sm-teach-copy p { margin: 0; color: var(--sm-ink-soft); font-size: calc(.95rem * var(--sm-scale)); }

.sm-watch {
	display: grid; gap: .4rem;
	margin-top: .8rem;
	padding: .7rem .8rem;
	border-radius: 14px;
	background: rgba(43, 29, 107, .07);
	border: 1px solid rgba(43, 29, 107, .16);
}
.sm-watch-line { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.sm-watch-line dt {
	font-family: "Sarabun", serif;
	font-weight: 700;
	color: var(--sm-ink);
	font-size: calc(1.12rem * var(--sm-scale));
	background: rgba(232, 199, 138, .35);
	padding: .05em .45em;
	border-radius: 8px;
}
.sm-watch-line dd { margin: 0; color: var(--sm-ink-soft); font-size: calc(.92rem * var(--sm-scale)); }
.sm-watch-line dd b { color: var(--sm-indigo); }

/* ------------------------------------------------------------- STAGE (show) */

.sm-stage {
	position: relative;
	min-height: calc(100vh - 58px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.sm-stage-bg {
	position: absolute; inset: 0;
	background-image: var(--sm-stage-image);
	background-size: cover;
	background-position: center 38%;
	z-index: 0;
	transition: filter .45s cubic-bezier(.16, 1, .3, 1);
}
.sm-stage-bg::after {
	content: ""; position: absolute; inset: 0;
	background:
		radial-gradient(ellipse 70% 50% at 50% 22%, rgba(124, 92, 245, .18), transparent 70%),
		linear-gradient(180deg, rgba(13, 6, 32, .72) 0%, rgba(13, 6, 32, .35) 40%, rgba(13, 6, 32, .9) 100%);
}
.sm-stage.is-spot-search .sm-stage-bg { filter: saturate(.72) brightness(.78); }
.sm-stage-pool {
	position: absolute;
	z-index: 1;
	left: 50%;
	bottom: 1.25rem;
	width: min(68vw, 42rem);
	height: min(28vh, 13rem);
	border-radius: 50%;
	background: radial-gradient(ellipse at 50% 72%, rgba(232, 199, 138, .62) 0%, rgba(124, 92, 245, .18) 34%, transparent 70%);
	opacity: .12;
	transform: translateX(-50%) scaleX(.48);
	filter: blur(4px);
	transition: opacity .42s ease, transform .52s cubic-bezier(.16, 1, .3, 1), filter .42s ease;
	pointer-events: none;
}
.sm-stage-pool.is-open { opacity: .52; transform: translateX(-50%) scaleX(1); filter: blur(1px); }
.sm-stage-inner {
	position: relative;
	z-index: 2;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: .7rem;
	width: 100%;
	max-width: 60rem;
	margin: 0 auto;
	padding: .7rem .7rem 5.2rem;
}

/* HUD: applause meter + scene progress + props */
.sm-hud { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sm-applause {
	display: inline-flex; align-items: center; gap: .3rem;
	padding: .35rem .6rem;
	border-radius: 999px;
	background: rgba(13, 6, 32, .72);
	border: 1px solid rgba(232, 199, 138, .35);
}
.sm-applause-hand { font-size: 1.05rem; line-height: 1; filter: grayscale(1); opacity: .35; transition: filter .2s ease, opacity .2s ease, transform .2s ease; }
.sm-applause-hand.is-lit { filter: none; opacity: 1; }
.sm-applause.is-warm .sm-applause-hand.is-lit:last-of-type { transform: scale(1.12); }
.sm-applause-label { font-size: .74rem; color: var(--sm-gold-dim); margin-inline-start: .2rem; }

.sm-scene-dots {
	display: inline-flex;
	gap: .38rem;
	align-items: center;
	padding: .28rem .45rem;
	border-radius: 999px;
	background: rgba(13, 6, 32, .48);
}
.sm-scene-dot {
	width: 10px; height: 10px; border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(232, 199, 138, .3);
	box-shadow: inset 0 0 4px rgba(13, 6, 32, .75);
	transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.sm-scene-dot.is-done { background: var(--sm-mint); box-shadow: 0 0 9px rgba(111, 211, 189, .58); }
.sm-scene-dot.is-now { background: var(--sm-gold); box-shadow: 0 0 12px rgba(232, 199, 138, .8); transform: scale(1.28); }
.sm-scene-dot.is-judge { border-color: var(--sm-coral); }

.sm-props { display: inline-flex; gap: .35rem; margin-inline-start: auto; }
.sm-prop {
	width: 44px; height: 44px;
	border-radius: 12px;
	border: 1px solid rgba(232, 199, 138, .45);
	background: linear-gradient(180deg, var(--sm-ivory-2), #e9dfc7);
	color: var(--sm-ink);
	font-size: 1.05rem;
	cursor: pointer;
	position: relative;
}
.sm-prop:disabled { opacity: .35; cursor: not-allowed; }
.sm-prop:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-prop b {
	position: absolute; bottom: -4px; inset-inline-end: -4px;
	min-width: 17px; height: 17px; border-radius: 999px;
	background: var(--sm-coral); color: #fff;
	font-size: .64rem; line-height: 17px;
}

/* ⭐ ivory Pali panel — พระเอกของทุกฉาก */
.sm-script {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: linear-gradient(180deg, var(--sm-ivory-2) 0%, var(--sm-ivory) 100%);
	border: 1px solid rgba(232, 199, 138, .85);
	border-radius: 26px;
	box-shadow: var(--sm-shadow-deep);
	padding: .85rem 1rem 1rem;
	text-align: center;
	color: var(--sm-ink);
}
.sm-script > :not(.sm-spotlight-beam) { position: relative; z-index: 2; }
.sm-spotlight-beam {
	position: absolute;
	z-index: 1;
	inset: -1px;
	pointer-events: none;
	clip-path: polygon(calc(var(--sm-spot-left) - 5%) 0, calc(var(--sm-spot-left) + 5%) 0, calc(var(--sm-spot-left) + 14%) 100%, calc(var(--sm-spot-left) - 14%) 100%);
	background: linear-gradient(180deg, rgba(255, 239, 190, .48) 0%, rgba(232, 199, 138, .17) 58%, transparent 100%);
	opacity: .82;
	transition: clip-path .18s linear;
}
.sm-spotlight-beam i {
	position: absolute;
	top: -5px;
	left: calc(var(--sm-spot-left) - 17px);
	width: 34px;
	height: 12px;
	border-radius: 4px 4px 10px 10px;
	background: #5d4625;
	box-shadow: 0 5px 16px 4px rgba(255, 221, 151, .7);
	transition: left .18s linear;
}
.sm-script.is-spot-locked { box-shadow: 0 18px 46px -24px rgba(232, 199, 138, .7); }
.sm-script-kicker {
	margin: 0 0 .35rem;
	font-size: calc(.9rem * var(--sm-scale));
	color: var(--sm-ink-soft);
	letter-spacing: .01em;
}
.sm-script-kicker b { color: var(--sm-indigo); }
.sm-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-end;
	gap: .3rem .45rem;
	/* พื้นที่ว่างเหนือ-ใต้อักษรไทย/บาลี ให้พินทุกับนิคคหิตไม่ชนกัน */
	padding: .35rem .1rem .5rem;
}
.sm-chip {
	position: relative;
	font-size: calc(1.9rem * var(--sm-scale));
	font-weight: 700;
	line-height: 1.55;
	color: var(--sm-ink);
	background: none;
	border: 0;
	padding: .04em .28em;
	border-radius: 12px;
	cursor: default;
	transition: color .16s ease, background-color .16s ease, transform .16s ease;
}
.sm-chip.is-tappable { cursor: pointer; min-height: 44px; min-width: 44px; padding-block: .1em; }
.sm-chip.is-tappable:hover { background: rgba(232, 199, 138, .28); }
.sm-chip:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-chip.is-dimmed { color: #a49cba; }
/* สปอตไลต์กวาด: ไฮไลต์เฉพาะคำ ไม่ระบายทั้งบรรทัด */
.sm-chip.is-lit {
	background: radial-gradient(ellipse at 50% 55%, rgba(232, 199, 138, .95) 0%, rgba(232, 199, 138, .35) 60%, transparent 100%);
	color: #1b1147;
}
.sm-chip.is-locked {
	background: linear-gradient(180deg, rgba(255, 214, 133, .95), rgba(240, 190, 110, .9));
	color: #1b1147;
	box-shadow: 0 0 0 2px rgba(232, 199, 138, .8), 0 8px 22px -12px rgba(232, 199, 138, .9);
}
.sm-chip.is-wrong { animation: sm-chip-nudge .28s ease; }
@keyframes sm-chip-nudge { 0%, 100% { transform: none; } 35% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }
.sm-chip-mark {
	position: absolute; inset-inline: 0; bottom: .1em;
	height: 3px; border-radius: 999px;
	background: var(--sm-coral);
}

.sm-sweep {
	height: 6px;
	margin: .1rem auto .1rem;
	max-width: 22rem;
	border-radius: 999px;
	background: rgba(43, 29, 107, .14);
	position: relative;
	overflow: hidden;
}
.sm-sweep i {
	position: absolute; top: 0; bottom: 0;
	width: 22px; border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--sm-gold), transparent);
	transition: left .18s linear;
}
/* ⚠ ต้องเป็น flex (บล็อก) ไม่ใช่ inline-flex
   ของเดิมทั้งคำสำเร็จและบัตรออกสอบเป็น inline-flex จึงเรียงชิดกันในบรรทัดเดียว
   แล้วบัตรที่เอียง -.5deg กับพื้นทึบไปทับตัวอักษรท้ายคำแปล (หลวงพี่เจอบนมือถือ ๑๒ ส.ค. ๒๕๖๙) */
.sm-script-word {
	display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; justify-content: center;
	margin-top: .3rem;
}
.sm-script-word b { font-size: calc(1.5rem * var(--sm-scale)); color: var(--sm-indigo); line-height: 1.5; }
.sm-script-word span { color: var(--sm-ink-soft); font-size: calc(.95rem * var(--sm-scale)); }
.sm-exam-tag {
	display: inline-flex; align-items: center; gap: .3rem;
	margin-top: .45rem;
	font-size: .78rem;
	padding: .22rem .7rem;
	border-radius: 6px;
	background:
		linear-gradient(90deg, rgba(138, 82, 16, .08) 1px, transparent 1px) 0 0 / 6px 100%,
		#f3dfb5;
	border: 1px dashed rgba(138, 82, 16, .5);
	color: #78501b;
	transform: rotate(-.5deg);
	max-width: 100%;
	flex-wrap: wrap;
	justify-content: center;
}
/* บัตรออกสอบในแผงบท = บรรทัดของตัวเอง ไม่ไปชิดคำแปล */
.sm-script > .sm-exam-tag {
	display: flex;
	width: max-content;
	margin-inline: auto;
}

.sm-judge-tag {
	display: inline-flex; align-items: center; gap: .35rem;
	font-size: .8rem; font-weight: 700;
	padding: .2rem .7rem;
	border-radius: 999px;
	background: linear-gradient(180deg, #f0806e, #d1594a);
	color: #fff;
	box-shadow: 0 6px 16px -8px rgba(240, 128, 110, .9);
}

/* task label — บอกตรง ๆ ว่าต้องทำอะไร */
.sm-task {
	display: flex; align-items: center; justify-content: center; gap: .45rem;
	font-size: calc(1rem * var(--sm-scale));
	font-weight: 600;
	color: #ffe9bd;
	text-align: center;
	max-width: 40ch;
	margin-inline: auto;
	text-wrap: balance;
}
.sm-task i { color: var(--sm-gold); }
.sm-task.is-choose {
	background: linear-gradient(180deg, rgba(232, 199, 138, .22), rgba(232, 199, 138, .06));
	border: 1px solid rgba(232, 199, 138, .5);
	border-radius: 999px;
	padding: .45rem 1rem;
	color: #fff5df;
}

/* pods + cast */
.sm-pods {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	gap: .5rem;
	align-items: end;
}
.sm-pods.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-cast-cue {
	position: relative;
	z-index: 3;
	grid-column: 1 / -1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	margin: 0 auto -.3rem;
	padding: .28rem .7rem;
	border-radius: 999px;
	background: rgba(13, 6, 32, .78);
	color: #bdb3d8;
	font-size: calc(.78rem * var(--sm-scale));
}
.sm-cast-cue i { color: var(--sm-gold-dim); }
.sm-pods.is-waiting::before {
	content: "";
	position: absolute;
	z-index: 2;
	inset: 1.8rem 0 0;
	background:
		linear-gradient(90deg, rgba(13, 6, 32, .9) 0%, rgba(30, 16, 70, .58) 34%, transparent 49%, transparent 51%, rgba(30, 16, 70, .58) 66%, rgba(13, 6, 32, .9) 100%);
	pointer-events: none;
}
.sm-pod {
	position: relative;
	display: grid;
	justify-items: center;
	gap: .2rem;
	padding: 0 0 .5rem;
	border: 0;
	background: none;
	color: var(--sm-ivory);
	cursor: pointer;
	border-radius: 18px;
	transition: transform .16s ease;
}
.sm-pod:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-pod:disabled { cursor: not-allowed; }
.sm-pod-figure {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 34vh;
	/* ตัวละครถ่ายบนฉากครามไล่มืด — ไล่ขอบให้กลืนเวที ไม่เห็นขอบภาพ */
	-webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 44%, #000 58%, transparent 100%);
	mask-image: radial-gradient(ellipse 72% 78% at 50% 44%, #000 58%, transparent 100%);
	filter: saturate(.9) brightness(.86);
	transition: filter .2s ease, transform .2s ease;
}
.sm-pod-figure img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sm-pod.is-selected .sm-pod-figure,
.sm-pod:hover:not(:disabled) .sm-pod-figure { filter: none; transform: translateY(-3px); }
.sm-pod-ring {
	width: 78%;
	height: 12px;
	border-radius: 50%;
	background: radial-gradient(ellipse at 50% 50%, var(--sm-pod-hue, var(--sm-violet)) 0%, transparent 72%);
	opacity: .5;
	transition: opacity .2s ease, transform .2s ease;
}
.sm-pod.is-selected .sm-pod-ring { opacity: 1; transform: scaleX(1.08); }
.sm-pod-name {
	font-size: calc(.86rem * var(--sm-scale));
	font-weight: 700;
	text-shadow: 0 2px 8px rgba(6, 3, 18, .95);
}
.sm-pod-sadhana {
	font-size: .74rem;
	color: var(--sm-gold);
	background: rgba(13, 6, 32, .7);
	border-radius: 999px;
	padding: .05rem .5rem;
	border: 1px solid rgba(232, 199, 138, .3);
}
.sm-pod.is-dimmed { opacity: .32; filter: grayscale(.7); }

/* ช่วงค้นคำ นักแสดงรอหลังม่าน — ลดการแข่งขันกับบทบาลีที่กำลังสอน */
.sm-pods.is-waiting .sm-pod { opacity: .46; transform: translateY(10px) scale(.96); }
.sm-pods.is-waiting .sm-pod-figure { filter: saturate(.18) brightness(.38); }
.sm-pods.is-waiting .sm-pod-ring { opacity: .16; transform: scaleX(.7); }
.sm-pods.is-waiting .sm-pod-name,
.sm-pods.is-waiting .sm-pod-sadhana { opacity: .38; }

/* ล็อกคำถูกแล้ว: ม่านเปิดทีละตัวจากกลางเวที ก่อนรับ focus เพื่อเลือกสาธนะ */
.sm-pods.is-revealed .sm-pod {
	animation: sm-cast-reveal .58s cubic-bezier(.16, 1, .3, 1) both;
	animation-delay: calc(var(--sm-pod-index, 0) * 70ms);
}
@keyframes sm-cast-reveal {
	0% { opacity: .3; clip-path: inset(0 44% 0 44%); transform: translateY(18px) scale(.94); filter: brightness(.42); }
	100% { opacity: 1; clip-path: inset(0); transform: none; filter: none; }
}

/* ⭐ ถึงตาเลือกแล้ว — ไฟใต้เท้าสว่างขึ้นทั้งสามตัว ให้รู้ทันทีว่ากดได้
   (หลวงพี่ท้วง ๑๒ ส.ค. ๒๕๖๙ ว่าขั้นนี้เงียบไป ไม่รู้ว่าให้กดอะไร) */
.sm-pod.is-live .sm-pod-figure { filter: none; }
.sm-pod.is-live .sm-pod-ring { opacity: 1; transform: scaleX(1.06); }
.sm-pod.is-live .sm-pod-sadhana { border-color: var(--sm-gold); color: #ffe9bd; }
.sm-pod.is-live::before {
	content: "";
	position: absolute;
	inset: 4% 2% 0;
	border-radius: 22px;
	border: 1px solid rgba(232, 199, 138, .45);
	background:
		linear-gradient(180deg, rgba(232, 199, 138, .16) 0%, rgba(232, 199, 138, .04) 45%, transparent 100%);
	pointer-events: none;
	animation: sm-pod-ready 1.9s ease-in-out infinite;
}
@keyframes sm-pod-ready {
	0%, 100% { opacity: .5; }
	50% { opacity: 1; }
}
.sm-pod.is-live:hover::before,
.sm-pod.is-live:focus-visible::before { opacity: 1; animation: none; border-color: var(--sm-gold); }

/* เฉลยด้วยไฟ: เขียว = ถูก · แดง = ตัวที่กดผิด */
.sm-pod.is-correct::before,
.sm-pod.is-picked-wrong::before {
	content: "";
	position: absolute;
	inset: 4% 2% 0;
	border-radius: 22px;
	pointer-events: none;
	animation: none;
}
.sm-pod.is-correct::before {
	border: 2px solid var(--sm-ok);
	background: linear-gradient(180deg, rgba(52, 166, 132, .3) 0%, rgba(52, 166, 132, .08) 55%, transparent 100%);
	box-shadow: 0 0 24px -4px rgba(52, 166, 132, .8);
}
.sm-pod.is-picked-wrong::before {
	border: 2px solid var(--sm-coral);
	background: linear-gradient(180deg, rgba(240, 128, 110, .3) 0%, rgba(240, 128, 110, .08) 55%, transparent 100%);
	box-shadow: 0 0 24px -4px rgba(240, 128, 110, .8);
}
.sm-pod.is-correct .sm-pod-figure,
.sm-pod.is-picked-wrong .sm-pod-figure { filter: none; }
.sm-pod.is-correct .sm-pod-ring {
	background: radial-gradient(ellipse at 50% 50%, var(--sm-ok) 0%, transparent 72%);
	opacity: 1; transform: scaleX(1.12);
}
.sm-pod.is-picked-wrong .sm-pod-ring {
	background: radial-gradient(ellipse at 50% 50%, var(--sm-coral) 0%, transparent 72%);
	opacity: 1;
}
.sm-pod.is-correct .sm-pod-sadhana { background: var(--sm-ok); color: #fff; border-color: #bff0dd; }
.sm-pod.is-picked-wrong .sm-pod-sadhana { background: var(--sm-coral); color: #fff; border-color: #f7cfc8; }
.sm-pod-badge {
	position: absolute; top: .2rem; inset-inline-end: .2rem;
	font-size: .7rem;
	padding: .1rem .45rem;
	border-radius: 999px;
	background: var(--sm-gold);
	color: #2b1a02;
	font-weight: 700;
}

/* choices */
.sm-choices { display: grid; gap: .5rem; }
.sm-choices.is-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.sm-choices.sm-casting-choices {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: .65rem;
	width: 100%;
}
.sm-choice {
	display: flex; align-items: center; gap: .5rem;
	min-height: 48px;
	width: 100%;
	padding: .6rem .85rem;
	border-radius: 14px;
	border: 1px solid rgba(232, 199, 138, .4);
	background: linear-gradient(180deg, rgba(253, 249, 239, .96), rgba(240, 232, 214, .94));
	color: var(--sm-ink);
	font: inherit;
	font-size: calc(1rem * var(--sm-scale));
	font-weight: 600;
	cursor: pointer;
	text-align: start;
	transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.sm-casting-choices .sm-choice {
	justify-content: center;
	min-height: 56px;
	padding-inline: .7rem;
	text-align: center;
}
.sm-casting-choices .sm-choice-mark { margin-inline-start: 0; }
.sm-casting-pods { width: 100%; }
.sm-casting-pods .sm-pod { min-width: 0; }
.sm-choice:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px -14px rgba(6, 3, 18, .9); }
.sm-choice:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-choice.is-correct { background: linear-gradient(180deg, #d6f4e8, #b6e9d5); border-color: var(--sm-ok); }
.sm-choice.is-wrong { background: linear-gradient(180deg, #fbdcd6, #f6c6bd); border-color: var(--sm-coral); }
.sm-choice.is-dimmed { opacity: .38; }
.sm-choice.is-picked { box-shadow: 0 0 0 2px var(--sm-indigo) inset; }
.sm-choice-mark { margin-inline-start: auto; font-size: 1rem; }
.sm-choice-pali { font-size: calc(1.24rem * var(--sm-scale)); line-height: 1.6; color: var(--sm-indigo); }

/* whisper / feedback */
.sm-whisper {
	display: grid; gap: .3rem;
	padding: .7rem .85rem;
	border-radius: 14px;
	border: 1px solid rgba(232, 199, 138, .45);
	background: rgba(30, 16, 70, .82);
	font-size: calc(.94rem * var(--sm-scale));
	color: #efe6ff;
}
.sm-whisper.is-correct { border-color: rgba(52, 166, 132, .6); background: rgba(18, 62, 50, .85); }
.sm-whisper.is-wrong { border-color: rgba(240, 128, 110, .6); background: rgba(74, 26, 24, .85); }
.sm-whisper strong { display: flex; align-items: center; gap: .4rem; color: var(--sm-gold); }
.sm-whisper.is-correct strong { color: #8fe3c6; }
.sm-whisper.is-wrong strong { color: #f6b8ae; }
.sm-whisper p { margin: 0; }
.sm-whisper .sm-verbatim { color: var(--sm-gold); font-weight: 700; }

/* ปุ่มหลักอยู่ต่อจากคำตอบทันที (สายตาอยู่ตรงนั้น) แล้วปล่อยพื้นเวทีที่เหลือไว้ด้านล่าง */
.sm-stage-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: .4rem 0 auto; }

/* ไฟหน้าเวทีสะท้อนเสียงปรบมือ — อยู่ในพื้นที่กันชนล่าง ไม่ทับปุ่ม */
.sm-footlights {
	position: absolute;
	z-index: 3;
	inset: auto 0 0;
	height: 4.3rem;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: clamp(.65rem, 2.2vw, 1.45rem);
	padding: 0 .8rem .65rem;
	background: linear-gradient(180deg, transparent, rgba(5, 2, 16, .72));
	pointer-events: none;
}
.sm-footlights i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #493d5f;
	box-shadow: 0 0 0 3px rgba(13, 6, 32, .72);
	opacity: .5;
	transition: background-color .24s ease, box-shadow .32s ease, opacity .24s ease, transform .32s cubic-bezier(.16, 1, .3, 1);
}
.sm-footlights i.is-lit { background: var(--sm-gold); box-shadow: 0 0 18px 5px rgba(232, 199, 138, .45); opacity: 1; }
.sm-footlights.is-cue i.is-lit { transform: translateY(-2px); }
.sm-footlights.is-bright i.is-lit { box-shadow: 0 0 24px 8px rgba(232, 199, 138, .58); }

/* --------------------------------------------------------- ฉากแฝด (twin) */

.sm-twin { display: grid; gap: .6rem; }
.sm-twin-teach {
	text-align: center;
	font-size: calc(.92rem * var(--sm-scale));
	color: #ddd3ff;
	background: rgba(124, 92, 245, .16);
	border: 1px dashed rgba(167, 139, 250, .5);
	border-radius: 12px;
	padding: .5rem .7rem;
}
.sm-twin-rows { display: grid; gap: .5rem; }
.sm-twin-row {
	display: grid;
	grid-template-columns: 76px 1fr;
	gap: .6rem;
	align-items: center;
	padding: .5rem .6rem;
	border-radius: 16px;
	border: 1px solid rgba(232, 199, 138, .3);
	background: rgba(13, 6, 32, .75);
}
.sm-twin-row.is-active { border-color: var(--sm-gold); box-shadow: 0 0 0 2px rgba(232, 199, 138, .3); }
.sm-twin-row.is-correct { border-color: var(--sm-ok); }
.sm-twin-row.is-wrong { border-color: var(--sm-coral); }
.sm-twin-trainee {
	width: 76px; height: 76px;
	border-radius: 14px; overflow: hidden;
	background: var(--sm-night-3);
	position: relative;
	border: 1px solid rgba(255, 255, 255, .12);
}
.sm-twin-trainee img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-twin-trainee .sm-twin-worn {
	position: absolute; inset: 0;
	display: grid; place-items: center;
	background: rgba(13, 6, 32, .55);
}
.sm-twin-worn img { width: 74%; height: 74%; object-fit: contain; }
.sm-twin-script { min-width: 0; }
.sm-twin-script .sm-twin-pali {
	font-size: calc(1.24rem * var(--sm-scale));
	font-weight: 700;
	line-height: 1.6;
	color: var(--sm-ivory-2);
}
.sm-twin-script .sm-twin-clue { color: var(--sm-gold); }
.sm-twin-script small { display: block; color: #b3a9d4; font-size: .8rem; }
.sm-twin-bank { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.sm-mask-token {
	width: 66px; height: 66px;
	border-radius: 16px;
	overflow: hidden;
	border: 2px solid rgba(232, 199, 138, .5);
	background: var(--sm-night-3);
	cursor: grab;
	padding: 0;
	position: relative;
}
.sm-mask-token:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-mask-token.is-held { border-color: var(--sm-gold); transform: scale(1.06); }
.sm-mask-token.is-used { opacity: .3; cursor: default; }
.sm-mask-token img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-mask-token span {
	position: absolute; inset: auto 0 0 0;
	background: rgba(13, 6, 32, .85);
	color: var(--sm-gold);
	font-size: .6rem;
	padding: .05rem 0;
	text-align: center;
}

/* ------------------------------------------------------- ต่อบท (form drill) */

.sm-form { display: grid; gap: .55rem; }
.sm-form-pattern {
	font-size: calc(.88rem * var(--sm-scale));
	color: #ddd3ff;
	background: rgba(124, 92, 245, .14);
	border-radius: 12px;
	padding: .5rem .7rem;
	border: 1px solid rgba(167, 139, 250, .35);
}
.sm-form-line {
	display: flex; flex-wrap: wrap; gap: .3rem;
	justify-content: center;
	padding: .5rem;
	border-radius: 14px;
	background: rgba(253, 249, 239, .96);
	border: 1px solid rgba(232, 199, 138, .7);
}
.sm-form-slot {
	display: grid; gap: .1rem; justify-items: center;
	padding: .2rem .45rem;
	border-radius: 10px;
	min-width: 3.4rem;
	border: 1px dashed rgba(43, 29, 107, .3);
}
.sm-form-slot.is-filled { border-style: solid; border-color: var(--sm-ok); background: rgba(52, 166, 132, .1); }
.sm-form-slot.is-current { border-color: var(--sm-gold); background: rgba(232, 199, 138, .22); border-style: solid; }
.sm-form-slot b { color: var(--sm-ink); font-size: calc(1rem * var(--sm-scale)); min-height: 1.5em; }
.sm-form-slot small { font-size: .66rem; color: var(--sm-ink-soft); letter-spacing: .02em; }
.sm-form-slot.is-yoga b { color: var(--sm-indigo); }

/* -------------------------------------------- ดูชุดรู้ปัจจัย (costume) */

.sm-costume { display: grid; gap: .55rem; }
.sm-trace {
	display: flex; justify-content: center; gap: .02em;
	font-size: calc(2.1rem * var(--sm-scale));
	font-weight: 700;
	line-height: 1.55;
	color: var(--sm-ink);
	padding: .3rem .2rem .5rem;
}
.sm-trace span { position: relative; padding: 0 .01em; }
.sm-trace span.is-mark { color: #a03a29; }
.sm-trace span.is-mark::after {
	content: "";
	position: absolute; inset-inline: -.06em; bottom: .12em;
	height: 4px; border-radius: 999px;
	background: var(--sm-coral);
}
.sm-trace-note { font-size: calc(.9rem * var(--sm-scale)); color: var(--sm-ink-soft); text-align: center; }
.sm-trace-note b { color: var(--sm-indigo); }

/* ------------------------------------------------------- ขานนาม (curtain) */

.sm-curtain { display: grid; gap: .55rem; }
.sm-curtain-fields { display: grid; gap: .45rem; }
.sm-field {
	display: grid;
	grid-template-columns: 5.6rem 1fr;
	align-items: center;
	gap: .5rem;
	padding: .45rem .6rem;
	border-radius: 12px;
	border: 1px solid rgba(232, 199, 138, .3);
	background: rgba(13, 6, 32, .68);
}
.sm-field.is-current { border-color: var(--sm-gold); box-shadow: 0 0 0 2px rgba(232, 199, 138, .28); }
.sm-field.is-done { border-color: var(--sm-ok); }
.sm-field-label { font-size: .84rem; color: var(--sm-gold-dim); }
.sm-field-value { font-size: calc(1rem * var(--sm-scale)); font-weight: 600; color: var(--sm-ivory-2); min-height: 1.4em; }
.sm-field-value.is-pending { color: #7f759f; font-weight: 400; }

.sm-answer-sheet {
	background: linear-gradient(180deg, var(--sm-ivory-2), var(--sm-ivory));
	border-radius: 16px;
	border: 1px solid rgba(232, 199, 138, .8);
	padding: .75rem .85rem;
	color: var(--sm-ink);
	display: grid;
	gap: .35rem;
}
.sm-answer-sheet h3 { margin: 0; font-size: calc(1rem * var(--sm-scale)); color: var(--sm-indigo); }
.sm-answer-sheet .sm-answer-pali { font-size: calc(1.3rem * var(--sm-scale)); font-weight: 700; line-height: 1.6; }
.sm-answer-sheet .sm-answer-trans { font-size: calc(1rem * var(--sm-scale)); line-height: 1.75; }
.sm-answer-sheet .sm-answer-label { font-weight: 700; color: #a03a29; }
.sm-answer-sheet dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; font-size: calc(.92rem * var(--sm-scale)); }
.sm-answer-sheet dt { color: var(--sm-ink-soft); }
.sm-answer-sheet dd { margin: 0; font-weight: 600; }

/* --------------------------------------------------------- arena (สนามจริง) */

.sm-arena-form { display: grid; gap: .5rem; }
/* ป้ายช่องอยู่บนแผงงาช้าง จึงต้องเป็นหมึกคราม ไม่ใช่ทองซีด (คอนทราสต์ไม่ผ่าน) */
.sm-arena-form label { display: grid; gap: .2rem; font-size: calc(.88rem * var(--sm-scale)); font-weight: 600; color: var(--sm-ink-soft); }
.sm-arena-form textarea,
.sm-arena-form input {
	font: inherit;
	font-size: calc(1rem * var(--sm-scale));
	padding: .55rem .7rem;
	border-radius: 12px;
	border: 1px solid rgba(232, 199, 138, .4);
	background: rgba(253, 249, 239, .96);
	color: var(--sm-ink);
	width: 100%;
	min-height: 46px;
}
.sm-arena-form textarea { min-height: 5.5rem; line-height: 1.8; resize: vertical; }
.sm-arena-form input:focus-visible,
.sm-arena-form textarea:focus-visible { outline: none; box-shadow: var(--sm-focus); }
.sm-selfcheck { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }

/* ------------------------------------------------------- ม่านปิด (results) */

.sm-result { max-width: 40rem; margin: 0 auto; padding: 1.2rem .8rem 5.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.sm-ovation { display: flex; gap: .4rem; justify-content: center; font-size: 1.8rem; }
.sm-ovation span { filter: grayscale(1); opacity: .3; }
.sm-ovation span.is-lit { filter: none; opacity: 1; }
.sm-result-list { display: grid; gap: .4rem; }
.sm-result-row {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: .5rem;
	padding: .45rem .6rem;
	border-radius: 12px;
	background: rgba(43, 29, 107, .06);
	border: 1px solid rgba(43, 29, 107, .12);
}
.sm-result-row .sm-result-pali { font-weight: 700; color: var(--sm-ink); font-size: calc(1.08rem * var(--sm-scale)); line-height: 1.6; }
.sm-result-row small { display: block; color: var(--sm-ink-soft); font-size: .8rem; }
.sm-status-pill {
	font-size: .74rem; font-weight: 700;
	padding: .16rem .6rem;
	border-radius: 999px;
	white-space: nowrap;
}
.sm-status-pill.is-collected { background: rgba(67, 56, 202, .14); color: var(--sm-indigo); }
.sm-status-pill.is-due { background: rgba(217, 131, 36, .16); color: #8a5210; }
.sm-status-pill.is-fluent { background: rgba(52, 166, 132, .16); color: #14654f; }
.sm-status-pill.is-new { background: rgba(91, 80, 128, .14); color: var(--sm-ink-soft); }

.sm-poster {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid rgba(232, 199, 138, .5);
	background-image: var(--sm-poster-image);
	background-size: cover; background-position: center;
	min-height: 12rem;
	display: grid; place-content: center;
	text-align: center;
	padding: 1.5rem 1rem;
}
.sm-poster::before { content: ""; position: absolute; inset: 0; background: rgba(13, 6, 32, .5); }
.sm-poster > * { position: relative; }
.sm-poster h2 { margin: 0; font-size: calc(1.4rem * var(--sm-scale)); color: var(--sm-gold); }
.sm-poster p { margin: .3rem 0 0; color: var(--sm-ivory); }

/* ---------------------------------------------------------- ห้องคัมภีร์ */

.sm-scripture { max-width: 44rem; margin: 0 auto; padding: 1.2rem .8rem 5.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.sm-def-card { display: grid; gap: .5rem; }
.sm-def-q { font-weight: 700; color: var(--sm-indigo); font-size: calc(1.02rem * var(--sm-scale)); }
.sm-def-lines { display: grid; gap: .35rem; }
.sm-def-line {
	padding: .45rem .6rem;
	border-radius: 10px;
	background: rgba(43, 29, 107, .06);
	font-size: calc(1rem * var(--sm-scale));
	line-height: 1.85;
}
.sm-def-line.is-hidden { color: transparent; background: rgba(43, 29, 107, .16); -webkit-user-select: none; user-select: none; }
.sm-def-line.is-hidden::after { content: "แตะเพื่อเปิด"; color: var(--sm-ink-soft); font-size: .82rem; }
.sm-gap-note {
	font-size: .86rem;
	color: #8a5210;
	background: rgba(217, 131, 36, .12);
	border: 1px dashed rgba(217, 131, 36, .5);
	border-radius: 12px;
	padding: .55rem .7rem;
}

/* --------------------------------------------------------------- responsive */

@media (min-width: 720px) {
	.sm-stage-inner { padding: 1rem 1rem 2rem; gap: .9rem; }
	.sm-chip { font-size: calc(2.3rem * var(--sm-scale)); }
	.sm-act-card { grid-template-columns: 86px 1fr auto; }
	.sm-act-face { width: 66px; height: 66px; }
	.sm-field { grid-template-columns: 6.4rem 1fr; }
	.sm-troupe { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
	.sm-admission-ticket { grid-template-columns: minmax(0, 1fr); }
	.sm-ticket-stub {
		min-height: 56px;
		flex-direction: row;
		justify-content: flex-start;
		gap: 12px;
		padding: 8px 18px;
		border-left: 0;
		border-top: 1px dashed rgba(100, 64, 18, .58);
		text-align: left;
	}
	.sm-ticket-stub > span { writing-mode: horizontal-tb; }
	.sm-ticket-stub > strong { font-size: 1.35rem; }
}

@media (max-width: 560px) {
	.sm-casting-choices { gap: .35rem; }
	.sm-casting-choices .sm-choice { min-height: 48px; padding-inline: .35rem; font-size: calc(.92rem * var(--sm-scale)); }
	.sm-sync span:not([class]) { display: none; }
	.sm-sync { padding: .3rem .5rem; }
	.sm-applause-label { display: none; }
	.sm-brand { min-width: 0; padding-inline-end: .55rem; }
	.sm-brand strong { display: block; max-width: 9.4rem; overflow: hidden; text-overflow: ellipsis; }
	.sm-settings-panel { position: fixed; top: 64px; right: .6rem; width: calc(100vw - 1.2rem); }
	.sm-settings-panel::before { right: 16px; }
	.sm-home { padding: .7rem .7rem 5.5rem; }
	.sm-home-hero { padding: .8rem .25rem .1rem; }
	.sm-home-hero h1 { font-size: clamp(2.15rem, calc(12vw * var(--sm-scale)), 3.25rem); }
	.sm-home-hero > p { margin-top: .55rem; font-size: calc(.92rem * var(--sm-scale)); }
	.sm-home-facts { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sm-home-facts > div { padding: .6rem .4rem; }
	.sm-hero-queue { align-items: flex-start; font-size: calc(.84rem * var(--sm-scale)); }
	.sm-hero-actions .sm-btn-go { flex-basis: 100%; max-width: 16rem; }
	.sm-ticket-face { padding: 11px 12px 12px; }
	.sm-ticket-head { align-items: flex-start; gap: 8px; }
	.sm-ticket-status { grid-template-columns: minmax(0, 1fr); padding-block: 5px; }
	.sm-ticket-status span { min-height: 38px; grid-template-columns: 22px 5.4rem minmax(0, 1fr); padding: 4px 6px; }
	.sm-ticket-status span + span { border-left: 0; border-top: 1px solid rgba(100, 64, 18, .18); }
	.sm-ticket-status i { grid-row: auto; }
	.sm-ticket-status b { font-size: .68rem; }
	.sm-ticket-bank { grid-template-columns: minmax(0, 1fr); gap: 7px; }
	.sm-ticket-bank-copy { padding-inline: 4px; }
	.sm-admission-ticket .sm-bank-option { min-height: 52px; }
}

@media (max-width: 420px) {
	.sm-chip { font-size: calc(1.55rem * var(--sm-scale)); }
	.sm-script { padding: .7rem .6rem .8rem; border-radius: 20px; }
	.sm-pods.is-three { gap: .3rem; }
	.sm-pod-name { font-size: calc(.76rem * var(--sm-scale)); }
	.sm-pod-sadhana { font-size: .66rem; padding: .05rem .35rem; }
	.sm-brand strong { font-size: calc(.85rem * var(--sm-scale)); }
	.sm-field { grid-template-columns: 4.6rem 1fr; }
	.sm-trace { font-size: calc(1.7rem * var(--sm-scale)); }
	.sm-setting-row { grid-template-columns: minmax(0, 1fr); }
	.sm-stepper { width: 100%; grid-template-columns: 44px minmax(0, 1fr) 44px; }
	.sm-sound-grid { grid-template-columns: minmax(0, 1fr); }
	.sm-sound-toggle { min-height: 48px; grid-template-columns: 24px minmax(0, 1fr) auto; }
	.sm-sound-toggle i { grid-row: auto; }
	.sm-sound-toggle b { font-size: .7rem; }
	.sm-ticket-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
	.sm-ticket-head > div { display: grid; gap: 3px; }
}

/* ----------------------------------------------- calm mode + reduced motion */

body.sm-calm .sm-stage-bg { opacity: .35; }
body.sm-calm .sm-stage-bg::after { background: linear-gradient(180deg, rgba(13, 6, 32, .9), rgba(13, 6, 32, .95)); }
body.sm-calm .sm-pod-ring { opacity: .3; }
body.sm-calm .sm-home-bg,
body.sm-calm .sm-atlas-bg { opacity: .22; }
body.sm-calm .sm-stage-pool { opacity: .08; }
body.sm-calm .sm-stage-pool.is-open { opacity: .24; }
body.sm-calm .sm-spotlight-beam { opacity: .4; }
body.sm-calm .sm-footlights i.is-lit { box-shadow: 0 0 10px 2px rgba(232, 199, 138, .28); }

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.sm-sweep i { transition: none; }
	.sm-pods.is-revealed .sm-pod { animation: none; }
}
body.sm-reduced .sm-sweep { display: none; }
body.sm-reduced .sm-chip.is-lit { background: rgba(232, 199, 138, .5); }
body.sm-reduced .sm-spotlight-beam { display: none; }
body.sm-reduced .sm-stage-pool,
body.sm-reduced .sm-footlights i { transition: none; }
body.sm-reduced .sm-pods.is-revealed .sm-pod { animation: none; }
