:root{font-family:system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#202a38;background:#f7f8fc}
*{box-sizing:border-box}
body{margin:0}
button,input,select{font:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
.shell{max-width:800px;padding:28px 20px 70px;margin:auto}
.site-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:24px}
.eyebrow{font-size:11px;font-weight:750;letter-spacing:.18em;color:#526ee6;margin-bottom:8px}
h1{font-size:clamp(26px,5vw,38px);line-height:1.15;letter-spacing:-.03em;margin:0 0 10px}
.site-head p{color:#687487;font-size:14px;margin:0}
.share-button{border:0;border-radius:11px;background:#4869ed;color:white;padding:10px 16px;font-weight:600;white-space:nowrap}
.share-button:hover{background:#3156d8}
.toolbar{background:white;border:1px solid #e2e7f1;border-radius:16px;padding:17px;box-shadow:0 6px 22px #1a285c08}
.search-label{display:block;font-size:13px;font-weight:650;margin-bottom:8px}
#search{width:100%;min-height:44px;padding:10px 14px;border:1px solid #cfd6e5;border-radius:10px;outline:none}
.search-row{display:flex;align-items:stretch;gap:8px}
.search-row #search{flex:1;min-width:0;width:auto}
#search-submit{min-width:64px;min-height:44px;border:0;border-radius:10px;background:#4869ed;color:#fff;font-weight:700;padding:8px 13px}
#search-submit:hover{background:#3156d8}
#search:focus,select:focus-visible,button:focus-visible{outline:2px solid #4869ed;outline-offset:2px}
@keyframes search-autofill-detected{from{opacity:1}to{opacity:1}}
#search:-webkit-autofill{animation:search-autofill-detected .01s}
#search:autofill{animation:search-autofill-detected .01s}
.site-version{margin-top:4px;color:#8490a1;font-size:11px}
.search-feedback{margin-top:9px;font-size:13px;line-height:1.5;color:#526789}
.search-feedback button{margin-left:6px;border:0;background:transparent;color:#3655c8;font-weight:700;text-decoration:underline;padding:2px}
.edit-launch{display:flex;flex-wrap:wrap;gap:8px;margin-top:11px}
.edit-launch button{border:1px solid #cfd7e8;background:#f5f7fc;color:#33445f;border-radius:10px;padding:9px 12px;font-size:13px;font-weight:650}
.edit-launch button:hover{background:#eaf0ff}
.sync-status{margin-top:8px;color:#647085;font-size:12px;min-height:16px}
.online-result{margin-top:16px;padding:18px 19px;background:#fff;border:1px solid #cdd8ff;border-radius:16px;box-shadow:0 6px 22px #1a285c0a;scroll-margin-top:14px}
.online-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.online-caption{font-size:12px;color:#4869ed;font-weight:750;letter-spacing:.08em}
.online-heading h2{font-size:25px;line-height:1.2;margin:3px 0 0;overflow-wrap:anywhere}
.online-phonetic{color:#69768a;font-size:14px;margin-top:6px}
.online-result h3{font-size:14px;margin:18px 0 7px;color:#34425a}
.online-meaning{white-space:pre-wrap;line-height:1.65;font-size:15px;max-height:170px;overflow:auto;overflow-wrap:anywhere}
.online-play{border:1px solid #cfd7f5;background:#eef2ff;color:#3655c8;border-radius:10px;padding:8px 12px;white-space:nowrap}
.online-add{border:1px solid #cfd7f5;background:#eef2ff;color:#3655c8;border-radius:10px;padding:8px 12px;white-space:nowrap}
.online-play.active{background:#dce5ff}
.online-examples{padding-left:22px;margin:7px 0 0;line-height:1.5}
.online-examples li{margin-bottom:11px;overflow-wrap:anywhere}
.online-credit,.online-example-credit{display:flex;flex-wrap:wrap;gap:8px;font-size:11px;margin-top:5px;color:#687487}
.online-source{color:#5265a2;text-decoration:underline}
.online-message,.online-example-fallback{color:#667388;font-size:14px;line-height:1.6;margin:8px 0 0}
.filters{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin-top:13px}
.filters label{font-size:13px;color:#647085}
.filters select{border:1px solid #cfd6e5;background:#fff;padding:8px 10px;border-radius:9px;max-width:100%}
.filters select:not(:last-child){margin-right:12px}
.list-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin:24px 2px 12px}
.list-head strong{font-size:17px}
#status{font-size:12px;color:#526789;text-align:right}
.word-list{display:grid;gap:11px}
.word-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;background:white;border:1px solid #e1e6f0;border-radius:14px;padding:16px 17px;box-shadow:0 2px 8px #1a285c06}
.word-actions{display:flex;flex-direction:column;align-items:stretch;gap:7px}
.edit-word{border:1px solid #d9e0ec;background:#fff;color:#52617a;border-radius:9px;padding:6px 10px;font-size:12px}
.word-title{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.word-title strong{font-size:20px;word-break:break-word}
.phonetic{color:#6c7587;font-size:13px}
.tags{font-size:12px;color:#4869ed;margin:5px 0}
.meaning{font-size:14px;line-height:1.6;color:#475366;white-space:pre-wrap;overflow-wrap:anywhere}
.speak{border:1px solid #cfd7f5;background:#eef2ff;color:#3655c8;border-radius:10px;padding:8px 12px;white-space:nowrap}
.speak:hover,.speak.active{background:#dce5ff}
.empty{background:#fff;border:1px solid #e1e6f0;border-radius:14px;padding:25px;text-align:center;color:#647085}
footer{text-align:center;font-size:12px;color:#8190a3;margin-top:28px}
dialog{border:1px solid #dce2ef;border-radius:16px;padding:20px;max-width:min(92vw,360px);width:100%;box-shadow:0 18px 45px #17214230}
dialog::backdrop{background:#111c3480}
.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.dialog-head h2{font-size:19px;margin:0}
.wide-dialog{max-width:min(94vw,520px)}
.dialog-note{color:#647085;font-size:13px;line-height:1.5;margin:8px 0}
.dialog-error{color:#b42318;font-size:13px;min-height:18px}
.dialog-primary{border:0;border-radius:10px;background:#4869ed;color:#fff;padding:10px 16px;font-weight:700}
.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}
.dialog-actions>button:not(.dialog-primary){border:1px solid #d4dbe8;background:#fff;border-radius:10px;padding:9px 13px}
.dialog-actions #word-delete{margin-right:auto;color:#b42318}
#editor-auth-dialog input,.wide-dialog input,.wide-dialog textarea,.wide-dialog select{width:100%;min-height:42px;border:1px solid #cbd4e4;border-radius:9px;padding:9px 11px;background:white;color:#202a38}
.wide-dialog textarea{resize:vertical;min-height:82px}
.editor-label{display:block;font-size:13px;font-weight:650;color:#3b475b;margin:12px 0 5px}
.book-create{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.book-create #book-new-parent{grid-column:1}
.book-create #book-create{grid-column:2;grid-row:1 / span 2}
.book-manager-list{display:grid;gap:8px;max-height:45vh;overflow:auto;margin-top:15px}
.book-manager-row{display:flex;align-items:center;gap:8px;border:1px solid #e0e6f0;border-radius:10px;padding:8px 10px}
.book-manager-row span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px}
.book-manager-row button{border:0;background:#edf2ff;color:#3655c8;border-radius:8px;padding:6px 9px;font-size:12px}
.book-manager-row button.book-delete{background:#fff1f0;color:#b42318}
.word-book-options{display:grid;gap:8px;max-height:150px;overflow:auto}
.word-book-options label{display:flex;gap:9px;align-items:center;font-size:14px}
.word-book-options input{width:18px;min-height:18px;height:18px}
#share-close{border:0;background:transparent;font-size:21px;padding:0 4px}
.share-qr{min-height:218px;display:grid;place-items:center}
.share-qr svg{max-width:100%;height:auto}
#share-note{font-size:13px;color:#687487;line-height:1.5}
#share-url{display:block;font-size:13px;overflow-wrap:anywhere;margin:11px 0}
@media(max-width:540px){.shell{padding:20px 13px 55px}.site-head{align-items:start}.site-head .share-button{padding:9px 11px;font-size:13px}.word-card{padding:13px}.word-title strong{font-size:18px}.filters select:not(:last-child){margin-right:5px}}

.meaning{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}
.meaning.expanded{display:block}
.expand{border:0;background:transparent;color:#4869ed;font-size:12px;padding:5px 0 0}
.expand:hover{text-decoration:underline}
