:root {
  --cream: #FFF4DC;
  --paper: #FFFBF0;
  --crust: #A9541A;
  --crust-dark: #7A3A0E;
  --ink: #3B2413;
  --muted: #8A6F58;
  --mustard: #FFC533;
  --mustard-dark: #D99A00;
  --red: #E5484D;
  --red-dark: #B8323A;
  --green: #2E9E5B;
  --green-dark: #1F7A44;
  --green-soft: #DDF4E4;
  --red-soft: #FFE1E1;
  --blue-soft: #E3EEFF;
  --line: #EBD9B4;
  --radius: 20px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: #F3DFB0;
  color: var(--ink);
  font: 500 16px/1.45 var(--font);
  overscroll-behavior-y: none;
}
#app {
  position: relative;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
h1, h2 { font-family: var(--display); margin: 0; line-height: 1.15; }
h1 { font-size: 30px; }
h2 { font-size: 20px; margin: 22px 0 10px; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.28em; }

.screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 24px;
  -webkit-overflow-scrolling: touch;
  animation: screen-in .32s ease-out;
}
@keyframes screen-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { transform: scale(.85) translateY(10px); opacity: 0; } }
@keyframes rise-in { from { transform: translateY(18px); opacity: 0; } }
@keyframes from-left { from { transform: translateX(-24px) scale(.96); opacity: 0; } }
@keyframes from-right { from { transform: translateX(24px) scale(.96); opacity: 0; } }

