/* Rzmong Clinical Hub – palet medis lembut, mobile-first, mode gelap. */
:root {
  --bg: #f4f8f8; --surface: #ffffff; --surface-2: #eef5f4; --text: #11302e; --muted: #5a716f; --border: #d6e4e2;
  --primary: #0f766e; --primary-2: #14b8a6; --primary-soft: #ccfbf1; --focus: #f59e0b;
  --hijau: #15803d; --hijau-bg: #dcfce7; --kuning: #a16207; --kuning-bg: #fef9c3; --oranye: #c2410c; --oranye-bg: #ffedd5;
  --merah: #b91c1c; --merah-bg: #fee2e2; --biru: #1d4ed8; --biru-bg: #dbeafe;
  --hijau-s: #22c55e; --kuning-s: #eab308; --oranye-s: #f97316; --merah-s: #ef4444; --biru-s: #3b82f6;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 48, 46, .06), 0 4px 16px rgba(16, 48, 46, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1514; --surface: #12201f; --surface-2: #182a28; --text: #e3f1ef; --muted: #9db5b2; --border: #26403d;
  --primary: #2dd4bf; --primary-2: #5eead4; --primary-soft: #134e4a;
  --hijau: #4ade80; --hijau-bg: #12301f; --kuning: #facc15; --kuning-bg: #33300f; --oranye: #fb923c; --oranye-bg: #3a2312;
  --merah: #f87171; --merah-bg: #3b1616; --biru: #93c5fd; --biru-bg: #172a46;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; font-size: 16px; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; white-space: pre-wrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.muted { color: var(--muted); font-size: .92rem; }
[hidden] { display: none !important; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .45rem; color: var(--text); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand b { color: var(--primary); }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 900; }
[data-theme="dark"] .logo { color: #062421; }
.search { position: relative; flex: 1 1 260px; order: 3; min-width: 0; }
.search input { width: 100%; padding: .62rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 1rem; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); max-height: 70vh; overflow: auto; z-index: 40; }
.search-results li { padding: 0; }
.search-results li.muted { padding: .6rem; }
.search-results a { display: flex; flex-direction: column; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; color: var(--text); }
.search-results a small { color: var(--muted); }
.search-results a:hover, .search-results a.sel { background: var(--primary-soft); }
.icon-btn { margin-left: auto; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
@media (min-width: 760px) { .search { order: 0; max-width: 520px; } .icon-btn { margin-left: 0; } }

/* Navigasi: baris grup utama (muat di 360px tanpa geser) + baris sub-tab grup aktif */
.cat-nav { position: sticky; top: var(--topbar-h, 57px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
@media (max-width: 759px) { .cat-nav { top: var(--topbar-h, 105px); } }
.nav-main { display: flex; gap: .1rem; padding: .3rem .25rem; max-width: 1180px; margin: 0 auto; }
.nav-grp { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .3rem 0; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: .68rem; letter-spacing: -.01em; font-weight: 600; line-height: 1.15; -webkit-tap-highlight-color: transparent; }
.nav-ic { font-size: 1.25rem; line-height: 1.2; }
.nav-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lbl-long { display: none; }
.nav-grp:hover { background: var(--surface-2); color: var(--text); }
.nav-grp[aria-current] { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 -3px 0 var(--primary); }
.nav-sub { display: flex; gap: .4rem; padding: .35rem .6rem .45rem; border-top: 1px solid var(--border); background: var(--surface-2); justify-content: center; flex-wrap: wrap; }
.nav-sub a { padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: .88rem; background: var(--surface); white-space: nowrap; }
.nav-sub a[aria-current="page"] { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
[data-theme="dark"] .nav-sub a[aria-current="page"] { color: #062421; }
@media (min-width: 760px) {
  .nav-main { gap: .35rem; padding: .45rem .8rem; justify-content: center; }
  .nav-grp { flex: 0 1 auto; flex-direction: row; gap: .35rem; padding: .38rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .92rem; font-weight: 500; }
  .nav-ic { font-size: 1rem; }
  .lbl-long { display: inline; } .lbl-short { display: none; }
  .nav-grp[aria-current] { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: none; font-weight: 600; }
  [data-theme="dark"] .nav-grp[aria-current] { color: #062421; }
}
.cat-grp { color: var(--muted); font-weight: 600; font-size: .85em; }

main { max-width: 1180px; margin: 0 auto; padding: 1rem .8rem 2rem; outline: none; }
main:focus, main:focus-visible { outline: none; }
.hero { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-radius: var(--radius); padding: 1.3rem 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
[data-theme="dark"] .hero { color: #052522; }
.hero h1 { font-size: 1.55rem; }
.hero p { margin: 0; opacity: .95; }
.sec-title { margin: 1.4rem 0 .6rem; }
.page-head { margin-bottom: 1rem; }
.page-head p { margin: .2rem 0 .5rem; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-card { display: flex; flex-direction: column; gap: .2rem; padding: .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .12s; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--primary-2); }
.cat-card .ic { font-size: 1.6rem; }
.cat-card small { color: var(--muted); }

.calc-list { display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr); } .calc-card { min-width: 0; }
@media (min-width: 760px) { .calc-list { grid-template-columns: repeat(2, 1fr); } }
.calc-card { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.calc-card:hover { border-color: var(--primary-2); background: var(--surface-2); }
.calc-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.calc-card small { color: var(--muted); font-size: .82rem; }
.calc-card .ic { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .82rem; }
.calc-card.special .ic { font-size: 1.3rem; }
.calc-card .ic.pr1 { background: var(--merah-bg); color: var(--merah); }
.calc-card .ic.pr2 { background: var(--biru-bg); color: var(--biru); }
.calc-card .ic.pr3 { background: var(--surface-2); color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.c-hijau { background: var(--hijau-bg); color: var(--hijau); border-color: transparent; }
.badge.c-kuning { background: var(--kuning-bg); color: var(--kuning); border-color: transparent; }
.badge.c-oranye { background: var(--oranye-bg); color: var(--oranye); border-color: transparent; }
.badge.c-merah { background: var(--merah-bg); color: var(--merah); border-color: transparent; }
.badge.c-biru { background: var(--biru-bg); color: var(--biru); border-color: transparent; }

/* Kalkulator */
.calc { display: grid; gap: 1rem; }
@media (min-width: 900px) { .calc { grid-template-columns: minmax(320px, 5fr) 6fr; align-items: start; } .calc-out { position: sticky; top: calc(var(--stick-h, 104px) + 16px); } .calc.compact .calc-out { position: static; } }
.calc-form { margin: 0; }
.form-head { display: flex; justify-content: space-between; align-items: center; }
.btn-ghost { border: 1px solid var(--border); background: transparent; color: var(--primary); padding: .35rem .7rem; border-radius: 8px; cursor: pointer; font-size: .88rem; }
.field { margin: 0 0 .85rem; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .3rem; padding: 0; }
.unit { font-weight: 500; color: var(--muted); font-size: .85rem; }
.num-row { display: flex; gap: .6rem; align-items: center; }
.num-row input[type=range] { flex: 1; min-width: 0; }
input[type=number], input[type=time], select { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 1rem; font-variant-numeric: tabular-nums; }
.num-row input[type=number] { width: 7.2rem; flex: 0 0 auto; text-align: right; font-weight: 600; }
input[type=range] { accent-color: var(--primary); height: 28px; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.field.invalid input[type=number] { border-color: var(--merah); background: var(--merah-bg); }
.field.invalid .hint { color: var(--merah); font-weight: 600; }
.check label { display: flex; gap: .5rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: 0 0 auto; }
.segmented { display: flex; flex-wrap: wrap; gap: .35rem; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: block; padding: .45rem .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: .9rem; }
.segmented input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
[data-theme="dark"] .segmented input:checked + span { color: #062421; }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.score-list { display: grid; gap: .3rem; }
.score-list label { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface-2); position: relative; }
.score-list input { position: absolute; opacity: 0; }
.score-list .pts { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; }
.score-list label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.score-list label:has(input:checked) .pts { background: var(--primary); color: #fff; border-color: var(--primary); }
.score-list label:has(input:focus-visible) { outline: 3px solid var(--focus); }

/* Hasil */
.result { border-radius: var(--radius); padding: 1rem; border: 2px solid; margin-bottom: 1rem; background: var(--surface); }
.result.c-hijau { border-color: var(--hijau-s); background: linear-gradient(var(--hijau-bg), var(--surface) 70%); }
.result.c-kuning { border-color: var(--kuning-s); background: linear-gradient(var(--kuning-bg), var(--surface) 70%); }
.result.c-oranye { border-color: var(--oranye-s); background: linear-gradient(var(--oranye-bg), var(--surface) 70%); }
.result.c-merah { border-color: var(--merah-s); background: linear-gradient(var(--merah-bg), var(--surface) 70%); }
.result.c-biru { border-color: var(--biru-s); background: linear-gradient(var(--biru-bg), var(--surface) 70%); }
.res-label { font-size: .9rem; color: var(--muted); font-weight: 600; }
.res-value { font-size: 2.3rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.res-value small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.res-level { margin-top: .3rem; font-size: .95rem; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; background: currentColor; }
.c-hijau .res-level, .c-hijau .m-sub { color: var(--hijau); } .c-kuning .res-level, .c-kuning .m-sub { color: var(--kuning); }
.c-oranye .res-level, .c-oranye .m-sub { color: var(--oranye); } .c-merah .res-level, .c-merah .m-sub { color: var(--merah); } .c-biru .res-level, .c-biru .m-sub { color: var(--biru); }
.res-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: .8rem 0 0; }
.res-list div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .45rem .6rem; }
.res-list dt { font-size: .78rem; color: var(--muted); }
.res-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.res-list dd small { font-weight: 500; color: var(--muted); }
.alert { margin: .6rem 0 0; padding: .55rem .7rem; border-radius: 10px; font-size: .9rem; }
.alert.c-merah { background: var(--merah-bg); color: var(--merah); } .alert.c-biru { background: var(--biru-bg); color: var(--biru); }
.alert.c-kuning { background: var(--kuning-bg); color: var(--kuning); } .alert.c-oranye { background: var(--oranye-bg); color: var(--oranye); }
.alert a { color: inherit; font-weight: 700; }

.gauge { position: relative; margin: 1rem 0 .4rem; padding-top: 22px; }
.gauge-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; }
.seg { height: 100%; opacity: .85; }
.seg.c-hijau { background: var(--hijau-s); } .seg.c-kuning { background: var(--kuning-s); } .seg.c-oranye { background: var(--oranye-s); } .seg.c-merah { background: var(--merah-s); } .seg.c-biru { background: var(--biru-s); }
.gauge-marker { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.gauge-marker span { font-size: .72rem; font-weight: 700; background: var(--text); color: var(--surface); padding: 0 .35rem; border-radius: 6px; white-space: nowrap; }
.gauge-marker::after { content: ""; width: 3px; height: 20px; background: var(--text); border-radius: 2px; margin-top: 1px; }
.gauge-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: .2rem; }

details.info { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .1rem .9rem; margin-bottom: .6rem; }
details.info > summary { cursor: pointer; font-weight: 700; padding: .65rem 0; list-style-position: outside; }
details.info[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: .5rem; }
details.info.steps { border-color: var(--primary-2); }
details.info.steps ol { padding-left: 1.3rem; }
details.info.steps li { margin-bottom: .35rem; font-variant-numeric: tabular-nums; }
.formula { padding-left: 1.1rem; } .formula li { margin-bottom: .35rem; }
.interp { width: 100%; border-collapse: collapse; } .interp td { padding: .35rem .3rem; border-bottom: 1px solid var(--border); vertical-align: top; font-size: .92rem; }
.interp .badge { white-space: normal; }
.cites { padding-left: 1.2rem; font-size: .9rem; } .cites li { margin-bottom: .45rem; word-break: break-word; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { border: 1px solid var(--border); padding: .35rem .45rem; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--surface-2); }
.tbl.sofa th { background: var(--surface-2); white-space: nowrap; text-transform: capitalize; }
.table-wrap { overflow-x: auto; }
.tables-grid { display: grid; gap: 1rem; } @media (min-width: 900px) { .tables-grid { grid-template-columns: 1fr 1fr; } }

/* Luka bakar */
.burn-grid { display: grid; gap: 1rem; } @media (min-width: 960px) { .burn-grid { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.body-fig { margin: 0; text-align: center; }
.body-fig figcaption { font-weight: 700; font-size: .88rem; margin-bottom: .2rem; }
.body-fig svg { width: 100%; max-width: 230px; height: auto; touch-action: manipulation; }
.side-lbl { font-size: 10px; fill: var(--muted); font-weight: 700; letter-spacing: .05em; }
.region { cursor: pointer; --frac: 0; }
.region > * { fill: var(--surface-2); stroke: var(--muted); stroke-width: 1.3; transition: fill .15s; }
.region.on > * { fill: color-mix(in srgb, #ef4444 calc(25% + var(--frac) * 70%), var(--surface-2)); stroke: var(--merah); }
.region.hl > * { stroke: var(--primary); stroke-width: 3; }
.region:focus { outline: none; } .region:focus-visible > * { stroke: var(--focus); stroke-width: 3.5; }
.hover-info { min-height: 1.5em; font-size: .92rem; background: var(--surface-2); padding: .45rem .6rem; border-radius: 8px; }
.row-actions { display: flex; justify-content: flex-end; margin: .4rem 0; }
.sel-list { list-style: none; padding: 0; margin: 0; } .sel-list li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.sel-list li span { flex: 1; } .sel-list small { color: var(--muted); }
.btn-x { border: 0; background: var(--merah-bg); color: var(--merah); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.big-tbsa .res-value { font-size: 2.8rem; }
.timeline24 { position: relative; display: flex; border-radius: 12px; overflow: visible; margin: 1.6rem 0 .6rem; }
.timeline24 > div:not(.now) { display: flex; flex-direction: column; padding: .55rem .6rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.t8 { background: var(--oranye-bg); color: var(--oranye); border-radius: 12px 0 0 12px; border: 2px solid var(--oranye-s); }
.t16 { background: var(--biru-bg); color: var(--biru); border-radius: 0 12px 12px 0; border: 2px solid var(--biru-s); border-left: 0; }
.timeline24 .now { position: absolute; top: -22px; bottom: -4px; width: 0; border-left: 3px dashed var(--text); }
.timeline24 .now span { position: absolute; top: 0; left: 4px; font-size: .72rem; white-space: nowrap; font-weight: 700; }

/* Infus */
.drug-picker { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .5rem .85rem; border-radius: 999px; cursor: pointer; font-size: .92rem; }
.chip[aria-checked="true"] { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
[data-theme="dark"] .chip[aria-checked="true"] { color: #062421; }
.conc-row { display: grid; grid-template-columns: 1fr 5.5rem 1fr auto; gap: .5rem; align-items: end; }
.conc-row .unit { padding-bottom: 1.25rem; }
.conc-out { background: var(--surface-2); padding: .5rem .7rem; border-radius: 10px; margin: 0 0 .8rem; }
.two-way { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: end; }
.two-way .swap { font-size: 1.5rem; color: var(--primary); padding-bottom: .9rem; }
.field.big input { font-size: 1.5rem; font-weight: 800; padding: .55rem .6rem; text-align: right; }
.dose-slider { width: 100%; }

/* Komposisi */
.body-grid { display: grid; gap: 1rem; } @media (min-width: 960px) { .body-grid { grid-template-columns: 340px 1fr; align-items: start; } .body-grid > form { position: sticky; top: calc(var(--stick-h, 104px) + 16px); max-height: calc(100vh - var(--stick-h, 104px) - 36px); overflow: auto; } }
.metrics { display: grid; gap: .8rem; } @media (min-width: 640px) { .metrics { grid-template-columns: 1fr 1fr; } }
.metrics > .alert { grid-column: 1 / -1; margin: 0; }
.metric { background: var(--surface); border: 1px solid var(--border); border-left: 6px solid; border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); }
.metric.c-hijau { border-left-color: var(--hijau-s); } .metric.c-kuning { border-left-color: var(--kuning-s); } .metric.c-oranye { border-left-color: var(--oranye-s); } .metric.c-merah { border-left-color: var(--merah-s); } .metric.c-biru { border-left-color: var(--biru-s); }
.metric header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.metric h3 { font-size: .95rem; margin: 0; }
.metric .more { font-size: .82rem; text-decoration: none; white-space: nowrap; }
.m-value { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; text-transform: capitalize; }
.m-value small { font-size: .9rem; color: var(--muted); font-weight: 600; text-transform: none; }
.m-sub { font-size: .88rem; }
.hbars { display: grid; gap: .3rem; margin-top: .6rem; }
.hbar { display: grid; grid-template-columns: 7.5rem 1fr 4.8rem; gap: .4rem; align-items: center; font-size: .82rem; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.track { position: relative; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.fill { position: absolute; inset: 0 auto 0 0; background: var(--primary-2); border-radius: 999px; }
.hbar.hl .fill { background: var(--oranye-s); } .hbar.hl .hl-lbl { font-weight: 700; }

/* Luka */
.wtl { position: relative; height: 180px; margin: .5rem 0 0; background: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), var(--border) calc(12.5% - 1px) 12.5%); border-radius: 10px; }
.wtl-bar { position: absolute; height: 38px; border-radius: 10px; border: 2px solid; cursor: pointer; font-weight: 700; font-size: .82rem; text-align: left; padding: 0 .5rem; color: var(--text); opacity: .55; overflow: visible; white-space: nowrap; }
.wtl-bar span { position: relative; z-index: 1; }
.wtl-bar.c-merah { background: var(--merah-bg); border-color: var(--merah-s); } .wtl-bar.c-oranye { background: var(--oranye-bg); border-color: var(--oranye-s); }
.wtl-bar.c-hijau { background: var(--hijau-bg); border-color: var(--hijau-s); } .wtl-bar.c-biru { background: var(--biru-bg); border-color: var(--biru-s); }
.wtl-bar.active { opacity: 1; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--primary-2); }
.wtl-now { position: absolute; top: -6px; bottom: -6px; border-left: 3px solid var(--text); pointer-events: none; }
.wtl-axis { position: relative; height: 22px; font-size: .7rem; color: var(--muted); margin-bottom: .6rem; }
.wtl-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.wtl-axis span:first-child { transform: none; } .wtl-axis span:last-child { transform: translateX(-100%); }
input.wide { width: 100%; }
.phase-detail { display: grid; gap: .5rem; margin-top: .6rem; }
.phase { border-radius: 12px; padding: .7rem .9rem; border-left: 6px solid; background: var(--surface-2); }
.phase.c-merah { border-color: var(--merah-s); } .phase.c-oranye { border-color: var(--oranye-s); } .phase.c-hijau { border-color: var(--hijau-s); } .phase.c-biru { border-color: var(--biru-s); }
.phase h3 small { font-weight: 500; color: var(--muted); }
.phase p { margin: .2rem 0 0; }
.factors { display: grid; gap: 1rem; } @media (min-width: 700px) { .factors { grid-template-columns: 1fr 1fr; } }
.chk { display: flex; gap: .5rem; padding: .3rem 0; cursor: pointer; } .chk input { width: 18px; height: 18px; accent-color: var(--primary); }
.time-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.time-card { background: var(--surface-2); border-radius: 12px; padding: .7rem; } .time-card b { font-size: 1.4rem; color: var(--primary); } .time-card p { margin: .2rem 0 0; font-size: .9rem; }
.stage-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stage-card { background: var(--surface-2); border-radius: 12px; padding: .8rem; } .stage-card p { margin: .2rem 0 0; font-size: .9rem; }
.layers { display: grid; grid-template-rows: 10px 18px 22px 16px; border-radius: 8px; overflow: hidden; margin-bottom: .5rem; border: 1px solid var(--border); }
.layer-legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; font-size: .8rem; }
.layer-legend .ly { padding: .15rem .5rem; border-radius: 6px; color: #3b2a20; }
.ly-epi { background: #f6d5c3; } .ly-der { background: #eab9a0; } .ly-fat { background: #f9e7a6; } .ly-mus { background: #d98b84; }
.layers .st-1 { background: #f08a7a; } .layers .st-2 { background: repeating-linear-gradient(45deg, #b91c1c 0 4px, #7f1d1d 4px 8px); }
.layers .st-3 { background: #c9b26b; } .layers .st-4 { background: #6b2147; }
.guide li { margin-bottom: .4rem; } .guide-dl div { margin-bottom: .5rem; } .guide-dl dt { font-weight: 700; } .guide-dl dd { margin: 0; }
.gcs-grid { display: grid; gap: .8rem; } @media (min-width: 700px) { .gcs-grid { grid-template-columns: repeat(3, 1fr); } }

/* Footer & disclaimer */
.site-footer { max-width: 1180px; margin: 0 auto; padding: 1rem .8rem 5.5rem; /* ruang untuk gelembung Mochi di pojok */ font-size: .85rem; color: var(--muted); }
.foot-disclaimer { margin: .8rem 0 0; padding-top: .7rem; border-top: 1px solid var(--border); font-size: .8rem; line-height: 1.5; color: var(--muted); }
@media print { .topbar, .cat-nav, .btn-ghost { display: none; } body { padding: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Ringkasan hasil lengket di ponsel */
.mini-res { display: none; }
@media (max-width: 899px) {
  .mini-res { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; position: sticky; top: var(--stick-h, 152px); z-index: 15; padding: .5rem .8rem; border-radius: 12px; border: 2px solid; background: var(--surface); box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
  .mini-res span { font-size: .85rem; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mini-res b { font-size: 1.25rem; white-space: nowrap; } .mini-res small { font-size: .8rem; color: var(--muted); }
  .mini-res.c-hijau { border-color: var(--hijau-s); background: var(--hijau-bg); } .mini-res.c-kuning { border-color: var(--kuning-s); background: var(--kuning-bg); }
  .mini-res.c-oranye { border-color: var(--oranye-s); background: var(--oranye-bg); } .mini-res.c-merah { border-color: var(--merah-s); background: var(--merah-bg); } .mini-res.c-biru { border-color: var(--biru-s); background: var(--biru-bg); }
  .calc.compact .mini-res { top: var(--stick-h, 152px); }
}
@media (min-width: 760px) and (max-width: 899px) { .mini-res { top: var(--stick-h, 104px); } }

/* Emoji dekoratif */
.emo { font-style: normal; margin-right: .1rem; }
.lvl-emo { display: inline-block; margin-right: .35rem; font-size: 1em; line-height: 1; vertical-align: -0.05em; }
.badge .lvl-emo, .badge [aria-hidden] { font-size: .85em; }
.nav-sub .emo { margin-right: .15rem; }

/* ===== Chat Mochi ===== */
:root { --mochi-z: 2147483000; --mochi-gap: 16px; }
/* Gelembung chat: selalu di atas bar lain, aman terhadap notch */
.mochi-fab { position: fixed; z-index: calc(var(--mochi-z) + 2); right: calc(var(--mochi-gap) + env(safe-area-inset-right)); bottom: var(--mochi-gap); width: 62px; height: 62px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: linear-gradient(145deg, var(--primary-2), var(--primary)); box-shadow: 0 8px 24px rgba(15, 118, 110, .45), 0 2px 6px rgba(0, 0, 0, .15); display: grid; place-items: center; transition: transform .2s ease, box-shadow .2s; animation: mochi-bob 3.2s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.mochi-fab::after { content: ""; position: absolute; right: 6px; bottom: -3px; width: 16px; height: 16px; background: var(--primary); border-radius: 0 0 4px 0; transform: rotate(45deg) skew(8deg, 8deg); z-index: -1; }
.mochi-fab-face { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; }
.mochi-fab-face svg { transform: translateY(5px) scale(1.18); }
.mochi-fab-close { position: absolute; inset: 0; display: none; place-items: center; color: #fff; font-size: 1.9rem; line-height: 1; padding-bottom: 8px; font-weight: 700; }
.mochi-fab.open { animation: none; }
.mochi-fab.open .mochi-fab-face { display: none; }
.mochi-fab.open .mochi-fab-close { display: grid; }
.mochi-fab:hover { transform: translateY(-2px) scale(1.05); }
.mochi-fab:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.mochi-dot { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; display: none; }
.mochi-fab.new .mochi-dot { display: block; animation: mochi-pulse 1.6s ease-out infinite; }
.mochi-fab-tip { position: absolute; right: 72px; top: 50%; transform: translateY(-50%); background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: .4rem .75rem; border-radius: 14px 14px 4px 14px; font-size: .85rem; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); pointer-events: none; opacity: 0; transition: opacity .3s; }
.mochi-fab:not(.open) .mochi-fab-tip, .mochi-fab:hover:not(.open) .mochi-fab-tip { opacity: 1; }
.mochi-fab.away { display: none; }
/* Ikon gelembung kecil: sisa Moci saat menyusut karena tidak dipakai */
.mochi-mini { position: fixed; z-index: calc(var(--mochi-z) + 2); right: calc(var(--mochi-gap) + env(safe-area-inset-right)); bottom: var(--mochi-gap); width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; color: #fff; background: linear-gradient(145deg, var(--primary-2), var(--primary)); opacity: .8; box-shadow: 0 4px 12px rgba(15, 118, 110, .35); display: grid; place-items: center; animation: mochi-pop-in .25s ease-out, mochi-bob 3.2s ease-in-out .25s infinite; transition: opacity .2s, transform .2s; -webkit-tap-highlight-color: transparent; }
.mochi-mini[hidden] { display: none; }
.mochi-mini:hover, .mochi-mini:focus-visible { opacity: 1; transform: scale(1.08); }
.mochi-mini:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
html.mochi-open .mochi-mini { display: none; }
@keyframes mochi-pop-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: .8; } }
@keyframes mochi-bob { 0%, 82%, 100% { transform: translateY(0); } 88% { transform: translateY(-7px); } 94% { transform: translateY(0); } 97% { transform: translateY(-3px); } }
@keyframes mochi-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); } 100% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } }

/* Panel: ringkas di kanan bawah (desktop), bottom sheet ±70% (ponsel) */
.mochi-panel { position: fixed; z-index: calc(var(--mochi-z) + 1); right: calc(var(--mochi-gap) + env(safe-area-inset-right)); bottom: calc(var(--mochi-gap) + 74px); width: var(--mochi-w, 360px); height: var(--mochi-h, 520px); max-width: calc(100vw - 2 * var(--mochi-gap)); max-height: calc(100dvh - 110px); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); overflow: hidden; transform-origin: bottom right; animation: mochi-pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.mochi-panel[hidden] { display: none; }
.mochi-panel.max { width: min(960px, calc(100vw - 2 * var(--mochi-gap))); height: calc(100dvh - 110px); max-height: none; }
.mochi-panel.resizing { animation: none; user-select: none; }
@keyframes mochi-pop { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.mochi-resize { position: absolute; left: 0; top: 0; width: 22px; height: 22px; cursor: nwse-resize; z-index: 3; touch-action: none; }
.mochi-resize::before { content: ""; position: absolute; left: 5px; top: 5px; width: 9px; height: 9px; border-left: 2px solid rgba(255, 255, 255, .85); border-top: 2px solid rgba(255, 255, 255, .85); border-radius: 3px 0 0 0; }
.mochi-resize:focus-visible { outline: 2px solid var(--focus); }
.mochi-panel.max .mochi-resize { display: none; }
@media (max-width: 640px) {
  .mochi-panel { left: 0; right: 0; width: 100%; max-width: none; bottom: 0; height: 72dvh; max-height: calc(100dvh - 8px); border-radius: 22px 22px 0 0; border-bottom: 0; transform-origin: bottom center; animation: mochi-sheet .26s cubic-bezier(.2, .9, .3, 1); }
  .mochi-panel.max { height: 100dvh; width: 100%; border-radius: 0; }
  .mochi-panel::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .6); z-index: 2; }
  .mochi-resize { display: none; }
  /* Di atas keyboard virtual (iOS / Android) – nilai dari visualViewport, tanpa memindah fokus */
  .mochi-panel { bottom: var(--kb, 0px); max-height: calc(min(100dvh, var(--vvh, 100dvh)) - 8px); }
  html.mochi-open .mochi-fab { display: none; }
  .mochi-fab-tip { right: 70px; }
}
@keyframes mochi-sheet { from { transform: translateY(100%); } to { transform: none; } }
.mochi-head { display: flex; align-items: center; gap: .4rem; padding: .7rem .6rem .6rem .9rem; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.mochi-ava { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.mochi-ttl { flex: 1; min-width: 0; }
.mochi-ttl h2 { margin: 0; font-size: 1.05rem; line-height: 1.2; color: #fff; }
.mochi-ttl small { display: block; font-size: .72rem; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mochi-ib { background: rgba(255, 255, 255, .18); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: .95rem; flex: none; }
.mochi-ib:hover { background: rgba(255, 255, 255, .3); }
.mochi-ib:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.mochi-ib[hidden] { display: none; }
.mochi-body { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }

.mochi-name { margin: auto; padding: 1.2rem; text-align: center; display: flex; flex-direction: column; gap: .55rem; max-width: 340px; overflow-y: auto; }
.mochi-hero { display: grid; place-items: center; }
.mochi-hello { font-size: 1.15rem; font-weight: 700; margin: 0; }
.mochi-name input { font: inherit; font-size: 16px; padding: .7rem .9rem; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); text-align: center; }
.mochi-name input:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.mochi-err { color: var(--merah); font-size: .85rem; min-height: 1.1em; margin: 0; }
.mochi-fine { font-size: .76rem; color: var(--muted); margin: .4rem 0 0; line-height: 1.45; }
.mochi-btn { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: .7rem 1rem; background: var(--primary); color: #fff; cursor: pointer; }
[data-theme="dark"] .mochi-btn { color: #062b28; }
.mochi-btn:hover { filter: brightness(1.08); }
.mochi-btn.sm { padding: .45rem .8rem; font-size: .85rem; }
.mochi-btn.ghost { background: var(--surface); color: var(--primary); border: 1px solid var(--border); }
.mochi-link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; text-decoration: underline; }

.mochi-log { flex: 1; min-height: 0; overflow-y: auto; padding: .8rem .7rem; display: flex; flex-direction: column; gap: .55rem; overscroll-behavior: contain; }
.mochi-row { display: flex; gap: .4rem; align-items: flex-end; max-width: 100%; }
.mochi-row.me { justify-content: flex-end; }
.mochi-ava-s { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; flex: none; overflow: hidden; }
.mochi-bubble { max-width: 82%; padding: .55rem .75rem; border-radius: 16px; font-size: .93rem; line-height: 1.5; overflow-wrap: anywhere; }
.mochi-row.cat .mochi-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.mochi-row.me .mochi-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
[data-theme="dark"] .mochi-row.me .mochi-bubble { color: #062b28; }
.mochi-bubble p { margin: 0 0 .4rem; } .mochi-bubble p:last-of-type { margin-bottom: 0; }
.mochi-bubble ul, .mochi-bubble ol { margin: .2rem 0 .4rem; padding-left: 1.2rem; }
.mochi-bubble code { background: var(--surface-2); padding: 0 .25rem; border-radius: 4px; font-size: .88em; }
.mochi-bubble pre { background: var(--surface-2); padding: .5rem; border-radius: 8px; overflow-x: auto; }
.mochi-bubble a { color: var(--primary); font-weight: 600; }
.mochi-bubble .md-h { font-weight: 700; }
.mochi-model { display: block; margin-top: .35rem; font-size: .7rem; color: var(--muted); }
.mochi-note { align-self: center; font-size: .76rem; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border); padding: .25rem .65rem; border-radius: 999px; text-align: center; max-width: 92%; }
.mochi-note.warn { color: var(--kuning); background: var(--kuning-bg); border-style: solid; }
.mochi-note.auth, .mochi-note:has(button) { background: none; border: 0; padding: 0; }
.mochi-dots { display: inline-flex; gap: 4px; padding: .2rem 0; }
.mochi-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-2); animation: mochi-bounce 1s infinite ease-in-out; }
.mochi-dots i:nth-child(2) { animation-delay: .15s; } .mochi-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mochi-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.mochi-chips { display: flex; gap: .4rem; overflow-x: auto; padding: 0 .7rem .5rem; scrollbar-width: none; }
.mochi-chips[hidden] { display: none; }
.mochi-chip { flex: none; font: inherit; font-size: .8rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .35rem .7rem; cursor: pointer; }
.mochi-chip:hover { border-color: var(--primary-2); }
.mochi-compose { display: flex; gap: .45rem; padding: .55rem .6rem calc(.55rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.mochi-compose textarea { flex: 1; resize: none; font: inherit; font-size: 16px; /* ≥16px: cegah auto-zoom iOS */ padding: .6rem .75rem; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text); max-height: 120px; }
.mochi-compose textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.mochi-send { width: 44px; height: 44px; flex: none; align-self: flex-end; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 1.1rem; cursor: pointer; }
[data-theme="dark"] .mochi-send { color: #062b28; }
.mochi-send:disabled { opacity: .5; cursor: wait; }

/* Animasi maskot */
.mochi-cat { overflow: visible; }
.mochi-cat .m-eye { transform-box: fill-box; transform-origin: center; }
.mochi-cat.idle .m-eye { animation: mochi-blink 4.2s infinite; }
.mochi-cat .m-tail { transform-box: view-box; transform-origin: 88px 92px; }
.mochi-cat.idle .m-tail { animation: mochi-tail 2.4s ease-in-out infinite; }
.mochi-cat .m-dots { fill: var(--primary-2, #14b8a6); opacity: 0; }
.mochi-cat.thinking .m-dots { opacity: 1; }
.mochi-cat.thinking .m-dots circle { animation: mochi-think 1.2s infinite; }
.mochi-cat.thinking .m-dots circle:nth-child(2) { animation-delay: .2s; } .mochi-cat.thinking .m-dots circle:nth-child(3) { animation-delay: .4s; }
.mochi-cat.thinking .m-head { transform-box: view-box; transform-origin: 60px 80px; animation: mochi-tilt 1.6s ease-in-out infinite; }
.mochi-cat.thinking .m-tail { animation: mochi-tail .8s ease-in-out infinite; }
.mochi-cat.wave .m-head { transform-box: view-box; transform-origin: 60px 80px; animation: mochi-tilt 3s ease-in-out infinite; }
@keyframes mochi-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes mochi-tail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes mochi-think { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes mochi-tilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .mochi-cat *, .mochi-panel, .mochi-dots i, .mochi-fab, .mochi-mini, .mochi-dot { animation: none !important; transition: none !important; } .mochi-cat.thinking .m-dots circle { opacity: 1; } }
@media print { .mochi-fab, .mochi-mini, .mochi-panel { display: none !important; } }

.mochi-ib { width: 32px; height: 32px; }
.mochi-refs { margin-top: .5rem; padding: .45rem .6rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; }
.mochi-refs b { display: block; font-size: .78rem; margin-bottom: .15rem; }
.mochi-refs ul { margin: 0; padding-left: 1.1rem; }
.mochi-refs li { margin: .1rem 0; }
.mochi-refs.none { color: var(--muted); background: none; border-style: dashed; }
.tables-grid > div { min-width: 0; overflow-x: auto; }
.tables-grid { min-width: 0; }
.wtl-bar:last-of-type { display: flex; align-items: center; justify-content: flex-end; }
.wtl-bar:last-of-type span { position: absolute; right: .5rem; }

/* ===== Modul Kejiwaan ===== */
.btn { border: 0; background: var(--primary); color: #fff; padding: .55rem .95rem; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .95rem; }
[data-theme="dark"] .btn { color: #062421; }
.row-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; align-items: center; }
.small { font-size: .82rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
label.chip { display: inline-flex; align-items: center; position: relative; padding: .4rem .75rem; font-size: .88rem; user-select: none; }
label.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.chip:has(input:checked) { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
[data-theme="dark"] label.chip:has(input:checked) { color: #062421; }
label.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .45rem .8rem; border-radius: 999px; cursor: pointer; font-size: .88rem; }
.chip-btn[aria-selected="true"] { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
[data-theme="dark"] .chip-btn[aria-selected="true"] { color: #062421; }
.sp-tabs { margin: .5rem 0 1rem; }
.field-head { margin: 1rem 0 .4rem; padding-top: .6rem; border-top: 1px dashed var(--border); font-size: .98rem; color: var(--primary); }
.field-note { margin: -.3rem 0 .8rem; font-size: .85rem; color: var(--muted); }
.flabel { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .35rem; }
.field input[type=text], .field textarea, .field select { width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.form-row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.crisis { margin: .8rem 0; padding: .8rem .9rem; border-radius: 12px; background: var(--merah-bg); color: var(--merah); border: 2px solid var(--merah-s); }
.crisis-title { font-weight: 800; margin: 0 0 .35rem; }
.crisis ul { margin: .3rem 0; padding-left: 1.1rem; } .crisis li { margin: .2rem 0; }
.crisis a { color: inherit; font-weight: 800; }
.crisis-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.crisis-links a { background: var(--merah-s); color: #fff; padding: .35rem .7rem; border-radius: 999px; text-decoration: none; font-size: .88rem; }
.mse-grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .mse-grid { grid-template-columns: 1.3fr 1fr; align-items: start; } .mse-out { align-self: stretch; } .sticky { position: sticky; top: calc(var(--stick-h, 104px) + 6px); } }
.mse-dom { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem .2rem; margin: 0 0 .8rem; }
.mse-dom legend { font-weight: 800; padding: 0 .3rem; }
.mse-text { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: .7rem; min-height: 6rem; font-size: .95rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 .6rem; } .checklist li { padding: .3rem 0; border-bottom: 1px solid var(--border); }
.checklist label { display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; } .checklist input { margin-top: .3rem; width: 18px; height: 18px; flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
.jtable th, .jtable td { padding: .4rem .35rem; border-bottom: 1px solid var(--border); vertical-align: top; font-size: .88rem; text-align: left; }
.jtable thead th { background: var(--surface-2); }
.timer { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .6rem 0; }
.timer-big { flex: 1 1 160px; background: var(--surface-2); border-radius: 12px; padding: .6rem .8rem; }
.timer-big span { display: block; font-size: .82rem; color: var(--muted); } .timer-big b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.timer-big.due { background: var(--merah-bg); } .timer-big.due span, .timer-big.due b { color: var(--merah); }
.timer .muted { flex-basis: 100%; margin: 0; }
.milestones { padding-left: 1.1rem; margin: .4rem 0; } .milestones li { margin: .25rem 0; font-size: .9rem; }
.milestones li.c-merah { color: var(--merah); } .milestones li.c-oranye { color: var(--oranye); } .milestones li.c-biru { color: var(--text); }
.rlog { padding-left: 1.2rem; font-size: .9rem; } .rlog pre { white-space: pre-wrap; font-size: .82rem; }
.steps-list li { margin: .3rem 0; }
.dose-box ul { margin: .3rem 0 0; padding-left: 1.1rem; }
@media print { .topbar, .cat-nav, .mochi-btn, .row-btns, .crumbs { display: none !important; } }
.mochi-note.crisis { background: none; border: 0; padding: 0; border-radius: 0; max-width: 100%; text-align: left; font-size: .85rem; align-self: stretch; }
.mochi-note.crisis .crisis { margin: .2rem 0; }

/* ===== Ventilator ===== */
.alert.c-hijau-a { background: var(--hijau-bg); color: var(--hijau); } .alert.c-kuning { background: var(--kuning-bg); color: var(--kuning); }
.peep-tbl td.on, .peep-tbl th.on { background: var(--primary); color: #fff; font-weight: 700; border-radius: 6px; }
.vs-label { border-left: 4px solid var(--kuning-s); padding-left: .6rem; }
.vs-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .3rem .8rem; align-items: end; }
.vs-bar .field, .vs-side .field { display: flex; flex-direction: column; gap: .2rem; margin: 0 0 .4rem; font-size: .88rem; font-weight: 600; }
.vs-bar select, .vs-bar input, .vs-side select { width: 100%; padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.vs-bar .row-btns, .vs-bar p { grid-column: 1 / -1; margin: .2rem 0; }
.vs-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; margin: 1rem 0; }
.vsim { background: #0a0f1a; color: #e2e8f0; border-radius: 18px; padding: .6rem; border: 6px solid #1f2937; box-shadow: 0 8px 30px rgba(0,0,0,.35); font-variant-numeric: tabular-nums; min-width: 0; }
.vsim button { font: inherit; color: inherit; cursor: pointer; }
.vs-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.vs-mode { background: #1e3a5f; border: 1px solid #3b82f6; border-radius: 10px; padding: .3rem .7rem; display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.vs-mode small { color: #93c5fd; font-size: .7rem; }
.vs-pt { color: #94a3b8; font-size: .78rem; }
.vs-clock { margin-left: auto; color: #94a3b8; font-size: .8rem; }
.vs-alarm { flex: 1 1 220px; min-height: 2rem; border-radius: 8px; padding: .3rem .6rem; font-size: .85rem; background: #111827; display: flex; align-items: center; gap: .3rem; }
.vs-alarm .ok { color: #4ade80; }
.vs-alarm.lv-hi { background: #dc2626; color: #fff; animation: vsblink 1s steps(2) infinite; }
.vs-alarm.lv-med { background: #facc15; color: #111; } .vs-alarm.lv-lo { background: #0891b2; color: #fff; }
@keyframes vsblink { 50% { background: #7f1d1d; } }
@media (prefers-reduced-motion: reduce) { .vs-alarm.lv-hi { animation: none; } }
.vs-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .4rem; margin-bottom: .5rem; }
.vs-modes button { background: #111827; border: 1px solid #334155; border-radius: 10px; padding: .45rem; text-align: left; display: flex; flex-direction: column; }
.vs-modes button small { color: #94a3b8; font-size: .72rem; } .vs-modes button.on { border-color: #3b82f6; background: #1e3a5f; }
.vs-main { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: .5rem; }
.vs-waves { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.vs-wave { position: relative; background: #050912; border: 1px solid #1e293b; border-radius: 8px; }
.vs-wave canvas { display: block; width: 100%; height: 112px; }
.vs-wl { position: absolute; right: .4rem; top: .15rem; font-size: .75rem; font-weight: 700; } .vs-wl small { font-weight: 400; color: #94a3b8; }
.vs-p .vs-wl { color: #facc15; } .vs-f .vs-wl { color: #4ade80; } .vs-v .vs-wl { color: #c084fc; }
.vs-meas { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; align-content: start; }
.vs-mv { background: #0f172a; border: 1px solid #1e293b; border-radius: 8px; padding: .2rem .35rem; display: flex; flex-direction: column; line-height: 1.15; }
.vs-mv span { font-size: .66rem; color: #94a3b8; } .vs-mv b { font-size: 1.05rem; color: #f8fafc; } .vs-mv small { font-size: .6rem; color: #64748b; }
.vs-mv.bad { border-color: #ef4444; } .vs-mv.bad b { color: #fca5a5; }
.vs-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: .35rem; margin-top: .5rem; }
.vs-sbtn { background: linear-gradient(#1e293b, #111827); border: 1px solid #334155; border-radius: 12px; padding: .35rem .3rem; display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-height: 58px; }
.vs-sbtn span { font-size: .72rem; color: #cbd5e1; } .vs-sbtn b { font-size: 1.2rem; color: #fff; } .vs-sbtn small { font-size: .62rem; color: #94a3b8; }
.vs-sbtn.on { border-color: #facc15; box-shadow: 0 0 0 2px rgba(250,204,21,.35); } .vs-sbtn.on b { color: #facc15; }
.vs-knob { margin-top: .5rem; background: #111827; border: 1px solid #facc15; border-radius: 12px; padding: .5rem; }
.vs-knob-head { display: flex; justify-content: space-between; align-items: baseline; } .vs-knob-head b { font-size: 1.5rem; color: #facc15; }
.vs-knob-row { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.vs-knob-row input[type=range] { flex: 1; accent-color: #facc15; min-width: 0; }
.vs-knob-row button { min-width: 44px; min-height: 40px; border-radius: 10px; background: #1e293b; border: 1px solid #334155; font-size: 1.1rem; }
.vs-knob-row .vs-accept { flex: 1; background: #15803d; border-color: #22c55e; font-size: .95rem; } .vs-knob-row .vs-cancel { flex: 1; background: #374151; font-size: .95rem; }
.vs-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.vs-tools button { background: #111827; border: 1px solid #334155; border-radius: 8px; padding: .3rem .6rem; font-size: .8rem; } .vs-tools button.on { border-color: #38bdf8; color: #38bdf8; }
.vs-side { display: flex; flex-direction: column; gap: .8rem; min-width: 0; } .vs-side .card { margin: 0; } .vs-side h3 { margin: 0 0 .4rem; font-size: 1rem; }
.vs-mon { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; background: #000; border-radius: 14px; padding: .5rem; font-variant-numeric: tabular-nums; }
.vm { display: flex; flex-direction: column; line-height: 1.1; padding: .2rem .3rem; } .vm span { font-size: .68rem; color: #94a3b8; } .vm b { font-size: 1.45rem; }
.vm-spo2 b { color: #22d3ee; } .vm-hr b { color: #4ade80; } .vm-bp b { color: #f87171; font-size: 1.1rem; } .vm-rr b { color: #facc15; } .vm-co2 b { color: #e2e8f0; }
.vm.bad b { animation: vsblink2 1s steps(2) infinite; } @keyframes vsblink2 { 50% { opacity: .35; } }
.vs-abg dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; margin: 0; font-variant-numeric: tabular-nums; } .vs-abg dl div { background: var(--surface-2); border-radius: 8px; padding: .2rem .4rem; } .vs-abg dt { color: var(--muted); font-size: .75rem; } .vs-abg dd { margin: 0; font-weight: 700; } .vs-abg div.bad dd { color: var(--merah); }
.vs-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.vs-goals { list-style: none; padding: 0; margin: .3rem 0; } .vs-goals li { padding: .15rem 0; } .vs-goals li.ok { color: var(--hijau); font-weight: 600; }
.vs-tips { padding-left: 1rem; margin: 0; font-size: .88rem; } .vs-tips li { margin-bottom: .45rem; } .vs-tips li.lv-hi b { color: var(--merah); } .vs-tips li.lv-med b { color: var(--kuning); } .vs-tips li.lv-lo b { color: var(--biru); }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; margin: 1rem 0; }
.mode-card { margin: 0; } .mode-card h2 { font-size: 1.05rem; margin-top: 0; } .mode-card .badge, .mode-grid .badge { white-space: normal; text-align: left; }
.vtrace { width: 100%; height: auto; display: block; margin: .3rem 0; }
.wave-fig { margin: 0; } .wave-fig figcaption { font-size: .88rem; }
@media (max-width: 900px) { .vs-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .vsim { border-width: 3px; padding: .4rem; border-radius: 14px; }
  .vs-main { grid-template-columns: minmax(0, 1fr); }
  .vs-meas { grid-template-columns: repeat(4, 1fr); }
  .vs-wave canvas { height: 82px; }
  .vs-set { grid-template-columns: repeat(4, 1fr); } .vs-sbtn b { font-size: 1.05rem; }
  .vs-mon { grid-template-columns: repeat(3, 1fr); } .vm b { font-size: 1.2rem; }
}

/* Ventilator: bisa disetel vs hanya tampilan */
.vsim .vs-key { position: relative; border: 1.5px solid #22d3ee !important; background: linear-gradient(#1f3a4a, #10202c) !important; box-shadow: 0 2px 0 #0e7490, inset 0 1px 0 rgba(255,255,255,.12); cursor: pointer; transition: transform .06s, box-shadow .06s, background .15s; }
.vsim .vs-key:hover { background: linear-gradient(#25485c, #14293a) !important; border-color: #67e8f9 !important; }
.vsim .vs-key:active { transform: translateY(2px); box-shadow: 0 0 0 #0e7490, inset 0 2px 4px rgba(0,0,0,.4); }
.vsim .vs-key:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }
.vsim .vs-key .pen { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: .7rem; color: #67e8f9; opacity: .85; }
.vsim .vs-sbtn.on { border-color: #facc15 !important; background: linear-gradient(#3a3412, #1f1c08) !important; box-shadow: 0 0 0 3px rgba(250,204,21,.35); }
.vsim .vs-sbtn.on .pen { color: #facc15; }
.vsim .vs-sbtn.alarm-limit { border-style: dashed !important; }
.vs-sbtn small .o2b { font-style: normal; color: #0a0f1a; background: #67e8f9; border-radius: 4px; padding: 0 .25rem; font-weight: 700; }
.vs-measbox, .vs-mon { position: relative; }
.vs-ro-tag { display: inline-block; font-size: .6rem; letter-spacing: .03em; text-transform: uppercase; color: #64748b; margin: 0 0 .15rem .1rem; }
.vs-mon .vs-ro-tag { grid-column: 1 / -1; margin: 0; }
.vsim .vs-mv { border: 0; background: transparent; border-bottom: 1px solid #1e293b; border-radius: 0; cursor: default; user-select: none; }
.vsim .vs-mv span { color: #64748b; }
.vsim .vs-mv.bad { border-bottom-color: #ef4444; background: rgba(239,68,68,.08); }
.vs-wave { cursor: default; }
.vs-legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .72rem; margin-top: .45rem; color: #94a3b8; }
.lg-set { color: #67e8f9; border: 1.5px solid #22d3ee; border-radius: 6px; padding: 0 .35rem; }
.lg-ro { color: #94a3b8; border-bottom: 1px solid #334155; padding: 0 .2rem; }
.vs-tour { margin-top: .5rem; background: #0f2a35; border: 1.5px solid #22d3ee; border-radius: 12px; padding: .6rem .7rem; font-size: .85rem; }
.vs-tour p { margin: .3rem 0 .5rem; }
.vs-tour .vs-accept { background: #15803d; border: 1px solid #22c55e; border-radius: 10px; padding: .35rem 1rem; }
.vsim .vs-knum { flex: 0 0 5.2rem; width: 5.2rem; padding: .4rem; border-radius: 10px; border: 1.5px solid #facc15 !important; background: #0a0f1a !important; color: #facc15 !important; font: inherit; font-weight: 700; text-align: center; }
.vs-knob-note { margin: .35rem 0 0; font-size: .75rem; color: #94a3b8; }
.vs-o2 { border-radius: 10px; padding: .3rem .6rem; display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.vs-o2 small { font-size: .66rem; color: #a5f3fc; }
.vsim .vs-o2.on { background: linear-gradient(#0e7490, #155e75) !important; border-color: #a5f3fc !important; }
.vs-o2stat { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; background: #083344; border: 1px solid #22d3ee; color: #cffafe; border-radius: 8px; padding: .25rem .5rem; font-size: .82rem; }
.vs-o2stat b { font-size: 1rem; color: #fff; font-variant-numeric: tabular-nums; }
.vs-o2stat small { color: #a5f3fc; }
.vs-o2stat button { background: #1e293b; border: 1px solid #64748b; border-radius: 6px; padding: .1rem .45rem; font-size: .75rem; }
.vs-abg dd small { font-weight: 400; color: var(--muted); }
@media (max-width: 560px) { .vs-knob-row { flex-wrap: wrap; } .vs-knum { flex: 0 0 4.5rem; width: 4.5rem; } .vs-o2stat { flex: 1 1 100%; } }

/* Brand: nama + tagline (tagline mengecil/hilang di layar sangat kecil) */
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-size: 1.05rem; }
.brand-tag { font-size: .68rem; color: var(--muted); font-weight: 500; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; }
.hero-tag { margin: -.2rem 0 .5rem; font-size: 1.05rem; color: var(--primary); }
@media (max-width: 420px) { .brand-name { font-size: .98rem; } .brand-tag { font-size: .6rem; } }
@media (max-width: 340px) { .brand-tag { display: none; } }
.hero .hero-tag { color: #fff; opacity: .95; }
.hero a { color: #fff; text-decoration-color: rgba(255,255,255,.7); }

/* ===== Simulator: layar penuh / imersif, tanpa zoom ketuk-ganda ===== */
/* Ketuk ganda tidak memperbesar halaman di tombol & kontrol (pinch-zoom tetap bisa). */
a, button, input, select, textarea, label, summary, [role="button"] { touch-action: manipulation; }
.vs-stage, .vs-stage *, .vs-wrap, .vs-wrap *, .vs-bar, .vs-bar * { touch-action: manipulation; }
.vs-stage { min-width: 0; }
.vs-fstop { margin-left: .2rem; background: #0f172a; border: 1px solid #475569; border-radius: 8px; padding: .25rem .55rem; font-size: .78rem; color: #e2e8f0; white-space: nowrap; }
.vs-fstop:hover { border-color: #94a3b8; }
.vs-fsbtn { font-weight: 700; }
/* Halaman simulator di layar pendek/ponsel: header & nav ikut tergulir agar simulator tidak terpotong. */
@media (max-width: 900px), (max-height: 560px) {
  [data-route="simulator-ventilator"] .topbar, [data-route="simulator-ventilator"] .cat-nav { position: static; }
}
@media (max-height: 500px) { .topbar, .cat-nav { position: static; } }
/* Mode layar penuh (Fullscreen API) & imersif (fallback iOS) */
.vs-stage.is-fs { display: flex; flex-direction: column; gap: .3rem; width: 100%; height: 100%; position: relative; background: #000; padding: max(.3rem, env(safe-area-inset-top)) max(.3rem, env(safe-area-inset-right)) max(.3rem, env(safe-area-inset-bottom)) max(.3rem, env(safe-area-inset-left)); overflow: hidden; overscroll-behavior: contain; color: #e2e8f0; }
.vs-stage.is-fs:fullscreen { width: 100vw; height: 100vh; }
.vs-stage.is-fs:-webkit-full-screen { width: 100vw; height: 100vh; }
.vs-stage.immersive { position: fixed; inset: 0; z-index: calc(var(--mochi-z, 2147483000) + 10); height: 100vh; height: 100dvh; width: 100vw; }
html.vs-immersive, html.vs-immersive body { overflow: hidden; overscroll-behavior: none; }
html.vs-immersive .topbar, html.vs-immersive .cat-nav, html.vs-immersive .site-footer,
html.vs-immersive .mochi-fab, html.vs-immersive .mochi-mini, html.vs-immersive .mochi-panel, html.vs-immersive .skip { display: none !important; }
.is-fs .vs-fstop { background: #7f1d1d; border-color: #f87171; color: #fff; font-weight: 700; font-size: .85rem; padding: .3rem .7rem; }
.is-fs .vsim { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; border-width: 3px; border-radius: 12px; padding: .35rem; box-shadow: none; }
.is-fs .vs-main { flex: 1 0 auto; min-height: auto; display: flex; flex-direction: column; gap: .3rem; }
.is-fs .vs-waves { flex: 1 1 auto; min-height: calc(3 * 52px + .6rem); }
.is-fs .vs-measbox { flex: 0 0 auto; }
.is-fs .vs-wave { flex: 1 1 0; min-height: 52px; }
.is-fs .vs-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.is-fs .vs-legend { display: none; }
.is-fs .vs-mon { flex: 0 0 auto; grid-template-columns: repeat(5, 1fr); padding: .25rem .4rem; border-radius: 10px; }
.is-fs .vs-mon .vs-ro-tag { display: none; }
.is-fs .vm b { font-size: 1.1rem; } .is-fs .vm-bp b { font-size: .9rem; }
/* Lanskap: kurva + nilai terukur di kiri, setelan & tombol di kanan, monitor pasien di strip kanan. */
@media (orientation: landscape) {
  .vs-stage.is-fs { flex-direction: row; }
  .is-fs .vsim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 36%); grid-template-rows: auto auto auto auto auto auto 1fr; column-gap: .4rem; overflow: auto; }
  .is-fs .vs-top { grid-column: 1 / -1; margin-bottom: .2rem; flex-wrap: nowrap; }
  .is-fs .vs-top .vs-alarm { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  .is-fs .vs-modes { grid-column: 1 / -1; grid-row: 2; }
  .is-fs .vsim { min-height: 0; }
  .is-fs .vs-waves { min-height: 0; }
  .is-fs .vs-main { grid-column: 1; grid-row: 3 / -1; min-height: 0; flex-direction: row; }
  .is-fs .vs-measbox { flex: 0 0 128px; min-height: 0; overflow: auto; }
  .is-fs .vs-set, .is-fs .vs-knob, .is-fs .vs-tour, .is-fs .vs-tools { grid-column: 2; margin-top: 0; }
  .is-fs .vs-knob { grid-row: 4; } .is-fs .vs-tour { grid-row: 5; } .is-fs .vs-tools { grid-row: 6; }
  .is-fs .vs-set { grid-row: 3; grid-template-columns: repeat(3, 1fr); align-content: start; gap: .25rem; }
  .is-fs .vs-sbtn { min-height: 48px; padding: .2rem; } .is-fs .vs-sbtn b { font-size: 1rem; }
  .is-fs .vs-tools { margin-top: .3rem; } .is-fs .vs-knob { margin-top: .3rem; padding: .35rem; } .is-fs .vs-tour { margin-top: .3rem; }
  .is-fs .vs-meas { grid-template-columns: 1fr 1fr; overflow: auto; }
  .is-fs .vs-mon { width: 84px; grid-template-columns: 1fr; align-content: start; gap: .1rem; }
}
@media (orientation: portrait) and (max-height: 800px) {
  .is-fs .vs-pt { display: none; }
  .is-fs .vs-sbtn { min-height: 50px; padding: .2rem; }
  .is-fs .vs-mv { padding: .1rem .3rem; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .is-fs .vs-pt { display: none; }
  .is-fs .vs-mv b { font-size: .92rem; } .is-fs .vs-mv span { font-size: .6rem; }
  .is-fs .vs-o2 small, .is-fs .vs-mode small { display: none; }
}
/* Laci panel layar penuh: Tindakan / Skenario / Tantangan / AGD / Tips (panel asli dipindah ke sini) */
.vs-drawer { display: none; }
.is-fs .vs-drawer { display: flex; flex-direction: column; position: relative; flex: 0 0 auto; }
.vs-dr-tabs { display: flex; gap: .25rem; }
.vs-dr-tabs button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0; padding: .3rem .1rem; border-radius: 10px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; font: inherit; font-size: 1.05rem; line-height: 1.15; cursor: pointer; }
.vs-dr-tabs button small { font-size: .66rem; font-weight: 600; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vs-dr-tabs button[aria-selected="true"] { background: #facc15; border-color: #facc15; color: #111; } .vs-dr-tabs button[aria-selected="true"] small { color: #111; }
.vs-dr-panel { position: absolute; left: 0; right: 0; bottom: calc(100% + .3rem); max-height: min(46dvh, 420px); overflow: auto; overscroll-behavior: contain; background: var(--bg); color: var(--text); border: 2px solid #facc15; border-radius: 14px; padding: .5rem; box-shadow: 0 -10px 30px rgba(0,0,0,.55); z-index: 5; -webkit-overflow-scrolling: touch; }
.vs-dr-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; position: sticky; top: -.5rem; margin: -.5rem -.5rem .4rem; padding: .45rem .6rem; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 1; }
.vs-dr-close { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .85rem; cursor: pointer; }
.vs-dr-pane > .card, .vs-dr-pane > .vs-bar { margin: 0; box-shadow: none; }
.vs-dr-pane .vs-bar { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.vs-dr-pane .vs-actions button { min-height: 40px; }
.vs-dr-pane:has(> [data-chpanel]:not([hidden])) .vs-dr-empty { display: none; }
@media (orientation: landscape) {
  .is-fs .vs-drawer { flex-direction: row; }
  .is-fs .vs-dr-tabs { flex-direction: column; width: 62px; gap: .2rem; }
  .is-fs .vs-dr-tabs button { flex: 1 1 0; padding: .15rem; font-size: 1rem; }
  .is-fs .vs-dr-panel { left: auto; right: calc(100% + .3rem); top: var(--dr-top, 0px); bottom: 0; width: min(380px, 46vw); max-height: none; box-shadow: -10px 0 30px rgba(0,0,0,.55); }
}

/* ---------- 🧪 Interpretasi AGD ---------- */
.res-summary { margin: 0 0 .55rem; padding: .55rem .7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.abg-ex, .abg-photo { margin: .8rem 0; }
.abg-ex .sec-title, .abg-photo .sec-title { margin: 0 0 .5rem; font-size: 1.05rem; }
.abg-ex-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.abg-photo > summary { cursor: pointer; list-style: none; }
.abg-photo > summary::-webkit-details-marker { display: none; }
.abg-photo > summary h2::after { content: ' ▾'; color: var(--muted); }
.abg-photo[open] > summary h2::after { content: ' ▴'; }
.abg-consent { margin: .6rem 0; }
.abg-photo-btns { display: flex; gap: .5rem; flex-wrap: wrap; margin: .4rem 0; }
.abg-photo-btns .btn { display: inline-flex; align-items: center; gap: .3rem; }
.abg-photo-btns [aria-disabled="true"] { opacity: .45; pointer-events: none; }
.abg-canvas { display: block; max-width: 100%; height: auto; max-height: 60vh; margin: .4rem 0 .6rem; border: 1px solid var(--border); border-radius: 8px; touch-action: none; cursor: crosshair; }
/* Kolom form AGD yang terisi dari foto (hilang saat diedit) */
.field.num.ocr-hit { border-radius: 10px; box-shadow: 0 0 0 2px var(--kuning-s); background: var(--kuning-bg); padding-left: .4rem; padding-right: .4rem; }
.field.num.ocr-hit input[type=number] { font-weight: 700; }
.abg-dis { margin: .5rem 0; padding-left: 1.3rem; } .abg-dis li { margin: .2rem 0; }
.abg-sec h4 { margin: .6rem 0 .2rem; font-size: .95rem; }
.abg-sec ul { margin: .2rem 0 .4rem; padding-left: 1.2rem; } .abg-sec li { margin: .15rem 0; }
.abg-man { border-left: 4px solid var(--border); padding: .1rem 0 .1rem .6rem; margin: .5rem 0; }
.abg-man.c-merah { border-left-color: var(--merah-s); background: var(--merah-bg); border-radius: 0 8px 8px 0; }
.abg-links { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; }
.abg-links .chip { text-decoration: none; padding: .3rem .65rem; font-size: .85rem; }
.vs-abg-link { display: inline-block; margin-top: .5rem; text-decoration: none; }

/* ---------- 💼 Loker ---------- */
.loker-form { margin: .8rem 0; display: grid; gap: .2rem; }
.loker-row { display: grid; grid-template-columns: 1fr; gap: .2rem; }
@media (min-width: 640px) { .loker-row { grid-template-columns: 1fr 1fr; gap: .8rem; } }
.loker-form select, .loker-form input[data-roletext] { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 1rem; }
.loker-roles { margin: .2rem 0 .45rem; }
.loker-form fieldset { border: 0; padding: 0; margin: .4rem 0; }
.loker-form legend { font-weight: 600; margin-bottom: .3rem; }
.chip-check { display: inline-flex; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .45rem .8rem; border-radius: 999px; cursor: pointer; font-size: .88rem; }
.chip-check input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.chip-check input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.loker-go { margin-top: .5rem; width: 100%; padding: .75rem; font-size: 1.02rem; }
.loker-go:disabled { opacity: .5; cursor: not-allowed; }
.loker-fraud { line-height: 1.4; }
.loker-list { display: grid; gap: .6rem; margin: .7rem 0; }
@media (min-width: 760px) { .loker-list { grid-template-columns: 1fr 1fr; } }
.loker-card h3 { margin: .35rem 0 .1rem; font-size: 1.02rem; line-height: 1.3; }
.loker-inst { margin: 0 0 .2rem; font-weight: 600; color: var(--muted); }
.loker-card .btn { display: inline-block; text-decoration: none; margin-top: .3rem; }
.loker-badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.loker-links { margin: .9rem 0; }
.loker-links h3 { margin: .7rem 0 .3rem; font-size: .95rem; }
.loker-dl { display: flex; flex-wrap: wrap; gap: .4rem; }
.loker-dl .chip { text-decoration: none; font-size: .86rem; padding: .4rem .7rem; }
.loker-sep iframe { width: 100%; height: 72px; border: 0; }

/* ---------- PWA: area aman (poni/Dynamic Island, home bar, lanskap) ---------- */
.topbar { padding-top: max(.6rem, env(safe-area-inset-top)); padding-left: max(.8rem, env(safe-area-inset-left)); padding-right: max(.8rem, env(safe-area-inset-right)); }
.nav-main, .nav-sub { padding-left: max(.25rem, env(safe-area-inset-left)); padding-right: max(.25rem, env(safe-area-inset-right)); }
main, .site-footer { padding-left: max(.8rem, env(safe-area-inset-left)); padding-right: max(.8rem, env(safe-area-inset-right)); }
[data-standalone] .search-results { max-height: calc(100dvh - 160px - env(safe-area-inset-top)); }

/* ---------- Pasang aplikasi ---------- */
[data-standalone] .inst-only, [data-installed] .inst-only { display: none !important; }
.icon-btn + .icon-btn { margin-left: 0; }
.inst-hbtn { font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.inst-ic { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -.2em; color: inherit; flex: none; }
.inst-ic svg { width: 100%; height: 100%; display: block; }
[data-inst-ic-slot] { display: inline-flex; vertical-align: -.2em; }
.inst-hbtn .inst-ic { width: 20px; height: 20px; vertical-align: middle; }
/* Warna merek logo perangkat (baris logo, tombol header, judul lembar, tautan footer) */
:is(.dev-ic, .inst-ic).brand-android { color: #3DDC84; } :is(.dev-ic, .inst-ic).brand-apple { color: #000; } [data-theme="dark"] :is(.dev-ic, .inst-ic).brand-apple { color: #fff; }
/* Mode terang: hijau Android & panel Windows kontrasnya rendah di latar putih → garis tepi gelap tipis */
:root:not([data-theme="dark"]) :is(.dev-ic, .inst-ic:not(.inst-badge)):is(.brand-android, .brand-windows) svg { filter: drop-shadow(0 0 .5px rgba(0, 0, 0, .7)) drop-shadow(0 0 .3px rgba(0, 0, 0, .5)); }
/* Lencana di tombol teal: gelap untuk Android/Windows (hijau/kuning ≥9:1), putih untuk Apple hitam (21:1); cincin pemisah */
.inst-badge { box-sizing: border-box; width: 1.6em; height: 1.6em; padding: .26em; border-radius: 50%; vertical-align: -.45em; background: #0b1f1d; box-shadow: 0 0 0 1.5px #fff; }
.inst-ic.inst-badge.brand-apple { background: #fff; color: #000; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .55); padding: .24em .26em .28em; }
[data-theme="dark"] .inst-ic.inst-badge.brand-apple { color: #000; }
[data-theme="dark"] .inst-badge:not(.brand-apple) { box-shadow: 0 0 0 1.5px #0b1f1d; }
.btn .inst-ic { margin-right: .15rem; }
.btn:has(.inst-badge) { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.inst-hlbl { display: none; }
@media (min-width: 760px) { .inst-hbtn { width: auto; padding: 0 .85rem; border-radius: 999px; font-size: .92rem; font-weight: 700; color: var(--primary); margin-left: auto; } .inst-hlbl { display: inline; } }
.inst-banner { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .7rem; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: var(--radius); padding: .7rem .8rem; margin: -.2rem 0 1.2rem; box-shadow: var(--shadow); }
.inst-banner img, .inst-box img, .inst-head img { border-radius: 22%; display: block; }
.inst-banner small, .inst-box small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.inst-banner .btn, .inst-box .btn { white-space: nowrap; margin: 0; }
@media (max-width: 480px) { .inst-banner { grid-template-columns: auto 1fr auto; } .inst-banner .btn { grid-column: 1 / -1; width: 100%; } .inst-banner .inst-x { grid-row: 1; grid-column: 3; } }
.inst-x { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex: none; }
.inst-x:hover { background: var(--surface-2); }
.inst-box { display: flex; align-items: center; gap: .85rem; background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border: 1px solid var(--border); border-radius: 18px; padding: .9rem 1rem; margin: 0 0 1.2rem; color: var(--text); box-shadow: var(--shadow); }
.inst-box-txt { flex: 1; min-width: 0; } .inst-box-txt b { font-size: 1.02rem; }
@media (max-width: 420px) { .inst-box { flex-wrap: wrap; } .inst-box .btn { width: 100%; } }
.inst-sheet-wrap { position: fixed; inset: 0; z-index: calc(var(--mochi-z, 2147483000) + 20); display: flex; align-items: flex-end; justify-content: center; }
.inst-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: inst-fade .2s ease; }
.inst-sheet { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 24px - env(safe-area-inset-top)); overflow: auto; overscroll-behavior: contain; background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; padding: .4rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0, 0, 0, .3); animation: mochi-sheet .26s cubic-bezier(.2, .9, .3, 1); }
@media (min-width: 760px) { .inst-sheet-wrap { align-items: center; } .inst-sheet { border-radius: 22px; } }
html.inst-open { overflow: hidden; }
.inst-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: .3rem auto .6rem; }
.dev-icons { display: inline-flex; align-items: center; gap: .6rem; vertical-align: middle; line-height: 1; }
.dev-ic { display: inline-flex; width: 20px; height: 20px; color: var(--text); opacity: .8; transition: opacity .15s, color .15s; }
.dev-ic svg { width: 100%; height: 100%; display: block; }
.dev-icons.has-current .dev-ic { opacity: .32; }
.dev-icons.has-current .dev-ic.is-current { opacity: 1; }
.dev-ic-sm { width: 18px; height: 18px; opacity: .75; vertical-align: -3px; margin-right: .15rem; }
.inst-banner .dev-icons { display: flex; margin-top: .35rem; } .inst-head .inst-devs { margin: .3rem 0 0; } .pasang-devs { margin: .1rem 0 .4rem; }
.pasang-devs .dev-ic { width: 22px; height: 22px; }
.inst-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; } .inst-head h2 { margin: 0; font-size: 1.12rem; } .inst-head p { margin: .1rem 0 0; } .inst-head > div { flex: 1; }
.inst-steps { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .55rem; }
.inst-step { display: grid; grid-template-columns: 28px 112px 1fr; align-items: center; gap: .6rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: .6rem; }
.inst-n { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
[data-theme="dark"] .inst-n { color: #062421; }
.inst-ill { display: grid; place-items: center; min-height: 48px; }
.inst-txt { font-size: .93rem; line-height: 1.4; }
.ios-ic { width: 1.25em; height: 1.25em; vertical-align: -.25em; color: #007aff; }
.mock-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 1.3rem; font-weight: 800; color: #007aff; box-shadow: var(--shadow); }
.mock-btn .ios-ic { width: 28px; height: 28px; }
.mock-row { display: flex; align-items: center; gap: .35rem; font-size: .7rem; line-height: 1.15; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .45rem .5rem; color: var(--text); box-shadow: var(--shadow); }
.mock-row .ios-ic { flex: none; color: var(--text); }
.mock-add { display: inline-block; color: #007aff; font-weight: 800; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .9rem; box-shadow: var(--shadow); }
@media (max-width: 380px) { .inst-step { grid-template-columns: 28px 1fr; } .inst-ill { display: none; } }
.inst-copy { display: flex; gap: .4rem; margin: .5rem 0; } .inst-copy input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: .5rem .6rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); } .inst-copy .btn { margin: 0; white-space: nowrap; }
.notice-slot { padding: 0 .8rem; } .notice-slot:empty { display: none; }
.app-toast { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; max-width: 1100px; margin: .3rem auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: .2rem .35rem .2rem .7rem; font-size: .82rem; line-height: 1.35; }
.app-toast .btn { margin: 0; padding: .2rem .6rem; font-size: .8rem; white-space: nowrap; } .app-toast .inst-x { color: var(--muted); }
@keyframes inst-fade { from { opacity: 0; } to { opacity: 1; } }
.pasang-ic { vertical-align: middle; border-radius: 22%; }
.qr-box { width: min(260px, 70vw); margin: .4rem auto; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--border); } .qr-box svg { display: block; width: 100%; height: auto; }
.pasang-qr { text-align: center; } .pasang-qr .inst-copy { max-width: 460px; margin: .5rem auto; }
@media print { .inst-only, .app-toast, .notice-slot, .inst-sheet-wrap, .foot-cards { display: none !important; } }

/* ---------- ☕ Dukung (Saweria) + kotak pasang di footer ---------- */
.foot-cards { display: grid; gap: .75rem; margin-bottom: 1rem; }
.foot-cards:empty { display: none; }
.foot-cards .inst-box { margin: 0; }
@media (min-width: 760px) { .foot-cards { grid-template-columns: 1fr 1fr; } [data-standalone] .foot-cards, [data-installed] .foot-cards { grid-template-columns: 1fr; } }
.donate-box { display: flex; align-items: center; gap: .85rem; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid #f59e0b; border-radius: 18px; padding: .9rem 1rem; color: var(--text); box-shadow: var(--shadow); }
.donate-ic { flex: none; width: 56px; height: 56px; border-radius: 22%; display: grid; place-items: center; font-size: 1.9rem; background: #fef3c7; }
[data-theme="dark"] .donate-ic { background: #3a2a0c; }
.donate-txt { flex: 1; min-width: 0; } .donate-txt b { font-size: 1.02rem; } .donate-txt small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.donate-acts { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.donate-btn { display: inline-block; text-decoration: none; white-space: nowrap; background: #f59e0b; color: #1f1300; margin: 0; }
.donate-btn:hover { background: #d97706; color: #fff; }
.donate-more { font-size: .8rem; color: var(--muted); }
@media (max-width: 420px) { .donate-box { flex-wrap: wrap; } .donate-box .donate-btn { width: 100%; text-align: center; } }
.foot-links { font-weight: 600; } .foot-links a { text-decoration: none; }
.donate-qr { text-align: center; } .donate-qr .inst-copy { max-width: 460px; margin: .5rem auto; }

.foot-donate { margin: .4rem 0 0; font-size: .82rem; color: var(--muted); } .foot-donate a { font-weight: 600; }

/* Kotak SOS (Interpretasi AGD) */
.sos-grid { border-collapse: collapse; margin: .35rem 0; font-size: .85rem; }
.sos-grid th, .sos-grid td { border: 1px solid var(--line, #c9d3dc); padding: .25rem .6rem; text-align: center; }
.sos-grid tbody th { text-align: left; font-weight: 600; }
.sos-grid td { min-width: 4.5rem; }
