/* BarziBall child-app mockup. System fonts only, no network. */
:root {
  --bg: #FFF6EA; --card: #fff; --ink: #1E2440; --muted: #636A8A; --line: #EFE6DA;
  --brand: #FF7A1A; --brand-d: #D9590A; --brand-l: #FFE6D2;
  --deed: #13B08B; --deed-d: #0C8C6E; --deed-l: #DDF6EE;
  --thanks: #8457F0; --thanks-d: #6537D6; --thanks-l: #EEE7FF;
  --sun: #FFC83D; --sky: #3BA4FF; --warn: #FFF1C2; --warn-ink: #8A5A00;
  --r: 22px; --sh: 0 2px 0 rgba(30,36,64,.06), 0 8px 24px rgba(30,36,64,.06);
  --font: system-ui, -apple-system, "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", "Noto Sans Arabic", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: #E9E4F5; font-size: 18px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 10px; }

/* ---------- mockup bar (demo controls) ---------- */
.mbar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; background: #1E2440; color: #fff; font-size: 14px; direction: rtl; }
.mbar .mt { font-weight: 700; margin-inline-end: auto; }
.mbar .mt small { font-weight: 400; opacity: .7; margin-inline-start: 6px; }
.mbar button { background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 99px; font-size: 14px; }
.mbar button:hover { background: rgba(255,255,255,.2); }
.mbar button.on { background: var(--brand); }
.mbar .grp { display: flex; gap: 4px; }
@media (max-width: 700px) { .mbar .mt small, #bar-frame, .mbar .wide { display: none; } .mbar { padding: 6px 8px; gap: 5px; } .mbar button { padding: 5px 9px; font-size: 13px; } }

/* ---------- app container ---------- */
#app { position: relative; container-type: inline-size; background: var(--bg); height: calc(100vh - 48px); height: calc(100dvh - 48px); overflow: hidden; }
body.frame #app { width: 390px; height: min(844px, calc(100dvh - 90px)); margin: 20px auto; border-radius: 46px; border: 12px solid #15182B; box-shadow: 0 30px 60px rgba(30,36,64,.3); }
@media (max-width: 700px) { body.frame #app { width: 100%; height: calc(100dvh - 44px); margin: 0; border: 0; border-radius: 0; box-shadow: none; } #app { height: calc(100dvh - 44px); } }

.sample { text-align: center; font-size: 13px; color: var(--muted); padding: 18px 10px 6px; }
.muted { color: var(--muted); font-size: 15px; }
.center { text-align: center; }
.row-sb { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 18px; }
.card h3 { font-size: 18px; }
.mt { margin-top: 16px; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 60px; border-radius: 18px; font-weight: 800; font-size: 19px; transition: transform .08s, box-shadow .08s; }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 5px 0 var(--brand-d); }
.btn-brand:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brand-d); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); margin-top: 12px; }
.btn-ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn-big { min-height: 66px; font-size: 21px; }
.btn-link { color: var(--sky); font-weight: 700; font-size: 16px; padding: 8px 4px; }
.iconbtn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--sh); }
.iconbtn:active, .tile:active, .itemrow:active, .rrow:active, .key:active { transform: scale(.96); }
[dir=rtl] .ic-flip, [dir=rtl] .ob-back .ic, [dir=rtl] .flow-top .ic { transform: none; }
.chev .ic, .backlink .ic { transform: scaleX(-1); }

/* ---------- mascot ---------- */
.mascot { display: block; flex: none; }
.m-cheer { animation: bounce 1s ease-in-out infinite; }
.m-happy { animation: bob 3s ease-in-out infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0) } 40% { transform: translateY(-14px) rotate(-6deg) } 60% { transform: translateY(-14px) rotate(6deg) } }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }

