/* pronounce.love
   纸本主题：暖白底 + 发音视频同款深绿；访客系统为深色时自动用深色版，没有手动切换。
   音标类型色（单元音 / 双元音 / 卷舌元音 / 辅音）只上在符号和小圆点上。
   状态都挂在 <html> 上：data-acc（us/uk）、data-mode（simple/detail）。 */
:root {
  color-scheme: light;
  --bg: #F4F1EB; --surface: #FFFFFF; --ink: #1B1A17; --muted: #746E65; --line: #ECE6DC;
  --us: #2C5A47; --uk: #2C5A47; --on-acc: #FFFFFF; --mark: #F1CF48; --mark-ink: #1B1A17;
  --k-mono: #B5472C; --k-diph: #6F4AA8; --k-rcol: #9A5B12; --k-cons: #1F5F8D;
  --shadow: 0 1px 2px rgb(60 45 20 / .05), 0 8px 28px rgb(60 45 20 / .06);
  --f-disp: 'Newsreader', Georgia, serif; --w-disp: 500;
  --f-ipa: 'Gentium Book Plus', 'Charis SIL', 'Doulos SIL', 'Times New Roman', serif;
  --f-ui: 'Source Sans 3', 'Noto Sans Thai', 'PingFang SC', 'PingFang TC', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Microsoft YaHei', 'Yu Gothic', system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #12110F; --surface: #1C1A17; --ink: #EEE9E0; --muted: #A09A8F; --line: #2D2A25;
    --us: #86C2A5; --uk: #86C2A5; --on-acc: #12110F; --mark: #E2C03E;
    --k-mono: #F0937A; --k-diph: #C3A6F0; --k-rcol: #E8B46A; --k-cons: #82B9EA;
    --shadow: 0 1px 0 rgb(255 255 255 / .03);
  }
}
:root { --acc: var(--us); }
:root[data-acc="uk"] { --acc: var(--uk); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
:root[data-mode="simple"] .only-detail, :root[data-mode="detail"] .only-simple { display: none !important; }
:root[data-acc="us"] .acc-uk, :root[data-acc="uk"] .acc-us { display: none !important; }
.k-mono { --k: var(--k-mono); } .k-diph { --k: var(--k-diph); } .k-rcol { --k: var(--k-rcol); } .k-cons { --k: var(--k-cons); }
.sl { font-family: var(--f-ui); font-weight: 300; font-size: .78em; opacity: .3; margin-inline: .05em; position: relative; top: -.04em; }
.ipa { font-family: var(--f-ipa); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 16px; }

/* 卡片 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.card-h h2, .card-h h3 { margin: 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-h h2::before, .card-h h3::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--k, var(--acc)); }
.card-h b { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-h .en { font-size: 10.5px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.card-b { padding: 12px 14px 14px; }

/* 顶栏 */
.top { display: flex; align-items: center; gap: 6px; padding-block: 14px 10px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; text-decoration: none; white-space: nowrap; font-family: var(--f-disp); font-weight: var(--w-disp); font-size: 19px; letter-spacing: -.02em; }
.brand .logo { width: 28px; height: 28px; border-radius: 50%; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; font-family: var(--f-ipa); font-size: 19px; font-weight: 400; letter-spacing: 0; line-height: 1; padding-bottom: 3px; transition: background-color .25s; }
.brand .tld { color: var(--muted); font-weight: 400; }
.mini-seg { display: inline-flex; gap: 2px; }
.mini-seg button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.mini-seg button:hover { color: var(--ink); }
.mini-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.navlink { font-size: 13px; text-decoration: none; color: var(--muted); padding: 4px 6px; white-space: nowrap; }
.navlink:hover, .navlink[aria-current="page"] { color: var(--ink); }
.sep { width: 1px; height: 16px; background: var(--line); flex: none; }
.ibtn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: inline-grid; place-items: center; padding: 0; text-decoration: none; flex: none; }
.ibtn:hover { color: var(--ink); background: var(--surface); }
.ibtn svg { width: 17px; height: 17px; }
.menu {
  position: absolute; right: 0; top: 52px; z-index: 30; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; display: grid; gap: 2px; min-width: 200px; box-shadow: 0 16px 40px rgb(0 0 0 / .14);
}
.menu button, .menu a { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 8px; border-radius: 8px; text-align: left; font-size: 13px; text-decoration: none; }
.menu button:hover, .menu a:hover, .menu [aria-current="true"] { background: var(--bg); }
.menu [aria-current="true"] { font-weight: 600; }
.menu small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 3px 4px; }
@media (max-width: 460px) { .brand .tld { display: none; } .top .navlink.hide-sm { display: none; } }