/* ---------- buttons & fields ---------- */
.btn {
  display: block; width: 100%; min-height: 52px; padding: 12px 18px;
  border-radius: 16px; background: #fff; border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line);
  font-weight: 800; font-size: 17px; text-align: center;
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.btn.primary { background: var(--mustard); border-color: var(--mustard-dark); box-shadow: 0 4px 0 var(--mustard-dark); }
.btn.primary:active { box-shadow: 0 0 0 var(--mustard-dark); }
.btn.danger { color: var(--red-dark); margin-top: 16px; }
.btn.small { width: auto; min-height: 48px; padding: 8px 18px; }
.chip-btn {
  min-height: 44px; padding: 6px 16px; border-radius: 999px; background: #fff;
  border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); font-weight: 800;
  transition: transform .08s, box-shadow .08s;
}
.chip-btn:active { transform: translateY(3px); box-shadow: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; font-size: 19px; color: var(--muted); display: grid; place-items: center; transition: background .15s, transform .1s; }
.icon-btn:active { background: var(--line); transform: scale(.9); }
.field { display: block; margin: 16px 0; }
.field > span { display: block; font-weight: 800; margin-bottom: 8px; }
input[type=text], input[type=password], input[type=email], select {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, select:focus { border-color: var(--mustard-dark); box-shadow: 0 0 0 4px rgba(255, 197, 51, .3); }
.switch { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 700; }
.switch input { width: 24px; height: 24px; accent-color: var(--crust); }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.levels button {
  min-height: 56px; border-radius: 14px; background: #fff; border: 2px solid var(--line);
  box-shadow: 0 3px 0 var(--line); font-weight: 800; line-height: 1.1; transition: transform .15s var(--spring), background .15s;
}
.levels button small { display: block; font-size: 10px; font-weight: 700; color: var(--muted); }
.levels button.on { background: var(--mustard); border-color: var(--mustard-dark); box-shadow: 0 3px 0 var(--mustard-dark); transform: scale(1.06); }
.muted { color: var(--muted); }
.small { font-size: 13px; margin-top: 16px; }
.card { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 6px 16px 16px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }
.stars { display: inline-flex; gap: 2px; font-size: 15px; }
.stars .ic.on { fill: var(--mustard); stroke: var(--mustard-dark); }
.stars .ic.off { stroke: #D9C9A6; }
.stars.big { display: flex; justify-content: center; gap: 8px; font-size: 44px; margin: 4px 0 8px; }
.stars.big .ic { animation: star-in .5s var(--spring) backwards; }
.stars.big .ic:nth-child(2) { animation-delay: .18s; transform: translateY(-6px); }
.stars.big .ic:nth-child(3) { animation-delay: .36s; }
@keyframes star-in { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.tile { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 15px; background: rgba(255, 255, 255, .75); font-size: 22px; color: var(--crust-dark); }

/* ---------- Brezi ---------- */
.brezi { display: block; width: 120px; height: 130px; flex: none; }
.brezi.big { width: 170px; height: 184px; margin: 0 auto; animation: pop .6s var(--spring); }
.brezi.mini { width: 46px; height: 50px; }
.brezi svg { width: 100%; height: 100%; overflow: visible; display: block; }
.brezi .body { animation: bob 2.6s ease-in-out infinite; transform-origin: 60px 120px; }
.brezi .hat { transform-box: fill-box; transform-origin: 50% 100%; }
.brezi .lid { transform-origin: center; transform-box: fill-box; animation: blink 4.2s infinite; }
.brezi .pupil { transition: transform .25s; }
.brezi .mouth-open, .brezi .mouth-o, .brezi .sweat, .brezi .dots { display: none; }
.brezi[data-mood=talking] .mouth-smile { display: none; }
.brezi[data-mood=talking] .mouth-open { display: block; animation: chew .24s ease-in-out infinite alternate; transform-origin: center; transform-box: fill-box; }
.brezi[data-mood=talking] .body { animation: talk-bob .5s ease-in-out infinite; }
.brezi[data-mood=listening] .mouth-smile { display: none; }
.brezi[data-mood=listening] .mouth-o { display: block; }
.brezi[data-mood=listening] .body { animation: lean 1s ease-in-out infinite; }
.brezi[data-mood=listening] .pupil { transform: scale(1.15); transform-box: fill-box; transform-origin: center; }
.brezi[data-mood=thinking] .pupil { transform: translate(2px, -3px); }
.brezi[data-mood=thinking] .dots { display: block; }
.brezi[data-mood=thinking] .dots circle { animation: dot 1s infinite; }
.brezi[data-mood=thinking] .dots circle:nth-child(2) { animation-delay: .15s; }
.brezi[data-mood=thinking] .dots circle:nth-child(3) { animation-delay: .3s; }
.brezi[data-mood=happy] .body { animation: hop .5s ease-in-out infinite; }
.brezi[data-mood=oops] .sweat { display: block; animation: drip .7s ease-in infinite; }
.brezi[data-mood=oops] .body { animation: shake .4s ease-in-out 2; }
button.brezi:active { transform: scale(.94); }
button.brezi { transition: transform .15s var(--spring); }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes talk-bob { 50% { transform: translateY(-2px) rotate(2deg); } }
@keyframes hop { 50% { transform: translateY(-11px) rotate(4deg) scale(1.04); } }
@keyframes lean { 50% { transform: rotate(5deg); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(0); } 97% { transform: scaleY(1); } }
@keyframes chew { from { transform: scaleY(.3); } to { transform: scaleY(1.05); } }
@keyframes dot { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes drip { to { transform: translateY(8px); opacity: 0; } }

/* ---------- onboarding ---------- */
.onboard { max-width: 400px; margin: 0 auto; padding-top: 12px; }
.onboard > * { animation: rise-in .45s ease-out backwards; }
.onboard > :nth-child(2) { animation-delay: .1s; } .onboard > :nth-child(3) { animation-delay: .16s; }
.onboard > :nth-child(4) { animation-delay: .22s; } .onboard > :nth-child(5) { animation-delay: .28s; } .onboard > :nth-child(6) { animation-delay: .34s; }
.onboard h1 { text-align: center; margin-top: 8px; }
.lead { text-align: center; color: var(--muted); margin: 8px 0 12px; }

/* ---------- home ---------- */
.topbar { display: flex; align-items: center; gap: 10px; }
.stat { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 14px; border-radius: 999px; background: var(--paper); border: 2px solid var(--line); font-size: 17px; }
.stat.streak .ic { color: #F26A1B; fill: #FFC533; animation: flicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.stat.points .ic { color: var(--crust); }
@keyframes flicker { 50% { transform: scale(1.12) rotate(-4deg); } }
.topbar .chip-btn { margin-left: auto; }
.hero { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; }
.bubble {
  position: relative; flex: 1; background: #fff; border: 2px solid var(--line);
  border-radius: 18px; padding: 12px 14px; box-shadow: 0 4px 0 var(--line); animation: pop .4s var(--spring) .15s backwards; transform-origin: 0 50%;
}
.bubble.wiggle { animation: wiggle .5s var(--spring); }
@keyframes wiggle { 0% { transform: scale(.9) rotate(-2deg); } 60% { transform: scale(1.03) rotate(1deg); } }
.bubble::before {
  content: ""; position: absolute; left: -10px; top: 50%; width: 16px; height: 16px;
  background: #fff; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}
.bubble .de { font-weight: 800; font-size: 17px; }
.bubble .en { color: var(--muted); font-size: 14px; margin-top: 2px; }
.goal { background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px 12px; margin-top: 12px; }
.goal-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.goal-head .ic { color: var(--red); }
.bar { height: 14px; border-radius: 999px; background: #F2E3BF; overflow: hidden; }
.bar i { position: relative; display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--mustard), #FF9F1C); transition: width .9s var(--spring); overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); animation: shine 2.4s ease-in-out infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.install {
  width: 100%; min-height: 48px; margin-top: 12px; border-radius: 16px; font-weight: 800;
  background: var(--ink); color: #fff; animation: rise-in .4s ease-out;
}
.install-tip { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: var(--blue-soft); font-size: 14px; }

/* ---------- learning path ---------- */
.unit { margin-top: 20px; }
.unit-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--c, #fff); border: 2px solid rgba(59, 36, 19, .12); box-shadow: 0 4px 0 rgba(59, 36, 19, .12);
}
.unit-head small { display: block; font-size: 12px; font-weight: 800; color: rgba(59, 36, 19, .65); text-transform: uppercase; letter-spacing: .04em; }
.unit-head b { display: block; font-family: var(--display); font-size: 20px; line-height: 1.1; }
.unit-head div span { font-size: 14px; font-weight: 700; color: rgba(59, 36, 19, .7); }
.path { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px 0 6px; }
.node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 190px; text-align: center; transform: translateX(var(--dx, 0)); animation: node-in .45s var(--spring) backwards; }
@keyframes node-in { from { opacity: 0; transform: translateX(var(--dx, 0)) scale(.5); } }
.node-wrap b { font-size: 14px; font-weight: 800; margin-top: 12px; line-height: 1.2; }
.node-wrap .sub { font-size: 12px; font-weight: 700; color: var(--muted); }
.node-wrap .stars { margin-top: 2px; }
.node {
  display: grid; place-items: center; width: 76px; height: 68px; border-radius: 50%; font-size: 26px; color: #fff;
  background: var(--mustard); box-shadow: 0 7px 0 var(--mustard-dark); transition: transform .08s, box-shadow .08s;
}
.node .ic { stroke-width: 2.6; }
.node:active { transform: translateY(7px); box-shadow: none; }
.node.rp { border-radius: 24px; }
.node.done { background: var(--green); box-shadow: 0 7px 0 var(--green-dark); }
.node.locked { background: #E6D8BC; box-shadow: 0 7px 0 #CDBD9C; font-size: 21px; color: #A8977C; }
.node.locked.nope { animation: shake .35s ease-in-out; }
.node.next { animation: glow 1.6s ease-in-out infinite; color: var(--ink); }
.node.next .ic { fill: currentColor; }
.node.next.rp { background: var(--red); box-shadow: 0 7px 0 var(--red-dark); color: #fff; }
.node.next.rp .ic { fill: none; }
@keyframes glow { 0%, 100% { outline: 0 solid rgba(255, 197, 51, .6); outline-offset: 2px; } 50% { outline: 10px solid rgba(255, 197, 51, .25); outline-offset: 4px; } }
.start-tag {
  position: absolute; top: -27px; z-index: 1; padding: 2px 12px; border-radius: 10px; background: #fff; border: 2px solid var(--line);
  font-size: 13px; font-weight: 800; color: var(--crust); animation: tag-bob 1.3s ease-in-out infinite;
}
@keyframes tag-bob { 50% { transform: translateY(-5px); } }

/* ---------- role-play grid ---------- */
.scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scene {
  position: relative; text-align: start; padding: 12px 12px 12px; min-height: 132px; border-radius: var(--radius);
  background: var(--c, #fff); border: 2px solid rgba(59, 36, 19, .12); box-shadow: 0 5px 0 rgba(59, 36, 19, .14);
  transition: transform .08s, box-shadow .08s; animation: pop .4s var(--spring) backwards;
}
.scene:active { transform: translateY(5px); box-shadow: none; }
.scene b { display: block; font-family: var(--display); font-size: 18px; margin-top: 8px; line-height: 1.1; }
.scene small { color: rgba(59, 36, 19, .7); font-weight: 700; }
.scene .tick { position: absolute; top: 12px; right: 10px; font-size: 13px; background: #fff; border-radius: 999px; padding: 4px 7px; }

/* ---------- chat ---------- */
#screen-chat { display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 0; overflow: hidden; }
.chatbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 2px solid var(--line); background: var(--paper); }
.chat-title { flex: 1; min-width: 0; line-height: 1.2; }
.chat-title b { display: block; font-family: var(--display); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title b .ic { color: var(--crust); }
.chat-title span { font-size: 13px; color: var(--muted); font-weight: 700; }
.speaking { display: flex; align-items: center; gap: 3px; height: 24px; opacity: 0; transition: opacity .2s; }
.speaking.on { opacity: 1; }
.speaking i { width: 4px; height: 6px; border-radius: 2px; background: var(--crust); }
.speaking.on i { animation: eq .5s ease-in-out infinite alternate; }
.speaking i:nth-child(2) { animation-delay: .12s; } .speaking i:nth-child(3) { animation-delay: .24s; } .speaking i:nth-child(4) { animation-delay: .06s; }
@keyframes eq { to { height: 22px; } }
.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; border-radius: 18px; padding: 10px 14px; }
.msg.tutor { align-self: flex-start; background: #fff; border: 2px solid var(--line); border-bottom-left-radius: 6px; animation: from-left .32s var(--spring); }
.msg.me { align-self: flex-end; background: var(--crust); color: #fff; border-bottom-right-radius: 6px; animation: from-right .32s var(--spring); }
.msg.me.pending { opacity: .85; }
.msg .de { font-size: 18px; font-weight: 700; }
.msg.teach .de { font-size: 16.5px; }
.msg .en { font-size: 14px; color: var(--muted); margin-top: 4px; }
.msg .coach { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #FFF3C9; font-size: 14px; font-weight: 700; }
.msg .coach .ic { color: var(--crust); }
.ell { display: inline-flex; gap: 4px; margin-left: 8px; }
.ell i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dot 1s infinite; }
.ell i:nth-child(2) { animation-delay: .15s; } .ell i:nth-child(3) { animation-delay: .3s; }
.tools { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tool { min-height: 38px; min-width: 44px; padding: 4px 12px; border-radius: 999px; background: var(--cream); font-size: 14px; font-weight: 800; transition: transform .12s var(--spring), background .15s; }
.tool:active { background: var(--line); transform: scale(.92); }
.vocab { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.word-chip { min-height: 36px; padding: 4px 10px; border-radius: 12px; background: var(--blue-soft); font-size: 14px; font-weight: 700; text-align: start; transition: transform .15s var(--spring), background .2s; }
.word-chip:active { transform: scale(.94); }
.word-chip.saved { background: var(--green-soft); animation: bump .35s var(--spring); }
@keyframes bump { 50% { transform: scale(1.1); } }
.note, .check { align-self: flex-end; max-width: 92%; border-radius: 16px; padding: 10px 12px; font-size: 14.5px; animation: pop .3s var(--spring); }
.note.good { background: var(--green-soft); }
.note.fix { background: #FFE9D6; border: 2px dashed #F0B98A; }
.note b, .check b { display: block; }
.note .fixed { font-size: 16px; font-weight: 800; margin: 2px 0; }
.tip { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(59, 36, 19, .15); }
.xp { float: right; font-weight: 800; color: var(--crust); margin-left: 8px; animation: xp-in .7s var(--spring); }
@keyframes xp-in { 0% { transform: translateY(14px) scale(.4); opacity: 0; } 60% { transform: translateY(-4px) scale(1.25); } }
.check { align-self: stretch; max-width: none; border: 2px solid; }
.check.correct { background: var(--green-soft); border-color: #A7DDB9; }
.check.correct b { color: var(--green-dark); }
.check.almost { background: #FFF3C9; border-color: #F1D277; }
.check.wrong { background: var(--red-soft); border-color: #F3B2B4; }
.check.wrong b { color: var(--red-dark); }
.words-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.words-row .w { padding: 4px 12px; border-radius: 12px; font-family: var(--display); font-size: 19px; line-height: 1.3; animation: pop .35s var(--spring) backwards; }
.words-row .w.ok { background: #fff; color: var(--green-dark); box-shadow: inset 0 0 0 2px #A7DDB9; }
.words-row .w.bad { background: #fff; color: var(--red-dark); box-shadow: inset 0 0 0 2px #F3B2B4; text-decoration: underline wavy var(--red); text-underline-offset: 4px; }
.check .tools .tool { background: #fff; }
.say {
  align-self: stretch; text-align: center; border-radius: 20px; padding: 12px 14px 14px; animation: pop .4s var(--spring) .12s backwards;
  background: var(--mustard); border: 2px solid var(--mustard-dark); box-shadow: 0 4px 0 var(--mustard-dark);
}
.say small { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--crust-dark); }
.say b { display: block; font-family: var(--display); font-size: 25px; line-height: 1.15; margin: 4px 0 2px; }
.say > span { font-size: 14px; font-weight: 700; color: var(--crust-dark); }
.say .tools { justify-content: center; margin-top: 10px; }
.say .tool { background: #fff; }
.typing { align-self: flex-start; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px; display: flex; gap: 5px; animation: from-left .25s ease-out; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--crust); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.hints { padding: 8px 12px; background: var(--paper); border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; max-height: 40dvh; overflow-y: auto; animation: rise-in .25s ease-out; }
.hints p { font-size: 13px; font-weight: 800; color: var(--muted); }
.hint { text-align: start; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; min-height: 48px; transition: transform .1s; }
.hint:active { transform: scale(.98); }
.hint b { display: block; } .hint span { font-size: 13px; color: var(--muted); }
.typebar { display: flex; gap: 8px; padding: 8px 12px; background: var(--paper); border-top: 2px solid var(--line); animation: rise-in .25s ease-out; }
.typebar input { flex: 1; min-width: 0; }
.controls { display: flex; align-items: flex-end; justify-content: space-around; padding: 10px 12px 0; background: var(--paper); border-top: 2px solid var(--line); }
.side-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 72px; min-height: 56px; padding-top: 6px; font-size: 13px; font-weight: 800; color: var(--muted); border-radius: 14px; transition: background .15s, transform .1s; }
.side-btn .ic { font-size: 22px; }
.side-btn:active { transform: scale(.94); }
.side-btn.on { background: var(--cream); color: var(--ink); }
.mic-zone { position: relative; display: flex; flex-direction: column; align-items: center; }
.wave { position: absolute; bottom: 100%; margin-bottom: 14px; display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 14px; border-radius: 20px; background: var(--ink); opacity: 0; transform: translateY(10px) scale(.8); transition: opacity .15s, transform .2s var(--spring); pointer-events: none; }
.wave.on { opacity: 1; transform: none; }
.wave i { width: 4px; height: 6px; border-radius: 2px; background: var(--mustard); transition: height .08s; }
.mic {
  position: relative; display: grid; place-items: center; width: 86px; height: 86px; border-radius: 50%; color: #fff; font-size: 34px;
  background: var(--red); box-shadow: 0 6px 0 var(--red-dark);
  transition: transform .15s var(--spring), box-shadow .1s, background .2s;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.mic .ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--red); opacity: 0; pointer-events: none; }
.mic.rec { transform: scale(1.18) translateY(3px); box-shadow: 0 2px 0 var(--red-dark), 0 0 0 calc((var(--vol, 1) - 1) * 44px) rgba(229, 72, 77, .22); }
.mic.rec .ring { animation: ripple 1.4s ease-out infinite; }
.mic.rec .ring.two { animation-delay: .7s; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }
.mic.rec.cancel { background: #8A6F58; box-shadow: 0 2px 0 #5E4A39; }
.mic.rec.cancel .ring { animation: none; }
.mic.busy { background: #C9B79B; box-shadow: 0 6px 0 #A8977C; pointer-events: none; }
.mic.busy .ic { animation: breathe 1s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.82); opacity: .6; } }
.mic-label { text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); background: var(--paper); padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); min-height: 38px; }

/* ---------- words ---------- */
.pagehead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.words { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.words li { display: flex; align-items: center; gap: 4px; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 8px 6px 8px 14px; animation: rise-in .3s ease-out backwards; }
.words .w { flex: 1; min-width: 0; }
.words .w b { display: block; font-size: 17px; transition: filter .25s; }
.words .w span { font-size: 14px; color: var(--muted); }
.words.quiz .w b { filter: blur(7px); }
.words.quiz li.peek .w b { filter: none; }

/* ---------- tab bar, modal, toast ---------- */
.tabbar { display: flex; background: var(--paper); border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; min-width: 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 800; color: #B5A088; transition: color .15s; }
.tabbar button .ic { font-size: 22px; transition: transform .25s var(--spring); }
.tabbar button.on { color: var(--crust-dark); }
.tabbar button.on .ic { transform: translateY(-3px) scale(1.15); fill: rgba(255, 197, 51, .55); }
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(59, 36, 19, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 480px; background: var(--cream); border-radius: 26px 26px 0 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); text-align: center; animation: sheet-up .4s var(--spring);
  max-height: 92dvh; overflow-y: auto;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet .brezi { margin: 0 auto; }
.sheet h1 { margin: 6px 0; }
.sheet .btn { margin-top: 10px; }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 6px; }
.results div { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 10px 4px; animation: pop .4s var(--spring) backwards; }
.results div:nth-child(2) { animation-delay: .1s; } .results div:nth-child(3) { animation-delay: .2s; }
.results b { display: block; font-family: var(--display); font-size: 26px; line-height: 1; }
.results span { font-size: 12px; font-weight: 800; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 30;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  width: max-content; max-width: min(92vw, 440px); text-align: center; animation: pop .3s var(--spring);
}
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
#confetti span { position: absolute; top: -20px; width: 10px; height: 10px; animation: fall cubic-bezier(.3, .2, .6, 1) forwards; }
#confetti .dot { border-radius: 50%; }
#confetti .bar { width: 6px; height: 16px; border-radius: 3px; }
@keyframes fall { to { transform: translate(var(--drift, 0), 110vh) rotate(720deg); } }

@media (min-width: 520px) {
  #app { box-shadow: 0 0 60px rgba(59, 36, 19, .25); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition: none !important; }
}

/* ---------- Brezi loses his temper ---------- */
.brezi .brows, .brezi .steam { display: none; }
[data-temper=mad] #screen-chat .brezi .brows { display: block; }
[data-temper=mad] #screen-chat .brezi .steam { display: block; }
[data-temper=mad] #screen-chat .brezi .steam circle { animation: steam .7s ease-out infinite; transform-box: fill-box; transform-origin: center; }
[data-temper=mad] #screen-chat .brezi .steam circle:nth-child(even) { animation-delay: .25s; }
[data-temper=mad] #screen-chat .brezi .body { animation: rage .14s linear infinite; }
[data-temper=mad] #screen-chat .brezi .mouth-open { animation-duration: .13s; }
[data-temper=mad] #screen-chat .brezi svg { filter: drop-shadow(0 0 6px rgba(229, 72, 77, .9)) saturate(1.5) hue-rotate(-14deg); }
[data-temper=mad] #screen-chat .brezi.mini { transform: scale(1.5); transition: transform .3s var(--spring); }
[data-temper=mad] .chatbar { background: #FFE1E1; border-bottom-color: #F3B2B4; transition: background .2s; }
[data-temper=mad] .speaking i { background: var(--red); }
[data-temper=mad] .feed .msg.tutor:last-of-type { border-color: var(--red); animation: from-left .32s var(--spring), rumble .35s linear .32s 2; }
.brezi.mini { transition: transform .3s var(--spring); transform-origin: 100% 30%; }
@keyframes rage { 0% { transform: translate(-1.5px, 0) rotate(-2deg); } 50% { transform: translate(1.5px, -1px) rotate(2deg); } 100% { transform: translate(-1px, 1px) rotate(-1deg); } }
@keyframes steam { from { transform: translateY(4px) scale(.4); opacity: 1; } to { transform: translateY(-10px) scale(1.3); opacity: 0; } }
@keyframes rumble { 25% { transform: translateX(-5px) rotate(-.6deg); } 75% { transform: translateX(5px) rotate(.6deg); } }

/* ---------- account ---------- */
.btn.link { background: none; border-color: transparent; box-shadow: none; color: var(--crust); margin-top: 8px; }
.form-error { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--red-soft); color: var(--red-dark); font-weight: 700; font-size: 14px; animation: shake .35s ease-in-out; }
.card.account { margin-top: 16px; padding-top: 14px; }
.card.account .btn { margin-top: 10px; }
.sheet .field { text-align: start; }

/* ---------- dictionary ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; border-radius: 16px; background: #F2E3BF; }
.seg button { min-height: 44px; border-radius: 12px; font-weight: 800; font-size: 14px; color: var(--muted); transition: background .2s, color .2s, transform .15s var(--spring); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--line); }
.dict-form { margin: 12px 0 4px; }
.dict-form textarea {
  width: 100%; min-height: 76px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: #fff; outline: none; resize: vertical;
  font: inherit; font-size: 18px; font-weight: 700; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.dict-form textarea:focus { border-color: var(--mustard-dark); box-shadow: 0 0 0 4px rgba(255, 197, 51, .3); }
.dict-form .row { margin-top: 8px; }
.btn.grow { flex: 1; width: auto; }
.btn:disabled { opacity: .6; pointer-events: none; }
.entry { margin-top: 14px; padding: 14px; border-radius: var(--radius); background: #fff; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); animation: pop .35s var(--spring); }
.entry .lang { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.entry .de-line { font-family: var(--display); font-size: 27px; line-height: 1.15; margin: 2px 0; overflow-wrap: anywhere; }
.entry.sentence .de-line { font-size: 21px; }
.entry .en-line { font-size: 17px; font-weight: 700; margin: 2px 0 0; overflow-wrap: anywhere; }
.entry .say-it { color: var(--crust); font-weight: 700; font-size: 14px; }
.entry .facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.entry .fact { padding: 3px 10px; border-radius: 999px; background: var(--cream); font-size: 13px; font-weight: 800; }
.entry .fact.der { background: #D6E8FF; } .entry .fact.die { background: #FFD6D6; } .entry .fact.das { background: #DDF4E4; }
.entry hr { border: 0; border-top: 2px dashed var(--line); margin: 12px 0; }
.entry h3 { margin: 12px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.entry .ex { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.entry .ex div { flex: 1; min-width: 0; }
.entry .ex b { display: block; } .entry .ex span { font-size: 14px; color: var(--muted); }
.entry .alts { display: flex; flex-wrap: wrap; gap: 6px; }
.entry .note-line { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FFF3C9; font-size: 14px; font-weight: 700; }
.recent { margin-top: 18px; }
.recent button { display: flex; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; text-align: start; border-bottom: 1px solid var(--line); font-weight: 700; }
.recent button span { color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.tabbar button { font-size: 11px; }

.mic.small { width: 54px; height: 54px; font-size: 23px; box-shadow: 0 4px 0 var(--red-dark); }
.mic.small.rec { transform: scale(1.2) translateY(2px); }
.dict-form .row { align-items: center; }
.dict-mic-label { margin-top: 8px; text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); min-height: 20px; }

.form-info { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: var(--green-dark); font-weight: 700; font-size: 14px; animation: pop .3s var(--spring); }
.btn.link + .btn.link { margin-top: 0; }
.card.account .muted { margin-top: 6px; font-size: 14px; }

/* ---------- alphabet and grammar ---------- */
.extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.extra { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 12px; text-align: start; border-radius: 18px; background: #fff; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s; animation: pop .4s var(--spring) backwards; }
.extra:active { transform: translateY(4px); box-shadow: none; }
.extra b { display: block; font-family: var(--display); font-size: 18px; line-height: 1.1; }
.extra small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.extra .tile { background: var(--mustard); color: var(--ink); width: 44px; height: 44px; }
.tile.abc { font-family: var(--display); font-size: 20px; font-weight: 800; }
.pagehead h1 { flex: 1; margin-left: 4px; }
.pill { padding: 4px 12px; border-radius: 999px; background: var(--paper); border: 2px solid var(--line); font-size: 13px; font-weight: 800; white-space: nowrap; }
.letters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.letter { min-height: 68px; border-radius: 16px; background: #fff; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s; animation: pop .35s var(--spring) backwards; overflow: hidden; }
.letter:active { transform: translateY(4px); box-shadow: none; }
.letter b { display: block; font-family: var(--display); font-size: 25px; line-height: 1.05; }
.letter small { display: block; padding: 0 2px; font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.letter.done { background: var(--green-soft); border-color: #A7DDB9; box-shadow: 0 4px 0 #A7DDB9; }
.letter.done b { color: var(--green-dark); }
.with-brezi { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.with-brezi p { width: 100%; font-size: 13px; font-weight: 800; color: var(--muted); }
.with-brezi .chip-btn { min-height: 40px; font-size: 14px; }
.with-brezi .chip-btn.done { background: var(--green-soft); border-color: #A7DDB9; box-shadow: 0 3px 0 #A7DDB9; }
.letter-sheet .big-letter { font-family: var(--display); font-size: 76px; line-height: 1; color: var(--crust-dark); animation: pop .45s var(--spring); }
.letter-sheet .named { font-weight: 800; color: var(--crust); }
.letter-sheet .sound { margin: 8px 0 12px; text-align: start; }
.sample { text-align: center; padding: 12px; border-radius: 18px; background: var(--mustard); border: 2px solid var(--mustard-dark); }
.sample b { display: block; font-family: var(--display); font-size: 28px; line-height: 1.1; }
.sample span { font-weight: 700; color: var(--crust-dark); }
.sample .tools { justify-content: center; }
.sample .tool { background: #fff; }
.try { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.try .mic-zone { margin-top: 4px; }
.try .dict-mic-label { margin: 0; }
.try .check, .try .typing { align-self: stretch; text-align: start; }
.try .brezi-says { align-self: stretch; text-align: start; padding: 10px 12px; border-radius: 14px; background: #fff; border: 2px solid var(--line); font-weight: 700; }
.topics { display: flex; flex-direction: column; gap: 8px; }
.topic-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; text-align: start; border-radius: 18px; background: #fff; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s; animation: rise-in .3s ease-out backwards; }
.topic-card:active { transform: translateY(4px); box-shadow: none; }
.topic-card .tile { background: var(--cream); }
.topic-card > span:nth-child(2) { flex: 1; min-width: 0; }
.topic-card b { display: block; font-family: var(--display); font-size: 18px; line-height: 1.15; }
.topic-card small { font-size: 13px; font-weight: 700; color: var(--muted); }
.topic-card.done { border-color: #A7DDB9; box-shadow: 0 4px 0 #A7DDB9; }
.topic-card.done .tile { background: var(--green-soft); color: var(--green-dark); }
.topic h1 { font-size: 30px; }
.topic .sub { font-weight: 800; color: var(--crust); margin-bottom: 10px; }
.topic p { margin: 10px 0; }
.topic ul { margin: 10px 0; padding-left: 20px; }
.topic li { margin: 6px 0; }
.topic h3 { margin: 18px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 12px 0; border-radius: 16px; border: 2px solid var(--line); background: #fff; }
.topic table { width: 100%; border-collapse: collapse; font-size: 15px; }
.topic th, .topic td { padding: 9px 10px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.topic th { background: #FFF3C9; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.topic tr:last-child td { border-bottom: 0; }
.topic td:first-child { font-weight: 800; color: var(--muted); }
.topic td:not(:first-child) { font-weight: 700; }
.ex { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.ex div { flex: 1; min-width: 0; }
.ex b { display: block; } .ex span { font-size: 14px; color: var(--muted); }
.note-line { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FFF3C9; font-size: 14px; font-weight: 700; }
.topic .btn { margin-top: 16px; }

/* ---------- slide up to cancel a recording ---------- */
.bin {
  position: absolute; bottom: calc(100% + 66px); z-index: 3; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line); color: var(--muted); font-size: 22px; box-shadow: 0 4px 14px rgba(59, 36, 19, .2);
  opacity: 0; transform: translateY(26px) scale(.5); transition: opacity .18s, transform .25s var(--spring), background .15s, color .15s, border-color .15s; pointer-events: none;
}
.bin::after { content: ""; position: absolute; top: calc(100% + 5px); width: 10px; height: 10px; border-left: 3px solid var(--muted); border-top: 3px solid var(--muted); border-radius: 2px; transform: rotate(45deg); opacity: .7; animation: nudge 1s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-5px) rotate(45deg); opacity: .25; } }
.mic-zone.recording .bin { opacity: 1; transform: none; }
.mic-zone.recording.cancel .bin { background: var(--red); border-color: var(--red-dark); color: #fff; transform: scale(1.3); animation: bin-shake .3s ease-in-out infinite; }
.mic-zone.recording.cancel .bin::after { display: none; }
.mic-zone.recording.cancel .wave { opacity: .25; }
@keyframes bin-shake { 25% { rotate: -8deg; } 75% { rotate: 8deg; } }

/* ================= languages ================= */
.langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.langs.big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.langs button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 96px; padding: 12px 6px; border-radius: 22px;
  background: #fff; border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); transition: transform .12s var(--spring), box-shadow .08s, background .2s;
  animation: pop .45s var(--spring) backwards;
}
.langs button:nth-child(2) { animation-delay: .06s; } .langs button:nth-child(3) { animation-delay: .12s; } .langs button:nth-child(4) { animation-delay: .18s; }
.langs button:active { transform: translateY(5px); box-shadow: none; }
.langs button.on { background: #FFF3C9; border-color: var(--mustard-dark); box-shadow: 0 5px 0 var(--mustard-dark); transform: scale(1.04); }
.langs button b { font-family: var(--display); font-size: 16px; line-height: 1.1; }
.langs.big button { min-height: 112px; }
.langs.big button b { font-size: 21px; }
.glyph {
  display: grid; place-items: center; width: 46px; height: 46px; font-style: normal; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; color: #fff; border-radius: 50%;
}
.langs.big .glyph { width: 56px; height: 56px; font-size: 30px; }
.glyph.tiny { display: inline-grid; width: 24px; height: 24px; font-size: 13px; vertical-align: -6px; }
.g-en { background: #3F6FD8; }
.g-de { background: #E08A2D; }
.g-es { background: #D64545; }
.g-fa { background: #2A9D78; font-family: "Vazirmatn", sans-serif; }
.g-ar { background: #B8327A; font-family: "Vazirmatn", sans-serif; }
.pick-lead { font-weight: 700; }
.say-hint { display: block; font-style: normal; font-size: 14px; font-weight: 800; color: var(--crust); margin: 2px 0; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px; text-align: center; font-weight: 800; color: var(--muted); }
.typing.center { align-self: center; margin: 8px auto 0; width: max-content; }
#level-btn { display: inline-flex; align-items: center; gap: 2px; padding-inline: 10px 14px; }

/* text finds its own direction: a German word inside a Persian screen still reads left to right */
p, b, small, h1, h2, h3, li, td, th, em, label > span, .de, .en, .hint, .word-chip, .tool, input, textarea { unicode-bidi: plaintext; }

/* ================= right to left (Persian, Arabic) ================= */
[dir=rtl] body { font-family: "Vazirmatn", "Nunito", system-ui, sans-serif; }
[dir=rtl] { --display: "Baloo Bhaijaan 2", "Vazirmatn", "Baloo 2", sans-serif; }
[dir=rtl] .bubble { transform-origin: 100% 50%; }
[dir=rtl] .bubble::before { left: auto; right: -10px; border-left: 0; border-bottom: 0; border-right: 2px solid var(--line); border-top: 2px solid var(--line); }
[dir=rtl] .topbar .chip-btn { margin-left: 0; margin-right: auto; }
[dir=rtl] .xp { float: left; margin-left: 0; margin-right: 8px; }
[dir=rtl] .msg.tutor { border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
[dir=rtl] .msg.me { border-bottom-right-radius: 18px; border-bottom-left-radius: 6px; }
[dir=rtl] .scene .tick { right: auto; left: 10px; }
[dir=rtl] .pagehead h1 { margin-left: 0; margin-right: 4px; }
[dir=rtl] .topic ul { padding-left: 0; padding-right: 20px; }
[dir=rtl] .ell { margin-left: 0; margin-right: 8px; }
[dir=rtl] .topic-card > .ic:last-child, [dir=rtl] #ob-go .ic { transform: scaleX(-1); }
[dir=rtl] .brezi.mini { transform-origin: 0 30%; }
[dir=rtl] .levels button small { font-size: 9.5px; }

/* ================= a plain, calm look ================= */
.screen, .tabbar { position: relative; z-index: 1; }
/* the path: a thin dotted line from step to step */
.path { position: relative; }
.trail { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: visible; pointer-events: none; }
.trail path { fill: none; stroke: var(--line); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 14; }
.node-wrap { z-index: 1; }
.node { position: relative; }
.node-wrap b { background: var(--cream); border-radius: 6px; padding: 0 6px; }

/* which language is which: the one you speak, then the one you learn */
.step-tag { display: table; margin: 10px auto 2px; padding: 2px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.step-tag.inline { display: inline-block; margin: 0; padding: 1px 10px; font-style: normal; vertical-align: 1px; }
.langs button small { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.lang-notes { margin-top: 18px; padding: 10px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.lang-notes p { font-size: 13.5px; color: var(--muted); padding: 6px 0; }
.lang-notes p + p { border-top: 1px solid var(--line); }
.lang-notes b { color: var(--red-dark); }
.field-note { margin: -2px 0 10px; font-size: 14px; color: var(--muted); }

/* the first screen: one row per language, so five fit on a phone */
#lang-cards { grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
#lang-cards button { flex-direction: row; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; text-align: start; animation: none; }
#lang-cards button b { font-size: 19px; }
#lang-cards button small { margin-inline-start: auto; }
#lang-cards .glyph { width: 40px; height: 40px; font-size: 21px; flex: none; }
#screen-lang .brezi.big { width: 96px; height: 104px; }
.lang-notes { margin-top: 14px; }
.lang-notes p { font-size: 12.5px; padding: 4px 0; }