/* ---------- onboarding ---------- */
.ob { height: 100%; overflow-y: auto; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 0%, #FFE2C4, var(--bg) 60%); position: relative; }
.ob-in { width: 100%; max-width: 440px; margin: auto; padding: 32px 22px 10px; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.ob-hero { display: flex; justify-content: center; margin-bottom: 18px; }
.ob-title { font-size: 28px; line-height: 1.2; margin-bottom: 10px; }
.ob-sub { color: var(--muted); margin-bottom: 26px; }
.ob-back { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 2; }
.bio-ic { color: var(--brand); }
.scanning .ic { animation: pulse 0.9s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .6 } }
.chip-line { margin-bottom: 26px; }
.chip { display: inline-block; background: #fff; border-radius: 99px; padding: 6px 14px; font-size: 15px; font-weight: 600; box-shadow: var(--sh); }
.idcard { text-align: center; margin-bottom: 22px; }
.idname { font-size: 22px; font-weight: 800; margin: 8px 0 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; text-align: start; font-size: 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }
.pin { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.pd { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--brand); }
.pd.on { background: var(--brand); animation: popin .2s; }
@keyframes popin { from { transform: scale(.4) } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 0 auto 10px; }
.key { height: 66px; border-radius: 20px; background: #fff; font-size: 28px; font-weight: 700; box-shadow: 0 4px 0 var(--line); }
.key-del { background: transparent; box-shadow: none; }

/* ---------- shell ---------- */
.shell { height: 100%; display: flex; flex-direction: column; }
.main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.top-title { font-size: 26px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 20px; flex: none; overflow: hidden; }
.avatar.big { width: 76px; height: 76px; font-size: 34px; }
.avatar.coach { background: var(--sky); }
.avatar.sys { background: var(--brand-l); }
.avatar.sys svg { width: 40px; height: 40px; }
.content { flex: 1; overflow-y: auto; padding: 6px 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.side { display: none; }
.tabs { display: flex; justify-content: space-around; align-items: flex-end; background: #fff; padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(30,36,64,.07); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: #8C90A8; font-size: 12px; font-weight: 700; position: relative; min-height: 56px; }
.tab.on { color: var(--brand); }
.tab .badge { position: absolute; top: 2px; inset-inline-start: calc(50% + 4px); }
.badge { background: #F0435A; color: #fff; border-radius: 99px; font-size: 12px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; font-weight: 800; }
.nav-plus .plus-in { width: 60px; height: 60px; margin-top: -26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 5px 0 var(--brand-d), 0 8px 18px rgba(255,122,26,.4); }
.nav-plus:active .plus-in { transform: translateY(3px); box-shadow: 0 2px 0 var(--brand-d); }
.tab.nav-plus { color: var(--brand); }

/* desktop: sidebar instead of tabs */
@container (min-width: 820px) {
  .shell { flex-direction: row; }
  .tabs, .avatar-btn { display: none; }
  .side { display: flex; flex-direction: column; width: 250px; background: #fff; padding: 20px 14px; box-shadow: 4px 0 24px rgba(30,36,64,.05); }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 25px; line-height: 1.15; padding: 0 8px 22px; }
  .side-nav { display: flex; flex-direction: column; gap: 6px; }
  .snav { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; font-weight: 700; color: #5A607E; position: relative; }
  .snav:hover { background: var(--bg); }
  .snav.on { background: var(--brand-l); color: var(--brand-d); }
  .snav .badge { margin-inline-start: auto; order: 3; }
  .snav.nav-plus { background: var(--brand); color: #fff; margin: 8px 0; box-shadow: 0 4px 0 var(--brand-d); }
  .snav.nav-plus .plus-in { width: auto; height: auto; margin: 0; background: none; box-shadow: none; }
  .snav.nav-plus .plus-in .ic { width: 24px; height: 24px; }
  .side-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; text-align: start; }
  .side-me:hover { background: var(--bg); }
  .side-me small { display: block; color: var(--muted); font-size: 13px; }
  .top { padding: 26px 34px 10px; }
  .top-title { font-size: 30px; }
  .content { padding: 8px 34px 30px; }
  .content > * { max-width: 1000px; width: 100%; }
  .content .home { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
  .home .hero, .home .actions { grid-column: 1 / -1; }
  .home .recent, .home .msgprev { grid-column: 1 / -1; }
  .home .actions .bigact { min-height: 150px; }
  .content .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .stats .tiles3, .stats .teamcard { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(3, 1fr) !important; }
  .flow-body, .flow-top { max-width: 760px; width: 100%; margin: 0 auto; }
  .flow-top { padding-top: 24px; }
  .teamgrid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ---------- home ---------- */
.home { display: flex; flex-direction: column; gap: 14px; }
.hero { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #FFE7D1, #FFF6EA); }
.hero.done { background: linear-gradient(135deg, var(--deed-l), #FFF6EA); }
.hero h2 { font-size: 24px; }
.hero p { color: #4A5070; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bigact { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; min-height: 132px; border-radius: var(--r); color: #fff; padding: 12px; transition: transform .08s, box-shadow .08s; }
.bigact.deed { background: var(--deed); box-shadow: 0 6px 0 var(--deed-d); }
.bigact.thanks { background: var(--thanks); box-shadow: 0 6px 0 var(--thanks-d); }
.bigact:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.ba-e { font-size: 40px; line-height: 1.1; }
.ba-t { font-size: 21px; font-weight: 900; }
.ba-s { font-size: 14px; opacity: .9; }
.pill { font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: 99px; background: var(--bg); white-space: nowrap; }
.pill.ok { background: var(--deed-l); color: var(--deed-d); }
.pill.warn { background: var(--warn); color: var(--warn-ink); }
.bar { height: 12px; background: var(--bg); border-radius: 99px; margin: 12px 0 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--brand)); border-radius: 99px; }
[dir=rtl] .bar span { margin-inline-start: 0; }
.streak-n { color: var(--brand-d); font-weight: 700; }
.streak-n b { font-size: 26px; }
.wks { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: 12px 0 8px; }
.wk { aspect-ratio: 1; border-radius: 50%; background: var(--bg); border: 2px dashed #E3D6C4; display: grid; place-items: center; font-size: 15px; max-width: 44px; min-width: 0; overflow: hidden; }
.wk.on { background: var(--brand-l); border: 2px solid var(--brand); }
.wk.now:not(.on) { border-color: var(--brand); animation: pulse 1.6s infinite; }
.msgprev { display: flex; align-items: center; gap: 12px; text-align: start; width: 100%; }
.msgprev small { display: block; color: var(--muted); font-size: 14px; }
.dot-new { width: 12px; height: 12px; background: #F0435A; border-radius: 50%; margin-inline-start: auto; flex: none; }
.rrow, .mrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; text-align: start; border-bottom: 1px solid var(--line); }
.rrow:last-child, .mrow:last-child { border-bottom: 0; }
.rr-e { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none; }
.rr-b { min-width: 0; display: flex; flex-direction: column; }
.rr-b b { font-size: 17px; }
.rr-b small { color: var(--muted); font-size: 14px; }
.tag { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 99px; }
.tag.deed { background: var(--deed-l); color: var(--deed-d); }
.tag.thanks { background: var(--thanks-l); color: var(--thanks-d); }
.recent h3 { margin-bottom: 4px; }

/* ---------- report flow ---------- */
.flow { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.flow.deed { background: linear-gradient(180deg, var(--deed-l), var(--bg) 40%); }
.flow.thanks { background: linear-gradient(180deg, var(--thanks-l), var(--bg) 40%); }
.flow-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.steps { flex: 1; display: flex; gap: 6px; }
.steps span { flex: 1; height: 10px; border-radius: 99px; background: rgba(30,36,64,.1); transition: background .3s; }
.flow.deed .steps .on { background: var(--deed); }
.flow.thanks .steps .on { background: var(--thanks); }
.flow:not(.deed):not(.thanks) .steps .on { background: var(--brand); }
.flow-type { font-weight: 800; font-size: 15px; min-width: 70px; text-align: end; }
.flow.deed .flow-type { color: var(--deed-d); } .flow.thanks .flow-type { color: var(--thanks-d); }
.flow-body { flex: 1; overflow-y: auto; padding: 8px 18px 24px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; animation: slide .22s ease-out; }
@keyframes slide { from { opacity: 0; transform: translateY(10px) } }
.q { font-size: 26px; line-height: 1.2; }
.q-e { font-size: 30px; }
.opt { font-size: 15px; font-weight: 600; color: var(--muted); background: #fff; padding: 2px 10px; border-radius: 99px; vertical-align: middle; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--tc); border-radius: var(--r); min-height: 116px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 18px; text-align: center; padding: 10px; box-shadow: 0 5px 0 rgba(30,36,64,.08); transition: transform .08s; }
.tile-e { font-size: 42px; line-height: 1; }
.items { display: flex; flex-direction: column; gap: 10px; }
.itemrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 16px 18px; min-height: 64px; font-size: 18px; font-weight: 700; box-shadow: 0 4px 0 var(--line); transition: transform .08s; }
.chev { color: var(--muted); }
.chosen { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 12px; box-shadow: var(--sh); }
.chosen > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.chosen small { color: var(--muted); font-size: 14px; }
.textwrap { position: relative; }
textarea { width: 100%; font: inherit; font-size: 18px; border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; padding-inline-end: 76px; resize: none; background: #fff; color: var(--ink); }
textarea:focus { outline: none; border-color: var(--sky); }
.mic { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 var(--brand-d); }
.mic.rec { background: #F0435A; box-shadow: 0 0 0 0 rgba(240,67,90,.5); animation: ring 1.2s infinite; }
@keyframes ring { to { box-shadow: 0 0 0 16px rgba(240,67,90,0); } }
.recline { display: flex; align-items: center; gap: 8px; color: #C42A40; font-weight: 700; font-size: 15px; }
.recdot { width: 10px; height: 10px; border-radius: 50%; background: #F0435A; animation: pulse 1s infinite; }
.privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; color: #4A5070; background: #fff; border-radius: 14px; padding: 10px 12px; }
.privacy .ic { flex: none; margin-top: 2px; color: var(--deed-d); }

/* ---------- celebration ---------- */
.celebrate { height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 24px; gap: 8px; background: radial-gradient(circle at 50% 30%, #FFE7D1, var(--bg) 65%); position: relative; }
.celebrate > .btn { max-width: 400px; }
.celebrate h1 { font-size: 38px; }
.celebrate p { color: #4A5070; font-size: 19px; margin-bottom: 10px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 10px; height: 16px; background: var(--c); border-radius: 3px; transform: rotate(var(--r)); animation: fall 2.2s var(--d) ease-in forwards; }
@keyframes fall { to { top: 105%; transform: rotate(calc(var(--r) + 540deg)); } }
.streak-up { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 18px; border-radius: 99px; box-shadow: var(--sh); font-size: 19px; color: var(--brand-d); animation: popin .5s .4s both; margin-bottom: 6px; }
.streak-up .wk { width: 38px; }
.badge-new { background: var(--warn); color: var(--warn-ink); font-weight: 800; padding: 8px 16px; border-radius: 99px; margin-bottom: 8px; animation: popin .5s .8s both; }

/* ---------- reports list ---------- */
.fchips { display: flex; gap: 8px; flex-wrap: wrap; }
.fchip { padding: 10px 18px; border-radius: 99px; background: #fff; font-weight: 700; font-size: 16px; box-shadow: 0 3px 0 var(--line); min-height: 44px; }
.fchip.on { background: var(--ink); color: #fff; box-shadow: none; }
.wkhead { font-size: 17px; margin-top: 6px; }
.wkhead small { color: var(--muted); font-weight: 500; font-size: 14px; }
.list { padding: 4px 14px; }
.empty { text-align: center; padding: 30px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* sheet */
.sheet-bg { position: absolute; inset: 0; background: rgba(30,36,64,.35); z-index: 20; animation: fade .2s; }
@keyframes fade { from { opacity: 0 } }
.sheet { position: absolute; inset-inline: 0; bottom: 0; z-index: 21; background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 18px 22px; display: flex; flex-direction: column; gap: 12px; animation: up .25s ease-out; max-width: 560px; margin: 0 auto; }
@keyframes up { from { transform: translateY(100%) } }
.grab { width: 44px; height: 5px; border-radius: 9px; background: #D8CCBB; align-self: center; }
blockquote { margin: 0; background: #fff; border-radius: 14px; padding: 12px 16px; border-inline-start: 5px solid var(--brand); font-size: 18px; }
.sheet .btn-ghost { margin-top: 0; }

/* ---------- stats ---------- */
.stats { display: flex; flex-direction: column; gap: 14px; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stile { border-radius: var(--r); padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stile b { font-size: 32px; line-height: 1.1; }
.stile b small { font-size: 16px; opacity: .7; }
.stile span { font-size: 14px; font-weight: 700; }
.stile.deed { background: var(--deed-l); color: var(--deed-d); }
.stile.thanks { background: var(--thanks-l); color: var(--thanks-d); }
.stile.wk { background: var(--brand-l); color: var(--brand-d); aspect-ratio: auto; border: 0; max-width: none; display: flex; border-radius: var(--r); }
.bdgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 12px; }
.bdg { text-align: center; padding: 12px 6px; border-radius: 18px; background: var(--bg); display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .55; filter: grayscale(1); }
.bdg.got { opacity: 1; filter: none; background: var(--warn); }
.bdg-e { font-size: 34px; }
.bdg b { font-size: 14px; line-height: 1.2; }
.bdg small { font-size: 12px; color: var(--muted); }
.hbar { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 24px; align-items: center; gap: 10px; margin-top: 10px; font-size: 15px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-t { height: 14px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.hb-t span { display: block; height: 100%; border-radius: 99px; min-width: 4px; }
.hb-t .deed { background: var(--deed); } .hb-t .thanks { background: var(--thanks); }
.teamcard { background: linear-gradient(135deg, #E3F1FF, #fff); }
.teamgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.teamgrid div { background: #fff; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; }
.teamgrid b { font-size: 26px; color: #1E6FC2; }
.teamgrid b small { font-size: 15px; color: var(--muted); }
.teamgrid span { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- messages ---------- */
.mrow.new b { font-weight: 900; }
.mrow:not(.new) b { font-weight: 600; }
.backlink { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; }
.msg { display: flex; flex-direction: column; gap: 12px; }
.msg-h { display: flex; align-items: center; gap: 12px; }
.msg-h small { display: block; color: var(--muted); font-size: 14px; }
.msg h2 { font-size: 22px; }
.msg-b { font-size: 18px; }

/* ---------- profile ---------- */
.who { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.who li { display: flex; gap: 10px; font-size: 16px; }
.who li > span:first-child { font-size: 22px; }
.set { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.set > span { display: flex; align-items: center; gap: 8px; }
.settings .muted { margin-top: 8px; }
.switch { appearance: none; width: 54px; height: 32px; border-radius: 99px; background: #D5D7E3; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch:checked { background: var(--deed); }
.switch:checked::after { inset-inline-start: 25px; }

/* ---------- toast & notification ---------- */
.toast { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 16px; font-size: 16px; z-index: 40; width: max-content; max-width: 86%; text-align: center; animation: popin .2s; transition: opacity .4s; }
.toast.out { opacity: 0; }
.notif { position: absolute; top: 10px; inset-inline: 10px; z-index: 45; display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-radius: 20px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(30,36,64,.25); text-align: start; animation: drop .35s ease-out; transition: opacity .4s, transform .4s; max-width: 460px; margin: 0 auto; }
.notif small { display: block; color: var(--muted); font-size: 12px; }
.notif b { display: block; font-size: 16px; }
.notif > span > span { font-size: 15px; }
.notif.out { opacity: 0; transform: translateY(-20px); }
@keyframes drop { from { transform: translateY(-120%) } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.stile b, .teamgrid b { direction: ltr; unicode-bidi: isolate; }
.content .idcard { margin-bottom: 0; }

/* app name with basketball logo: phone header row (desktop shows it in the sidebar) */
.mbrand { display: flex; align-items: center; gap: 9px; padding: 12px 18px 0; font-weight: 900; font-size: 22px; color: var(--ink, #1E2440); }
.logo { flex: none; display: block; }
@container (min-width: 820px) { .mbrand { display: none; } }
/* full-screen phone: the demo bar takes what it needs, the app takes the rest (also as an installed app) */
@media (max-width: 700px) {
  body { display: flex; flex-direction: column; height: 100dvh; }
  .mbar { flex: none; padding-top: calc(6px + env(safe-area-inset-top)); }
  #app, body.frame #app { flex: 1; min-height: 0; height: auto; }
}
