/* salman.ai — game-style UI (Duolingo-like palette) */
:root {
  --green: #58CC02; --green-d: #58A700; --green-l: #D7FFB8;
  --blue: #1CB0F6; --blue-d: #1899D6; --blue-l: #DDF4FF; --blue-b: #84D8FF;
  --yellow: #FFC800; --yellow-d: #E5B400; --yellow-l: #FFF4CC;
  --orange: #FF9600; --orange-d: #E08A00; --orange-l: #FFF5E5;
  --red: #FF4B4B; --red-d: #EA2B2B; --red-l: #FFDFE0;
  --purple: #CE82FF; --purple-d: #A568CC;
  --text: #4B4B4B; --muted: #777777; --faint: #AFAFAF; --line: #E5E5E5; --line-d: #CECECE; --bg: #FFFFFF;
  --r: 16px;
  --font: Nunito, "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 700; -webkit-tap-highlight-color: transparent; }
body { padding-top: env(safe-area-inset-top, 0px); }
button, input, select, textarea { font-family: inherit; font-weight: 700; color: inherit; }
a { color: var(--blue-d); }
button svg, a svg { width: 22px; height: 22px; flex: 0 0 auto; }
h1, h2, h3 { margin: 0; font-weight: 900; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
p { margin: 0; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
code, .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.code { background: #F7F7F7; border: 2px solid var(--line); border-radius: 12px; padding: 12px; white-space: pre-wrap; word-break: break-all; margin: 8px 0; }

/* ---------- Animations ---------- */
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes bounceX { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,-6px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 70% { transform: scale(.94); } 100% { transform: scale(1); } }
@keyframes floatUp { 0% { transform: translate(-50%,0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-50%,-60px); opacity: 0; } }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fall { 0% { transform: translateY(-20px) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: .9; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
@keyframes dots { 0%,80%,100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.bob { animation: bob 2.4s ease-in-out infinite; }
.pop { animation: pop .5s ease-out; }
.wiggle { animation: wiggle .5s ease-in-out 3; }
.shake { animation: shake .4s ease-in-out; }
.fade-in { animation: fadeIn .35s ease-out both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- Chunky buttons ---------- */
.btn { --c: var(--green); --s: var(--green-d); --t: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border: none; border-radius: var(--r); background: var(--c); color: var(--t); box-shadow: 0 4px 0 var(--s);
  font-size: 15px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform .08s, box-shadow .08s, filter .15s; user-select: none; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--s); }
.btn:disabled { --c: var(--line); --s: var(--line-d); --t: var(--faint); cursor: not-allowed; }
.btn-green { --c: var(--green); --s: var(--green-d); }
.btn-blue { --c: var(--blue); --s: var(--blue-d); }
.btn-orange { --c: var(--orange); --s: var(--orange-d); }
.btn-red { --c: var(--red); --s: var(--red-d); }
.btn-ghost { --c: #fff; --s: var(--line); --t: var(--blue); border: 2px solid var(--line); }
.btn-ghost-muted { --c: #fff; --s: var(--line); --t: var(--muted); border: 2px solid var(--line); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 2px solid var(--line); background: #fff; box-shadow: 0 3px 0 var(--line); cursor: pointer; color: var(--muted); transition: transform .08s, box-shadow .08s; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.icon-btn svg { width: 22px; height: 22px; }

/* Selectable chips / options */
.opt { min-height: 48px; padding: 0 16px; border-radius: var(--r); border: 2px solid var(--line); background: #fff; box-shadow: 0 4px 0 var(--line); cursor: pointer; font-size: 15px; font-weight: 800; color: var(--text); text-align: left; transition: transform .08s, box-shadow .08s; }
.opt:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.opt.on { background: var(--blue-l); border-color: var(--blue-b); box-shadow: 0 4px 0 var(--blue-b); color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .opt { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.seg { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 8px; }
.seg .opt { text-align: center; padding: 0 6px; }

/* ---------- Cards, bars ---------- */
.card { border: 2px solid var(--line); border-radius: 18px; padding: 18px; background: #fff; }
.card + .card { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.bar { position: relative; height: 16px; border-radius: 8px; background: var(--line); overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--yellow); transition: width .6s cubic-bezier(.3,1.6,.5,1); }
.bar > i::after { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); }
.bar > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; color: var(--text); }
.bar.lg { height: 20px; border-radius: 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #F2F2F2; font-size: 12px; font-weight: 800; color: var(--muted); }
.alert { padding: 12px 14px; border-radius: 14px; background: var(--red-l); color: #B3261E; font-weight: 800; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; font-weight: 900; color: var(--text); }
.field small { color: var(--muted); font-weight: 700; font-size: 12px; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: #F7F7F7; font-size: 16px; font-weight: 700; outline: none; transition: border-color .15s, background .15s; }
.field textarea, textarea.input { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-b); background: #fff; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 250px; flex: 0 0 250px; border-right: 2px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; }
.brand b { font-size: 27px; font-weight: 900; color: var(--green); letter-spacing: -.02em; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid transparent; text-decoration: none; color: var(--muted); font-weight: 900; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.nav a:hover { background: #F7F7F7; }
.nav a.on { background: var(--blue-l); border-color: var(--blue-b); color: var(--blue); }
.nav svg { width: 28px; height: 28px; flex: 0 0 auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 2px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 20; }
.stats { display: flex; align-items: center; gap: 16px; }
.stat { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; font-size: 17px; white-space: nowrap; flex: 0 0 auto; }
.stat svg { flex: 0 0 auto; }
.stat svg { width: 24px; height: 24px; }
.stat.streak { color: var(--orange); } .stat.xp { color: var(--yellow-d); } .stat.bal { color: var(--blue); }
.stat.off { color: var(--faint); }
.view { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px 24px 120px; }
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 2px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); gap: 4px; }
.tabbar a { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; border: 2px solid transparent; text-decoration: none; color: var(--faint); font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.tabbar a.on { background: var(--blue-l); border-color: var(--blue-b); color: var(--blue); }
.tabbar svg { width: 26px; height: 26px; }
@media (max-width: 999px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .tabbar { display: flex; }
  .view { padding: 18px 16px 110px; }
}

/* ---------- Today ---------- */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
@media (max-width: 1199px) { .today { grid-template-columns: minmax(0, 1fr); } }
.rail { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 24px; }
@media (max-width: 1199px) { .rail { position: static; } .rail .stats { display: none; } }
.unit { border-radius: 18px; background: var(--green); box-shadow: 0 5px 0 var(--green-d); color: #fff; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.unit small { font-size: 13px; font-weight: 900; letter-spacing: .06em; opacity: .92; text-transform: uppercase; }
.unit .title { font-size: 21px; font-weight: 900; line-height: 1.25; }
.unit .ubtn { min-height: 46px; padding: 0 16px; border-radius: 14px; border: 2px solid #89E219; background: var(--green); box-shadow: 0 4px 0 var(--green-d); color: #fff; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: transform .08s, box-shadow .08s; }
.unit .ubtn:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.unit .ubtn svg { width: 20px; height: 20px; }
.brief { display: flex; gap: 14px; align-items: flex-start; }
.bubble { position: relative; flex: 1; padding: 14px 16px; border: 2px solid var(--line); border-radius: 18px; background: #fff; line-height: 1.5; }
.bubble::before { content: ""; position: absolute; left: -10px; top: 22px; width: 16px; height: 16px; background: #fff; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }

.path { position: relative; display: flex; flex-direction: column; align-items: center; gap: 46px; padding: 60px 0 30px; }
.node-row { display: flex; align-items: center; gap: 16px; width: 340px; max-width: 100%; transition: transform .3s; }
.node-wrap { position: relative; width: 78px; height: 78px; flex: 0 0 auto; }
.node { position: relative; width: 78px; height: 78px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .08s, box-shadow .08s; }
.node svg { width: 36px; height: 36px; }
.node.done { background: var(--yellow); box-shadow: 0 7px 0 var(--yellow-d); color: #A07800; }
.node.current { background: var(--green); box-shadow: 0 7px 0 var(--green-d); color: #fff; }
.node.todo { background: var(--line); box-shadow: 0 7px 0 var(--line-d); color: var(--faint); }
.node:active { transform: translateY(7px); box-shadow: 0 0 0 transparent; }
.node-wrap .ring { position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-out infinite; }
.node-wrap .start { position: absolute; left: 50%; top: -50px; padding: 8px 14px; border-radius: 12px; background: #fff; border: 2px solid var(--line); color: var(--green); font-weight: 900; font-size: 14px; letter-spacing: .06em; white-space: nowrap; animation: bounceX 1.2s ease-in-out infinite; }
.node-wrap .start::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; margin-left: -6px; background: #fff; border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
.node-label { min-width: 0; text-align: left; background: none; border: none; padding: 6px 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.node-label small { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .03em; }
.node-label b { font-size: 17px; font-weight: 900; color: var(--text); line-height: 1.25; }
.node-label.done b { color: var(--faint); text-decoration: line-through; }
.node-label .slip { color: var(--orange); }
.xp-float { position: absolute; left: 50%; top: -6px; font-weight: 900; font-size: 20px; color: var(--yellow-d); white-space: nowrap; pointer-events: none; animation: floatUp .9s ease-out forwards; z-index: 5; }
.path-mascot { position: absolute; right: 0; top: 470px; width: 110px; }
@media (max-width: 559px) { .node-row { width: 290px; } .stats { gap: 12px; } .stat { font-size: 15px; } }
@media (max-width: 700px) { .path-mascot { display: none; } }
.empty { text-align: center; padding: 30px 10px; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.quest { display: flex; align-items: center; gap: 12px; }
.quest svg { width: 34px; height: 34px; flex: 0 0 auto; }
.quest .grow { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Coach ---------- */
.coach { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 150px); }
.coach-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--line); }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px 0; }
.msg { display: flex; gap: 10px; align-items: flex-end; animation: fadeIn .3s ease-out both; }
.msg .av { width: 44px; height: 48px; flex: 0 0 auto; }
.msg .txt { max-width: 82%; padding: 12px 15px; border-radius: 18px; border: 2px solid var(--line); background: #fff; line-height: 1.5; font-size: 15.5px; overflow-wrap: anywhere; }
.msg .txt ul { margin: 6px 0; padding-left: 20px; }
.msg .txt p + p { margin-top: 8px; }
.msg.user { justify-content: flex-end; }
.msg.user .txt { background: var(--blue-l); border-color: var(--blue-b); color: #0B6E9E; }
.msg .kind { display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px; background: var(--orange-l); color: #B36200; font-size: 12px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0 54px; }
.act { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--green-l); color: #3F7A00; font-size: 13px; font-weight: 900; animation: pop .4s ease-out both; }
.act svg { width: 16px; height: 16px; }
.typing .txt { display: flex; gap: 6px; padding: 16px; }
.typing i { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); animation: dots 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.composer { position: sticky; bottom: 0; background: #fff; padding: 12px 0 8px; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.composer .row textarea { flex: 1; min-height: 52px; max-height: 160px; padding: 13px 16px; border-radius: 16px; border: 2px solid var(--line); background: #F7F7F7; font-size: 16px; resize: none; outline: none; line-height: 1.4; }
.composer .row textarea:focus { border-color: var(--blue-b); background: #fff; }
.send { width: 52px; height: 52px; border-radius: 16px; border: none; background: var(--green); box-shadow: 0 4px 0 var(--green-d); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .08s, box-shadow .08s; }
.send:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.send:disabled { background: var(--line); box-shadow: 0 4px 0 var(--line-d); color: var(--faint); }
.send svg { width: 24px; height: 24px; }
@media (max-width: 999px) { .composer { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } .coach { min-height: calc(100vh - 200px); } }

/* ---------- Plan ---------- */
.plan { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.chain { display: flex; flex-direction: column; gap: 10px; }
.banner { border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; color: #fff; text-align: left; border: none; width: 100%; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.banner:active { transform: translateY(4px); box-shadow: 0 0 0 transparent !important; }
.banner small { font-size: 12px; font-weight: 900; letter-spacing: .07em; opacity: .92; text-transform: uppercase; }
.banner b { font-size: 16px; font-weight: 900; line-height: 1.25; }
.banner .pct { font-size: 18px; font-weight: 900; }
.lv-year { background: var(--purple); box-shadow: 0 5px 0 var(--purple-d); }
.lv-month { background: var(--green); box-shadow: 0 5px 0 var(--green-d); }
.lv-week { background: var(--blue); box-shadow: 0 5px 0 var(--blue-d); }
.banner.ghost { background: #fff; color: var(--muted); border: 2px dashed var(--line); box-shadow: none; }
.week { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)) 44px; gap: 6px; align-items: center; }
.day { height: 66px; border-radius: 14px; border: 2px solid var(--line); background: #fff; box-shadow: 0 4px 0 var(--line); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; transition: transform .08s, box-shadow .08s; }
.day:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.day small { font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; }
.day b { font-size: 18px; font-weight: 900; }
.day i { font-style: normal; font-size: 10px; font-weight: 800; color: var(--faint); }
.day.today b { color: var(--green); }
.day.on { background: var(--blue-l); border-color: var(--blue-b); box-shadow: 0 4px 0 var(--blue-b); }
.day.on b, .day.on small { color: var(--blue); }
.day.full i { color: var(--green-d); }
.tlist { display: flex; flex-direction: column; gap: 10px; }
.trow { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; }
.check { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; border: 2px solid var(--line); background: #fff; box-shadow: 0 3px 0 var(--line); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: transparent; transition: transform .08s; }
.check svg { width: 22px; height: 22px; }
.check.on { background: var(--green); border-color: var(--green); box-shadow: 0 3px 0 var(--green-d); color: #fff; }
.check:active { transform: translateY(3px); }
.trow .tt { flex: 1; min-width: 0; background: none; border: none; text-align: left; cursor: pointer; padding: 4px 0; display: flex; flex-direction: column; gap: 2px; }
.trow .tt b { font-size: 16px; font-weight: 900; }
.trow .tt small { font-size: 12px; color: var(--muted); font-weight: 800; }
.trow.done .tt b { color: var(--faint); text-decoration: line-through; }
.goal { border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.goal .gt { background: none; border: none; padding: 0; text-align: left; cursor: pointer; font-size: 16px; font-weight: 900; line-height: 1.3; }
.goal.done .gt { color: var(--green-d); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .icon-btn { width: 38px; height: 38px; }

/* ---------- Money ---------- */
.money { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.balance { border-radius: 20px; background: var(--blue); box-shadow: 0 6px 0 var(--blue-d); color: #fff; padding: 18px 20px; display: flex; align-items: center; gap: 12px; }
.balance small { font-size: 12px; font-weight: 900; letter-spacing: .07em; opacity: .92; text-transform: uppercase; }
.balance .big { font-size: 36px; font-weight: 900; letter-spacing: -.01em; display: inline-block; }
.balance .ubtn { border-color: var(--blue-b); background: var(--blue); box-shadow: 0 4px 0 var(--blue-d); }
.accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.acct { border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 4px 0 var(--line); padding: 12px; display: flex; align-items: center; gap: 10px; background: #fff; cursor: pointer; text-align: left; transition: transform .08s, box-shadow .08s; }
.acct:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.dot { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; flex: 0 0 auto; }
.dot svg { width: 20px; height: 20px; }
.acct small { font-size: 12px; color: var(--muted); font-weight: 800; display: block; }
.acct b { font-size: 16px; font-weight: 900; }
.tip { display: flex; gap: 10px; align-items: flex-end; }
.tip .bubble { background: var(--orange-l); border-color: #FFD9A0; color: #8A4B00; }
.tip .bubble::before { background: var(--orange-l); border-color: #FFD9A0; }
.txrow { display: flex; align-items: center; gap: 12px; min-height: 58px; border-bottom: 2px solid #F2F2F2; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; cursor: pointer; padding: 6px 0; }
.txrow .grow b { display: block; font-size: 15px; font-weight: 900; }
.txrow .grow small { font-size: 12px; color: var(--muted); font-weight: 700; }
.amt { font-size: 15px; font-weight: 900; }
.amt.in { color: var(--green-d); }

/* ---------- Settings ---------- */
.settings { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.list-edit { display: flex; flex-direction: column; gap: 10px; }
.list-edit .row input, .list-edit .row select { min-height: 44px; }

/* ---------- Sheet (modal) ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); animation: slideUp .3s cubic-bezier(.2,1.1,.4,1); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .backdrop { align-items: center; } .sheet { border-radius: 22px; } }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Result banner (like lesson feedback) */
.result { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--green-l); animation: slideUp .35s cubic-bezier(.2,1.2,.4,1); }
.result .inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.result .badge { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--green-d); animation: pop .5s ease-out; }
.result .badge svg { width: 32px; height: 32px; }
.result h3 { color: var(--green-d); font-size: 22px; }
.result p { color: var(--green-d); font-weight: 800; }

/* Toasts & confetti */
#toasts { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 12px 18px; border-radius: 16px; background: var(--text); color: #fff; font-weight: 900; box-shadow: 0 5px 0 #2F2F2F; animation: pop .4s ease-out; }
.toast.xp { background: var(--yellow); color: #5C4500; box-shadow: 0 5px 0 var(--yellow-d); }
.toast.err { background: var(--red); box-shadow: 0 5px 0 var(--red-d); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }

/* Login & setup */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.auth-card form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.setup-body { padding: 24px 16px 60px; }
.setup-card { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.setup-card h2 { margin-top: 10px; }
.setup-head { display: flex; align-items: center; gap: 14px; }
