/* iPhone-first reading and lookup interface, November 2026. */
:root {
  --paper: #f7f9f8;
  --ink: #183d36;
  --muted: #657b75;
  --line: #e3eae6;
  --lime: #d2ef91;
  --soft: #edf2ef;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body { background: var(--paper); }
#app { max-width: 1100px; }
.topbar { height: calc(78px + env(safe-area-inset-top, 0px)); padding: calc(20px + env(safe-area-inset-top, 0px)) 22px 12px; }
.brand strong { font-size: 22px; letter-spacing: 1px; }
.brand strong span { font-size: 7px; letter-spacing: 1.8px; }
.brandmark { transform: scale(.9); }
.topbar > .icon-btn { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
main { padding: 15px 22px calc(110px + var(--safe)); }
h1 { font-weight: 750; letter-spacing: -1px; }
.eyebrow { font-size: 9px; color: #7b9389; letter-spacing: 1.8px; }
.home-greeting h1 { font-size: 34px; line-height: 1.35; margin-bottom: 11px; }
.greeting-dot { color: #91b74d; }
.home-greeting > .muted, .page-heading > p:last-child { font-size: 13px; line-height: 1.8; margin-top: 8px; }
.quick-search { display: flex; align-items: center; gap: 11px; background: #fff; border: 1px solid #dce6e0; border-radius: 18px; margin-top: 23px; padding: 5px 7px 5px 15px; box-shadow: 0 4px 18px #244e3210; }
.quick-search > svg { width: 20px; color: #708b80; }
.quick-search input { border: 0; outline: 0; background: transparent; min-width: 0; width: 100%; height: 42px; font-size: 16px; color: var(--ink); }
.quick-search input::placeholder { font-size: 13px; color: #899a91; }
.quick-search > button { border-radius: 13px; background: #ecf4e0; display: grid; place-items: center; min-width: 42px; height: 42px; }
.quick-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 7px 0 18px; }
.quick-tags > span { font-size: 10px; color: #7e9287; margin-right: 3px; }
.quick-tags button { font-size: 11px; min-height: 34px; padding: 6px 11px; background: #edf1ee; border-radius: 10px; }
.random-card { min-height: 195px; border-radius: 24px; background: #e6f1c9; padding: 23px 20px; color: var(--ink); border: 1px solid #d6e5b7; }
.random-card .eyebrow { font-size: 8px; color: #6c8251; letter-spacing: 1.2px; }
.hero-copy { width: calc(100% - 55px); position: relative; z-index: 2; }
.random-card h2 { color: #244531; font-size: 26px; margin: 13px 0 7px; line-height: 1.3; }
.random-card p { color: #6c7e59; font-size: 11px; }
.random-card .hero-button { margin-top: 20px; background: #244e3c; color: #fff; font-size: 12px; min-height: 47px; border-radius: 14px; box-shadow: 0 3px 0 #173327; padding: 10px 16px; }
.hero-button:active { transform: translateY(2px); box-shadow: 0 1px 0 #173327; }
.pocket-art { position: absolute; right: 16px; top: 64px; width: 76px; height: 100px; }
.mini-ticket { position: absolute; inset: 0; transform: rotate(12deg); background: #fffdf1; border-radius: 13px; border: 1px solid #bbcd9b; box-shadow: 6px 7px 0 #b9d48a; padding: 13px 9px; }
.mini-ticket > span { font-size: 12px; font-weight: 850; letter-spacing: 1px; }
.mini-ticket > i { display: block; height: 3px; width: 80%; background: #d7dec5; margin: 7px 0 0; border-radius: 5px; }
.mini-ticket > i + i { width: 55%; margin-top: 5px; }
.mini-ticket > b { display: block; margin-top: 9px; padding-top: 5px; border-top: 1px dashed #c7d2b1; font-size: 11px; letter-spacing: 3px; }
.orbit-dot { position: absolute; bottom: -12px; right: -2px; height: 10px; width: 10px; background: #f2bb68; border-radius: 50%; }
.orbit-spark { position: absolute; top: -28px; left: 4px; color: #809b4d; font-size: 25px; }
.random-tools { margin: 6px 2px 15px; }
.random-tools > span { font-size: 10px; }
.random-tools .text-btn { font-size: 11px; }
.section-head { margin: 26px 0 14px; gap: 12px; }
.section-head h2 { font-size: 18px; font-weight: 700; }
.section-head .eyebrow { display: block; font-size: 8px; margin-bottom: 6px; }
.section-head .text-btn { font-size: 11px; white-space: nowrap; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.topic-tile { --topic-bg: #e9f0e9; --topic-ink: #52775e; border: 1px solid #e7ede8; border-radius: 19px; padding: 14px 5px 12px; background: #fff; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.topic-icon { width: 44px; height: 44px; border-radius: 15px; background: var(--topic-bg); color: var(--topic-ink); }
.topic-tile strong { font-size: 12px; margin-top: 8px; font-weight: 600; }
.topic-tile small { font-size: 9px; color: #86968c; margin-top: 4px; }
.topic-food { --topic-bg: #fff0da; --topic-ink: #b17d3f; }
.topic-transport { --topic-bg: #e7effb; --topic-ink: #6583b1; }
.topic-stay { --topic-bg: #e8f2e5; --topic-ink: #6a8f60; }
.topic-shopping { --topic-bg: #f7e8e9; --topic-ink: #b37c82; }
.topic-visit { --topic-bg: #e1f2ee; --topic-ink: #5f9487; }
.topic-health { --topic-bg: #f9e8df; --topic-ink: #bc886c; }
.topic-help { --topic-bg: #fff2d3; --topic-ink: #ae934c; }
.topic-chat { --topic-bg: #ede9f6; --topic-ink: #8e7daa; }
.topic-work { --topic-bg: #e6eef0; --topic-ink: #6c8e95; }
.topic-tile:hover, .scene-card:hover, .word-card:hover { border-color: #b8cfb8; }
.scene-list { gap: 11px; }
.scene-card { padding: 17px 14px; gap: 13px; border-radius: 19px; border-color: #e5ebe7; min-height: 105px; }
.scene-art { --topic-bg: #e9f0e9; --topic-ink: #52775e; display: grid; place-items: center; width: 43px; height: 49px; flex-shrink: 0; align-self: flex-start; background: var(--topic-bg); color: var(--topic-ink); border-radius: 14px; }
.scene-art.topic-food { --topic-bg: #fff0da; --topic-ink: #b17d3f; }
.scene-art.topic-transport { --topic-bg: #e7effb; --topic-ink: #6583b1; }
.scene-art.topic-shopping { --topic-bg: #f7e8e9; --topic-ink: #b37c82; }
.scene-art.topic-chat { --topic-bg: #ede9f6; --topic-ink: #8e7daa; }
.scene-card small { font-size: 9px; margin-bottom: 5px; }
.scene-card h3 { font-size: 14px; line-height: 1.5; font-weight: 650; }
.scene-card .sample { font-size: 11px; margin-top: 5px; color: #7d9188; }
.scene-meta { display: flex; align-items: center; gap: 3px; font-size: 9px; color: #71877d; margin-top: 7px; }
.scene-meta svg { width: 11px; height: 11px; }
.scene-card > svg { width: 14px; }
.resume { background: #fff; border: 1px solid var(--line); padding: 14px; gap: 12px; margin-top: 10px; border-radius: 18px; }
.resume > span:nth-child(2) { flex: 1; min-width: 0; }
.resume-icon { display: grid; place-items: center; height: 40px; width: 40px; border-radius: 13px; background: #eef3e5; }
.resume small { font-size: 9px; }
.resume strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.bottom-nav { background: #ffffffed; border-top-color: #e4eae6; padding-top: 11px; }
.bottom-nav a { gap: 4px; font-size: 10px; min-width: 65px; }
.bottom-nav a svg { padding: 4px; width: 32px; height: 29px; border-radius: 10px; }
.bottom-nav a.active svg { background: #e5f0ce; }
.bottom-nav a.active:after { display: none; }
.page-heading { padding-top: 7px; }
.page-heading h1 { font-size: 29px; }
.search { margin: 20px 0 16px; border-radius: 16px; height: 52px; }
.search input { font-size: 16px; }
.search input::placeholder { font-size: 13px; }
.browse-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #eaf0ec; padding: 4px; border-radius: 15px; gap: 4px; margin: 0 0 20px; }
.browse-tabs button { display: flex; justify-content: center; align-items: center; min-height: 44px; gap: 5px; font-size: 12px; border-radius: 11px; }
.browse-tabs button svg { height: 16px; width: 16px; }
.browse-tabs small { font-size: 9px; opacity: .65; }
.browse-tabs [aria-selected=true] { background: #fff; box-shadow: 0 2px 5px #3158410e; font-weight: 700; }
.filters[aria-label="大类"] { flex-wrap: wrap; gap: 7px; margin-bottom: 0; padding-bottom: 10px; }
.chip { background: #edf2ee; color: #5a7266; border: 1px solid transparent; font-size: 11px; padding: 10px 12px; min-height: 40px; border-radius: 12px; }
.chip.selected { background: #e1edc6; color: #39532c; border-color: #b8ce91; }
.subfilters { padding-bottom: 13px; margin-top: 1px; }
.subfilters .chip { border-radius: 20px; background: #fff; border-color: var(--line); font-size: 10px; }
.subfilters .selected { border-color: #91ae70; background: #f1f6e8; }
.results-heading { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: #778e81; margin: 8px 0 13px; }
.results-heading span { font-size: 9px; white-space: nowrap; }
.word-grid { display: grid; gap: 10px; }
.word-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-align: left; width: 100%; }
.word-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.word-copy strong { font-size: 19px; font-weight: 650; overflow-wrap: anywhere; }
.word-copy > span { font-size: 12px; color: #677f72; line-height: 1.7; }
.word-copy small { font-size: 9px; color: #96a499; }
.word-arrow { color: #95a68e; }
.word-arrow svg { width: 16px; }
.reader main { padding: 0 20px calc(125px + var(--safe)); }
.reader-bar { margin: 0 -5px 14px; height: calc(62px + env(safe-area-inset-top,0px)); }
.reader-bar .icon-btn { border: 1px solid #e5eae5; background: #fff; border-radius: 15px; }
.reader-location { letter-spacing: 1px; }
.reader-head { margin-bottom: 17px; }
.reader-head h1 { font-size: 26px; line-height: 1.45; letter-spacing: -.6px; }
.badge { border-radius: 7px; background: #eaf0e4; color: #6d865b; font-size: 10px; }
.reader-caption { font-size: 10px; line-height: 1.9; margin: 10px 0 16px; }
.reader-actions { gap: 7px; }
.reader-actions .primary, .reader-actions .secondary { font-size: 11px; padding: 11px 12px; min-height: 44px; border-radius: 13px; }
.reader-actions .primary { background: #315741; box-shadow: 0 3px 0 #1d3e2b; }
.reader-jumps { display: flex; gap: 6px; padding: 10px 0; margin: 15px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reader-jumps button { font-size: 11px; flex: 1; min-height: 38px; border-radius: 10px; background: #eff3ee; white-space: nowrap; }
#conversation-section { font-size: 17px; }
#conversation-section, #alternatives-section, #vocabulary-section, #offline-panel { scroll-margin-top: calc(75px + env(safe-area-inset-top,0px)); }
.turn { border-radius: 20px 20px 20px 5px; padding: 15px 17px 18px; margin: 14px 17px 14px 0; border-color: #e0e9e3; background: #fff; }
.turn.me { margin: 14px 0 14px 17px; background: #eaf2df; border-color: #d9e5ca; border-radius: 20px 20px 5px 20px; }
.turn-top { margin-bottom: 7px; }
.speaker { font-size: 10px; color: #69816f; font-weight: 600; }
.turn .en { font-size: 18px; font-weight: 500; line-height: 1.6; }
.turn .zh { font-size: 13px; color: #6a7f6d; line-height: 1.8; margin-top: 10px; }
.turn-buttons .mini-btn { height: 44px; width: 38px; min-width: 38px; }
.turn-buttons [data-audio] { background: #edf4e6; min-width: 59px; border-radius: 13px; height: 38px; }
.turn.me .turn-buttons [data-audio] { background: #dceacb; }
.turn.playing { background: #f3f9de; border-color: #8aab54; box-shadow: 0 0 0 2px #dcebbc; }
.branch-label { margin-top: 24px; font-size: 11px; font-weight: 600; color: #8c774f; background: #f5eddd; padding: 9px 12px; border-radius: 10px; }
.word-row { background: #fff; border: 1px solid var(--line); padding: 17px; border-radius: 18px; margin-bottom: 10px; }
.word-title { gap: 8px; }
.word-term { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 650; text-align: left; min-height: 44px; padding: 0; overflow-wrap: anywhere; min-width: 0; }
.word-term svg { width: 13px; color: #98a68d; }
.word-title [data-audio] { border-radius: 12px; background: #edf3e5; height: 44px; min-width: 50px; flex-shrink: 0; }
.word-row p { color: #718372; }
.player-dock { border-radius: 22px; background: #fff; border-color: #d5e1d6; box-shadow: 0 4px 30px #193c3424; padding: 7px 13px 11px; }
.playing-top { font-size: 9px; }
.playing-main { gap: 9px; }
.playing-copy p { font-size: 12px; }
.round-play { background: #315741; height: 44px; width: 44px; }
.native-audio summary { font-size: 10px; }
.native-audio { margin-top: 7px; }
#dock .rate-btn { min-width: 37px; }
.reader-download { margin-top: 29px; }
.info-box { border: 1px solid #dce6d2; background: #eef4e6; border-radius: 18px; padding: 17px; }
.info-box .secondary { background: #fff; margin-top: 12px; font-size: 11px; }
.reader-foot { padding: 15px 2px; font-size: 10px; line-height: 1.9; overflow-wrap: anywhere; }
.pocket-stats { display: grid; grid-template-columns: repeat(3,1fr); padding: 20px 12px; border: 1px solid #dfe8d9; border-radius: 20px; background: #eff4e6; gap: 8px; margin-top: 23px; }
.pocket-stats span { text-align: center; font-size: 10px; color: #74816d; }
.pocket-stats strong { display: block; font-size: 25px; color: #32503a; margin-bottom: 5px; font-weight: 650; }
.compact-empty { font-size: 12px; padding: 28px 18px; color: #7b8c80; }
.personal-card { display: flex; gap: 13px; align-items: center; padding: 19px 15px; margin: 25px 0 17px; background: #eaf2dc; border: 1px solid #dce5cd; border-radius: 21px; }
.personal-mark { height: 44px; width: 44px; display: grid; place-items: center; background: #fff; border-radius: 14px; flex-shrink: 0; }
.personal-card > div { flex: 1; min-width: 0; }
.personal-card h2 { font-size: 16px; }
.personal-card p { color: #718363; font-size: 10px; margin-top: 5px; line-height: 1.7; }
.personal-card .badge { font-size: 9px; white-space: nowrap; }
.setting-card { margin-top: 11px; }
.setting-row { font-size: 13px; min-height: 75px; }
.setting-row small { font-size: 10px; }
.toggle { width: 40px; height: 25px; border-radius: 20px; background: #cdd8d0; position: relative; }
.toggle:after { content: ''; position: absolute; left: 4px; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #153b3430; }
.toggle.on { background: #719851; }
.toggle.on:after { left: 19px; }
.source-details { color: #7a8a7e; font-size: 11px; line-height: 1.9; margin: 22px 3px; }
.source-details summary { min-height: 44px; cursor: pointer; padding-top: 10px; }
.source-details p { margin: 8px 0; }
.source-details a { text-decoration: underline; }
.word-sheet-title { display: flex; align-items: center; gap: 14px; margin: 13px 0 16px; }
.word-sheet-title h2 { font-size: 29px; overflow-wrap: anywhere; flex: 1; line-height: 1.3; }
.word-sheet-title [data-audio] { min-width: 60px; height: 44px; border-radius: 13px; background: #e5efcf; gap: 4px; font-size: 12px; }
.word-save { background: #fff; margin-bottom: 10px; font-size: 12px; }
.word-save.is-saved { background: #eaf1dd; border-color: #c2d5a9; }
.word-senses > div { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 17px; }
.sense-number { font-size: 9px; letter-spacing: 1px; color: #91a180; display: block; margin-bottom: 8px; }
.word-senses p { font-size: 16px; line-height: 1.7; }
.word-senses small { display: block; color: #76876c; font-size: 12px; line-height: 1.8; margin-top: 8px; }
.word-senses blockquote { margin: 13px 0 0; padding: 12px 14px; font-size: 14px; line-height: 1.7; background: #edf2e4; border-left: 3px solid #b7cb94; border-radius: 0 10px 10px 0; overflow-wrap: anywhere; }
.word-context { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 51px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.7; }
.word-context span { flex: 1; }
.word-context svg { width: 16px; }
#sheet { max-height: 88dvh; }
#sheet .sheet-head .eyebrow { font-size: 8px; letter-spacing: 1px; }
.home-note { color: #8b9a90; font-size: 10px; }
@media (max-width: 360px) {
  main { padding-left: 16px; padding-right: 16px; }
  .random-card h2 { font-size: 23px; }
  .pocket-art { right: 11px; transform: scale(.88); }
  .reader-actions .secondary { padding-left: 8px; padding-right: 8px; }
  .personal-card .badge { display: none; }
}
@media (min-width: 700px) {
  main { padding: 22px 44px 140px; }
  .topbar { padding-left: 44px; padding-right: 44px; }
  .home-greeting h1 { font-size: 43px; }
  .home-greeting br { display: none; }
  .quick-search, .quick-tags { max-width: 600px; }
  .home-layout { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; margin-top: 22px; }
  .home-topics .section-head { margin-top: 0; }
  .random-card { min-height: 231px; padding: 26px; }
  .hero-copy { width: calc(100% - 70px); }
  .random-card h2 { font-size: 30px; }
  .pocket-art { transform: scale(1.15); right: 33px; top: 83px; }
  .topic-tile { padding-top: 11px; padding-bottom: 11px; }
  .word-grid { grid-template-columns: 1fr 1fr; }
  .reader main { max-width: 720px; padding-left: 30px; padding-right: 30px; }
  .reader-head h1 { font-size: 32px; }
  .reader-jumps { max-width: 510px; }
  .personal-card, .pocket-stats { max-width: 650px; }
  .source-details { max-width: 650px; }
}
@media (prefers-reduced-motion: reduce) { .hero-button:active { transform: none; } }

.word-filter-toggle { display: none; }
.word-lookup .word-filter-toggle { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 44px; font-size: 11px; margin: -8px 0 8px; text-align: left; padding: 0 4px; color: #708473; }
.word-filter-toggle > span { flex: 1; }
.word-filter-toggle svg { width: 16px; height: 16px; }
.word-filter-toggle small { font-size: 10px; }
.word-lookup:not(.word-filter-open) .filters { display: none; }
