.ml-wait { margin: 12vh auto; max-width: 520px; padding: 25px; text-align: center; background: #fff; border-radius: 16px; }
.learn-page { min-height: 100svh; background: linear-gradient(135deg,#edf6fc,#f8fbfd 65%); color: #102f52; }
.learn-head { background: linear-gradient(105deg,#084a80,#072c60); color: white; }
.learn-head > div, .learn-main { width: min(960px,calc(100% - 32px)); margin: auto; }
.learn-head > div { min-height: 64px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.learn-head a { display:flex; align-items:center; text-decoration:none; }
.learn-head .masari-brand--compact { font-size:20px; }
.learn-user { font-weight:650; overflow-wrap:anywhere; }
.learn-main { padding: 22px 0 max(74px,env(safe-area-inset-bottom)); }
.learn-main h1,.learn-main h2,.learn-main h3,.learn-main p { line-height:1.65; }
.learn-main h1 { margin:5px 0 15px; font-size:clamp(22px,3.2vw,34px); color:#0a3768; }
.learn-heading > a { display:inline-flex; align-items:center; gap:5px; text-decoration:none; font-size:13px; }
.learn-page a { color:#075da5; font-weight:700; }
.learn-nav { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.learn-nav a { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:5px 14px; border-radius:20px; background:#fff; border:1px solid #d5e3ef; text-decoration:none; }
.learn-nav [aria-current] { background:#084d91; color:white; border-color:#084d91; }
.learn-panels { display:grid; gap:14px; }
.learn-card { min-width:0; background:white; padding:clamp(14px,3vw,25px); border:1px solid #d6e5f0; border-radius:18px; box-shadow:0 4px 14px #2046630c; }
.learn-card h2 { margin:0 0 12px; font-size:clamp(17px,2.2vw,22px); }
.learn-card h3 { margin:18px 0 6px; font-size:16px; }
.learn-card p { margin:5px 0 13px; overflow-wrap:anywhere; }
.learn-rows { display:grid; }
.learn-row { display:flex; align-items:center; gap:13px; padding:12px 3px; min-height:44px; text-decoration:none; color:inherit; border-bottom:1px solid #e5edf3; }
.learn-row:last-child { border:0; }
.learn-row > span:first-child { min-width:0; }
.learn-row strong,.learn-row small { display:block; line-height:1.55; }
.learn-row strong { font-weight:750; overflow-wrap:anywhere; }
.learn-row small,.learn-meta { color:#516c82; font-weight:550; }
.learn-row [lang="en"],.learn-response { overflow-wrap:anywhere; }
.learn-row [lang="en"] { direction:ltr; text-align:right; }
.learn-row .learn-number { border-radius:9px; background:#e4f4fa; color:#08638d; min-width:34px; padding:2px; text-align:center; font-weight:750; }
.learn-status,.learn-row > bdi:last-child { flex:none; margin-inline-start:auto; color:#276581; font-size:13px; }
.learn-row[aria-disabled] { color:#52677a; }
.learn-row[aria-disabled] .learn-status { color:#66798a; }
.learn-card audio { display:block; width:min(100%,440px); margin:10px 0; }
.learn-card audio[hidden] {display:none;}
.learn-dialogue { padding:12px 16px; border-radius:12px; background:#f0f8fc; line-height:1.5; }
.learn-dialogue p { margin:5px 0; }
.learn-en-title { text-align:right; }
.learn-card details { margin-top:12px; }
.learn-card summary { padding:5px 0; color:#114a79; cursor:pointer; font-weight:750; }
.learn-vocab { display:grid; grid-template-columns:1fr 1fr; max-width:450px; gap:4px 16px; }
.learn-vocab dd { margin:0; }
.learn-question { margin:12px 0 16px; border:1px solid #d3e1ec; padding:14px; border-radius:12px; min-width:0; }
.learn-question legend { padding:0 6px; font-weight:750; color:#164c77; }
.learn-question p { font-weight:700; }
.learn-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:8px; }
.learn-choices label { cursor:pointer; border:1px solid #cbdae8; padding:8px; border-radius:9px; display:flex; align-items:center; gap:7px; min-width:0; }
.learn-choices label:has(input:checked) { border-color:#007c93; background:#e7f8f7; }
.learn-choices input { accent-color:#007788; }
.learn-choices span { overflow-wrap:anywhere; }
.learn-question output { display:block; color:#006d60; font-weight:700; }
.learn-link { border:0; background:transparent; color:#0a6290; padding:6px 0; font-size:13px; text-decoration:underline; }
.learn-question.learn-incorrect { border-color:#b53141; }
.learn-primary,.learn-secondary,.learn-page .learn-primary { display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:10px; color:white; background:#075898; min-height:40px; font:inherit; font-weight:750; text-decoration:none; padding:6px 20px; }
.learn-primary:disabled { opacity:.65; cursor:wait; }
.learn-secondary { background:#edf7fa; color:#07547a; border:1px solid #aed5e3; }
.learn-actions,.learn-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.learn-card form:not([data-step="complete"]):not([data-step="review"]) label:not(.learn-choices label) { display:grid; gap:5px; margin:8px 0; font-weight:650; }
.learn-card :is(textarea, input[type=number],select,input[type=file]) { width:100%; max-width:100%; padding:7px 10px; border:1px solid #b8cddd; border-radius:8px; font:inherit; color:inherit; background:#fcfeff; }
.learn-card textarea { resize:vertical; }
.learn-card input[type=number] { max-width:140px; }
.learn-message { color:#934121; }
.learn-saved { background:#dcf6eb; color:#0d644b; padding:8px 15px; border-radius:10px; }
.learn-overview-score { display:grid; justify-items:start; color:white; border-radius:16px; padding:20px; background:linear-gradient(115deg,#074b87,#006d82); }
.learn-overview-score strong,.learn-result { font:750 32px/1.5 Arial,sans-serif; }
.learn-result { color:#008373; }
.learn-assignment { border-bottom:1px solid #d9e8f0; padding:8px 0; }
.learn-assignment summary span { margin-inline-start:12px; font-size:12px; color:#33718a; }
.learn-response { background:#f0f7fb; padding:12px; border-radius:10px; white-space:pre-wrap; }
.learn-tag { display:inline-block; background:#ecf5fa; border-radius:6px; margin:3px; padding:2px 7px; }
@media (max-width:520px) {
  .learn-main,.learn-head > div { width:calc(100% - 22px); }
  .learn-main { padding-top:15px; }
  .learn-head > div { min-height:52px; }
  .learn-nav { gap:5px; }
  .learn-nav a { padding:3px 9px; font-size:12px; }
  .learn-row { gap:7px; }
  .learn-status { font-size:11px; }
  .learn-choices {grid-template-columns:1fr;}
}
