/* 登录、结算、排行榜、我的 */

.login { min-height: 100dvh; display: grid; align-content: center; gap: 22px; padding: calc(24px + var(--safe-t)) 20px calc(28px + var(--safe-b)); }
.login-hero { display: grid; justify-items: center; gap: 4px; text-align: center; }
.login-mascot { width: 132px; height: 132px; animation: bob 2.8s ease-in-out infinite; }
.brand { font-size: 34px; font-weight: 900; letter-spacing: .01em; line-height: 1.2; }
.brand-hej { display: inline-block; padding: 0 12px; border-radius: 14px; background: var(--btn); color: #fff; transform: rotate(-4deg); box-shadow: 0 4px 0 var(--btn-deep); }
.brand-sub { color: var(--muted); margin-top: 8px; }
.login-form { display: grid; gap: 14px; padding: 18px 16px 20px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--soft); }
.seg-btn { min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 800; }
.seg-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .25); }
.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 800; }
.field-input { width: 100%; min-height: 52px; padding: 10px 14px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--bg); font-size: 17px; }
.field-input:focus { border-color: var(--btn); outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
.form-error { padding: 9px 12px; border-radius: 12px; background: var(--lingon-soft); color: var(--lingon-deep); font-size: 14px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .form-error { color: var(--lingon); } }
.login-hint { font-size: 13px; color: var(--muted); text-align: center; }

/* 结算 */
.result { min-height: 100dvh; display: flex; flex-direction: column; }
.result-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: calc(28px + var(--safe-t)) 20px 16px; text-align: center; }
.result-mascot { width: 128px; height: 128px; animation: pop .5s both; }
.is-pass .result-mascot { animation: pop .5s both, bob 1.2s .5s ease-in-out infinite; }
.result-title { font-size: 30px; font-weight: 900; line-height: 1.25; }
.result-sub { color: var(--muted); max-width: 24em; }
.result-stars { display: flex; gap: 8px; align-items: flex-end; }
.big-star { font-size: 46px; line-height: 1; color: var(--line); }
.big-star:nth-child(2) { font-size: 60px; }
.big-star.is-on { color: var(--sun); text-shadow: 0 3px 0 #B5761B; animation: pop .45s both; animation-delay: calc(var(--i) * .18s + .2s); }
.ring { --pct: 0; width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ok) calc(var(--pct) * 1%), var(--line) 0); margin: 4px 0; }
.is-fail .ring { background: conic-gradient(var(--sun) calc(var(--pct) * 1%), var(--line) 0); }
.ring-in { width: 116px; height: 116px; border-radius: 50%; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.ring-in b { font-size: 34px; font-weight: 900; font-family: var(--font-round); }
.ring-in span { font-size: 13px; color: var(--muted); font-weight: 700; }
.result .tiles { width: 100%; max-width: 380px; }
.result-unlock { padding: 6px 16px; border-radius: 999px; background: var(--ok-soft); color: var(--ok-deep); font-weight: 800; }
@media (prefers-color-scheme: dark) { .result-unlock { color: var(--ok); } }
.result-actions { display: grid; gap: 12px; padding: 12px 20px calc(20px + var(--safe-b)); }

/* 排行榜 */
.rank { overflow: hidden; }
.rank-row { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 14px; border-bottom: 2px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-row.is-me { background: var(--brand-soft); }
.rank-pos { flex: none; width: 30px; text-align: center; font-weight: 900; font-size: 17px; color: var(--muted); font-family: var(--font-round); }
.is-top .rank-pos { font-size: 24px; }
.rank-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.rank-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-tag { flex: none; padding: 0 7px; border-radius: 8px; background: var(--btn); color: #fff; font-size: 12px; font-weight: 800; }
.rank-streak { flex: none; font-size: 14px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rank-xp { flex: none; min-width: 68px; text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.rank-xp b { font-size: 18px; font-weight: 900; color: var(--ink); font-family: var(--font-round); }

/* 我的 */
.me-head { display: flex; align-items: center; gap: 14px; padding: 16px; }
.me-who { flex: 1; min-width: 0; }
.me-name { font-size: 22px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-line { font-size: 14px; color: var(--muted); font-weight: 600; }
.level-bar, .vocab-bar { position: relative; height: 12px; margin-top: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.level-fill { height: 100%; border-radius: 999px; background: var(--sun); }
.me-next { margin-top: 4px; font-size: 12px; color: var(--muted); }
.vocab-bar { margin-top: -6px; }
.vocab-learned, .vocab-mastered { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.vocab-learned { background: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.vocab-mastered { background: var(--ok); }
.tile-learned .tile-value { color: var(--brand); } .tile-mastered .tile-value { color: var(--ok); } .tile-due .tile-value { color: var(--sun-deep); }
.set-list { overflow: hidden; }
.set-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-bottom: 2px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .btn { flex: none; }
.set-ico { flex: none; font-size: 22px; width: 30px; text-align: center; }
.set-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.set-text span { font-size: 13px; color: var(--muted); }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; position: relative; width: 54px; height: 32px; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch-input:checked + .switch { background: #0E9C8B; }
.switch-input:checked + .switch::after { transform: translateX(22px); }
.switch-input:focus-visible + .switch { outline: 3px solid var(--sun); outline-offset: 2px; }
.tile-recall .tile-value { color: var(--ok); } .tile-combo .tile-value { color: var(--brand); }
.sec-note { margin: -4px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
