/* ==========================================================================
   واژه‌یار — styles.  RTL-first, mobile-first, light/dark.
   ========================================================================== */

:root {
  --bg: #f6f4ff;
  --bg-2: #ece8ff;
  --card: #ffffff;
  --card-2: #faf9ff;
  --ink: #1e1b3a;
  --muted: #7a7799;
  --line: #e7e3f8;
  --brand: #6c5ce7;
  --brand-2: #8e7bff;
  --brand-soft: #efeaff;
  --accent: #ff7a59;
  --pink: #ff7a9e;
  --good: #12b981;
  --good-soft: #dcf7ec;
  --bad: #f04d5d;
  --bad-soft: #ffe8ea;
  --warn: #f5a524;
  --sky: #3aa0ff;
  --shadow: 0 14px 34px -16px rgba(76, 58, 190, 0.32);
  --shadow-sm: 0 2px 0 #e3def6;
  --hero: linear-gradient(135deg, #6c5ce7 0%, #8e7bff 55%, #ff7a9e 130%);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --radius: 22px;
  --font: "Vazirmatn", "Vazir", Tahoma, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 76px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0d1f;
    --bg-2: #15132b;
    --card: #1a1835;
    --card-2: #201d40;
    --ink: #f1efff;
    --muted: #9b98bd;
    --line: #2b2852;
    --brand: #8b7cff;
    --brand-2: #a597ff;
    --brand-soft: #262250;
    --good-soft: #10352b;
    --bad-soft: #3a1c26;
    --shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 2px 0 #131228;
    --hero: linear-gradient(135deg, #4b3fc4 0%, #6c5ce7 55%, #c4508a 130%);
    --nav-bg: rgba(26, 24, 53, 0.82);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0d1f;
  --bg-2: #15132b;
  --card: #1a1835;
  --card-2: #201d40;
  --ink: #f1efff;
  --muted: #9b98bd;
  --line: #2b2852;
  --brand: #8b7cff;
  --brand-2: #a597ff;
  --brand-soft: #262250;
  --good-soft: #10352b;
  --bad-soft: #3a1c26;
  --shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 2px 0 #131228;
  --hero: linear-gradient(135deg, #4b3fc4 0%, #6c5ce7 55%, #c4508a 130%);
  --nav-bg: rgba(26, 24, 53, 0.82);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 85% -8%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 62%),
    radial-gradient(700px 420px at -10% 8%, color-mix(in srgb, var(--pink) 12%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.en { font-family: var(--font-en); direction: ltr; unicode-bidi: isolate; display: inline-block; text-align: left; }
.muted { color: var(--muted); }

/* ---------- layout ---------- */
.view {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 34px);
  outline: none;
  animation: viewIn 0.35s ease both;
}
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { font-size: 1.45rem; font-weight: 800; line-height: 1.3; }
.page-head p { color: var(--muted); font-size: 0.9rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 4px 10px; font-weight: 800; font-size: 1.02rem; }
.section-title a, .section-title button { font-size: 0.85rem; font-weight: 600; color: var(--brand); }
.more-link { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 99px; background: var(--brand-soft); transition: background 0.15s, transform 0.12s; }
.more-link:active { transform: scale(0.94); }
.more-link .ic { width: 15px; height: 15px; stroke-width: 2.6; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.card-pad { padding: 18px; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 16px; font-weight: 700; font-size: 0.98rem;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s;
  text-decoration: none; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 0 color-mix(in srgb, var(--brand) 62%, #000); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 62%, #000); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.btn-good { background: var(--good); color: #fff; box-shadow: 0 10px 22px -12px var(--good); }
.btn-bad { background: var(--bad-soft); color: var(--bad); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-google { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn-google .g-ico { flex: none; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 15px 22px; font-size: 1.05rem; border-radius: 18px; }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; border-radius: 12px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 14px;
  color: var(--muted); background: transparent; transition: background 0.15s, color 0.15s, transform 0.12s;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn.is-on { color: var(--warn); }
.icon-btn.is-on .ic { fill: var(--warn); }
.icon-btn.is-speaking { color: var(--brand); background: var(--brand-soft); animation: pulse 0.9s ease infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .field > label { font-size: 0.86rem; font-weight: 700; color: var(--muted); }
.input, .field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 15px; border: 1.5px solid var(--line);
  background: var(--card-2); transition: border-color 0.15s, box-shadow 0.15s; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 76px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
.field input[dir="ltr"], .field textarea[dir="ltr"] { text-align: left; }
.field .hint { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.field .hint.warn { color: var(--warn); font-weight: 600; }
.field .hint.spell-hint { color: var(--brand); font-weight: 600; }
.spell-fix { color: var(--brand); font-weight: 800; text-decoration: underline; margin-inline-start: 4px; }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw-toggle { position: absolute; top: 0; bottom: 0; right: 6px; padding: 0 12px; color: var(--brand); font-weight: 700; font-size: 0.85rem; }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: 14px; padding: 10px 14px; font-size: 0.9rem; margin-bottom: 12px; font-weight: 600; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--brand-soft); border-radius: 16px; margin-bottom: 18px; }
.seg-btn { padding: 10px; border-radius: 12px; font-weight: 700; color: var(--muted); transition: all 0.2s; }
.seg-btn.is-on { background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; margin-inline: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line);
  font-size: 0.86rem; font-weight: 600; color: var(--muted); white-space: nowrap; transition: all 0.15s;
}
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: none; }

.search { position: relative; margin-bottom: 8px; }
.search .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.search input {
  width: 100%; padding: 13px 44px 13px 14px; padding-inline-start: 44px; border-radius: 18px;
  border: 1.5px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm);
}
.search input:focus { outline: none; border-color: var(--brand); }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background 0.2s; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform 0.22s cubic-bezier(0.3, 1.4, 0.5, 1); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(-20px); }

/* ---------- home ---------- */
.streak-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow-sm); font-weight: 800; color: var(--accent); border: 1px solid var(--line); }
.streak-chip .ic { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.streak-chip.is-cold { color: var(--muted); }
.streak-chip.is-cold .ic { fill: none; stroke: currentColor; }

.hero { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 16px; border-radius: 24px; padding: 18px 20px; background: var(--hero); color: #fff; box-shadow: none; }
.ring { width: 72px; height: 72px; position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .trk { stroke: rgba(255, 255, 255, 0.25); }
.ring .bar { stroke: #fff; transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.2rem; font-weight: 800; }
.hero-text { flex: 1; min-width: 150px; }
.hero h2 { font-size: 1.08rem; font-weight: 800; line-height: 1.5; }
.hero p { opacity: 0.92; font-size: 0.88rem; margin-top: 2px; }
.hero .btn { background: #fff; color: var(--brand); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.hero .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.hero-cta { padding: 12px 22px; }
@media (max-width: 479px) { .hero-cta { flex: 1 0 100%; } }


.bars { display: flex; align-items: flex-end; gap: 6px; height: 84px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bars i { width: 100%; max-width: 18px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); min-height: 4px; transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bars i.zero { background: var(--line); }
.bars small { font-size: 0.66rem; color: var(--muted); }
.bars .today small { color: var(--brand); font-weight: 800; }

/* ---------- word list ---------- */
.day-head { margin: 18px 6px 8px; font-size: 0.82rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.day-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wlist { display: grid; gap: 8px; }
.wrow {
  display: flex; align-items: center; gap: 4px; padding: 9px 12px; padding-inline-end: 4px; text-align: start; width: 100%;
  background: var(--card); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; transition: transform 0.12s, box-shadow 0.2s;
}
.wrow:active { transform: scale(0.985); }
.w-lvl { display: inline-flex; gap: 2px; margin-inline-start: auto; align-self: center; }
.w-lvl i { width: 9px; height: 4px; border-radius: 2px; background: var(--line); }
.w-lvl i.on { background: var(--brand); }
.wrow.is-pending { opacity: 0.7; border-style: dashed; }
.wrow-main { flex: 1; min-width: 0; padding-inline-start: 6px; }
.w-line { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.w-en { font-family: var(--font-en); direction: ltr; unicode-bidi: isolate; font-weight: 700; font-size: 1.06rem; letter-spacing: 0.1px; }
.w-ph { font-family: var(--font-en); direction: ltr; unicode-bidi: isolate; color: var(--muted); font-size: 0.85rem; }
.w-fa { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; color: var(--ink); opacity: 0.85; font-size: 0.92rem; overflow-wrap: anywhere; }
.w-lesson { color: var(--muted); font-size: 0.74rem; font-weight: 600; opacity: 0.9; }
.w-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 99px; font-size: 0.72rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.pill.new { background: var(--brand-soft); color: var(--brand); }
.pill.done { background: var(--good-soft); color: var(--good); }
.pill .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.wrow-actions { display: flex; flex: none; }

.empty { text-align: center; padding: 46px 20px; }
.empty .big { font-size: 3.4rem; line-height: 1; margin-bottom: 10px; display: block; filter: drop-shadow(0 10px 14px rgba(108, 92, 231, 0.25)); }
.empty h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------- review ---------- */
.rv-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rv-prog { flex: 1; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.rv-prog i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--pink)); transition: width 0.4s ease; }
.rv-count { font-weight: 800; color: var(--muted); font-size: 0.9rem; min-width: 48px; text-align: center; }
.flash { perspective: 1400px; cursor: pointer; }
.flash-inner { display: grid; transform-style: preserve-3d; transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1); min-height: 340px; }
.flash.is-flipped .flash-inner { transform: rotateY(180deg); }
.face {
  grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 30px; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.face.front { background: var(--card); }
.face.back { background: var(--hero); color: #fff; transform: rotateY(180deg); border: 0; }
.face .cap { position: absolute; inset-block-start: 18px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.4px; opacity: 0.65; }
.face { position: relative; }
.face .big-en, .quiz-prompt .big-en { font-family: var(--font-en); direction: ltr; font-weight: 700; font-size: clamp(2rem, 9vw, 3rem); line-height: 1.15; overflow-wrap: anywhere; }
.face .big-fa, .quiz-prompt .big-fa { font-weight: 800; font-size: clamp(1.6rem, 7vw, 2.3rem); line-height: 1.4; overflow-wrap: anywhere; }
.face .tap { font-size: 0.82rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.face .ex { font-family: var(--font-en); direction: ltr; font-style: italic; opacity: 0.92; font-size: 1rem; max-width: 30ch; }
.face .sub { opacity: 0.85; font-size: 0.95rem; }
.face .tts, .quiz-prompt .tts { background: var(--brand-soft); color: var(--brand); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.face.back .tts { background: rgba(255, 255, 255, 0.2); color: #fff; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.answers .btn { padding: 16px; font-size: 1.05rem; }
.answers[hidden] { display: none; }
.rv-hint { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 14px; }
.quiz-prompt { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 40px 20px; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; position: relative; }
.quiz-prompt .cap { position: absolute; inset-block-start: 18px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.4px; opacity: 0.65; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.quiz-opt { padding: 16px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 0.96rem; text-align: center; cursor: pointer; transition: transform 0.12s, background 0.15s, border-color 0.15s; overflow-wrap: anywhere; }
.quiz-opt:active { transform: scale(0.97); }
.quiz-opt.is-correct { background: var(--good-soft); border-color: var(--good); color: var(--good); font-weight: 700; }
.quiz-opt.is-wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); font-weight: 700; }
.quiz-opt[disabled] { pointer-events: none; }
.result { text-align: center; padding: 30px 10px; }
.result .score { font-size: 3.2rem; font-weight: 800; background: var(--hero); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.2; }

/* ---------- me ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar-btn { position: relative; width: 64px; height: 64px; flex: none; transition: transform 0.15s cubic-bezier(0.3, 1.5, 0.5, 1); }
.avatar-btn:active { transform: scale(0.94); }
.avatar-btn.is-busy { opacity: 0.6; pointer-events: none; }
.avatar-img, .avatar-fallback { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 20px; }
.avatar-img { object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: var(--hero); color: #fff; font-weight: 800; font-size: 1.5rem; box-shadow: 0 12px 22px -12px var(--brand); }
.avatar-cam { position: absolute; bottom: -4px; inset-inline-end: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), 0 0 0 3px var(--card); font-style: normal; }
.avatar-cam .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.profile-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.profile-info b { font-size: 1.1rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-info .en { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.link-btn.avatar-remove-link { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; }
.link-btn.danger { color: var(--bad); }
.setting { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: start; }
.setting:last-child { border-bottom: 0; }
.setting .ic { color: var(--brand); }
.setting .grow { flex: 1; min-width: 0; }
.setting b { display: block; font-weight: 700; }
.setting small { color: var(--muted); font-size: 0.8rem; display: block; line-height: 1.4; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft); border-radius: 14px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 11px; font-weight: 800; font-size: 1.2rem; color: var(--brand); }
.stepper button:active { background: var(--card); }
.stepper b { min-width: 34px; text-align: center; font-weight: 800; }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 40; inset-inline: 0; margin: 0 auto; width: min(94vw, 520px);
  bottom: calc(env(safe-area-inset-bottom) + 12px); height: 68px; border-radius: 28px;
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center;
  background: var(--nav-bg); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--line); box-shadow: 0 20px 40px -18px rgba(40, 28, 120, 0.4);
}
.nav-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; color: var(--muted); font-size: 0.7rem; font-weight: 700; transition: color 0.2s; }
.nav-btn .ic { width: 23px; height: 23px; transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); }
.nav-btn.is-on { color: var(--brand); }
.nav-btn.is-on .ic { transform: translateY(-2px) scale(1.12); }
.nav-btn.is-on::after { content: ""; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.fab {
  justify-self: center; width: 62px; height: 62px; margin-top: -32px; border-radius: 24px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--pink) 130%);
  box-shadow: 0 16px 28px -10px var(--brand), 0 0 0 6px var(--bg), 0 0 0 6px transparent;
  transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1);
  animation: fabFloat 3.8s ease-in-out infinite, fabRing 2.8s ease-out infinite;   /* gentle float + expanding halo */
}
.fab:active { transform: scale(0.9); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.6; transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); animation: fabTwist 6s ease-in-out infinite; }
.fab:active .ic { animation: none; transform: rotate(90deg); }
@keyframes fabFloat { 50% { translate: 0 -5px; } }
@keyframes fabRing {
  0% { box-shadow: 0 16px 28px -10px var(--brand), 0 0 0 6px var(--bg), 0 0 0 6px color-mix(in srgb, var(--brand) 42%, transparent); }
  70%, 100% { box-shadow: 0 16px 28px -10px var(--brand), 0 0 0 6px var(--bg), 0 0 0 28px transparent; }
}
@keyframes fabTwist { 0%, 78%, 100% { transform: rotate(0) scale(1); } 86% { transform: rotate(90deg) scale(1.2); } 93% { transform: rotate(90deg) scale(1); } }
.badge { position: absolute; top: 4px; inset-inline-end: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-style: normal; font-size: 0.68rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card); }

.offline-banner { position: sticky; top: 0; z-index: 60; display: flex; gap: 8px; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top) + 8px) 14px 8px; background: #2b2852; color: #fff; font-size: 0.82rem; font-weight: 600; text-align: center; }
.offline-banner .ic { width: 18px; height: 18px; }

/* ---------- sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; overscroll-behavior: contain; touch-action: none; }
.sheet-wrap .sheet { touch-action: pan-y; overscroll-behavior: contain; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(14, 13, 31, 0.5); backdrop-filter: blur(3px); animation: fade 0.25s ease both; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 30px 30px 0 0; padding: 10px 20px calc(env(safe-area-inset-bottom) + 22px);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.4); animation: sheetUp 0.35s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
.sheet-wrap.is-closing .sheet { animation: sheetDown 0.22s ease both; }
.sheet-wrap.is-closing .sheet-backdrop { animation: fadeOut 0.22s ease both; }
.sheet-grab { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 1.2rem; font-weight: 800; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 30px; max-height: 88dvh; }
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.suggest-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 6px 12px; border-radius: 99px; }
.suggest-btn .ic { width: 15px; height: 15px; }
.suggest-btn[disabled] { opacity: 0.6; }
.more-toggle { color: var(--brand); font-weight: 700; font-size: 0.88rem; margin: 2px 0 14px; display: inline-flex; gap: 6px; align-items: center; }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; }
.detail-en { font-family: var(--font-en); direction: ltr; font-weight: 700; font-size: 2rem; line-height: 1.2; }
.kv { display: grid; gap: 10px; margin: 16px 0; }
.kv > div { background: var(--card-2); border-radius: 16px; padding: 12px 14px; border: 1px solid var(--line); }
.kv small { display: block; color: var(--muted); font-size: 0.74rem; font-weight: 700; margin-bottom: 2px; }
.kv .en { font-style: italic; }
.lvl-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.lvl-dots i { width: 22px; height: 6px; border-radius: 4px; background: var(--line); }
.lvl-dots i.on { background: var(--good); }
.bulk-area { min-height: 180px; font-family: var(--font-en), var(--font); direction: ltr; text-align: left; line-height: 1.8; }

/* ---------- toast ---------- */
#toast-root { position: fixed; z-index: 100; inset-inline: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 26px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; max-width: 420px; padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.92rem; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5); animation: toastIn 0.3s cubic-bezier(0.2, 0.9, 0.25, 1) both; display: flex; gap: 10px; align-items: center; }
.toast.good { background: var(--good); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { animation: toastOut 0.25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.96); } }

.skeleton { border-radius: 18px; background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; height: 74px; margin-bottom: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- auth pages ---------- */
.auth-body { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; position: relative; overflow: hidden; }
.auth-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.float-chip { position: absolute; padding: 10px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-family: var(--font-en); font-weight: 700; color: var(--brand); display: flex; gap: 8px; align-items: baseline; opacity: 0.9; animation: floaty 7s ease-in-out infinite; }
.float-chip em { font-family: var(--font); font-style: normal; font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.c1 { top: 5%; inset-inline-start: 5%; }
.c2 { top: 13%; inset-inline-end: 4%; animation-delay: -2s; }
.c3 { bottom: 3%; inset-inline-start: 5%; animation-delay: -4s; }
.c4 { bottom: 4%; inset-inline-end: 5%; animation-delay: -1s; }
.c5 { display: none; }
@media (max-height: 820px) { .c3, .c4 { display: none; } }
@keyframes floaty { 50% { transform: translateY(-14px) rotate(-2deg); } }
.auth-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-logo { border-radius: 20px; box-shadow: 0 18px 30px -14px var(--brand); }
.auth-brand h1 { font-size: 2rem; font-weight: 800; margin-top: 10px; background: var(--hero); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand p { color: var(--muted); font-size: 0.94rem; margin-top: 4px; }
.auth-card { padding: 22px; box-shadow: var(--shadow); }
.auth-foot { text-align: center; margin-top: 16px; font-size: 0.8rem; color: var(--muted); }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 0.82rem; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#auth-google-error { margin-bottom: 10px; }

@media (min-width: 900px) {
  .view { padding-top: 34px; }
  .hero { padding: 28px; }
  .wlist { grid-template-columns: 1fr 1fr; }
  .day-head { grid-column: 1 / -1; margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- additions ---------- */
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-top > span { font-size: 0.86rem; font-weight: 700; color: var(--muted); }
a.setting { color: inherit; text-decoration: none; }
.box-dist { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; height: 118px; margin-top: 6px; }
.box-dist div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 0.72rem; color: var(--muted); font-weight: 600; text-align: center; }
.box-dist i { width: 100%; border-radius: 10px; background: var(--c); min-height: 6px; opacity: 0.9; }
.box-dist b { color: var(--ink); font-size: 0.95rem; }
.lvl-note { font-size: 0.82rem; color: var(--muted); margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); line-height: 1.9; }
.dir-toggle { display: inline-flex; align-items: center; gap: 8px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }


/* ---------- about / creator ---------- */

/* ---------- stats (from the "آمار و پیشرفت" Figma frame) ---------- */
/* Icons come straight from the exported Figma SVGs; masking lets them follow the theme colour. */
.ic-mask { display: inline-block; width: 24px; height: 24px; background-color: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; flex: none; transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); }
.ic-calendar { -webkit-mask-image: url(../icons/figma-calendar.svg); mask-image: url(../icons/figma-calendar.svg); }

.week-btn { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; flex: none; border-radius: 14px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 0.8rem; white-space: nowrap; box-shadow: var(--shadow-sm); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); transition: transform 0.12s, background 0.15s; }
.week-btn:active { transform: scale(0.95); background: var(--brand-soft); }
.week-btn .ic-mask { width: 18px; height: 18px; color: var(--brand); flex: none; }

.st-stack { display: grid; gap: 16px; }
.st-metrics { display: flex; gap: 9px; }
.st-metric { flex: 1; min-width: 0; padding: 12px; text-align: center; display: grid; gap: 4px; }
.st-metric b { font-size: 1.25rem; font-weight: 800; line-height: 1.5; }
.st-metric span { font-size: 0.69rem; color: var(--muted); }
.st-card { padding: 16px; display: grid; gap: 12px; }
.st-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.st-card-head > b { font-size: 0.88rem; font-weight: 800; }
.st-badge { padding: 7px 12px; border-radius: 99px; background: var(--good-soft); color: var(--good); font-size: 0.75rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.st-badge.neg { background: var(--bad-soft); color: var(--bad); }

.st-bars { direction: ltr; display: flex; align-items: flex-end; justify-content: center; gap: 12px; height: 112px; }
.st-day { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.st-day i { display: block; width: 22px; border-radius: 7px 7px 2px 2px; background: var(--brand-soft); min-height: 4px; transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.st-day.peak i { background: var(--brand); }
.st-day small { font-size: 0.56rem; color: var(--muted); line-height: 1.4; }

.st-title { font-size: 0.88rem; font-weight: 800; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; font-size: 0.75rem; text-align: start; padding: 2px 0; }
.st-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-row b { font-weight: 800; flex: none; }
.st-row:active { opacity: 0.6; }
.st-note { font-size: 0.66rem; line-height: 1.6; }

.st-tip { display: grid; gap: 8px; width: 100%; text-align: start; padding: 16px; border-radius: 20px; background: #232b49; color: #fff; box-shadow: var(--shadow-sm); border: 1px solid rgba(255, 255, 255, 0.06); }
button.st-tip { cursor: pointer; transition: transform 0.12s; }
button.st-tip:active { transform: scale(0.985); }
.st-tip .st-card-head > b { font-size: 0.88rem; font-weight: 800; }
.st-tip .st-badge { background: #e6f8f4; color: #1f9d83; }
.st-tip-text { font-size: 0.75rem; line-height: 1.6; color: rgba(255, 255, 255, 0.72); }

/* Signed numbers and percentages read left-to-right, as in the design ("+۴۲", "۸۴٪") */
.num { direction: ltr; unicode-bidi: isolate; }
.st-metric b.num { display: block; }

/* ---------- reminder settings ---------- */
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + i { opacity: 0.4; }
.time-input { padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card-2); direction: ltr; font-family: var(--font-en); font-weight: 600; min-height: 42px; }
.time-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.time-pick { display: inline-flex; align-items: center; gap: 4px; direction: ltr; flex: none; }
.time-pick b { font-weight: 800; color: var(--muted); }
select.time-input { min-width: 58px; padding: 8px 6px; text-align: center; text-align-last: center; font-family: var(--font); }

/* ---------- profile shortcut in page headers (replaces the "من" tab so the bar can be symmetric) ---------- */
.head-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.me-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 15px; overflow: hidden; background: var(--hero); color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.22); transition: transform 0.15s cubic-bezier(0.3, 1.5, 0.5, 1); }
.me-btn:active { transform: scale(0.9); }
.me-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-btn.is-empty .ic { width: 20px; height: 20px; }
.me-gear { position: absolute; bottom: -3px; inset-inline-end: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--card); color: var(--brand); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--card); font-style: normal; }
.me-gear .ic { width: 11px; height: 11px; stroke-width: 2.6; }

/* ---------- password recovery (login + reset pages) ---------- */
.forgot-head { margin-bottom: 16px; }
.forgot-head h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.forgot-head p { color: var(--muted); font-size: 0.92rem; line-height: 1.9; }
.form-ok { background: var(--good-soft); color: var(--good); border-radius: 14px; padding: 12px 14px; font-size: 0.92rem; font-weight: 600; line-height: 1.9; margin-bottom: 14px; }
.link-btn { color: var(--brand); font-weight: 700; font-size: 0.88rem; padding: 2px 0; margin: -4px 0 12px; }
.link-btn.center { display: block; margin: 14px auto 0; }
.link-btn:hover { text-decoration: underline; }
.auth-foot a { font-weight: 700; }

/* ---------- e-mail verification / account deletion ---------- */
.verify-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px 10px 8px; border-radius: 14px; background: var(--warn-soft, var(--brand-soft)); color: var(--ink); font-size: 0.88rem; font-weight: 600; }
.verify-banner .link-btn { margin: 0; white-space: nowrap; }
.moving-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 12px 12px 10px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--pink) 160%); }
.moving-banner > svg { flex: none; width: 22px; height: 22px; }
.moving-banner .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.moving-banner small { opacity: .9; font-size: .8rem; line-height: 1.7; }
.moving-banner .btn { flex: none; background: #fff; color: var(--brand); }
.remind-card { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 12px 12px 12px 8px; border-radius: 16px; background: var(--brand-soft); color: var(--ink); }
.remind-card > svg { flex: none; width: 22px; height: 22px; color: var(--brand); }
.remind-card .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.remind-card small { color: var(--muted); font-size: 0.8rem; line-height: 1.6; }
.remind-card .btn { flex: none; white-space: nowrap; }
.remind-card .remind-x { width: 28px; height: 28px; flex: none; }
.verify-banner .verify-x { margin-inline-start: auto; width: 28px; height: 28px; flex: none; }
.verify-note { margin: 12px 0 0; font-size: 0.86rem; color: var(--warn); font-weight: 600; }
.verify-note .link-btn { margin: 0; }
.setting-danger b, .setting-danger .ic { color: var(--bad); }
.del-warn { background: var(--bad-soft); color: var(--bad); border-radius: 14px; padding: 12px 14px; font-size: 0.92rem; font-weight: 600; line-height: 1.9; margin: 0 0 12px; }

/* ---------- leech words ---------- */
.leech-card { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--warn) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.leech-ico { font-size: 1.9rem; line-height: 1; flex: none; }
.leech-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.leech-txt b { color: color-mix(in srgb, var(--warn) 70%, var(--ink)); font-size: 1rem; }
.leech-txt small { color: var(--muted); font-size: 0.8rem; line-height: 1.7; }
.leech-card .btn { flex: none; }
.pill.leech { background: color-mix(in srgb, var(--warn) 18%, transparent); color: color-mix(in srgb, var(--warn) 70%, var(--ink)); font-weight: 800; }
.leech-tip { display: block; margin: 14px auto 0; padding: 8px 12px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; line-height: 1.7; color: inherit; background: rgba(255, 255, 255, 0.18); border: 1px dashed currentColor; }

/* ---------- XP, quests, streak freeze ---------- */
.lvl-badge { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.25rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 18px -8px var(--brand); }
.xp-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.xp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.xp-top b { font-size: 0.95rem; }
.xp-total { color: var(--brand); font-weight: 800; font-size: 0.82rem; white-space: nowrap; }
.xp-bar { height: 9px; border-radius: 99px; background: var(--brand-soft); overflow: hidden; }
.xp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 0.6s cubic-bezier(0.2, 0.9, 0.25, 1); }
.xp-main small { color: var(--muted); font-size: 0.76rem; }
.quests { margin: 0 0 14px; }
.quests-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.quests-head span { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.quest { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.q-ico { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.q-ico .ic { width: 17px; height: 17px; }
.quest.is-done .q-ico { background: var(--good); color: #fff; }
.quest.is-done .q-ico .ic { stroke-width: 3; }
.q-body { flex: 1; min-width: 0; display: grid; gap: 5px; font-size: 0.88rem; font-weight: 600; }
.quest.is-done .q-body > span { color: var(--muted); }
.q-bar { height: 6px; border-radius: 99px; background: var(--brand-soft); overflow: hidden; }
.q-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width 0.5s ease; }
.quest.is-done .q-bar i { background: var(--good); }
.q-xp { flex: none; color: var(--brand); font-weight: 800; font-size: 0.82rem; }
.quest.is-done .q-xp { color: var(--good); }
.quests-bonus { margin: 8px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); text-align: center; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.quests-bonus.is-done { color: var(--good); }
.info-list { margin: 0; padding-inline-start: 18px; line-height: 2; font-size: 0.92rem; }
.info-list b { color: var(--brand); }
.st-xp-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; margin-top: 10px; }
.st-xp-row div { display: grid; gap: 2px; }
.st-xp-row b { font-size: 1.25rem; color: var(--brand); }
.st-xp-row span { color: var(--muted); font-size: 0.78rem; }

/* ---------- design refresh: quests page, header button, review options ---------- */
.head-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 15px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--brand); transition: transform 0.12s; }
.head-btn:active { transform: translateY(2px); box-shadow: none; }
.head-dot { position: absolute; top: -6px; inset-inline-start: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; background: var(--accent); color: #fff; font-style: normal; font-size: 0.7rem; font-weight: 800; box-shadow: 0 0 0 3px var(--bg); }
.head-dot.is-done { background: var(--good); }
.head-dot .ic { width: 11px; height: 11px; stroke-width: 3.2; }
.sub-head { display: flex; align-items: center; gap: 6px; }
.back-btn .ic { transform: scaleX(1); }
.level-card { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; }
.level-card .lvl-badge { width: 58px; height: 58px; border-radius: 18px; font-size: 1.6rem; box-shadow: 0 4px 0 color-mix(in srgb, var(--brand) 62%, #000); }
.freeze-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; margin: 0 0 12px; text-align: start; }
.freeze-row .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.freeze-row small { color: var(--muted); font-size: 0.8rem; }
.freeze-row .ic { color: var(--muted); }
.freeze-ico { font-size: 1.6rem; line-height: 1; }
.quests-foot { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.quests-foot .link-btn { margin: 0; }
.opts { display: grid; gap: 16px; margin-top: 14px; }
.opt-label { display: block; margin: 0 2px 8px; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.opts .seg { margin: 0; }
.opt-note { font-size: 0.8rem; margin: 8px 2px 0; line-height: 1.8; }
.seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.86rem; }
.seg-btn .ic { width: 16px; height: 16px; }
.head-title { min-width: 0; }
.head-title h1 { overflow-wrap: anywhere; }
.leech-card { padding: 12px 14px; }

/* ---------- dictation ("listen & type") ---------- */
.practice-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: start; }
.practice-row .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.practice-row small { color: var(--muted); font-size: 0.8rem; }
.practice-row .ic { color: var(--muted); }
.practice-row:active { transform: translateY(2px); box-shadow: none; }
.p-ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--brand-soft); }
.dict-intro { text-align: center; }
.dict-emoji { font-size: 3rem; line-height: 1; display: block; margin-bottom: 8px; }
.dict-intro h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.dict-intro p { color: var(--muted); font-size: 0.9rem; line-height: 1.9; }
.dict-start { margin-top: 14px; }
.dict-tips { margin: 16px 4px 0; padding-inline-start: 18px; color: var(--muted); font-size: 0.83rem; line-height: 2; }
.dict-card { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; margin-top: 8px; text-align: center; }
.dict-tag { padding: 4px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 0.78rem; font-weight: 800; }
.dict-play { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 6px 0 color-mix(in srgb, var(--brand) 62%, #000); transition: transform 0.12s; }
.dict-play .ic { width: 44px; height: 44px; }
.dict-play:active, .dict-play.is-speaking { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--brand) 62%, #000); }
.dict-tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dict-card form { width: 100%; display: grid; gap: 12px; }
.dict-input { width: 100%; padding: 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-size: 1.5rem; font-weight: 700; text-align: center; letter-spacing: 0.02em; }
.dict-input:focus { outline: none; border-color: var(--brand); }
.dict-input::placeholder { font-family: var(--font-fa, inherit); font-size: 1rem; font-weight: 500; letter-spacing: 0; direction: rtl; }
.dict-hint { margin: -2px 0 0; display: grid; justify-items: center; gap: 2px; }
.dict-hint[hidden] { display: none; }
.dict-hint .en { color: var(--brand); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.14em; text-align: center; }
.dict-hint small { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.d-ok { color: inherit; }
.d-bad { color: var(--bad); text-decoration: underline wavy; text-underline-offset: 5px; }
.d-fix { color: var(--good); background: var(--good-soft); border-radius: 6px; padding: 0 2px; }
.dict-card form .btn { width: 100%; }
.dict-missed { text-align: start; display: grid; gap: 4px; }
.dict-miss { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.dict-miss .en { font-weight: 700; }
.dict-miss .grow { flex: 1; }

/* dictation: stage + colored feedback panel (Duolingo-style) */
.dict-stage { width: 100%; display: grid; justify-items: center; gap: 14px; padding: 22px 16px 18px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.dict-card.is-result .dict-stage { grid-auto-flow: column; justify-content: center; align-items: center; gap: 16px; padding: 14px 16px; }
.dict-card.is-result .dict-play { width: 64px; height: 64px; box-shadow: 0 4px 0 color-mix(in srgb, var(--brand) 62%, #000); }
.dict-card.is-result .dict-play .ic { width: 28px; height: 28px; }
.dict-feedback { width: 100%; display: grid; gap: 12px; padding: 18px; border-radius: 24px; text-align: center; }
.dict-feedback.is-ok { background: var(--good-soft); color: var(--good); }
.dict-feedback.is-bad { background: var(--bad-soft); color: var(--bad); }
.fb-head { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.15rem; }
.fb-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: currentColor; }
.fb-ico .ic { width: 16px; height: 16px; color: var(--card); stroke-width: 3; }
.fb-line { display: grid; gap: 2px; justify-items: center; }
.fb-line small { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.fb-line .en { color: var(--ink); font-size: 1.35rem; font-weight: 700; letter-spacing: 0.03em; overflow-wrap: anywhere; }
.fb-line .fb-answer { font-size: 1.8rem; }
.fb-mean { display: grid; gap: 2px; justify-items: center; color: var(--ink); }
.fb-mean .en { color: var(--muted); font-size: 0.9rem; }
.fb-mean b { font-size: 1.1rem; }
.fb-later { margin: -2px 0 0; color: var(--muted); font-size: 0.8rem; }
.fb-btn { color: #fff; }
.is-ok .fb-btn { background: var(--good); box-shadow: 0 4px 0 color-mix(in srgb, var(--good) 62%, #000); }
.is-bad .fb-btn { background: var(--bad); box-shadow: 0 4px 0 color-mix(in srgb, var(--bad) 62%, #000); }
.fb-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25) !important; }
.dict-skip { margin-top: 0; }
.wrow-actions .icon-btn { width: 36px; height: 36px; }
.wrow-actions .icon-btn .ic { width: 19px; height: 19px; }

/* home progress card + list paging */
.progress-card { padding: 16px; margin: 14px 0 0; }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pc-head span { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.pc-bar { display: flex; gap: 3px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--brand-soft); }
.pc-bar i { display: block; min-width: 6px; border-radius: 99px; }
.pc-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 14px; }
.pc-legend div { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.pc-legend .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pc-legend span { color: var(--muted); font-weight: 600; }
.pc-legend b { margin-inline-start: auto; }
.pc-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 0.78rem; line-height: 1.8; }
.more-rows { display: block; width: 100%; margin-top: 4px; padding: 12px; border-radius: 16px; border: 1.5px dashed var(--line); color: var(--brand); font-weight: 700; font-size: 0.9rem; }

/* ---------- streak week strip ---------- */
.streak-panel { display: grid; gap: 14px; }
.streak-top { display: flex; align-items: center; gap: 12px; }
.streak-flame { flex: none; width: 56px; height: 56px; display: grid; place-items: center; }
.streak-flame .wk-svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(240, 80, 60, 0.35)); }
.streak-flame.is-cold .wk-svg { filter: grayscale(1) opacity(0.45); }
.streak-num { flex: 1; display: grid; gap: 2px; }
.streak-num b { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.streak-num span { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.ice-count { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 99px; background: color-mix(in srgb, var(--sky) 16%, transparent); color: var(--sky); font-size: 1rem; }
.ice-count .wk-svg { width: 26px; height: 26px; }
.ice-count.is-empty { filter: grayscale(1); opacity: 0.6; }
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.wk-day { display: grid; justify-items: center; gap: 4px; }
.wk-day small { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.wk-day.is-today small { color: var(--accent); font-weight: 800; }
.wk-svg { width: 100%; max-width: 44px; height: auto; display: block; }
.wk-miss path { fill: var(--line); }
.wk-wait path { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: var(--accent); }
.wk-next path { fill: var(--line); opacity: .45; }
.wk-day.is-fire .wk-svg { filter: drop-shadow(0 3px 5px rgba(240, 80, 60, 0.3)); }
.wk-day.is-ice .wk-svg { filter: drop-shadow(0 3px 5px rgba(63, 155, 255, 0.35)); }
.wk-day.is-fire.is-today .wk-svg { animation: flame 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flame { 0%, 100% { transform: scale(1) rotate(-1.5deg); } 50% { transform: scale(1.07) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .wk-day.is-fire.is-today .wk-svg { animation: none; } }
.streak-msg { margin: 0; text-align: center; color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.wk-legend { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.wk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lg.fire { background: linear-gradient(135deg, #ff9f43, #f0324a); }
.lg.ice { background: linear-gradient(135deg, #a4dcff, #3f9bff); }
.lg.miss { background: var(--line); }


/* result screen emoji (animated by Motion "session-complete") */
.res-emoji { display: inline-block; font-size: 3.4rem; line-height: 1.1; }

/* ---------- stats: 7-day forecast, true retention, activity calendar ---------- */
.fc-bars { direction: rtl; height: 118px; gap: 8px; }
.fc-day b { font-size: 0.7rem; font-weight: 800; color: var(--muted); min-height: 1em; }
.fc-day.peak b { color: var(--brand); }
.fc-day small { font-size: 0.62rem; white-space: nowrap; }

.ret-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ret-main > b { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.ret-main > span { font-size: 0.8rem; color: var(--muted); }
.ret-note { margin: 0; font-size: 0.86rem; line-height: 1.8; }
.ret-row { display: grid; grid-template-columns: minmax(0, 1fr) 38% 44px; align-items: center; gap: 10px; font-size: 0.86rem; }
.ret-row > span:first-child { display: flex; flex-direction: column; font-weight: 700; }
.ret-row small { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.ret-row > b { text-align: left; }
.ret-meter { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.ret-meter i { display: block; height: 100%; border-radius: inherit; }
.ret-wait { margin: 0; font-size: 0.88rem; }
.ret-bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.ret-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }

.cal-months, .cal-grid { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 3px; }
.cal-months { font-size: 0.6rem; color: var(--muted); height: 1.1em; overflow: visible; }
.cal-months span { white-space: nowrap; overflow: visible; }
.cal-grid { grid-template-rows: repeat(7, auto); grid-auto-flow: column; }
.cal-c { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--bg-2); cursor: pointer; }
.cal-c.l1 { background: color-mix(in srgb, var(--brand) 28%, var(--bg-2)); }
.cal-c.l2 { background: color-mix(in srgb, var(--brand) 52%, var(--bg-2)); }
.cal-c.l3 { background: color-mix(in srgb, var(--brand) 78%, var(--bg-2)); }
.cal-c.l4 { background: var(--brand); }
.cal-c.is-ice { background: linear-gradient(135deg, #9fd8ff, var(--sky)); }
.cal-c.is-today { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-c.is-future { visibility: hidden; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); }
.cal-foot b { color: var(--ink); }
.cal-legend { display: inline-flex; align-items: center; gap: 3px; font-size: 0.68rem; }
.cal-legend .cal-c { width: 10px; cursor: default; }

/* ---------- word list: selection mode + duplicates ---------- */
.wrow.is-selecting { cursor: pointer; }
.sel-box { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); color: transparent; transition: background-color .15s, border-color .15s; }
.sel-box .ic { width: 15px; height: 15px; }
.wrow.is-sel { background: var(--brand-soft); }
.wrow.is-sel .sel-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.selbar {
  position: sticky; z-index: 60; top: calc(8px + env(safe-area-inset-top)); margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 12px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--pink) 160%); box-shadow: 0 16px 30px -16px var(--brand);
  animation: toastIn .22s ease-out;
}
.selbar-top { display: flex; align-items: center; gap: 6px; }
.selbar .selbar-x { color: #fff; background: rgba(255, 255, 255, .16); }
.selbar-count { flex: 1; font-size: 1rem; font-weight: 800; }
.selbar-all { padding: 7px 12px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .2); color: #fff; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.selbar-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.selbar-acts button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; border: 0; border-radius: 14px; background: #fff; color: var(--brand); font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; transition: transform .12s, opacity .15s; }
.selbar-acts button .ic { width: 18px; height: 18px; }
.selbar-acts button.danger { color: var(--bad); }
.selbar-acts button:active:not([disabled]) { transform: scale(.96); }
.selbar-acts button[disabled] { opacity: .5; cursor: default; }
/* while selecting, the bottom menu steps aside so the choice is only "act or finish" */
body:has(#selbar) #nav { transform: translateY(140%); pointer-events: none; }
#nav { transition: transform .25s ease; }
.dup-note { margin: -4px 0 10px; font-size: .84rem; line-height: 1.8; }

/* ---------- "say it yourself" (record & compare) ---------- */
.tts-row { display: inline-flex; gap: 10px; align-items: center; }
.rec-btn.is-rec { background: var(--bad) !important; color: #fff !important; animation: recPulse 1s ease-in-out infinite; }
@keyframes recPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 45%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .rec-btn.is-rec { animation: none; } }

/* ---------- word rows: pronunciation; "back to top" ---------- */
.w-ph-row { font-family: var(--font-en); direction: ltr; unicode-bidi: isolate; font-size: 0.8rem; color: var(--muted); }
.to-top {
  position: fixed; z-index: 55; inset-inline-end: 16px; bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--brand);
  display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer;
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .2s, transform .2s;
}
.to-top .ic { transform: rotate(-90deg); }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.btn-sq { padding-inline: 10px; }
.page-head h1 { white-space: nowrap; }

/* ---------- login page: error modal ---------- */
.auth-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.am-backdrop { position: absolute; inset: 0; background: rgba(14, 13, 31, 0.5); backdrop-filter: blur(3px); animation: fade .2s ease both; }
.am-card {
  position: relative; width: min(100%, 340px); padding: 26px 22px 20px; border-radius: 26px; text-align: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); animation: amIn .24s cubic-bezier(.34, 1.56, .64, 1) both;
}
.am-ico { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; margin-bottom: 10px; background: var(--bad-soft); color: var(--bad); font: 900 1.7rem/1 var(--font-en); }
.am-card h2 { margin: 0 0 6px; font-size: 1.12rem; font-weight: 800; }
.am-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.9; font-size: .95rem; }
.auth-modal.is-closing .am-card { animation: fadeOut .18s ease both; }
.auth-modal.is-closing .am-backdrop { animation: fadeOut .18s ease both; }
@keyframes amIn { from { opacity: 0; transform: translateY(12px) scale(.94); } }

/* settings: no page title; the profile card starts the page */
.me-top { margin-top: 4px; }
/* add-word sheet footer hint */
.add-foot { text-align: center; margin-top: 12px; color: var(--muted); font-size: .8rem; }

/* ---------- add word: pick the meaning the teacher meant ---------- */
.senses { display: grid; gap: 8px; margin: -2px 0 14px; }
.senses-head { margin: 0; font-size: .82rem; font-weight: 700; color: var(--muted); }
.sense {
  display: grid; gap: 4px; text-align: start; width: 100%; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: var(--card-2); border: 1.5px solid var(--line); color: var(--ink); font: inherit; direction: ltr;
}
.sense.is-on { border-color: var(--brand); background: var(--brand-soft); }
.sense-top { display: flex; gap: 8px; align-items: baseline; font-size: .86rem; line-height: 1.5; }
.sense-top b { flex: none; font-size: .7rem; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .3px; }
.sense em { font-size: .78rem; color: var(--muted); font-style: italic; }
.senses-more { justify-self: start; font-size: .82rem; }

/* ---------- fill in the blank (cloze) ---------- */
.cz-card { display: grid; gap: 14px; padding: 26px 20px; border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .2s, background-color .2s; }
.cz-card.is-ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 6%, var(--card)); }
.cz-card.is-bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 5%, var(--card)); }
.cz-sent { margin: 0; font-family: var(--font-en); font-size: 1.22rem; line-height: 1.9; text-align: left; overflow-wrap: anywhere; }
.cz-blank { display: inline-block; min-height: 1.5em; padding: 0 6px; margin: 0 2px; border-bottom: 3px solid var(--brand); color: var(--brand); font-weight: 800; text-align: center; vertical-align: bottom; line-height: 1.4; }
.cz-card.is-ok .cz-blank { border-color: var(--good); color: var(--good); }
.cz-card.is-bad .cz-blank { border-color: var(--bad); color: var(--bad); }
.cz-mean { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cz-mean b { font-size: 1.05rem; }
.cz-hint { justify-self: start; }
.cz-opt { font-family: var(--font-en); font-weight: 700; font-size: 1.02rem; }
.quiz-opt.is-dim { opacity: .55; }
.cz-next { margin-top: 16px; }
.cz-fill small { transition: none; }

/* ---------- review tab: hero, practice tiles, box strip ---------- */
.btn-white { background: #fff; color: var(--brand); box-shadow: 0 3px 0 rgba(30, 20, 90, .18); }
.btn-white:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(30, 20, 90, .18); }
.btn-white .ic { color: var(--brand); }
.rv-hero { display: grid; gap: 10px; padding: 20px; border-radius: 26px; color: #fff; background: var(--hero); margin-bottom: 4px; }
.rv-hero.is-done { background: linear-gradient(135deg, #10b981 0%, #34c79a 60%, #3aa0ff 140%); }
.rv-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rv-hero-top > div { display: grid; gap: 2px; }
.rv-hero-top b { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.rv-hero.is-done .rv-hero-top b { font-size: 1.45rem; line-height: 1.4; }
.rv-hero-top span { font-size: 1rem; font-weight: 700; opacity: .92; }
.rv-set { flex: none; width: 42px; height: 42px; border-radius: 14px; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .2); color: #fff; cursor: pointer; }
.rv-set .ic { width: 20px; height: 20px; }
.rv-meta { margin: 0 0 4px; font-size: .86rem; line-height: 1.8; opacity: .88; }

.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-tile {
  display: grid; justify-items: start; gap: 4px; padding: 14px; min-height: 112px; border-radius: 20px; text-align: start; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); font: inherit;
  transition: transform .12s;
}
.ex-tile:active { transform: scale(.97); }
.ex-tile.is-wide { grid-column: 1 / -1; min-height: 0; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.ex-tile.is-wide .ex-ico { grid-row: span 2; margin: 0; }
.ex-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; font-size: 1.3rem; margin-bottom: 4px; background: color-mix(in srgb, var(--t) 14%, transparent); }
.ex-tile b { font-size: .95rem; font-weight: 800; }
.ex-tile small { font-size: .76rem; color: var(--muted); line-height: 1.5; }
.ex-tile.is-hot { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 7%, var(--card)); }
.ex-tile.is-hot small { color: color-mix(in srgb, var(--warn) 70%, var(--ink)); font-weight: 700; }

.box-strip { display: grid; gap: 10px; margin-top: 14px; }
.bs-head { display: flex; align-items: center; justify-content: space-between; }
.bs-head b { font-size: .92rem; font-weight: 800; }
.bs-bar { display: flex; gap: 3px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.bs-bar i { display: block; min-width: 6px; }
.bs-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .76rem; color: var(--muted); }
.bs-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bs-legend span > i { width: 9px; height: 9px; border-radius: 3px; }
.bs-legend b { color: var(--ink); }
.rv-set-opts { display: grid; gap: 16px; margin-bottom: 18px; }

/* ---------- dictionary pictures (Learner's line drawings) ---------- */
.w-art { margin: 0 auto 10px; padding: 8px; border-radius: 16px; background: #fff; display: grid; place-items: center; max-width: 240px; box-shadow: 0 2px 10px -4px rgba(30, 20, 90, .25); }
.w-art img { display: block; max-width: 100%; max-height: 130px; object-fit: contain; }
.w-art.on-card { max-width: 70%; padding: 6px; margin-bottom: 6px; }
.w-art.on-card img { max-height: 105px; }
.art-slot:empty { display: none; }
.add-art { display: grid; justify-items: center; gap: 4px; margin: -4px 0 12px; }
.add-art .w-art { margin: 0; }
.add-art .w-art img { max-height: 90px; }
.add-art small { font-size: .74rem; color: var(--muted); }
.sheet .art-slot:not(.add-art) .w-art { max-width: 100%; }
.sheet .art-slot:not(.add-art) .w-art img { max-height: 200px; }
