
:root {
  --brand: #4a7244;          
  --fill: #4a7244;           
  --on-fill: #ffffff;        
  --placeholder: #737c6f;    
  --brand-ink: #355a30;      
  --brand-soft: #d6e4d1;     
  --bg: #e9ede5;             
  --surface: #ffffff;
  --surface-2: #f2f6ef;      
  --border: #d3dacd;
  --border-strong: #c3ccbc;
  --text: #1b2119;
  --muted: #5f685b;
  --faint: #8c9588;
  --hero-bg: var(--brand-soft);   
  --hero-text: var(--brand-ink);
  --hero-sub: #4c6847;
  --hero-line: #a3c19b;
  --header: #4a7244;
  --tip-bg: #f7efdc; --tip-text: #5a4a1e;
  --warn-bg: #f7e6dc; --warn-text: #6a3520;
  --hear: #4f7fa8;
  --bad: #b3402f;
  --shadow: 0 1px 2px rgba(25,40,22,.06), 0 3px 10px rgba(25,40,22,.06);
  --radius: 20px;
  --tabbar-h: 76px;
  --header-h: 66px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6a9d63; --fill: #78ab70; --on-fill: #132411; --brand-ink: #c6e6bf; --brand-soft: #4a6942; --placeholder: #9aa595;
    --bg: #0f120e; --surface: #2f392b; --surface-2: #3a4635; --border: #5a6b51; --border-strong: #6d8064;
    --text: #edf2ea; --muted: #b6c0b1; --faint: #8f9a8a;
    --hero-bg: #34552f; --hero-text: var(--brand-ink); --hero-sub: #a9c8a2; --hero-line: #5e8f58;
    --header: #2f4a2b;
    --tip-bg: #33301d; --tip-text: #ead9a3; --warn-bg: #3b2820; --warn-text: #f0c4aa;
    --hear: #8ab6dc; --bad: #ec8b7c; --shadow: 0 0 0 1px rgba(255,255,255,.03), 0 2px 6px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --brand: #6a9d63; --fill: #78ab70; --on-fill: #132411; --brand-ink: #c6e6bf; --brand-soft: #4a6942; --placeholder: #9aa595;
  --bg: #0f120e; --surface: #2f392b; --surface-2: #3a4635; --border: #5a6b51; --border-strong: #6d8064;
  --text: #edf2ea; --muted: #b6c0b1; --faint: #8f9a8a;
  --hero-bg: #34552f; --hero-text: var(--brand-ink); --hero-sub: #a9c8a2; --hero-line: #5e8f58;
  --header: #2f4a2b;
  --tip-bg: #33301d; --tip-text: #ead9a3; --warn-bg: #3b2820; --warn-text: #f0c4aa;
  --hear: #8ab6dc; --bad: #ec8b7c; --shadow: 0 0 0 1px rgba(255,255,255,.03), 0 2px 6px rgba(0,0,0,.5);
}
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-fs="2"] { font-size: 112.5%; }
html[data-fs="3"] { font-size: 125%; }
html[data-fs="4"] { font-size: 140%; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 12px; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 4px;
  padding-left: max(8px, calc((100% - 760px) / 2)); padding-right: max(8px, calc((100% - 760px) / 2));
  background: var(--header);
  color: #fff; box-shadow: 0 2px 12px rgba(30,55,26,.18);
}
.tb-title { flex: 1; min-width: 0; padding: 4px 8px; display: flex; flex-direction: column; justify-content: center; border-radius: 12px; color: #fff; }
.tb-title:active { background: rgba(255,255,255,.14); }
.tb-main { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.tb-sub { font-size: 14px; opacity: .85; font-weight: 400; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.icon-btn {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .1s;
}
.icon-btn:active { background: rgba(255,255,255,.18); transform: scale(.94); }
@media (hover: hover) { .icon-btn:hover { background: rgba(255,255,255,.14); } }
.icon-btn svg { width: 24px; height: 24px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 18px rgba(25,40,22,.08);
}
.tabbar-in { display: flex; justify-content: space-evenly; align-items: center; height: 100%; max-width: 560px; margin: 0 auto; }
.tabbar { --tab-sq: min(60px, calc((100vw - 12px) / 5 - 6px)); }
.tab {
  flex: none; width: var(--tab-sq); height: var(--tab-sq); min-width: 0; border: 0; border-radius: 26%; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .8125rem; font-weight: 700; letter-spacing: .03em;
}
.tab svg { width: 26px; height: 26px; flex: none; }
.tab.active { background: var(--fill); color: var(--on-fill); box-shadow: 0 3px 10px rgba(74,114,68,.35); }
.tab:active { transform: scale(.95); }
@media (min-width: 760px) {
  .tabbar {
    position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top)); bottom: auto; height: auto;
    padding: 12px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); border: 0; box-shadow: none;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .tabbar-in { max-width: 728px; height: 50px; padding: 5px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
  .tabbar-in { justify-content: normal; align-items: stretch; gap: 4px; }
  .tab { flex: 1; width: auto; height: auto; flex-direction: row; gap: 8px; font-size: 1rem; border-radius: 12px; }
  .tab svg { width: 20px; height: 20px; }
  @media (hover: hover) { .tab:not(.active):hover { background: var(--surface-2); color: var(--text); } }
}
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 28px; }
.site-foot { max-width: 760px; margin: 0 auto; text-align: center; font-size: .875rem; color: var(--muted); line-height: 1.75;
  padding: 8px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 80px); }  
