/* crewve 마이러닝 (js/learn.js) — 복습 · 매칭 · 통계. 이름은 전부 lr- 로 시작한다. 색·글꼴은 crewve.css 의 변수만 쓴다. */
.lr .lr-eye{margin:0;font-family:var(--f-brand);font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);font-weight:700}
.lr .lr-mut{color:var(--muted);margin:0 0 10px;font-size:13.5px}
.lr .lr-small{font-size:12.5px;margin:8px 0 0}
.lr .lr-big{font-size:clamp(22px,2.6vw,30px);font-weight:900;letter-spacing:-.02em;margin:4px 0 8px;line-height:1.25}
.lr .lr-link{color:var(--crew);text-decoration:underline;text-underline-offset:3px;font-weight:600;font-size:inherit}
.lr .lr-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.lr .lr-ok{color:var(--ok);font-size:12.5px;font-weight:700}
.lr .lr-danger{color:#FF8A75}
.lr .lr-h2{font-size:19px;margin:30px 0 12px;font-weight:800}
.lr kbd{display:none}
@media (hover:hover) and (pointer:fine){.lr kbd{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:5px;border:1px solid currentColor;font:700 11px var(--f-ui);opacity:.75;flex:none}}

.lr-head{display:flex;align-items:center;gap:16px;margin-bottom:8px}
.lr-head .lead{margin-bottom:14px}
.lr-av{flex:none;width:58px;height:58px;border-radius:18px;background:var(--grad);color:#1b0f08;font-weight:900;font-size:26px;display:grid;place-items:center}
.lr-badge{display:inline-grid;place-items:center;min-width:17px;height:17px;padding:0 4px;margin-left:5px;border-radius:99px;background:var(--sun);color:#fff;font:800 10.5px var(--f-ui);vertical-align:2px}
#tabbar a{position:relative}#tabbar .lr-badge{position:absolute;top:6px;left:50%;margin-left:6px}

/* 오늘 */
.lr-today{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:24px;background:linear-gradient(120deg,rgba(255,107,74,.16),rgba(255,194,75,.06) 55%,var(--surface))}
.lr-today>div:first-child{min-width:0;flex:1}
.lr-goal{flex:none;display:grid;justify-items:center;gap:12px}
.lr-ring{width:112px;height:112px;border-radius:50%;display:grid;place-content:center;text-align:center;background:radial-gradient(closest-side,var(--surface) 78%,transparent 80%),conic-gradient(var(--gold) var(--p),rgba(160,180,255,.16) 0)}
.lr-ring b{font:800 30px/1 var(--f-brand)}.lr-ring small{color:var(--muted);font-size:12px}
.lr-goalset{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.lr-goalset .pill{min-width:38px;text-align:center}

/* 한눈에 */
.lr-over{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px}
.lr-over>div{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:grid;gap:6px;align-content:space-between}
.lr-over span{color:var(--muted);font-size:12.5px}
.lr-over strong{font:800 26px/1.1 var(--f-brand)}.lr-over strong small{font:500 13px var(--f-ui);color:var(--muted)}
.lr-over strong:not(:has(small)):where(:lang(ko)){word-break:keep-all}
.lr-seg{display:flex;height:26px;border-radius:8px;overflow:hidden;margin:14px 0 6px;gap:2px}
.lr-seg i{font:800 12px/26px var(--f-ui);text-align:center;color:#0A0F22;min-width:22px}
.lr-seg .new,.lr-legend .new::before{background:#8FA0D8}.lr-seg .learning,.lr-legend .learning::before{background:var(--gold)}.lr-seg .learned,.lr-legend .learned::before{background:var(--ok)}
.lr-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 14px;font-size:12px;color:var(--muted)}
.lr-legend span::before{content:"";display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:6px}
.lr-charts{margin-top:14px}
.lr-bars{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;height:138px;align-items:end}
.lr-bars>div{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;min-width:0}
.lr-bars i{flex:none;width:100%;max-width:30px;border-radius:5px 5px 2px 2px;background:var(--grad);min-height:2px;opacity:.95}
.lr-bars.fc i{background:linear-gradient(180deg,var(--crew),#2b8fa8)}
.lr-bars i[style="height:0%"]{background:rgba(160,180,255,.18)}
.lr-bars b{order:-1;font:700 11px/1 var(--f-ui);color:var(--muted);margin-bottom:4px;min-height:11px}
.lr-bars span{font-size:11px;color:var(--dim);margin-top:5px;white-space:nowrap}

/* 내 단어 */
.lr-tools{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.lr-tools input,.lr-tools select{background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--text);font:inherit;padding:0 12px;height:36px;min-width:0}
.lr-tools input{flex:1 1 180px}
.lr-list{list-style:none;margin:10px 0 0;padding:0;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.lr-list li{display:grid;grid-template-columns:minmax(110px,1.1fr) minmax(0,2.4fr) auto auto auto;gap:6px 14px;align-items:center;padding:10px 14px;border-top:1px solid var(--line);background:var(--surface)}
.lr-list li:first-child{border-top:0}
.lr-hw{font-weight:800;font-size:17px}.lr-hw small{display:block;font-weight:500;font-size:12px;color:var(--muted)}
.lr-en{color:#CBD3EE;font-size:13.5px;min-width:0}
.lr-st{font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:99px;white-space:nowrap;border:1px solid}
.lr-st.new{color:#AEBBEB}.lr-st.learning{color:var(--gold)}.lr-st.learned{color:var(--ok)}
.lr-due{font-size:12px;color:var(--muted);white-space:nowrap}
.lr-rm{font-size:12.5px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;min-height:32px;padding:0 4px}
.lr-more{margin-top:10px}
.lr-add{margin-top:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.lr-add summary{cursor:pointer;padding:14px 16px;font-weight:800;min-height:44px}.lr-add summary small{font-weight:500;color:var(--muted);font-size:12.5px;margin-left:6px}
.lr-packs{padding:0 16px 16px;display:grid;gap:16px}
.lr-ph{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}.lr-ph .btn,.lr-ph .lr-ok{margin-left:auto}
.lr-chips{display:flex;flex-wrap:wrap;gap:6px}
.lr-chip{border:1px solid var(--line);border-radius:99px;padding:6px 13px;font-weight:700;font-size:14px;min-height:36px;color:#CBD3EE}
.lr-chip.on{background:rgba(88,224,160,.16);border-color:var(--ok);color:#fff}.lr-chip.on::before{content:"✓ ";color:var(--ok)}

/* 매칭 그래프 */
.lr-sample{color:#22100a!important;background:var(--gold);border-radius:4px;padding:1px 7px;font-weight:800!important}
.lr-teachers{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 14px}
.lr-t{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:99px;padding:5px 14px 5px 5px;font-weight:700;font-size:13px;min-height:44px;background:var(--surface)}
.lr-t[aria-pressed=true],.lr-dot[aria-pressed=true] .lr-face{outline:2px solid var(--gold);outline-offset:2px}
.lr-face{width:34px;height:34px;border-radius:50%;background:var(--surface-2);display:grid;place-items:center;font-weight:800;font-size:14px;overflow:hidden;flex:none;border:1px solid var(--line)}
.lr-face img{width:100%;height:100%;object-fit:cover;object-position:top}
.lr-pcwrap{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;gap:6px 8px;max-width:560px}
.lr-chart{position:relative;aspect-ratio:490/420;border-left:2px solid var(--line);border-bottom:2px solid var(--line);border-radius:0 12px 0 0;background:
  linear-gradient(var(--line) 1px,transparent 1px) 0 0/100% 25%,linear-gradient(90deg,var(--line) 1px,transparent 1px) 0 0/25% 100%,radial-gradient(circle at 100% 0,rgba(255,194,75,.14),transparent 60%)}
.lr-axis{font-size:12px;color:var(--muted);font-weight:700}
.lr-axis.y{writing-mode:vertical-rl;transform:rotate(180deg);justify-self:center;text-align:left;align-self:end;padding-top:6px}
.lr-axis.x{grid-column:2;justify-self:end}
.lr-dot{position:absolute;transform:translate(-50%,50%);display:grid;justify-items:center;padding:4px;border-radius:50%}
.lr-dot .lr-face{width:34px;height:34px}.lr-dot.t .lr-face{width:48px;height:48px;border:2px solid var(--gold)}
.lr-dot i,.lr-tag{font:800 10px/1.5 var(--f-ui);background:var(--gold);color:#22100a;border-radius:4px;padding:0 5px;margin-top:-7px;position:relative}
.lr-tag{margin:0 0 0 4px}
.lr-pccard:not(:empty){margin-top:14px;max-width:560px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.lr-who{display:flex;gap:12px;align-items:center}.lr-who .lr-face{width:46px;height:46px}.lr-who p{margin:2px 0 0}

/* 복습 */
.lr-rev{max-width:760px}
.lr-back{color:var(--muted);font-size:13.5px;display:inline-flex;align-items:center;min-height:36px}
.lr-prog{height:6px;border-radius:99px;background:rgba(160,180,255,.16);overflow:hidden;margin:14px 0 6px}.lr-prog i{display:block;height:100%;background:var(--grad);border-radius:99px;transition:width .25s}
.lr-card{padding:26px;margin-top:10px}
.lr .lr-clue{font-size:clamp(19px,2.3vw,24px);font-weight:700;margin:6px 0 18px;line-height:1.4}
.lr .lr-word{font-size:clamp(38px,6vw,56px);font-weight:900;margin:6px 0 2px!important;color:#fff!important;line-height:1.2}
.lr .lr-rom{color:var(--gold)!important;font-weight:700;font-size:16px!important;margin:0 0 14px!important}
.lr-rates{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px}
.lr-rates .btn{height:auto;min-height:62px;padding:8px 6px;flex-wrap:wrap;gap:2px 7px;white-space:normal;font-size:15px}
.lr-rates small{flex-basis:100%;font-size:11.5px;font-weight:600;opacity:.75;text-align:center}
.lr-choices{display:grid;gap:8px;margin-top:16px}
.lr-choice{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid var(--line);border-radius:10px;padding:13px 16px;min-height:52px;background:rgba(255,255,255,.03);font-weight:600;font-size:15.5px;transition:background .15s,border-color .15s}
.lr-choice:hover:not(:disabled){background:rgba(255,255,255,.09)}
.lr-choice.no{opacity:.45;border-color:#FF8A75;text-decoration:line-through}
.lr-choice.ok{border-color:var(--ok);background:rgba(88,224,160,.16)}
.lr .lr-fb{min-height:22px;margin:12px 0 4px!important;font-weight:700;color:var(--gold)!important}
.lr-done .lr-over{margin:14px 0}
.lr-match{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:10px;margin-top:8px}
.lr-match>div{display:grid;gap:8px;align-content:start}
.lr-m{border:1px solid var(--line);border-radius:10px;min-height:60px;padding:8px 12px;background:var(--surface);font-weight:600;font-size:13.5px;line-height:1.35;transition:background .15s,opacity .3s,border-color .15s}
.lr-m.ko{font-size:21px;font-weight:800}
.lr-m.sel{border-color:var(--gold);background:rgba(255,194,75,.16)}
.lr-m.ok{opacity:.28;border-color:var(--ok)}
.lr-m.no{border-color:#FF8A75;animation:lr-shake .4s}
@keyframes lr-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}

/* 오답 노트 */
.lr-mis{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.lr-mis li{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.lr-mis p{margin:6px 0 0;font-size:13.5px}
.lr-mh{display:flex;justify-content:space-between;align-items:center;gap:10px}.lr-mh strong{font-size:16px}.lr-mh strong small{color:var(--muted);font-weight:500}
.lr-mbar{height:7px;border-radius:99px;background:rgba(160,180,255,.14);margin:8px 0;overflow:hidden}.lr-mbar i{display:block;height:100%;background:var(--sun);border-radius:99px}
.lr-x{color:#FF8A75}.lr-o{color:var(--ok)}
.lr-next{margin-top:12px;max-width:100%;white-space:normal;height:auto;text-align:left;padding:6px 14px}

/* 되돌리기 알림 */
#toast:has(.lr-undo){pointer-events:auto;display:flex;align-items:center;gap:12px;white-space:nowrap}
#toast .lr-undo{color:#C63A1C;font-weight:800;text-decoration:underline;text-underline-offset:3px;min-height:28px}

@media (max-width:900px){
  .lr-head{gap:12px}.lr-av{width:46px;height:46px;font-size:21px;border-radius:14px}
  .lr-today{flex-direction:column;align-items:stretch;padding:18px;gap:18px}
  .lr-goal{grid-template-columns:auto 1fr;justify-items:start;align-items:center;gap:16px}
  .lr-ring{width:84px;height:84px}.lr-ring b{font-size:24px}
  .lr-goalset{flex-wrap:wrap}.lr-goalset span{flex-basis:100%}
  .lr-goalset .pill,.lr-chip,.lr-rm,.lr .lr-link,.lr-back,.lr-add summary{min-height:44px;display:inline-flex;align-items:center}
  .lr-goalset .pill{min-width:48px;justify-content:center}
  .lr-chip,.lr-rm{min-width:44px;justify-content:center}.lr .sec>h3 .pill{min-height:44px;display:inline-flex;align-items:center}.lr-next{min-height:44px}
  .lr .lr-acts .btn{flex:1 1 auto}
  .lr-over{grid-template-columns:1fr 1fr}.lr-over>div{padding:12px}.lr-over strong{font-size:21px}
  .lr-bars{height:118px;gap:2px}.lr-bars span{font-size:9.5px}
  .lr-tools input,.lr-tools select{height:44px}.lr-tools input{flex-basis:100%}
  .lr-list li{grid-template-columns:minmax(0,1fr) auto;padding:10px 12px}
  .lr-list .lr-en{grid-column:1/-1;order:3}.lr-list .lr-due{order:4}.lr-list .lr-rm{order:5;justify-self:end}
  .lr-card{padding:18px}
  .dlg-hero .btns [data-lsave]{grid-column:1/-1;order:9}
  .lr-dot{padding:5px}
  .lr-match{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:8px}.lr-m{padding:6px 8px;font-size:12.5px}.lr-m.ko{font-size:18px}
  #toast:has(.lr-undo){bottom:calc(72px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);white-space:normal}
  #toast .lr-undo{min-height:44px;flex:none}
}
@media (max-width:480px){.lr-chart{aspect-ratio:270/340}}
