*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f5f6fa;color:#1f2430}a{color:#4a6cf7}button{cursor:pointer;border:none;border-radius:6px;padding:.55rem 1rem;font-size:.95rem;background:#4a6cf7;color:#fff;transition:background .15s ease}button:hover{background:#3a58d6}button:disabled{background:#a9b3c9;cursor:not-allowed}button.secondary{background:#e4e7f0;color:#1f2430}button.secondary:hover{background:#d3d8e6}button.danger{background:#f75c5c}button.danger:hover{background:#d94848}input,select{font-size:.95rem;padding:.55rem .7rem;border:1px solid #d3d8e6;border-radius:6px;background:#fff;color:#1f2430}input:focus,select:focus{outline:2px solid #4a6cf7;outline-offset:1px}.error{color:#d94848;font-size:.9rem}.empty{color:#7a8299;font-style:italic}.topbar{display:flex;align-items:center;gap:2rem;padding:.9rem 1.5rem;background:#fff;border-bottom:1px solid #e4e7f0}.topbar .brand{font-weight:700;font-size:1.1rem;color:#4a6cf7;text-decoration:none}.topbar nav{display:flex;gap:1.2rem;flex:1}.topbar nav a{text-decoration:none;color:#5a6178;font-weight:500;padding:.3rem 0;border-bottom:2px solid transparent}.topbar nav a.active{color:#4a6cf7;border-bottom-color:#4a6cf7}.user-area{display:flex;align-items:center;gap:.8rem;font-size:.9rem;color:#5a6178}main{display:block}.page-container{max-width:960px;margin:0 auto;padding:2rem 1.5rem}.auth-page{position:fixed;inset:0;display:flex;overflow-y:auto;background-image:url(/images/home-bg.png);background-size:cover;background-position:center;padding:1.5rem}.auth-card{background:#fff;padding:2.5rem;border-radius:12px;box-shadow:0 4px 24px #0000000f;width:100%;max-width:380px;margin:auto;display:flex;flex-direction:column;gap:1rem}.auth-card h1{margin:0 0 .5rem;font-size:1.4rem}.auth-card label{display:flex;flex-direction:column;gap:.3rem;font-size:.9rem;color:#5a6178}.auth-card .switch{font-size:.9rem;color:#5a6178;margin:0}.auth-card .checkbox-field{flex-direction:row;align-items:center}.or-divider{display:flex;align-items:center;gap:.75rem;font-size:.8rem;color:#7a8299}.or-divider:before,.or-divider:after{content:"";flex:1;height:1px;background:#e4e7f0}.google-button{display:flex;justify-content:center}.google-button.busy{opacity:.6;pointer-events:none}.vocab-page{max-width:1600px}.vocab-layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:1.5rem;align-items:start}.lang-panel,.words-panel{background:#fff;border-radius:10px;padding:1.25rem;box-shadow:0 2px 10px #0000000a}.lang-panel{padding:1.75rem 1.5rem}.words-panel{min-width:0}.lang-panel h2,.words-panel h2{margin-top:0;font-size:1.05rem}.lang-panel h2{margin-bottom:1.25rem;font-size:1.5rem;text-align:center}@media(max-width:900px){.vocab-layout{grid-template-columns:1fr}}.lang-error{margin:.75rem 0 0;text-align:center}.lang-list{list-style:none;margin:0 0 1rem;padding:0;display:flex;flex-direction:column;gap:.3rem}.lang-item{display:flex;align-items:center;gap:.5rem;padding:.7rem .9rem;border-radius:8px;font-size:1.05rem;cursor:pointer}.lang-item:hover{background:#f0f2fa}.lang-item.active{background:#eaefff;color:#4a6cf7;font-weight:600}.lang-item span:first-child{flex:1}.word-count{font-size:.8rem;color:#7a8299}.lang-item .icon-btn{background:transparent;color:#b5bacb;padding:.1rem .4rem}.lang-item .icon-btn:hover{background:transparent;color:#d94848}.add-lang-form,.add-word-form{display:flex;gap:.5rem}.add-lang-form input,.add-word-form,.add-word-form input{flex:1;min-width:0}.word-tools{display:flex;align-items:center;gap:.5rem}.import-wrap{position:relative}.import-wrap>button{white-space:nowrap}.import-menu{position:absolute;top:calc(100% + .4rem);right:0;z-index:10;min-width:170px;display:flex;flex-direction:column;gap:.15rem;padding:.4rem;background:#fff;border:1px solid #e4e7f0;border-radius:8px;box-shadow:0 6px 20px #0000001a}.import-menu-title{font-size:.75rem;color:#7a8299;padding:.25rem .5rem .35rem}.import-menu button{background:transparent;color:#1f2430;text-align:left;padding:.45rem .5rem;font-size:.9rem;border-radius:5px}.import-menu button:hover{background:#f0f2fa}.import-hint,.import-message{font-size:.8rem;margin:.5rem 0 0}.import-hint{color:#7a8299}.import-message{color:#1f8a4c;font-weight:500}.words-scroll{max-height:calc(100vh - 21rem);min-height:16rem;overflow:auto;margin-top:1.25rem}.word-table{width:100%;border-collapse:collapse}.word-table th{position:sticky;top:0;z-index:1;background:#fff;text-align:left;font-size:.8rem;color:#7a8299;padding:0 .4rem .5rem;border-bottom:1px solid #e4e7f0}.word-table td{padding:.6rem .4rem;border-bottom:1px solid #f0f2fa}.word-table td input{width:100%}.word-table .actions{display:flex;gap:.5rem;justify-content:flex-end}.score{font-size:.85rem;font-weight:600;color:#4a6cf7}.option-label{font-size:.85rem;color:#5a6178}.segmented{position:relative;display:inline-flex;background:#eef0f7;border-radius:999px;padding:3px}.segment{position:relative;z-index:1;border:none;background:transparent;padding:.4rem .9rem;border-radius:999px;font-size:.82rem;font-weight:600;color:#5a6178;transition:color .2s ease}.segment.active{color:#fff}.segment-highlight{position:absolute;top:3px;left:3px;width:calc(50% - 3px);height:calc(100% - 6px);background:#4a6cf7;border-radius:999px;transition:transform .2s ease}.segment-highlight.right{transform:translate(100%)}.segment-highlight.quarter{width:calc(25% - 1.5px)}.invert-btn{position:absolute;top:1rem;right:1rem;padding:.35rem .8rem;font-size:.85rem}.range-field{display:grid;grid-template-columns:3.2rem minmax(0,1fr);align-items:center;gap:.6rem;font-size:.85rem;color:#5a6178}.checkbox-field{display:flex;align-items:center;gap:.55rem;font-size:.85rem;color:#5a6178;cursor:pointer}.checkbox-field input[type=checkbox]{width:1rem;height:1rem;padding:0;accent-color:#4a6cf7;cursor:pointer}.stats-row{display:flex;align-items:flex-end;gap:1rem;flex-wrap:wrap;margin-bottom:1.5rem}.stat{display:flex;flex-direction:column;gap:.35rem}.stat-label{font-size:.9rem;font-weight:600}.stat-box{min-width:96px;padding:.75rem 1rem;border-radius:6px;text-align:center;font-size:1.35rem;font-weight:700;color:#fff}.stat-box.correct{background:#8cc63e}.stat-box.incorrect{background:#ef5350}.stat-box.total{background:#26b0a5}.stat-meta{flex:1;min-width:200px;font-size:.9rem;color:#5a6178}.stat-meta p{margin:0 0 .3rem}.accuracy-bar{height:10px;border-radius:999px;background:#e4e7f0;overflow:hidden}.accuracy-bar span{display:block;height:100%;background:#8cc63e;transition:width .25s ease}.test-card{position:relative;background:#fff;border-radius:12px;padding:2.5rem;box-shadow:0 2px 10px #0000000a;text-align:center}.test-card .prompt{margin:0;color:#7a8299;font-size:.9rem}.test-card .word{font-size:2rem;font-weight:700;margin:.3rem 0 1.5rem}.test-card .word.small{font-size:1.1rem;font-weight:500;color:#5a6178}.final-score{font-weight:600;color:#4a6cf7;margin:0 0 1.5rem}.answer-row{display:flex;gap:.6rem;justify-content:center;margin-bottom:1rem}.answer-row input{width:100%;max-width:440px;padding:.7rem 1rem;font-size:1.05rem;text-align:center}.result{border-radius:8px;padding:.8rem 1rem;margin:1rem auto;max-width:360px;font-weight:500}.result p{margin:0}.result.correct{background:#e3f7e9;color:#1f8a4c}.result.incorrect{background:#fbe9e9;color:#c73838}.last-mistake{max-width:none;margin:1rem 0 0}.last-mistake .given{margin-top:.25rem;font-size:.85rem;font-weight:400;opacity:.8}.card-actions{display:flex;justify-content:center;gap:.6rem}.round-badge{display:inline-block;margin:0 0 .6rem;padding:.2rem .7rem;border-radius:999px;background:#eef0f7;color:#5a6178;font-size:.78rem;font-weight:600}.start-btn{padding:.6rem 1.6rem;font-weight:600}.test-page{max-width:1600px}.practice-grid{display:grid;grid-template-columns:minmax(230px,260px) minmax(0,1fr) minmax(360px,440px);gap:1.5rem;align-items:start}.practice-left{display:flex;flex-direction:column;gap:1.1rem;background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 2px 10px #0000000a}.setting{display:flex;flex-direction:column;gap:.45rem}.setting select{width:100%}.practice-right{display:flex;flex-direction:column;gap:1rem}.word-set-control{display:flex;flex-direction:column;gap:.5rem}.segmented.wide{display:flex}.segmented.wide .segment{flex:1;padding:.4rem .5rem;white-space:nowrap}.stats-panel{background:#fff;border-radius:12px;padding:1.25rem 1.5rem;box-shadow:0 2px 10px #0000000a}.stats-scroll{max-height:33rem;overflow:auto;margin-top:1rem}.stats-panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.stats-panel-head h3{margin:0;font-size:1rem}.panel-actions{display:flex;gap:.5rem;flex-shrink:0}.stats-table{width:100%;border-collapse:collapse}.stats-table th{position:sticky;top:0;z-index:1;background:#fff;text-align:left;font-size:.78rem;color:#7a8299;padding:0 .3rem .5rem;border-bottom:1px solid #e4e7f0}.stats-table td{padding:.45rem .3rem;border-bottom:1px solid #f0f2fa;font-size:.88rem}.stats-table .num{text-align:right;white-space:nowrap;width:1%}.stats-table .rank{width:2.25rem;color:#7a8299}.stats-table .wrong-count{color:#c73838;font-weight:600}.stats-table .last-result{text-align:center;font-weight:700;color:#7a8299}.stats-table .last-result.ok{color:#1f8a4c}.stats-table .last-result.bad{color:#c73838}.muted{color:#7a8299;font-weight:400}@media(max-width:1200px){.practice-grid{grid-template-columns:1fr}}.friends-page{max-width:1500px}.friends-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.friends-head h1{margin:0;font-size:1.5rem}.friends-layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:1.5rem;align-items:start}.friends-sidebar{display:flex;flex-direction:column;gap:1.25rem;min-width:0}.friends-main{min-width:0}.panel{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 2px 10px #0000000a}.panel h2{display:flex;align-items:center;gap:.5rem;margin:0 0 .9rem;font-size:1.05rem}.requests-panel{border:1px solid #d9e1ff}.count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .4rem;border-radius:999px;background:#4a6cf7;color:#fff;font-size:.72rem;font-weight:700}.muted-count{font-size:.8rem;font-weight:400;color:#7a8299}.person-row{display:flex;align-items:center;gap:.75rem;padding:.6rem .5rem;border-radius:8px}.person-who{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0}.person-name{display:flex;align-items:center;gap:.4rem;font-size:.95rem;font-weight:600}.person-sub{font-size:.78rem;color:#7a8299;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person-actions{display:flex;gap:.4rem;flex-shrink:0}.person-actions button{padding:.35rem .7rem;font-size:.8rem}.avatar{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:38px;height:38px;border-radius:50%;background:#eaefff;color:#4a6cf7;font-size:.85rem;font-weight:700}.avatar.online:after{content:"";position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:#8cc63e;border:2px solid white}.friend-card{cursor:pointer;transition:background .15s ease}.friend-card:hover{background:#f0f2fa}.friend-card.active{background:#eaefff}.card-tools{display:flex;gap:.2rem;flex-shrink:0;opacity:0;transition:opacity .15s ease}.friend-card:hover .card-tools,.friend-card.active .card-tools{opacity:1}button.ghost{background:transparent;color:#5a6178;padding:.3rem .5rem;font-size:.78rem}button.ghost:hover{background:#e4e7f0}button.ghost.remove:hover{background:#fbe9e9;color:#d94848}.pending-note{margin:.75rem 0 0;font-size:.78rem;color:#7a8299}.empty-state{display:flex;flex-direction:column;align-items:center;gap:.4rem;padding:1.5rem .5rem;text-align:center}.empty-emoji{font-size:1.8rem}.empty-title{margin:0;font-weight:600}.empty-text{margin:0 0 .6rem;font-size:.85rem;color:#7a8299;max-width:30rem}.main-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;min-height:24rem;text-align:center}.share-row{display:flex;align-items:center;gap:.5rem;width:100%;padding:.6rem;border-radius:8px;background:transparent;color:#1f2430;font-size:.88rem;text-align:left}.share-row:hover{background:#f0f2fa}.share-row.active{background:#eaefff;color:#4a6cf7;font-weight:600}.share-main{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.share-count{font-size:.78rem;color:#7a8299}.chat-panel{display:flex;flex-direction:column;height:calc(100vh - 12.5rem);min-height:30rem;padding:0}.chat-head{display:flex;align-items:center;gap:.75rem;padding:1rem 1.25rem;border-bottom:1px solid #e4e7f0}.chat-head-actions{display:flex;gap:.5rem;flex-shrink:0}.chat-head-actions button{padding:.4rem .8rem;font-size:.82rem}.thread{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:.4rem;padding:1.25rem}.thread-empty{margin:auto}.bubble-row{display:flex}.bubble-row.mine{justify-content:flex-end}.bubble{display:flex;align-items:flex-end;gap:.5rem;max-width:min(70%,32rem);padding:.55rem .8rem;border-radius:14px 14px 14px 4px;background:#f0f2fa;font-size:.92rem;line-height:1.35}.bubble.mine{background:#4a6cf7;color:#fff;border-radius:14px 14px 4px}.bubble-text{min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}.bubble-time{flex-shrink:0;font-size:.68rem;color:#7a8299;transform:translateY(2px)}.bubble.mine .bubble-time{color:#ffffffbf}.composer{display:flex;gap:.6rem;padding:1rem 1.25rem;border-top:1px solid #e4e7f0}.composer input{flex:1;min-width:0}.viewer{display:flex;flex-direction:column;gap:.9rem;flex:1;min-height:0;padding:1.25rem}.viewer-hint{margin:0;font-size:.85rem;color:#7a8299}.viewer-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap}.viewer-head h3{margin:0 0 .2rem;font-size:1.1rem}.viewer-scroll{flex:1;min-height:0;overflow:auto}.word-table th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.word-table th.sortable:hover{color:#4a6cf7}.sort-arrow{margin-left:.2rem}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:1.5rem;background:#1f243073;animation:fade-in .15s ease}.modal{display:flex;flex-direction:column;gap:.9rem;width:100%;max-width:440px;max-height:85vh;padding:1.5rem;border-radius:12px;background:#fff;box-shadow:0 12px 40px #0000002e;animation:rise .18s ease}.modal.narrow{max-width:380px}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.modal-head h2{margin:0;font-size:1.15rem}.modal-hint{margin:0;font-size:.85rem;color:#7a8299}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem}.search-results,.share-list{display:flex;flex-direction:column;gap:.2rem;overflow-y:auto;min-height:4rem}.skeleton{border-radius:6px;background:linear-gradient(90deg,#eef0f7 25%,#e2e6f2 37%,#eef0f7 63%);background-size:400% 100%;animation:shimmer 1.3s ease infinite}.skeleton-row{pointer-events:none}.skeleton-avatar{width:38px;height:38px;border-radius:50%;flex-shrink:0}.skeleton-line{height:.7rem;width:100%}.skeleton-line.short{width:55%}.skeleton-bubble{height:2.2rem;width:45%;border-radius:14px}.skeleton-bubble.right{align-self:flex-end;width:35%}.toast-stack{position:fixed;right:1.25rem;bottom:1.25rem;z-index:100;display:flex;flex-direction:column;gap:.5rem}.toast{padding:.7rem 1rem;border-radius:8px;background:#1f2430;color:#fff;font-size:.88rem;font-weight:500;box-shadow:0 6px 20px #0003;cursor:pointer;animation:rise .2s ease}.toast.error{background:#d94848}.topbar nav a{display:inline-flex;align-items:center;gap:.4rem}.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.15rem;height:1.15rem;padding:0 .35rem;border-radius:999px;background:#f75c5c;color:#fff;font-size:.68rem;font-weight:700}.leaderboard-page{max-width:640px}.board-row{display:flex;align-items:center;gap:.85rem;padding:.7rem .6rem;border-radius:8px;border-bottom:1px solid #f0f2fa}.board-row:last-of-type{border-bottom:none}.board-row.me{background:#eaefff}.board-rank{width:1.75rem;flex-shrink:0;text-align:center;font-size:.95rem;font-weight:700;color:#7a8299}.board-rank.top{color:#4a6cf7}.board-name{display:flex;align-items:center;gap:.5rem;flex:1;min-width:0;font-size:.98rem;font-weight:600}.you-chip{padding:.1rem .45rem;border-radius:999px;background:#4a6cf7;color:#fff;font-size:.68rem;font-weight:700}.board-streak{flex-shrink:0;font-size:1rem;font-weight:700;white-space:nowrap}.board-streak.cold{opacity:.4;font-weight:500}.board-note{margin:1rem 0 0;text-align:center}.appear{animation:rise .18s ease}@keyframes rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}@media(prefers-reduced-motion:reduce){.appear,.modal,.toast,.modal-backdrop,.skeleton{animation:none}}@media(max-width:1100px){.friends-layout{grid-template-columns:1fr}.chat-panel{height:auto;min-height:26rem}.thread{max-height:24rem}.card-tools{opacity:1}}