@media (min-width: 760px) { .wrap { padding-top: 4px; } .site-foot { padding-bottom: 88px; } }
.search { position: relative; margin-bottom: 14px; }
.search > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--brand); pointer-events: none; }
.search input {
  width: 100%; height: 50px; padding: 0 52px 0 44px; font: inherit; font-size: 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--placeholder); }
.search input::-webkit-search-cancel-button { display: none; }
.search-key { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 760px) {
  .search-key { display: block; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1rem; color: var(--placeholder); pointer-events: none; white-space: nowrap; }
  .search input:focus ~ .search-key, .search input:not(:placeholder-shown) ~ .search-key { display: none; }
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.search .clear { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.search .clear { padding: 4px; background-clip: content-box; }  
.search .clear svg { width: 16px; height: 16px; }
.res-count, .res-none { font-size: .8125rem; color: var(--muted); margin: 2px 4px 10px; font-weight: 700; }
.res { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
.res-link { display: block; padding: 12px 14px; border-radius: var(--radius); }
.res-link:active { background: var(--surface-2); }
.res.has-spk .res-link { padding-right: 66px; }
.res .tl, .res .zh { display: block; }
.res .where { display: inline-block; margin-top: 7px; padding: 2px 9px; border-radius: 999px; font-size: .8125rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); }
.lv-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 18px 18px 16px; margin-bottom: 14px;
  background: var(--hero-bg); color: var(--hero-text); border: 1.5px solid var(--hero-line); box-shadow: var(--shadow);
}
.lv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; position: relative; z-index: 1; }
.lv-ico { width: 46px; height: 46px; border-radius: 26%; background: var(--fill); color: var(--on-fill); display: grid; place-items: center; flex: none; box-shadow: 0 3px 8px rgba(74,114,68,.3); }
.lv-ico svg { width: 26px; height: 26px; }
.lv-name { margin: 0; font-size: 1.875rem; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.lv-hero p { margin: 0; font-size: 1rem; line-height: 1.6; position: relative; z-index: 1; }
.lv-prog { position: relative; z-index: 1; margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: .8125rem; font-weight: 700; color: var(--hero-sub); }
.lv-prog .bar { flex: 1; height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); overflow: hidden; }
.lv-prog .bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: 12px; }
.btn {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 6rem; padding: 13px 13px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .12s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); border-color: var(--brand); }
@media (hover: hover) { .btn:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(25,40,22,.12); transform: translateY(-2px); } }
.btn .num {
  align-self: flex-start; min-width: 32px; height: 26px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font-size: .8125rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-bottom: 4px;
}
.btn .title { font-size: 1.0625rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.btn .sub { font-size: .875rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.btn .done { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--fill); color: var(--on-fill); display: grid; place-items: center; }
.btn .done svg { width: 13px; height: 13px; }
.btn.read {
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--brand) 65%, var(--surface));
}
@media (hover: hover) { .btn.read:hover { border-color: var(--brand); } }
.btn.read .num { background: var(--fill); color: var(--on-fill); }
:root[data-theme="dark"] .btn.read { background: #161c14; border-color: #2b3827; box-shadow: none; }
:root[data-theme="dark"] .btn.read .title { color: #9aa595; }
:root[data-theme="dark"] .btn.read .sub { color: #6d7869; }
:root[data-theme="dark"] .btn.read .num, :root[data-theme="dark"] .btn.read .done { background: #233021; color: #7fa078; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.read { background: #161c14; border-color: #2b3827; box-shadow: none; }
  :root:not([data-theme="light"]) .btn.read .title { color: #9aa595; }
  :root:not([data-theme="light"]) .btn.read .sub { color: #6d7869; }
  :root:not([data-theme="light"]) .btn.read .num, :root:not([data-theme="light"]) .btn.read .done { background: #233021; color: #7fa078; }
}
.unit { display: none; }
.unit.show { display: block; animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.u-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; border-radius: 20px; padding: 12px 14px; margin-bottom: 12px; background: var(--hero-bg); color: var(--hero-text); border: 1.5px solid var(--hero-line); box-shadow: var(--shadow); }
.u-chip { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--fill); color: var(--on-fill); font-size: .8125rem; font-weight: 800; letter-spacing: .03em; }
.u-chip b { background: var(--hero-bg); color: var(--hero-text); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.u-hero h1 { position: relative; z-index: 1; margin: 0; font-size: 1.5rem; line-height: 1.3; font-weight: 800; letter-spacing: -.005em; }
.u-hero .desc { grid-column: 1 / -1; position: relative; z-index: 1; margin: 6px 0 0; font-size: .875rem; color: var(--hero-sub); line-height: 1.5; }
.card { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top) + 12px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 1.0625rem; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.card h3::before { content: ""; width: 5px; height: 1.05em; border-radius: 999px; background: var(--brand); flex: none; }
.card p { margin: 0 0 12px; font-size: 1rem; }
.card ul { margin: 0 0 12px; padding-left: 1.25em; font-size: 1rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card li { margin-bottom: 6px; }
.card li::marker { color: var(--brand); }
.ex { position: relative; background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-left: 3px solid var(--brand); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.ex:last-child { margin-bottom: 0; }
.ex.has-spk { padding-right: 62px; }
.tl { font-weight: 700; color: var(--brand-ink); font-size: 1.0625rem; line-height: 1.45; }
.zh { font-size: .875rem; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.sel-btn { position: absolute; z-index: 80; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--on-fill); font-weight: 700; font-size: .875rem; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 14px rgba(30,55,26,.3); }
.sel-btn::before { content: ""; position: absolute; inset: -3px 0; }   
.sel-btn svg { width: 16px; height: 16px; flex: none; }
.xref { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.spk {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: var(--fill); color: var(--on-fill); box-shadow: 0 2px 6px rgba(74,114,68,.3);
  display: grid; place-items: center; transition: background .15s, transform .1s;
}
.spk svg { width: 20px; height: 20px; }
.spk:active { transform: translateY(-50%) scale(.92); }
.spk .wave { display: none; gap: 2px; align-items: center; height: 14px; }
.spk .wave i { width: 3px; height: 100%; background: currentColor; border-radius: 999px; animation: wave .8s ease-in-out infinite; }
.spk .wave i:nth-child(2) { animation-delay: .15s; } .spk .wave i:nth-child(3) { animation-delay: .3s; }
.spk.playing { background: var(--fill); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent); }
.spk.playing svg { display: none; } .spk.playing .wave { display: flex; }
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.tip, .warn { position: relative; padding: 11px 13px 11px 41px; margin-top: 14px; font-size: 1rem; border-radius: 12px; line-height: 1.6; }
.tip::before, .warn::before { position: absolute; left: 13px; top: 14px; width: 18px; height: 18px; content: ""; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.tip { background: var(--tip-bg); color: var(--tip-text);
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.8.8 1 1.5 1 2.5h6c0-1 .2-1.7 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.warn { background: var(--warn-bg); color: var(--warn-text);
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20L12 3z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E"); }
.tip b, .warn b { font-weight: 800; }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 2px 0 14px; border: 1px solid var(--border); border-radius: 12px; }
.tblw:last-child .tbl { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 9px 11px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--brand-soft); color: var(--brand-ink); font-size: .875rem; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
td.zhc { font-size: .875rem; }   
tr:last-child td { border-bottom: 0; }
@media (max-width: 480px) { th, td { padding: 8px 8px; } .card { padding: 14px; } }
tr:nth-child(odd) td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td:first-child, td.lead { font-weight: 700; color: var(--brand-ink); word-break: keep-all; }   
td.nw { white-space: nowrap; }   
.card.hear h3::before { background: var(--hear); }
.card.hear .ex { border-left-color: var(--hear); }
.dlg .line { max-width: 88%; border-left-width: 1px; }
.dlg .line.them { border-radius: 4px 12px 12px 12px; }
.dlg .line.me { margin-left: auto; border-radius: 12px 4px 12px 12px; background: var(--brand-soft); border-color: transparent; }
.dlg .who { display: inline-block; font-size: .8125rem; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.dlg .line.me .who { color: var(--brand-ink); }
.fix { margin-bottom: 16px; }
.fix:last-child { margin-bottom: 0; }
.fix .x { display: flex; align-items: baseline; gap: 8px; padding: 2px 12px 6px; color: var(--bad); font-size: 1.0625rem; font-weight: 700; }
.fix .x .tl-x { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.fix .mk { font-weight: 800; }
.fix .ok .tl::before { content: "✓ "; color: var(--brand); }
.unit-nav { display: flex; gap: 12px; margin: 16px 0 4px; }
.nav-btn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .12s, border-color .15s; }
.nav-btn:active { transform: scale(.97); border-color: var(--brand); }
@media (hover: hover) { .nav-btn:hover { border-color: var(--brand); } }
.nav-btn .k { font-size: .8125rem; color: var(--brand-ink); font-weight: 700; }
.nav-btn .t { font-size: 1.0625rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-btn.next { text-align: right; }
.nav-btn.disabled { visibility: hidden; }
.mark { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; height: 48px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: transparent; cursor: pointer;
  font-weight: 700; font-size: 1rem; color: var(--muted); transition: all .15s; }
.mark svg { width: 18px; height: 18px; }
.mark.on { border: 0; background: var(--fill); color: var(--on-fill); }
.mark:active { transform: scale(.98); }
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; max-width: 520px; max-height: 100dvh; overflow-y: auto; margin: 0 auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.2); transform: translateY(105%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.sheet.open { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 999px; background: var(--border-strong); margin: 0 auto 12px; }
.sheet h4 { margin: 18px 0 8px; font-size: .8125rem; color: var(--muted); font-weight: 800; letter-spacing: .05em; }
.sheet h4:first-of-type { margin-top: 4px; }
.seg { display: flex; padding: 4px; background: var(--bg); border-radius: 12px; gap: 4px; }
.seg button { flex: 1; height: 44px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 700; color: var(--muted); transition: background .15s, color .15s; }
.seg button.on { background: var(--fill); color: var(--on-fill); box-shadow: 0 2px 8px rgba(74,114,68,.3); }
.seg .f1 { font-size: 14px; } .seg .f2 { font-size: 16px; } .seg .f3 { font-size: 18px; } .seg .f4 { font-size: 20px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.row .lbl { font-size: 1rem; font-weight: 700; }
.row .hint { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.switch { position: relative; flex: none; width: 52px; height: 31px; border: 0; border-radius: 999px; background: var(--faint); cursor: pointer; transition: background .2s; }   
.switch::before { content: ""; position: absolute; inset: -7px 0; }   
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--fill); }
.switch[aria-checked="true"]::after { transform: translateX(21px); }
.link-btn { border: 0; background: none; padding: 8px 0 0; color: var(--bad); font-size: .875rem; font-weight: 700; cursor: pointer; }
.sheet .done-btn { width: 100%; height: 50px; margin-top: 20px; border: 0; border-radius: 12px; background: var(--fill); color: var(--on-fill); font-weight: 800; font-size: 1rem; cursor: pointer; }
@media (min-width: 760px) {
  .sheet { bottom: auto; top: 50%; left: 50%; right: auto; width: 420px; border-radius: 20px; padding-bottom: 24px;
    transform: translate(-50%, -46%) scale(.97); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
  .sheet .grab { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 760px) { .card { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top) + 86px); } }
.toc { display: flex; gap: 8px; overflow-x: auto; margin: -2px -16px 12px; padding: 2px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.toc::-webkit-scrollbar { display: none; }
.toc a::after { content: ""; position: absolute; inset: -2px 0 -4px; }   
.toc a { position: relative; flex: none; padding: 8px 14px; border-radius: 999px; font-size: .875rem; font-weight: 700; white-space: nowrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .1s, border-color .15s; }
.toc a:active { transform: scale(.95); border-color: var(--brand); }
@media (hover: hover) { .toc a:hover { border-color: var(--brand); color: var(--brand-ink); } }
@media (min-width: 760px) { .toc { flex-wrap: wrap; overflow: visible; margin: -2px 0 14px; padding: 0; } }
mark { background: #ffe58a; color: inherit; border-radius: 3px; padding: 0 1px; }
:root[data-theme="dark"] mark { background: #7a6420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark { background: #7a6420; } }
:root { --hit: #ffe58a; }
:root[data-theme="dark"] { --hit: #7a6420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hit: #7a6420; } }
@keyframes hit { 0%, 55% { background-color: var(--hit); } }
.ex.hit, tr.hit td, tr.hit th, h1.hit, h3.hit, p.hit, li.hit, .tip.hit, .warn.hit, .tl-x.hit { animation: hit 2.4s ease-out; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); width: max-content; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: .875rem; font-weight: 700; text-align: center; box-shadow: var(--shadow);
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { .toast { bottom: 24px; } }
.install-btn { flex: none; height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--fill); color: var(--on-fill); font-weight: 800; font-size: 1rem; cursor: pointer; }
.swipe { display: none; margin: 6px 2px 0; font-size: .8125rem; font-weight: 700; color: var(--muted); }
.tblw.scroll .swipe { display: block; }
.fab { position: fixed; z-index: 55; right: max(16px, calc((100% - 760px) / 2)); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  
  background: var(--surface); color: var(--brand-ink); border: 1.5px solid var(--brand); box-shadow: 0 4px 14px rgba(30,55,26,.3);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .2s, transform .2s; }
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:active { transform: scale(.94); }
.fab svg { width: 22px; height: 22px; }
@media (min-width: 760px) { .fab { bottom: 24px; } }
@media (min-width: 920px) { .fab { right: calc((100% - 760px) / 2 - 64px); } }  
.clear-btn { margin-top: 10px; width: 100%; height: 44px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: transparent;
  color: var(--muted); font-weight: 700; font-size: .875rem; cursor: pointer; transition: all .15s; }
.clear-btn:disabled { opacity: .45; cursor: default; }
.clear-btn.confirm { background: var(--bad); border-color: var(--bad); color: #fff; }
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); }
.tb-title, .icon-btn, .tab, .res-link, .btn, .spk, .nav-btn, .mark, .seg button, .toc a, .fab, .clear-btn, .search .clear {
  transition: transform .24s var(--ease-out), background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.tb-title:active, .icon-btn:active, .tab:active, .res-link:active, .btn:active, .spk:active, .nav-btn:active,
.mark:active, .seg button:active, .toc a:active, .fab:active, .clear-btn:active, .search .clear:active { transition-duration: .1s; }
