* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: #f6f4ef; color: #1a1a1a; }

main { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
h1 { font-size: 22px; margin: 0 0 12px; }
.navrow { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; font-size: 14px; }
.navrow a { color: #1a1a1a; }
.importbar { display: flex; gap: 8px; }
.importbar input { flex: 1; min-width: 0; padding: 12px 14px; font-size: 16px; border: 1px solid #d8d4c8; border-radius: 10px; background: #fff; }
.importbar button { padding: 0 20px; font-size: 16px; border: 0; border-radius: 10px; background: #1a1a1a; color: #fff; cursor: pointer; }
.hint { min-height: 1.4em; margin: 10px 2px 0; color: #666; font-size: 14px; }
.shelf { display: grid; gap: 10px; margin-top: 12px; }
.card { position: relative; display: block; padding: 14px 44px 14px 16px; background: #fff; border: 1px solid #e5e1d8; border-radius: 12px; text-decoration: none; color: inherit; }
.card .t { font-size: 15px; font-weight: 600; line-height: 1.45; }
.card .m { margin-top: 4px; font-size: 12px; color: #999; }
.card .del { position: absolute; right: 10px; top: 12px; border: 0; background: none; font-size: 18px; color: #bbb; cursor: pointer; }
.empty { color: #999; text-align: center; padding: 48px 0; }
.dropzone { margin-top: 14px; padding: 18px; border: 1.5px dashed #c9c4b6; border-radius: 12px; text-align: center; color: #888; font-size: 14px; }
.dropzone.over { border-color: #1a1a1a; color: #1a1a1a; }

/* ---- 阅读页 ---- */
.docbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: rgba(246,244,239,.9); backdrop-filter: blur(8px); border-bottom: 1px solid #e5e1d8; }
.docbar .back { color: #1a1a1a; text-decoration: none; font-size: 14px; white-space: nowrap; }
.docbar .dt { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.modes { display: flex; border: 1px solid #d8d4c8; border-radius: 8px; overflow: hidden; }
.mbtn { border: 0; background: #fff; padding: 5px 10px; font-size: 12.5px; cursor: pointer; color: #555; }
.mbtn.on { background: #1a1a1a; color: #fff; }
.navlnk { font-size: 13px; color: #1a1a1a; text-decoration: none; white-space: nowrap; }
.aibtn { border: 0; background: #1a1a1a; color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }

.reader { max-width: 1100px; margin: 0 auto; padding: 22px 18px 90px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 30px; margin: 0 0 1.15em; align-items: start; }
.pair .src { font-size: 17px; line-height: 1.85; }
.pair .dst { font-size: 16px; line-height: 1.8; color: #6b6b6b; border-left: 2px solid #e5e1d8; padding-left: 12px; min-height: 1em; }
.pair.li .src { display: list-item; list-style: disc; margin-left: 18px; }
.pair.src-h .src { font-size: 20px; line-height: 1.5; margin: 1.4em 0 .5em; font-weight: 700; }
.src.as-quote { border-left: 3px solid #d8d4c8; padding-left: 12px; color: #444; }
.src.as-code { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; background: #efece4; padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; }
mark.hl { background: #ffe89a; border-radius: 3px; padding: 0 1px; }
.pair.flash { animation: flash 1.5s ease; }
@keyframes flash { 0%,60% { background: #fff3c4; } 100% { background: transparent; } }

body.mode-src .dst { display: none; }
body.mode-src .pair { grid-template-columns: 1fr; }
body.mode-dst .src { display: none; }
body.mode-dst .pair { grid-template-columns: 1fr; }
body.mode-dst .pair.li .src { display: none; }
body.mode-dst .pair.li .dst { display: list-item; list-style: disc; margin-left: 18px; }
@media (max-width: 860px) {
  .pair { grid-template-columns: 1fr; gap: 3px; }
  .pair .dst { border-left: 0; padding-left: 0; font-size: 15px; color: #757575; }
  .docbar .dt { display: none; }
}

/* ---- 划词浮条 / 弹卡 ---- */
.selbar { position: absolute; z-index: 20; display: flex; gap: 2px; background: #1a1a1a; border-radius: 9px; padding: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.selbar button { border: 0; background: none; color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.selbar button:hover { background: #333; }
.pop { position: absolute; z-index: 20; max-width: min(520px, calc(100vw - 24px)); background: #fff; border: 1px solid #e5e1d8; border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.14); font-size: 15px; line-height: 1.7; }
.pop-body { color: #333; }

/* ---- AI 抽屉 ---- */
.drawer { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: #fffdf8; border-left: 1px solid #e5e1d8; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.08); }
.dhead { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid #eee9dd; }
.dhead .x { margin-left: auto; border: 0; background: none; font-size: 13px; color: #888; cursor: pointer; }
.qtag { font-size: 11px; background: #ffe89a; border-radius: 5px; padding: 2px 7px; }
.qcard { margin: 12px 14px 0; padding: 10px 12px; background: #f2efe6; border-radius: 9px; font-size: 13.5px; line-height: 1.6; color: #444; }
.scope-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px 0; font-size: 12.5px; color: #888; }
.scope-row select { font-size: 13px; padding: 4px 6px; border: 1px solid #d8d4c8; border-radius: 7px; background: #fff; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: #1a1a1a; color: #fff; }
.msg.ai { align-self: flex-start; background: #f2efe6; }
.askform { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #eee9dd; }
.askform input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 14.5px; border: 1px solid #d8d4c8; border-radius: 9px; }
.askform button { border: 0; background: #1a1a1a; color: #fff; border-radius: 9px; padding: 0 16px; font-size: 14px; cursor: pointer; }
.dactions { padding: 0 12px 12px; }
.ghost { border: 1px solid #d8d4c8; background: #fff; border-radius: 9px; padding: 7px 14px; font-size: 13px; cursor: pointer; color: #444; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 42px; transform: translateX(-50%); background: #1a1a1a; color: #fff; font-size: 13.5px; padding: 9px 18px; border-radius: 20px; }

/* ---- 笔记 / 生词页 ---- */
.pagebar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #e5e1d8; background: rgba(246,244,239,.9); position: sticky; top: 0; z-index: 5; }
.pagebar a { color: #1a1a1a; text-decoration: none; font-size: 14px; }
.pagebar b { font-size: 15px; }
.notegroup { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.note { background: #fff; border: 1px solid #e5e1d8; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; line-height: 1.7; }
.note .q { color: #555; margin: 4px 0; padding-left: 10px; border-left: 3px solid #ffe89a; }
.note .meta { color: #999; font-size: 12px; margin-top: 6px; display: flex; gap: 12px; align-items: center; }
.note .meta a, .note .meta button { color: #888; font-size: 12px; background: none; border: 0; cursor: pointer; padding: 0; }
.vocab { display: flex; align-items: baseline; gap: 10px; background: #fff; border: 1px solid #e5e1d8; border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; font-size: 14.5px; }
.vocab .term { font-weight: 600; }
.vocab .tr { color: #666; flex: 1; }
.vocab button { border: 0; background: none; color: #aaa; cursor: pointer; font-size: 12.5px; }
.vocab .ok { color: #2e7d32; }

/* ---- 产品落地页 ---- */
.lp { max-width: 860px; margin: 0 auto; padding: 28px 18px 70px; }
.hero { text-align: center; padding: 30px 0 10px; }
.hero h1 { font-size: 32px; margin: 0 0 10px; }
.hero .sub { font-size: 17px; color: #555; margin: 0 0 22px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta { border: 1px solid #d8d4c8; background: #fff; color: #1a1a1a; border-radius: 12px; padding: 12px 22px; font-size: 16px; cursor: pointer; }
.cta.primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.login-row { text-align: center; margin-top: 18px; font-size: 14px; color: #666; }
.login-row a { color: #1a1a1a; }
.keybox { margin: 18px auto 0; max-width: 520px; background: #fffdf5; border: 1px solid #ffe89a; border-radius: 12px; padding: 14px 16px; text-align: center; font-size: 14.5px; }
.keybox code { display: block; font-size: 17px; letter-spacing: 1px; margin: 8px 0 12px; user-select: all; font-weight: 700; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 34px 0; }
.feat { background: #fff; border: 1px solid #e5e1d8; border-radius: 12px; padding: 16px 18px; }
.feat h3 { margin: 0 0 8px; font-size: 16px; }
.feat p { margin: 0; font-size: 14px; color: #666; line-height: 1.7; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 640px; margin: 0 auto 34px; }
.price { background: #fff; border: 1px solid #e5e1d8; border-radius: 14px; padding: 20px 18px; text-align: center; }
.price.hot { border-color: #1a1a1a; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.price .p { font-size: 34px; font-weight: 800; margin: 10px 0; }
.price .p span { font-size: 14px; font-weight: 400; color: #888; }
.price ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; color: #555; }
.price li { margin: 6px 0; }
.faq { font-size: 14px; color: #555; line-height: 1.8; }
.faq h3 { color: #1a1a1a; }
.lp footer { text-align: center; color: #999; font-size: 13px; margin-top: 30px; }
@media (max-width: 700px) { .feat-grid, .price-grid { grid-template-columns: 1fr; } }

/* ---- 升级引导条 ---- */
.upbar { position: fixed; z-index: 40; left: 50%; bottom: 0; transform: translateX(-50%); width: min(680px, 100vw); background: #fffbe8; border: 1px solid #ffe89a; border-bottom: 0; border-radius: 12px 12px 0 0; padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 14px; box-shadow: 0 -4px 18px rgba(0,0,0,.08); }
.upbar a { color: #1a1a1a; font-weight: 700; white-space: nowrap; }
.upbar .x { margin-left: auto; border: 0; background: none; color: #999; cursor: pointer; font-size: 14px; }