/* 口音切换 */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 2px 14px; }
.acc-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: color-mix(in oklab, var(--ink) 6%, var(--bg)); border-radius: 999px; padding: 3px; width: min(100%, 300px); }
.acc-seg button { position: relative; z-index: 1; border: 0; background: none; padding: 6px 4px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s; white-space: nowrap; }
.acc-seg button small { font-weight: 400; font-size: 11px; margin-left: 4px; opacity: .75; font-variant-numeric: tabular-nums; }
.acc-seg button[aria-selected="true"] { color: var(--on-acc); }
.acc-seg .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); background: var(--acc); border-radius: 999px; transition: transform .28s cubic-bezier(.3,.7,.2,1), background-color .25s; box-shadow: 0 2px 6px rgb(0 0 0 / .12); }
:root[data-acc="uk"] .acc-seg .thumb { transform: translateX(100%); }
.lede { margin: 0; color: var(--muted); font-size: 13px; }
.lede b { color: var(--ink); font-weight: 600; }
h1.page-h { margin: 6px 0 12px; font-family: var(--f-disp); font-weight: var(--w-disp); font-size: clamp(22px, 4vw, 28px); letter-spacing: -.01em; line-height: 1.25; text-wrap: balance; }

/* 简单模式：音标卡片 */
.board { display: grid; gap: 12px; }
.stack { display: contents; }
.tiles { display: grid; grid-template-columns: repeat(var(--cm), minmax(0, 1fr)); gap: 1px; background: var(--line); }
.t, .fill { background: var(--surface); }
.t {
  position: relative; aspect-ratio: 1 / .86; container-type: inline-size; min-width: 0; border: 0; border-radius: 0; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; transition: background-color .15s;
}
.t:hover { background: color-mix(in oklab, var(--k) 7%, var(--surface)); }
.t:active { background: color-mix(in oklab, var(--k) 13%, var(--surface)); }
.t .s { font-family: var(--f-ipa); font-size: clamp(19px, 31cqw, 36px); line-height: 1; color: var(--k); white-space: nowrap; }
.t .e { font-size: clamp(10px, 13.5cqw, 13px); line-height: 1; color: var(--muted); }
.t mark { background: none; color: var(--ink); font-weight: 600; }
.t::after { content: ''; position: absolute; left: 7px; top: 7px; border-left: 6px solid var(--k); border-block: 4px solid transparent; opacity: 0; transition: opacity .15s; }
.t:hover::after { opacity: .7; }
@media (min-width: 820px) {
  .board { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: 16px; align-items: start; }
  .stack { display: flex; flex-direction: column; gap: 16px; }
  .tiles { grid-template-columns: repeat(var(--cd), minmax(0, 1fr)); }
  .t { aspect-ratio: 5 / 4; gap: 7px; }
}

