/* lern - app styles. The sand design system is loaded from ui.sdisk.us first. */

:root { --sand-radius-md: 12px; --sand-radius-lg: 12px; }
body { background: var(--sand-canvas); color: var(--sand-text-primary); font-family: var(--sand-font-sans); margin: 0; }
h1, h2, h3, p { margin: 0; }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.75; flex-shrink: 0; }
.sand-btn, .sand-card, .sand-input, .sand-alert, .sand-segmented, .sand-segmented-item { border-radius: 12px; }
.sand-segmented-item { white-space: nowrap; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; min-height: 100vh; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--sand-text-secondary); font-size: 13px; }
.push { margin-top: auto; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--sand-petal); }
.brand svg { width: 36px; height: 36px; stroke-width: 2; }
.title { font-size: 26px; font-weight: 700; letter-spacing: .5px; }

.langs { overflow-x: auto; padding-bottom: 2px; }
.langs .sand-segmented { display: inline-flex; }
.langs .sand-segmented-item { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.tabbar { display: block; width: 100%; min-width: 34px; height: 3px; border-radius: 999px; background: var(--sand-elevated); overflow: hidden; }
.tabbar > span { display: block; height: 100%; border-radius: 999px; background: var(--theme-primary); }

.progress { display: flex; flex-direction: column; gap: 8px; }
.progress .bar { flex: none; }

.bar { height: 10px; background: var(--sand-elevated); border-radius: 999px; overflow: hidden; flex: 1; }
.bar > div { height: 100%; background: var(--theme-primary); transition: width .3s; }

.big { font-size: clamp(28px, 9vw, 44px); text-align: center; padding: 12px 0; word-break: break-word; }
.big.mono { font-family: var(--sand-font-mono); font-size: clamp(18px, 6vw, 28px); }
.mono { font-family: var(--sand-font-mono); }

.sand-chip { display: inline-flex; align-items: center; gap: 6px; }
.unit { display: flex; align-items: center; gap: 12px; }
.unit.locked { opacity: .5; }
.node { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--sand-border-default); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.unit.open .node { border-color: var(--theme-primary); color: var(--theme-primary); }
.unit.done .node { border-color: var(--sand-mint); color: var(--sand-mint); }

.choice { justify-content: space-between; text-align: left; width: 100%; }
.choice.sel { border-color: var(--theme-primary); background: var(--sand-pill-active); }
.choice.ok { border-color: var(--sand-mint); background: rgba(188, 239, 213, .1); }
.choice.bad { border-color: var(--sand-magenta); background: rgba(194, 40, 135, .12); }

.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sand-border-subtle); }
.setrow:last-child { border-bottom: 0; }

.audio { display: flex; gap: 8px; justify-content: center; padding: 8px 0; flex-wrap: wrap; }

.avatar { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; flex-shrink: 0; background: var(--sand-elevated); }
.avatar:not(img) { border: 1px solid var(--sand-border-default); }
.avatar-btn { padding: 4px; border-radius: 999px; display: inline-flex; }
.avatar-fb { display: inline-flex; align-items: center; justify-content: center; }
.save-saved { color: var(--sand-mint); }
.save-error { color: var(--sand-magenta); }
