/* Mandarin Learning website (direction A: Taipei Daylight). The app has its own styles in /app/app.css. */
:root {
  --blue: #1E55B0; --blue-d: #163F86; --blue-l: #EAF1FB; --yolk: #F2B420; --yolk-ink: #3A2900; --yolk-l: #FFF4D6;
  --ink: #122036; --sub: #3D4C64; --mute: #5A6880; --line: #DDE5F0; --bg: #F6F9FD; --card: #FFFFFF;
  --navy: #0F1B33; --navy-2: #122036; --navy-ink: #C9D4E6; --red: #B3261E;
  --f-head: 'Outfit', 'Noto Sans TC', system-ui, sans-serif;
  --f-body: 'DM Sans', 'Noto Sans TC', system-ui, sans-serif;
  --f-zh: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --f-kai: 'LXGW WenKai TC', 'Kaiti TC', 'DFKai-SB', serif;
  --r: 18px; --wrap: 1360px; --gutter: clamp(20px, 4vw, 48px);
  --spk: 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='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3Cpath d='M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--f-body); }
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-d); }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.6vw, 64px); letter-spacing: -1.5px; font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.8px; font-weight: 700; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0; }
.zh { font-family: var(--f-zh); }
.kai { font-family: var(--f-kai); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.narrow > * { max-width: 780px; }
[hidden] { display: none !important; }
.section { padding-block: 72px; }
.section.tight { padding-block: 48px; }
.band-white { background: var(--card); border-block: 1px solid var(--line); }
.band-blue { background: var(--blue-l); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; align-items: flex-end; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.split { display: grid; gap: 24px 64px; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-sm { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.lead { font-size: 19px; color: var(--sub); max-width: 36em; }
.muted { color: var(--mute); }
.sub { color: var(--sub); }
.small { font-size: 15px; }
.eyebrow { font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--red); }
.pill { align-self: flex-start; background: var(--yolk-l); color: #6B4A00; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 14px; font: 700 17px var(--f-body); text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-pri { background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-d); }
.btn-pri:hover { color: #fff; background: #1A4C9E; }
.btn-sec { background: var(--card); color: var(--blue); border-color: #C9D6EA; }
.btn-sec:hover { border-color: var(--blue); }
.btn-yolk { background: var(--yolk); color: var(--yolk-ink); }
.btn-yolk:hover { color: var(--yolk-ink); background: #E5A90F; }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 16px; border-radius: 999px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--yolk); outline-offset: 2px; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { flex: none; }
.wm { font-family: var(--f-head); font-size: 22px; font-weight: 700; letter-spacing: -0.5px; color: var(--ink); white-space: nowrap; }
.wm b { color: var(--blue); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 4px 22px; font-weight: 500; font-size: 16px; }
.nav a { color: #33425A; text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--blue); }
.nav .login { color: var(--blue); font-weight: 700; }
.nav .btn { color: #fff; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: 56px; width: min(84vw, 320px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px rgba(18,32,54,.16); padding: 10px; display: flex; flex-direction: column; }
.menu-panel a { padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.menu-panel a:hover { background: var(--blue-l); }
.menu-panel .btn { margin-top: 8px; color: #fff; }
@media (max-width: 880px) { .nav { display: none; } .menu { display: block; } }

/* hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 80px; padding-block: 72px; }
.hero > div { flex: 1 1 420px; min-width: 0; }
.hero > div:first-child { flex-grow: 1.3; }
.wordcard { width: 100%; max-width: 420px; margin: 0 auto; background: var(--card); border-radius: 28px; box-shadow: 0 24px 60px rgba(30,85,176,.16); padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.wordcard .hd { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--mute); }
.wordcard .big { font-family: var(--f-zh); font-size: 84px; font-weight: 700; line-height: 1.1; text-align: center; }
.wordcard .py { font-size: 22px; color: var(--blue); font-weight: 700; text-align: center; }
.ex { background: #F3F6FB; border-radius: 16px; padding: 14px 16px; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.ex .zh { font-size: 18px; color: var(--ink); }
.ex .p { color: var(--blue); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
a.card { text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--blue); transform: translateY(-2px); color: var(--ink); }
a.card .go { margin-top: auto; color: var(--blue); font-weight: 700; font-size: 15px; }
.card-dark { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.card-dark p { color: var(--navy-ink); }
.card-dark a { color: #9CC2FF; }
.num { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; font: 800 18px var(--f-head); display: flex; align-items: center; justify-content: center; }
.glyph { font-family: var(--f-zh); font-size: 40px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-l); color: var(--blue); display: flex; align-items: center; justify-content: center; }

/* page header for inner pages */
.phead { padding-block: 56px 32px; display: flex; flex-direction: column; gap: 14px; }
.crumbs { font-size: 15px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--mute); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-weight: 700; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 24px/1 var(--f-head); color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--sub); }

/* prose (legal, about) */
.prose { max-width: 780px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 26px; margin-top: 18px; }
.prose h3 { font-size: 19px; margin-top: 8px; }
.prose p, .prose li { color: #26344B; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--yolk-l); border-radius: 14px; padding: 16px 18px; color: #4A3500; }
.note-blue { background: var(--blue-l); color: #1A3566; }

/* tables */
.tbox { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 14px; color: var(--mute); font-weight: 700; background: #F8FAFD; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.w { font-family: var(--f-zh); font-size: 22px; font-weight: 500; white-space: nowrap; }
td.p { color: var(--blue); white-space: nowrap; }
td.z { font-family: var(--f-zh); color: var(--mute); white-space: nowrap; font-size: 15px; }
@media (max-width: 640px) { .hide-sm { display: none; } th, td { padding: 9px 10px; } }

/* audio button */
.say { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.say:hover { border-color: var(--blue); background: var(--blue-l); }
.say svg { width: 20px; height: 20px; }
.say:empty::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--spk) center / contain no-repeat; mask: var(--spk) center / contain no-repeat; }

/* forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--mute); }
input, select, textarea { font: 17px var(--f-body); color: var(--ink); background: #fff; border: 1.5px solid #C9D6EA; border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { border-radius: 12px; padding: 12px 14px; font-weight: 500; }
.msg.ok { background: #E3F5EA; color: #145A32; }
.msg.err { background: #FDE8E6; color: #8A1C14; }

/* chips / tabs */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid #C9D6EA; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer; }
.chip[aria-current], .chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--blue-l); color: var(--blue-d); }
.tag-warn { background: #FDE8E6; color: #8A1C14; }

/* CTA band + footer */
.cta { background: var(--blue); color: #fff; }
.cta .wrap { padding-block: 72px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.foot { background: var(--navy); color: var(--navy-ink); font-size: 15px; }
.foot a { color: var(--navy-ink); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; gap: 32px 40px; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); padding-block: 56px 36px; }
@media (max-width: 1000px) { .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .foot-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foot h4 { margin: 0 0 12px; color: #fff; font: 700 15px var(--f-head); letter-spacing: .5px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-bottom { border-top: 1px solid #23324F; padding-block: 22px 32px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #A9B6CC; }
.foot .wm { color: #fff; } .foot .wm b { color: #86B4FF; }

/* pinyin chart */
.pychart { font-size: 15px; }
.pychart th, .pychart td { padding: 0; border: 1px solid var(--line); text-align: center; }
.pychart th { padding: 8px 6px; background: #F3F6FB; }
.pychart th.rowh { position: sticky; left: 0; z-index: 1; min-width: 56px; }
.pychart thead th { top: 0; z-index: 2; }
.pychart thead th:first-child { left: 0; z-index: 3; }
.pychart button { width: 100%; min-width: 58px; min-height: 52px; border: 0; background: none; cursor: pointer; font: 600 16px var(--f-body); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px; }
.pychart button small { font: 400 12px var(--f-zh); color: var(--mute); display: none; }
.pychart button:hover, .pychart button[aria-pressed="true"] { background: var(--blue-l); color: var(--blue-d); }
.pychart.zyon button small { display: block; }
.nowbar { position: sticky; z-index: 10; bottom: 12px; margin-top: 16px; background: var(--navy-2); color: #fff; border-radius: 18px; padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; box-shadow: 0 16px 40px rgba(18,32,54,.25); }
.nowbar .syl { font: 800 26px var(--f-head); min-width: 70px; }
.nowbar .tbtn { min-height: 44px; border-radius: 12px; border: 1px solid #3A4C6E; background: #1B2B49; color: #fff; padding: 6px 12px; cursor: pointer; font: 500 15px var(--f-body); display: inline-flex; gap: 8px; align-items: center; }
.nowbar .tbtn .zh { font-size: 20px; }
.nowbar .tbtn:hover { border-color: var(--yolk); }

/* tones */
.tone4 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.tonecard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tonecard .mk { font: 800 40px var(--f-head); color: var(--blue); }
.tonecard svg { width: 100%; max-width: 160px; height: 70px; }
.pairs td { text-align: center; }
.pairs td button { border: 0; background: none; cursor: pointer; padding: 6px; display: flex; flex-direction: column; align-items: center; width: 100%; min-height: 60px; justify-content: center; border-radius: 10px; }
.pairs td button:hover { background: var(--blue-l); }
.pairs td .zh { font-size: 22px; color: var(--ink); }
.pairs td small { color: var(--blue); font-size: 14px; }

/* phrases */
.phrase { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.phrase:last-child { border-bottom: 0; }
.phrase .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.phrase .zh { font-size: 22px; }
.phrase .p { color: var(--blue); }
.phrase .e { color: var(--sub); font-size: 15px; }

/* dictionary */
.search { display: flex; gap: 10px; }
.search input { font-size: 19px; }
.dres { display: flex; flex-direction: column; }
.dent { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dent .w { font-family: var(--f-zh); font-size: 30px; font-weight: 500; line-height: 1.2; min-width: 3.2em; }
.dent .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dent .p { color: var(--blue); font-weight: 600; }
.dent .z { font-family: var(--f-zh); color: var(--mute); font-size: 15px; }

/* printables */
.sheet-tools { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: end; }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; overflow-x: auto; }
.sheet-in { min-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.sheet-h { display: flex; justify-content: space-between; font: 600 14px var(--f-body); color: #555; border-bottom: 1px solid #999; padding-bottom: 6px; margin-bottom: 4px; }
.srow { display: flex; flex-direction: column; gap: 2px; break-inside: avoid; }
.srow .lab { font-size: 13px; color: #333; }
.boxes { display: grid; grid-template-columns: repeat(10, 1fr); border-left: 1.5px solid #C0392B; border-top: 1.5px solid #C0392B; }
.box { aspect-ratio: 1; border-right: 1.5px solid #C0392B; border-bottom: 1.5px solid #C0392B; position: relative; display: flex; align-items: center; justify-content: center; font-family: var(--f-kai); font-size: clamp(26px, 4.6vw, 48px); line-height: 1; color: #111; }
.box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.box span { position: relative; }
.box.trace span { color: #C9C9C9; }

@media print {
  .top, .foot, .noprint, .cta, .phead, .crumbs { display: none !important; }
  body { background: #fff; }
  .section { padding: 0 !important; }
  .wrap { padding: 0 !important; max-width: none; }
  .sheet { border: 0; padding: 0; overflow: visible; }
  .sheet-in { min-width: 0; }
  .box { font-size: 15mm; }
  @page { margin: 12mm; }
}

/* word pages, situation lists, guides (scripts/site_seo.py) */
.h3 { font-size: 20px; }
.wp-h1 { font-size: 44px; letter-spacing: .04em; }
.wp-main { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .wp-main { grid-template-columns: minmax(0, 1fr); } }
.wp-card { max-width: none; margin: 0; position: sticky; top: 88px; }
@media (max-width: 820px) { .wp-card { position: static; } }
.wordcard .big.long { font-size: 60px; }
.wordcard .zy { font-family: var(--f-zh); color: var(--mute); text-align: center; font-size: 16px; letter-spacing: .06em; margin-top: 4px; }
.wp-en { text-align: center; font-size: 20px; font-weight: 700; margin-top: 8px; }
.wp-ex .zh { font-size: 22px; }
.wp-chars { display: flex; flex-wrap: wrap; gap: 10px; }
.wp-char { flex: 1 1 120px; min-width: 0; background: #F3F6FB; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.wp-char .zh { font-size: 34px; font-weight: 700; line-height: 1.1; }
.wp-char b { color: var(--blue); }
.wp-char small { color: var(--mute); font-size: 13px; line-height: 1.35; }
.wp-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.wp-mini { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s; }
.wp-mini:hover { border-color: var(--blue); transform: translateY(-1px); }
.wp-mini .zh { font-size: 22px; font-weight: 700; }
.wp-mini b { color: var(--blue); font-size: 14px; font-weight: 600; }
.wp-mini small { color: var(--mute); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-pn { margin-top: 28px; gap: 12px; }
.wp-pn a { font-weight: 700; }
td.w a { color: var(--blue); }
table .cat { text-align: left; background: var(--blue-l); color: var(--blue-d); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.cmp td.zh { font-size: 18px; }
.wp-h1s { display: block; font-size: 22px; font-weight: 600; color: var(--mute); margin-top: 4px; letter-spacing: 0; }

/* ---- Homepage v2 (Nov 2026): the product up front, the Traditional vs Simplified word difference as the one bold element ---- */
.hero-v2 { padding-block: 64px 56px; }
.hero-v2 .lead { font-size: 20px; }
.hero-visual { position: relative; display: flex; justify-content: center; padding: 8px 0 40px; }
.device { margin: 0; width: min(330px, 78vw); border-radius: 44px; background: #1D2130; padding: 11px; box-shadow: 0 30px 70px rgba(15, 27, 51, .28); transform: rotate(2.5deg); }
.device img { display: block; width: 100%; height: auto; border-radius: 34px; }
.hv-bear { position: absolute; left: max(0px, calc(50% - 290px)); bottom: 18px; width: 150px; height: auto; filter: drop-shadow(0 10px 18px rgba(15, 27, 51, .25)); }
.hv-note { position: absolute; right: max(0px, calc(50% - 300px)); top: 34%; max-width: 230px; background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: 0 16px 40px rgba(30, 85, 176, .2); display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.35; color: var(--sub); border-left: 6px solid var(--yolk); }
.hv-note .zh { font-size: 24px; font-weight: 700; color: var(--ink); }
@media (max-width: 560px) {
  .hv-bear { width: 104px; left: 0; bottom: 6px; }
  .hv-note { right: 0; top: auto; bottom: 22%; max-width: 190px; font-size: 14px; }
  .hv-note .zh { font-size: 20px; }
}
.compare-wrap { display: grid; gap: 32px 64px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
@media (max-width: 900px) { .compare-wrap { grid-template-columns: minmax(0, 1fr); } }
.compare { overflow-x: auto; }
.compare table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 17px; }
.compare th, .compare td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.compare thead th { font-size: 14px; color: var(--mute); font-weight: 700; border-bottom: 2px solid var(--line); }
.compare thead th:nth-child(2) { color: var(--blue); }
.compare tbody th { font-weight: 600; color: var(--sub); white-space: nowrap; }
.compare td.tw { background: var(--yolk-l); }
.compare tbody tr:first-child td.tw { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.compare tbody tr:last-child td.tw { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; border-bottom: 0; }
.say-word { all: unset; cursor: pointer; display: inline-flex; flex-direction: column; gap: 2px; border-radius: 10px; padding: 2px 6px; margin: -2px -6px; }
.say-word:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.say-word .zh { font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.say-word .py { font-size: 15px; font-weight: 700; color: var(--blue); }
.say-word:hover .zh { color: var(--blue); }
.compare td.ml .zh { font-size: 22px; color: var(--mute); text-decoration: line-through; text-decoration-color: rgba(179, 38, 30, .55); text-decoration-thickness: 2px; }
.why .glyph { font-size: 34px; }
.tour { display: grid; gap: 40px 72px; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: center; }
@media (max-width: 860px) { .tour { grid-template-columns: minmax(0, 1fr); } }
.tour-video { display: flex; justify-content: center; }
.tour-video video, .tour-video img { width: min(340px, 100%); height: auto; aspect-ratio: 9 / 16; border-radius: 28px; background: #0F1B33; box-shadow: 0 24px 60px rgba(30, 85, 176, .22); display: block; }
.steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 12px; color: var(--sub); max-width: 38em; }
.steps strong { color: var(--ink); }
.res-split { display: grid; gap: 40px 64px; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; }
@media (max-width: 960px) { .res-split { grid-template-columns: minmax(0, 1fr); } }
.res-split .wordcard { margin: 0; position: sticky; top: 96px; }
@media (max-width: 960px) { .res-split .wordcard { position: static; margin: 0 auto; } }
.grid-2c { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ig-row { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .ig-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ig { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; }
.ig img { width: 100%; height: auto; border-radius: 18px; display: block; box-shadow: 0 10px 26px rgba(15, 27, 51, .14); }
.ig:hover img { box-shadow: 0 14px 32px rgba(30, 85, 176, .28); }
.foot .social { display: flex; gap: 16px; }
.say-word .py { white-space: nowrap; }
@media (max-width: 560px) { .compare th, .compare td { padding: 10px 8px; } .say-word .zh { font-size: 26px; } .compare td.ml .zh { font-size: 19px; } .compare tbody th { white-space: normal; font-size: 15px; } }

/* phrase pages: Reel memes, classic lines and showdowns explained (/phrases, scripts/build_site.py) */
.wordcard .big.xl { font-size: clamp(36px, 9vw, 46px); line-height: 1.3; }
.ph-lit { text-align: center; font-size: 19px; font-weight: 700; margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.ph-lit small { font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--mute); }
.ph-mean { background: var(--yolk-l); border-radius: 14px; padding: 12px 14px; color: #3D2C00; font-size: 16px; line-height: 1.5; }
.ph-notes { display: flex; flex-direction: column; gap: 12px; color: #26344B; }
.ph-src ul { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.ph-app { background: var(--blue-l); border-color: #C9D6EA; }
.ph-cmp { padding: 18px; }
.ph-cmp .compare table { font-size: 16px; }
.compare.neutral td.ml .zh { text-decoration: none; display: block; }
.compare td.ml .py { display: block; font-size: 14px; color: var(--mute); white-space: nowrap; }
.compare.neutral thead th:nth-child(3) { color: var(--sub); }
.ph-item h3.zh { font-size: 24px; font-weight: 700; line-height: 1.3; }
.ph-item .ph-py { color: var(--blue); font-weight: 600; font-size: 15px; }
.ph-tag { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--blue-l); color: var(--blue-d); }
.ph-pairs { font-size: 20px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ph-pairs span { color: var(--mute); }
@media (max-width: 560px) { .ph-cmp { padding: 12px; } .ph-cmp .compare th, .ph-cmp .compare td { padding: 10px 6px; } .compare td.ml .zh { font-size: 19px; } }