/* 详细模式 */
.detail { display: grid; gap: 12px; }
.detail > div { display: grid; gap: 12px; align-content: start; }
@media (min-width: 860px) { .detail { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 16px; align-items: start; } .detail > div { gap: 16px; } }
.chart { position: relative; width: 100%; aspect-ratio: 4 / 3; background-image: radial-gradient(color-mix(in oklab, var(--muted) 35%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .trap { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; }
.chart .guide { stroke: var(--line); stroke-width: 1.2; fill: none; }
.chart .ax { font-size: 10px; fill: var(--muted); font-family: var(--f-ui); }
.chart .glide { stroke: var(--gk, var(--k-diph)); stroke-width: 3; fill: none; stroke-linecap: round; }
.chart .glide-head { fill: var(--gk, var(--k-diph)); }
.v { position: absolute; translate: -50% -50%; height: 32px; padding: 0 8px; border-radius: 16px; border: 1px solid color-mix(in oklab, var(--k) 40%, var(--line)); background: var(--surface); color: var(--k); font-family: var(--f-ipa); font-size: 18px; line-height: 1; display: grid; place-items: center; white-space: nowrap; box-shadow: 0 1px 3px rgb(0 0 0 / .06); transition: background-color .15s, opacity .2s; }
.v:hover, .chip:hover, .c:not(.empty):hover { background: color-mix(in oklab, var(--k) 9%, var(--surface)); }
.v[aria-pressed="true"], .chip[aria-pressed="true"], .c[aria-pressed="true"] { background: var(--k); border-color: var(--k); color: var(--surface); }
.v[aria-pressed="true"] .sl, .chip[aria-pressed="true"] .sl, .c[aria-pressed="true"] .sl { opacity: .5; }
.chart.gliding .v { opacity: .35; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid color-mix(in oklab, var(--k) 40%, var(--line)); color: var(--k); background: var(--surface); padding: 5px 12px; border-radius: 999px; display: inline-flex; align-items: baseline; gap: 6px; }
.chip .s { font-family: var(--f-ipa); font-size: 18px; line-height: 1.1; }
.chip .w { font-size: 11.5px; color: var(--muted); }
.chip[aria-pressed="true"] .w { color: var(--surface); opacity: .8; }
.crow { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); }
.crow:first-child { border-top: 0; }
.crow .lab { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.pairs { display: flex; flex-wrap: wrap; gap: 5px; }
.pair { display: grid; grid-template-rows: 32px 32px; gap: 3px; }
.c { min-width: 46px; height: 32px; padding: 0 6px; border: 1px solid color-mix(in oklab, var(--k) 40%, var(--line)); color: var(--k); background: var(--surface); font-family: var(--f-ipa); font-size: 17px; line-height: 1; display: grid; place-items: center; border-radius: 8px; white-space: nowrap; }
.c.voiced { background: color-mix(in oklab, var(--k) 8%, var(--surface)); }
.c.empty { border: 1px dashed var(--line); background: none; }
.legend { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--k-cons); border-radius: 3px; vertical-align: -1px; margin-right: 5px; background: var(--surface); }
.legend .vo i { background: color-mix(in oklab, var(--k-cons) 14%, var(--surface)); }

/* 热词卡片 */
.hot { margin-top: 26px; }
.hot-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.hot-h h2 { margin: 0; font-family: var(--f-disp); font-weight: var(--w-disp); font-size: 20px; letter-spacing: -.01em; }
.hot-h a { font-size: 13px; color: var(--muted); text-decoration: none; }
.hot-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin-inline: -2px; }
.hot-row a { flex: none; width: 156px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; transition: transform .15s, border-color .15s; }
.hot-row a:hover { border-color: color-mix(in oklab, var(--acc) 50%, var(--line)); transform: translateY(-1px); }
.hot-row .w { font-family: var(--f-disp); font-weight: var(--w-disp); font-size: 19px; line-height: 1.2; }
.hot-row .i { font-family: var(--f-ipa); font-size: 13px; color: var(--acc); }
.hot-row .d { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
@media (min-width: 820px) { .hot-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } .hot-row a { width: auto; } }

/* 热词页 */
.crumb { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.whead { padding-block: 6px 4px; }
.whead h1 { margin: 2px 0 0; font-family: var(--f-disp); font-weight: var(--w-disp); font-size: clamp(30px, 6.5vw, 46px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.whead .what { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 62ch; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--acc); border: 1px solid currentColor; padding: 0 8px; border-radius: 999px; vertical-align: middle; }
.wlay { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 860px) { .wlay { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; } .wlay > div { display: grid; gap: 16px; } }
@media (max-width: 859px) { .wlay > div { display: grid; gap: 12px; } }
.film { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; aspect-ratio: 16 / 9; }
.film video { display: block; width: 100%; height: 100%; }
.prons { display: grid; }
.pron { display: grid; grid-template-columns: max-content 1fr; align-items: baseline; gap: 2px 10px; padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; background: none; border-inline: 0; border-bottom: 0; width: 100%; }
.pron:first-child { border-top: 0; }
.pron .who { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 3em; }
.pron { grid-template-columns: max-content 1fr auto; }
.pron .ipa { font-size: 24px; line-height: 1.2; }
.pron .rec { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.pron.norec .rec { font-style: italic; }
.pron .play { grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 40px; height: 40px; border-radius: 50%; background: var(--acc); display: grid; place-items: center; transition: transform .15s; }
.pron .play::before { content: ''; border-left: 11px solid var(--on-acc); border-block: 7px solid transparent; margin-left: 3px; }
.pron:hover .play { transform: scale(1.06); }
.pron.playing .play { animation: pulse .8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.credit { margin: 0; padding: 8px 14px 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.credit a { color: inherit; }
.pron[aria-pressed="true"] { background: color-mix(in oklab, var(--acc) 6%, var(--surface)); }
.pron[aria-pressed="true"] .who { color: var(--acc); }
.syl { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.syl span { padding: 4px 11px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 17px; }
.syl span.s { background: var(--acc); border-color: var(--acc); color: var(--on-acc); font-weight: 700; }
.respell { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.respell b { color: var(--ink); letter-spacing: .03em; }
.phones { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.ph { position: relative; min-width: 56px; padding: 12px 10px 8px; border: 1px solid color-mix(in oklab, var(--k) 40%, var(--line)); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 4px; transition: background-color .15s; }
.ph:hover { background: color-mix(in oklab, var(--k) 8%, var(--surface)); }
.ph .s { font-family: var(--f-ipa); font-size: 22px; line-height: 1; color: var(--k); white-space: nowrap; }
.ph .w { font-size: 11px; color: var(--muted); }
.ph .w mark { background: none; color: var(--ink); font-weight: 700; }
.ph.stress::before { content: attr(data-stress); position: absolute; top: -9px; left: 50%; translate: -50% 0; font-size: 10px; font-weight: 700; line-height: 1; background: var(--mark); color: var(--mark-ink); padding: 3px 6px; border-radius: 4px; white-space: nowrap; }
.legend2 { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.legend2 span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--k); margin-right: 5px; }
.prose { margin: 0; font-size: 15px; max-width: 62ch; }
.alt { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 13.5px; }
.wrong { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.wrong li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; }
.wrong li::before { content: '✕'; flex: none; font-size: 10px; font-weight: 800; color: #C0392B; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, #C0392B 12%, var(--surface)); }
.refs { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.refs a { color: inherit; text-underline-offset: 2px; }
.lvl { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg); }
.faq { margin-top: 16px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; padding: 12px 14px; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: 14px; }
.more { margin-top: 26px; }
.wl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wl a { text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 2px; }
.wl a:hover { border-color: color-mix(in oklab, var(--acc) 50%, var(--line)); }
.wl .w { font-family: var(--f-disp); font-weight: var(--w-disp); font-size: 21px; line-height: 1.2; }
.wl .i { font-family: var(--f-ipa); font-size: 14px; color: var(--acc); }
.wl .d { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }

footer { margin-top: 36px; padding-block: 18px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* 视频抽屉 */
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 100%; background: var(--surface); color: var(--ink); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -10px 40px rgb(0 0 0 / .2); }
dialog.sheet::backdrop { background: rgb(10 10 12 / .5); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: up .3s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 20px; } }
.sheet-in { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.sheet-top .g { display: inline-flex; align-items: center; gap: 7px; }
.sheet-top .g::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--k); }
.sheet-top b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.sheet .film { box-shadow: none; border-radius: 12px; }
.info { display: flex; gap: 14px; align-items: flex-start; }
.info .sym { font-family: var(--f-ipa); font-size: 32px; line-height: 1.05; color: var(--k); white-space: nowrap; }
.info p { margin: 0; }
.info .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.info mark { background: none; color: var(--k); font-weight: 700; }
.ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ctrl button { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; }
.ctrl button:hover { background: var(--bg); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
