/* KARIS — ธีมม่วง-ขาว: แถบหัวม่วง, พื้นขาว, การ์ดขาวขอบม่วงอ่อน */
:root {
  --ink: #221A33;
  --muted: #6B6080;
  --bg: #FFFFFF;
  --field: #FBF9FE;
  --surface: #FFFFFF;
  --line: #E4D9F5;
  --violet: #6D28D9;
  --violet-deep: #4C1D95;
  --violet-soft: #F3EDFD;
  --on-violet: #FFFFFF;
  --on-accent: #FFFFFF;
  --ok: #1F7A55;  --ok-soft: #E2F4EB;
  --warn: #9A5B00; --warn-soft: #FDF0D9;
  --bad: #B3261E; --bad-soft: #FBE4E2;
  --font-display: 'Mitr', 'Sarabun', system-ui, sans-serif;
  --font-body: 'Sarabun', 'Leelawadee UI', 'Tahoma', system-ui, sans-serif;
  --font-data: 'IBM Plex Mono', ui-monospace, monospace;
  --r: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.3; text-wrap: balance; margin: 0; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.08rem; }
p { margin: 0; }
.wrap { max-width: 860px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* แถบหัว */
.masthead { background: linear-gradient(120deg, var(--violet-deep), var(--violet)); color: var(--on-violet); }
.masthead .wrap { display: flex; align-items: center; gap: 14px; padding-block: 18px; flex-wrap: wrap; }
.mark { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.12); display: grid; place-items: center;
  font-family: var(--font-data); font-weight: 600; font-size: .95rem; line-height: 1; text-align: center; flex: none; }
.mark small { display: block; font-size: .55rem; opacity: .8; font-weight: 400; }
.masthead .t { flex: 1; min-width: 0; }
.masthead .t p { font-size: .9rem; opacity: .82; }
.masthead a { color: var(--on-violet); font-size: .9rem; }

/* ตัวบอกขั้นตอน */
.steps { display: flex; gap: 6px; padding-block: 16px; overflow-x: auto; list-style: none; margin: 0; }
.steps li { flex: 1 0 auto; display: flex; flex-direction: column; gap: 6px; font-size: .78rem; color: var(--muted); min-width: 74px; }
.steps li::before { content: ''; height: 5px; border-radius: 3px; background: var(--line); }
.steps li.done::before, .steps li.on::before { background: var(--violet); }
.steps li.on { color: var(--ink); font-weight: 600; }

main { padding-block: 8px 64px; }
.page { display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.eyebrow { font-size: .8rem; letter-spacing: .06em; color: var(--violet); font-weight: 600; text-transform: uppercase; }
.lead { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--violet); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card > h3 { display: flex; gap: 10px; align-items: baseline; }
.qn { font-family: var(--font-data); font-size: .8rem; color: var(--violet); background: var(--violet-soft); padding: 2px 8px; border-radius: 6px; flex: none; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid > .field-wide { grid-column: 1 / -1; }
.field label .hint { font-weight: 400; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .lbl { font-size: .92rem; font-weight: 600; }
.req::after { content: ' *'; color: var(--bad); }
input[type=text], input[type=number], input[type=tel], input[type=date], input[type=datetime-local], input[type=password], select, textarea {
  font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--field); color: var(--ink); width: 100%; min-width: 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .opt:focus-within { outline: 3px solid var(--violet); outline-offset: 1px; }
.hint { font-size: .85rem; color: var(--muted); }

/* ตัวเลือกแบบปุ่ม */
.opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.opts.row { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
.opt { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); font-size: .96rem; line-height: 1.4; }
.opt input { margin: 3px 0 0; accent-color: var(--violet); flex: none; width: 17px; height: 17px; }
.opt small { display: block; color: var(--muted); font-size: .82rem; }
.opt:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }
.opts.row .opt { justify-content: center; padding: 10px 6px; }
.opts.row .opt input { position: absolute; opacity: 0; }
/* ตัวเลือกที่มีไอคอน: ไอคอนด้านบน ข้อความด้านล่าง ช่องติ๊กอยู่มุมซ้ายบน */
.opt.has-ico { flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 14px 10px 12px; gap: 6px; }
.opt.has-ico input { position: absolute; top: 9px; left: 9px; margin: 0; }
.opt .ico { display: flex; align-items: center; justify-content: center; min-width: 54px; height: 54px; padding: 0 10px; border-radius: 16px; background: var(--violet-soft); color: var(--violet); }
.opt .ico svg { height: 32px; width: auto; max-width: 100%; }
.opt:has(input:checked) .ico { background: var(--surface); }
.h-ico { display: inline-flex; vertical-align: -6px; margin-left: 8px; color: var(--violet); }
.h-ico svg { width: 24px; height: 24px; }
.opt.yes:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); }
.opt.no:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }

.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input { width: 110px; }

/* ปุ่ม */
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 20px; cursor: pointer; background: var(--violet); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nav .btn:last-child { margin-left: auto; }

.note { border-radius: 10px; padding: 12px 14px; font-size: .92rem; background: var(--violet-soft); }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.bad { background: var(--bad-soft); }
.source-credit { font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.err { color: var(--bad); font-size: .9rem; }
.infographic { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; border-radius: 10px; }
.infographic.wide { max-width: 860px; }
.note-info { border-top: 1px dashed var(--line); padding-top: 10px; line-height: 1.55; }
a.zoom { display: block; cursor: zoom-in; }
.centers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.centers li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.centers li:last-child { border-bottom: 0; }
.centers a { font-family: var(--font-data); font-weight: 600; color: var(--violet); white-space: nowrap; text-decoration: none; }
.centers a::before { content: "☎ "; }

/* แผนที่ */
#map { height: 300px; border-radius: 10px; border: 1px solid var(--line); background: var(--violet-soft); cursor: crosshair; }
.pin { background: none; border: 0; filter: drop-shadow(0 2px 2px rgba(40,10,80,.35)); }
.place-search input { flex: 1; width: auto; min-width: 0; }
.place-results { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.place-item { font: inherit; font-size: .9rem; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.place-item:last-child { border-bottom: 0; }
.place-item:hover, .place-item:focus-visible { background: var(--violet-soft); }
.place-results .hint { padding: 10px 12px; }
.coords { font-family: var(--font-data); font-size: .85rem; }

/* ผลประเมิน */
.verdict { border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 6px; border: 1.5px solid; }
.verdict.ok { background: var(--ok-soft); border-color: var(--ok); }
.verdict.bad { background: var(--bad-soft); border-color: var(--bad); }
/* กล่อง "ความเสี่ยงนี้เกิดขึ้นเมื่อใด?" */
.when-note { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); background: #FEF6DC; border: 1px solid #F6E3A6; }
.when-note h3 { margin-bottom: 4px; }
.when-note p + p { margin-top: 6px; }
.when-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #FDE68A; color: #92400E; }
.when-ico svg { width: 24px; height: 24px; }
.when-key { color: var(--bad); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* ภาพจุด X ต่อ 10,000 คน */
.dots-fig { margin: 4px 0 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; width: 100%; max-width: 340px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: #E4DCF3; }
.dots i.on { background: var(--bad); }
.dots-fig figcaption { display: flex; flex-direction: column; align-items: center; text-align: center; }
.dots-fig b { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--bad); }
.dots-fig span { font-size: .85rem; color: var(--muted); }
.meters { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.meter .big { font-family: var(--font-data); font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; font-size: .72rem; color: var(--muted); text-align: center; }
.scale span { padding-top: 8px; border-top: 6px solid var(--line); }
.scale span.on { color: var(--ink); font-weight: 700; }
.scale span:nth-child(1).on, .scale span:nth-child(2).on { border-color: var(--ok); }
.scale span:nth-child(3).on { border-color: var(--warn); }
.scale span:nth-child(4).on, .scale span:nth-child(5).on { border-color: var(--bad); }
.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.mute { background: var(--violet-soft); color: var(--violet); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 54px; gap: 10px; align-items: center; font-size: .92rem; }
.bar-row .track { height: 12px; border-radius: 6px; background: var(--violet-soft); overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--violet); border-radius: 6px; }
.bar-row .pct { font-family: var(--font-data); text-align: right; font-variant-numeric: tabular-nums; }
.bar-row small { grid-column: 1 / -1; color: var(--muted); margin-top: -8px; font-family: var(--font-data); font-size: .76rem; }
.formula { font-family: var(--font-data); font-size: .82rem; color: var(--muted); overflow-x: auto; white-space: nowrap; }
.advice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; margin: 0; list-style: none; }
.advice li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.advice b { font-family: var(--font-display); font-weight: 500; }
.advice .do { color: var(--ok); font-size: .8rem; font-weight: 700; } .advice .dont { color: var(--bad); font-size: .8rem; font-weight: 700; }

/* ตาราง (หลังบ้าน) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .78rem; color: var(--violet-deep); font-weight: 600; letter-spacing: .03em; background: var(--violet-soft); }
tbody tr { cursor: pointer; } tbody tr:hover { background: var(--violet-soft); }
td.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { background: var(--violet-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.kpi b { display: block; color: var(--violet-deep); font-family: var(--font-data); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .85rem; color: var(--muted); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100%); background: var(--surface); border-left: 1px solid var(--line);
  overflow-y: auto; padding: 20px; padding-top: calc(20px + env(safe-area-inset-top, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 14px; box-shadow: -20px 0 40px rgba(20,10,40,.18); z-index: 10; }
dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; font-size: .92rem; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.log { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
footer { font-size: .82rem; color: var(--muted); padding-block: 24px; border-top: 1px solid var(--line); }

@media (max-width: 520px) {
  body { font-size: 16px; } .card { padding: 16px; } .masthead h1 { font-size: 1.22rem; }
  .bar-row { grid-template-columns: 96px 1fr 46px; } dl.kv { grid-template-columns: 1fr; } dl.kv dt { margin-top: 6px; }
}
@media (prefers-reduced-motion: no-preference) { .page { animation: rise .25s ease-out; } @keyframes rise { from { transform: translateY(6px); } to { transform: none; } } }
.coords input { width: 10.5em; }

/* ===== ป๊อปอัป "รู้ก่อนประเมิน" ===== */
body.intro-open { overflow: hidden; }
.intro-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
  background: rgba(34, 26, 51, .62);
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.intro-box { width: 100%; max-width: 920px; max-height: 100%; display: flex; flex-direction: column; background: var(--surface);
  border-radius: 16px; border-top: 4px solid var(--violet); box-shadow: 0 24px 60px rgba(34, 26, 51, .35); overflow: hidden; position: relative; }
.intro-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer;
  box-shadow: 0 2px 8px rgba(34, 26, 51, .15); }
.intro-x:hover { background: var(--violet-soft); color: var(--violet); }
.intro-x svg { width: 22px; height: 22px; }
.intro-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.intro-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  border-top: 1px solid var(--line); background: var(--surface); flex: none; }
.intro-foot .btn { min-width: 160px; font-size: 1.05rem; padding: 13px 28px; }
.intro-foot .hint { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
  .intro-modal { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .intro-foot { flex-direction: column-reverse; align-items: stretch; gap: 6px; text-align: center; }
  .intro-foot .btn { width: 100%; }
}

/* เนื้อหาในป๊อปอัป (อินโฟกราฟิกแบบตัวหนังสือ) */
.ib { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 22px 22px 18px; font-size: .97rem; line-height: 1.6; }
.ib h2, .ib h3, .ib h4 { margin: 0; }
.ib p, .ib ul { margin: 0; }
.ib-wide, .ib-head { grid-column: 1 / -1; }
.ib-head { display: grid; grid-template-columns: 1fr minmax(0, 300px); gap: 18px; align-items: center; }
.ib-head h2 { font-size: 1.55rem; color: var(--violet-deep); margin: 6px 0 6px; }
.ib-head p { color: var(--muted); }
.ib-tag { display: inline-block; font-size: .82rem; font-weight: 700; color: var(--violet); background: var(--violet-soft); padding: 3px 12px; border-radius: 999px; }
.ib-art { width: 100%; height: auto; display: block; }
.ib-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #FBF9FE; min-width: 0; }
.ib-card.ib-col { flex-direction: column; }
.ib-card h3, .ib-note h3 { font-size: 1.12rem; color: var(--ink); margin-bottom: 4px; }
.ib-h { display: flex; align-items: center; gap: 10px; }
.ib-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--violet), #8B5CF6); }
.ib-ico.sm { width: 36px; height: 36px; }
.ib-ico svg { width: 24px; height: 24px; }
.ib-ico.sm svg { width: 20px; height: 20px; }
.ib-i { display: inline-flex; color: var(--violet); flex: none; }
.ib-i svg { width: 20px; height: 20px; }
.ib-food { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.ib-food li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 12px; background: #EFEDFA; font-weight: 700; }
.ib-food img { height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.ib-time { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; width: 100%; }
.ib-time > div { background: #EFEDFA; border-radius: 12px; padding: 12px; height: 100%; }
.ib-time h4 { display: flex; align-items: center; gap: 6px; color: var(--violet); font-size: 1.05rem; margin-bottom: 4px; }
.ib-arrow { display: inline-flex; color: var(--ink); }
.ib-arrow svg { width: 22px; height: 22px; }
.ib-checks { list-style: none; padding: 0; margin-top: 8px !important; display: grid; gap: 8px; }
.ib-checks li { display: flex; gap: 8px; align-items: flex-start; }
.ib-checks .ib-i { margin-top: 3px; }
.ib-checks b { display: block; }
.ib-note { padding: 16px 18px; border-radius: 14px; background: #FEF6DC; border: 1px solid #F6E3A6; }
.ib-note h3 { display: flex; align-items: center; gap: 8px; }
.ib-warn { display: inline-flex; color: #D97706; }
.ib-warn svg { width: 26px; height: 26px; }
.ib-note ul { padding-left: 1.3em; display: grid; gap: 4px; }
.ib-note li::marker { color: var(--violet); }
@media (max-width: 720px) {
  .ib { grid-template-columns: 1fr; padding: 16px 14px; gap: 12px; }
  .ib-head { grid-template-columns: 1fr; }
  .ib-head .ib-art { max-width: 260px; margin: 0 auto; order: -1; }
  .ib-head h2 { font-size: 1.3rem; }
  .ib-time { grid-template-columns: 1fr; }
  .ib-arrow { justify-self: center; transform: rotate(90deg); }
  .ib-food { gap: 6px; }
  .ib-food li { font-size: .9rem; }
}

/* ช่องค้นหาตำบล (ข้อ 1.2) */
.addr-search { position: relative; }
.addr-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 1200; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(34, 26, 51, .16);
  max-height: 300px; overflow-y: auto; }
.addr-list li { padding: 9px 12px; border-radius: 8px; cursor: pointer; line-height: 1.4; }
.addr-list li span { color: var(--muted); margin-left: 6px; }
.addr-list li[aria-selected="true"], .addr-list li:hover { background: var(--violet-soft); }
.addr-list li b { color: var(--ink); font-weight: 600; }
.addr-list .addr-none { cursor: default; color: var(--muted); }
.addr-list .addr-none:hover { background: none; }

/* แบบประเมินที่ทำค้างไว้ */
.draft-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--violet); }
.draft-banner b { display: block; color: var(--violet-deep); }
.draft-banner span { font-size: .9rem; color: var(--muted); }
.draft-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* อ้างอิงเนื้อหา (สีแดงชัดเจน) */
.ref-red { margin: 18px 0 4px; color: #D11A1A; font-weight: 700; font-size: 1rem; text-align: right; }

/* ข้อความแปลผล Cancer Risk / HI ในหน้าผล (ส่วนที่ 4) */
.lvl-msg { margin: 8px 0 10px; font-weight: 700; font-size: 1rem; line-height: 1.5; }
.lvl-msg.ok { color: #15803D; }
.lvl-msg.mid { color: #15803D; }
.lvl-msg.bad { color: var(--bad); }

/* ===== สัมภาษณ์ด้วยเสียง (เจ้าหน้าที่) ===== */
.rec { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rec-time { font-family: var(--font-data); font-size: 1.4rem; font-variant-numeric: tabular-nums; color: var(--violet-deep); }
#rec-play { width: 100%; }
.rec-bar { height: 8px; border-radius: 999px; background: var(--violet-soft); overflow: hidden; }
.rec-bar span { display: block; height: 100%; width: 0; background: var(--violet); transition: width .4s; }
.rec-guide summary { cursor: pointer; }
.rec-guide ol { margin: 8px 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 10px; }
.rec-guide ul { margin: 4px 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .92rem; }
.transcript { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.transcript p { margin: 0; line-height: 1.6; }
.transcript .ts { font-family: var(--font-data); font-size: .78rem; color: var(--muted); }
.spk { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: .8rem; }
.spk0 { background: var(--violet-soft); color: var(--violet-deep); }
.spk1 { background: var(--ok-soft); color: var(--ok); }
.spk2 { background: var(--warn-soft); color: var(--warn); }
.spk3 { background: var(--bad-soft); color: var(--bad); }
.rec-pick { align-items: center; border-style: dashed; }
.rec-pick:focus-within { border-color: var(--violet); }
.rec-pick small { overflow-wrap: anywhere; }
.rec-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--bad); vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) { .rec-dot { animation: blink 1s infinite; } @keyframes blink { 50% { opacity: .25; } } }
.rec-guide summary { cursor: pointer; list-style: none; }
.rec-guide summary::-webkit-details-marker { display: none; }
.rec-guide summary h3 { margin: 0; display: flex; gap: 10px; align-items: baseline; }
.rec-guide summary h3::after { content: '▾'; margin-left: auto; padding-left: 8px; color: var(--muted); }
.rec-guide[open] summary h3::after { content: '▴'; }
.rec-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 11; border-radius: 999px; box-shadow: 0 6px 18px rgba(20,10,40,.25); }
#rec-drawer .nav { align-items: center; } #rec-drawer h3 { margin: 0; } #rec-drawer .transcript { max-height: none; }
#rec-drawer[hidden], .rec-fab[hidden] { display: none; }
.ai-sum { white-space: pre-line; line-height: 1.6; margin: 8px 0; }
.ai-ev { margin: 6px 0 0; color: var(--violet-deep); }
#ai-body ul { margin: 6px 0 0; padding-left: 1.2rem; }
