



.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 6px;
  font-size: 13px;
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
}
.statusbar__icons {
  display: flex;
  gap: 6px;
  opacity: .8;
}



.appbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-3);
  flex-shrink: 0;
}
.appbar__title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: var(--weight-semibold);
}



.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-stroke);
  background: var(--color-surface);
  color: var(--color-text);
  display: grid;
  place-items: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.iconbtn:hover { background: var(--color-surface-2); border-color: var(--color-stroke-2); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 20px; height: 20px; }



.btn {
  width: 100%;
  border-radius: 14px;
  padding: 15px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: var(--transition-fast);
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--ghost {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-stroke);
}
.btn--ghost:hover { background: var(--color-surface-2); }

.btn--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border: 1px solid rgba(251, 113, 133, .3);
}

.btn--sm { width: auto; padding: 9px 16px; font-size: var(--text-sm); }


.btn-row { display: flex; gap: var(--space-3); }
.btn-row .btn { flex: 1; }



.field { margin-bottom: 14px; }
.field__label {
  display: block;
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--color-muted);
  margin-bottom: 7px;
}
.input {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
  border-radius: 13px;
  padding: 14px 15px;
  color: var(--color-text);
  font-size: var(--text-base);
  font-family: var(--font-body);
  transition: var(--transition-fast);
}
.input::placeholder { color: var(--color-muted-2); }
.input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface-2);
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}
textarea.input { resize: none; line-height: var(--leading-base); }


select.input {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--color-field);
  color: var(--color-text);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%239aa0bd' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 10px;
  padding-right: 42px;
  cursor: pointer;
  border-color: var(--color-stroke-2);
}
select.input option,
select.input optgroup {
  background-color: var(--color-field);
  color: var(--color-text);
}


.form-err {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--msg-error-bg);
  border: 1px solid var(--msg-error-line);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 4px 0 12px;
  color: var(--msg-error-ink);
  font-size: 14px; font-weight: 500; line-height: 1.45;
  text-align: left;
  animation: form-err-in .25s ease;
}
.form-err::before { content: '!'; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--msg-error-line); color: #fff; font-weight: 800; font-size: 13px;
  display: grid; place-items: center; margin-top: 1px; }
.form-err[hidden] { display: none; }
@keyframes form-err-in { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } 100% { transform: translateX(0); } }


.checkbox { accent-color: var(--color-primary); width: 16px; height: 16px; }



.card {
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: var(--blur-glass);
}
.card--glass {
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
}
.card--brand {
  background: var(--gradient-brand);
  border: none;
  box-shadow: var(--shadow-brand);
}
.card--accent {
  background: var(--color-primary-soft);
  border-color: rgba(109, 94, 252, .3);
}
.card--danger {
  background: var(--color-danger-soft);
  border-color: rgba(251, 113, 133, .3);
}



.chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}
.chip {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-stroke);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--color-muted);
  transition: var(--transition-fast);
}
.chip.is-active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: var(--weight-semibold);
}
.badge--violet  { background: var(--color-primary-soft); color: var(--color-primary-2); }
.badge--green   { background: var(--color-success-soft); color: var(--color-success); }
.badge--red     { background: var(--color-danger-soft);  color: var(--color-danger); }
.badge--amber   { background: var(--color-warning-soft); color: var(--color-warning); }



.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.stat {
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
}
.stat__n { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-bold); }
.stat__l { font-size: 11px; color: var(--color-muted); margin-top: 3px; }
.stat--accent { background: var(--color-primary-soft); border-color: rgba(109, 94, 252, .3); }



.row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
  margin-bottom: 11px;
  transition: var(--transition-fast);
}
.row-card:hover {
  background: var(--color-surface-2);
  border-color: var(--color-stroke-2);
  transform: translateX(2px);
}
.row-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--color-primary-soft);
  color: var(--color-primary-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.row-card__meta { flex: 1; min-width: 0; }
.row-card__meta h4 { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-bottom: 3px; }
.row-card__meta p  { font-size: var(--text-xs); color: var(--color-muted); }


.row-card__icon--green { background: var(--color-success-soft); color: var(--color-success); }
.row-card__icon--red   { background: var(--color-danger-soft);  color: var(--color-danger); }



.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
  margin-bottom: 10px;
  transition: var(--transition-fast);
}
.list-item:hover { background: var(--color-surface-2); }
.list-item__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--color-primary-soft);
  color: var(--color-primary-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.list-item__text  { flex: 1; font-size: var(--text-base); font-weight: var(--weight-medium); }
.list-item__sub   { font-size: var(--text-xs); color: var(--color-muted); }
.list-item--danger .list-item__text { color: var(--color-danger); }
.list-item--danger .list-item__icon { background: var(--color-danger-soft); color: var(--color-danger); }



.toggle {
  width: 46px;
  height: 27px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  position: relative;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  transition: var(--transition-fast);
}
.toggle.is-on { background: var(--gradient-brand); }
.toggle.is-on::after { left: 22px; }



.tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 12px 16px;
  flex-shrink: 0;
  background: linear-gradient(180deg, transparent, var(--color-bg-2) 40%);
  border-top: 1px solid var(--color-stroke);
  backdrop-filter: blur(20px);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--color-muted-2);
  flex: 1;
  padding: 4px;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 23px; height: 23px; overflow: visible; }
.tab.is-active { color: var(--color-primary-2); }


.tab__ic {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 30px; border-radius: 15px;
  transition: background .3s, box-shadow .3s, transform .15s;
}
.tab:active .tab__ic { transform: scale(.88); }
.tab svg * { transform-box: fill-box; transform-origin: center; }
.tab .f { fill: transparent; transition: fill .35s; }
.tab__label { transition: color .2s; }
.tab.is-active .tab__label { font-weight: 700; }


.tab.is-active .tab__ic {
  background: linear-gradient(135deg, rgba(109,94,252,.24), rgba(139,92,246,.10));
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.28), 0 6px 16px -6px rgba(109,94,252,.65);
}
.tab.is-active .f { fill: url(#rx-tab-fill); }
.tab.is-active .tab__ic::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  animation: rxTabRing 3s 1.2s ease-out infinite;
}
@keyframes rxTabRing {
  0%        { box-shadow: 0 0 0 0 rgba(139,92,246,.42); }
  60%, 100% { box-shadow: 0 0 0 9px rgba(139,92,246,0); }
}

.tab.is-active svg { animation: rxTabPop .6s cubic-bezier(.34,1.56,.64,1) both; }
.tab.is-tapped svg { animation: rxTabPop .45s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes rxTabPop {
  0%   { transform: scale(.55) translateY(5px); opacity: .3; }
  60%  { transform: scale(1.14) translateY(-1px); opacity: 1; }
  100% { transform: none; }
}


.tab--dashboard.is-active .p-roof { animation: rxRoof .65s .12s cubic-bezier(.34,1.56,.64,1) both; }
.tab--dashboard.is-active .p-door { animation: rxDoor 3.4s .9s ease-in-out infinite; }
@keyframes rxRoof { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rxDoor { 0%, 100% { fill: transparent; } 50% { fill: rgba(251,191,36,.9); } }


.tab--exams .p-check { stroke-dasharray: 12; stroke-dashoffset: 0; }
.tab--exams.is-active .p-check { animation: rxDraw .7s .3s ease-out both; }
.tab--exams.is-active .p-sheet { animation: rxNod 4.2s 1.4s ease-in-out infinite; }
@keyframes rxDraw { from { stroke-dashoffset: 12; } to { stroke-dashoffset: 0; } }
@keyframes rxNod { 0%, 82%, 100% { transform: none; } 88% { transform: rotate(-7deg); } 94% { transform: rotate(4deg); } }


.tab--library .p-ribbon { transform-origin: top center; }
.tab--library.is-active .p-ribbon { animation: rxRibbon .7s .2s cubic-bezier(.34,1.56,.64,1) both, rxTug 4s 1.6s ease-in-out infinite; }
@keyframes rxRibbon { from { transform: scaleY(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rxTug { 0%, 84%, 100% { transform: none; } 90% { transform: scaleY(1.22); } }


.tab--community svg { stroke: url(#nx-grad); }
.tab--community .p-bolt { animation: rxBolt 5.5s 2.5s ease-in-out infinite; }
.tab--community.is-active .f { fill: url(#rx-hive-fill); }
.tab--community.is-active .tab__ic {
  background: linear-gradient(135deg, rgba(124,109,245,.24), rgba(255,77,140,.16));
  box-shadow: inset 0 0 0 1px rgba(255,77,140,.25), 0 6px 16px -6px rgba(255,77,140,.55);
}
.tab--community.is-active svg { filter: drop-shadow(0 0 5px rgba(255,77,140,.45)); }
.tab--community.is-active .tab__label {
  background: linear-gradient(90deg, #7c6df5, #ff4d8c);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800;
}
@keyframes rxBolt {
  0%, 84%, 100% { opacity: 1; transform: none; }
  87% { opacity: .2; transform: scale(.82); }
  90% { opacity: 1; transform: scale(1.22); }
  93% { opacity: .45; }
  96% { opacity: 1; transform: none; }
}


.tab--lectures.is-active .p-play { fill: currentColor; animation: rxPlay 1.9s .6s ease-in-out infinite; }
@keyframes rxPlay { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.28); } }


.tab__live {
  position: absolute; top: -9px; right: -12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 5px 2px 4px; border-radius: 7px;
  background: linear-gradient(135deg, #ef4444, #f43f5e); color: #fff;
  font-size: 8px; font-weight: 800; letter-spacing: .08em; line-height: 1;
  box-shadow: 0 0 0 2px var(--color-bg), 0 4px 10px -2px rgba(239,68,68,.7);
  pointer-events: none; animation: rxLiveBob 2s ease-in-out infinite;
}
.tab__live[hidden] { display: none; }
.tab__live i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: rxBlink 1.1s ease-in-out infinite; }
.tab.is-live .tab__ic::before {
  content: ''; position: absolute; inset: -2px; border-radius: 17px; pointer-events: none;
  border: 1.5px solid rgba(239,68,68,.6); animation: rxLiveRing 1.6s ease-out infinite;
}
.tab.is-live .tab__label { color: #f43f5e; -webkit-text-fill-color: #f43f5e; font-weight: 800; }
@keyframes rxBlink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes rxLiveBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes rxLiveRing { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tab *, .tab *::before, .tab *::after { animation: none !important; }
}


.tabbar--actions { border-top: 1px solid var(--color-stroke); }
.tabbar--actions .btn { margin: 0 8px; }



.pbar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  overflow: hidden;
}
.pbar__fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
}



.ring {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto;
}
.ring svg { transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: var(--color-surface-2); stroke-width: 12; }
.ring__fg {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease);
}
.ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring__value { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-bold); }
.ring__sub   { font-size: var(--text-xs); color: var(--color-muted); }



.opt {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
  margin-bottom: 11px;
  transition: var(--transition-fast);
}
.opt:hover { border-color: var(--color-stroke-2); }
.opt.is-selected { background: var(--color-primary-soft); border-color: var(--color-primary); }
.opt__key {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--color-stroke);
  display: grid;
  place-items: center;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.opt.is-selected .opt__key { background: var(--gradient-brand); border-color: transparent; color: #fff; }
.opt span:last-child { font-size: var(--text-base); }



.palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.pcell {
  aspect-ratio: 1;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  border: 1px solid var(--color-stroke);
  background: var(--color-surface);
}
.pcell--answered { background: var(--color-success-soft); border-color: var(--color-success); color: var(--color-success); }
.pcell--marked   { background: rgba(139, 92, 246, .18); border-color: var(--color-primary-2); color: var(--color-primary-2); }
.pcell--current  { background: var(--gradient-brand); border-color: transparent; color: #fff; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.legend > div { display: flex; align-items: center; gap: 7px; font-size: var(--text-xs); color: var(--color-muted); }
.legend__dot { width: 11px; height: 11px; border-radius: 4px; }



.otp {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 18px;
}
.otp input {
  width: 46px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: var(--weight-semibold);
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
  border-radius: 13px;
  color: var(--color-text);
}
.otp input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}



.avatar {
  width: 84px;
  height: 84px;
  border-radius: 26px;
  background: var(--gradient-brand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 30px;
  color: #fff;
  margin: 0 auto;
  box-shadow: var(--shadow-brand);
}



.timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary-2);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}



.or {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-muted-2);
  font-size: 13px;
  margin: 18px 0;
}
.or::before, .or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-stroke);
}



.feature {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.feature__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--color-primary-soft);
  color: var(--color-primary-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}



.note {
  background: var(--color-surface);
  border: 1px solid var(--color-stroke);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
}
.note h4 { font-family: var(--font-display); font-size: 16px; margin-bottom: 8px; }
.note--correct { border-color: rgba(52, 211, 153, .3); }

.code {
  background: #05050f;
  border: 1px solid var(--color-stroke);
  border-radius: 12px;
  padding: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: #a5b4fc;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}



.check {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--color-success-soft);
  display: grid;
  place-items: center;
  margin: 0 auto;
}
.check svg { width: 48px; height: 48px; color: var(--color-success); }
.check--glow { box-shadow: 0 0 60px 0 rgba(52, 211, 153, .4); }



.scikb { display:none; background:var(--color-bg-2); border:1px solid var(--color-stroke);
  border-radius:var(--radius-md); padding:12px; margin-top:12px; }
.scikb.open { display:block; }
.scikb__tabs { display:flex; gap:8px; margin-bottom:10px; overflow-x:auto; }
.scikb__tab { flex-shrink:0; padding:7px 13px; border-radius:var(--radius-pill);
  border:1px solid var(--color-stroke); background:var(--color-surface);
  font-size:12px; color:var(--color-muted); }
.scikb__tab.is-active { background:var(--gradient-brand); color:#fff; border-color:transparent; }
.scikb__grid { display:grid; grid-template-columns:repeat(6,1fr); gap:6px; }
.scikb__key { padding:11px 0; border:1px solid var(--color-stroke); border-radius:10px;
  background:var(--color-surface); font-size:14px; color:var(--color-text); }
.scikb__key:active { background:var(--color-primary-soft); }
.eqn-preview { background:var(--color-surface); border:1px solid var(--color-stroke);
  border-radius:12px; padding:16px; min-height:54px; margin-top:10px; overflow-x:auto;
  color:var(--color-text); }


.calc-display { background:var(--color-surface-2); border:1px solid var(--color-stroke);
  border-radius:18px; padding:18px; text-align:right; }
.calc-expr { font-family:ui-monospace,monospace; font-size:15px; color:var(--color-muted);
  min-height:20px; word-break:break-all; }
.calc-result { font-family:var(--font-display); font-size:30px; font-weight:700;
  margin-top:6px; word-break:break-all; }
.calc-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-top:12px; }
.calc-key { padding:15px 0; border-radius:12px; border:1px solid var(--color-stroke);
  background:var(--color-surface); font-size:15px; color:var(--color-text); }
.calc-key:active { transform:scale(.96); }
.calc-key--op { background:var(--color-primary-soft); color:var(--color-primary-2); }
.calc-key--eq { background:var(--gradient-brand); color:#fff; }
.calc-key--fn { font-size:12px; color:var(--color-muted); }
.calc-key--wide { grid-column:span 2; }


.theme-toggle { width:40px; height:40px; border-radius:12px; border:1px solid var(--color-stroke);
  background:var(--color-surface); color:var(--color-text); display:grid; place-items:center; flex-shrink:0; }
.theme-toggle:active { transform:scale(.94); }
.theme-toggle--fixed { position:absolute; top:16px; right:16px; z-index:50; }


.empty { text-align:center; padding:40px 20px; color:var(--color-muted); }
.empty__icon { font-size:40px; margin-bottom:12px; }
.empty p { font-size:14px; }



.toast-stack { position:fixed; top:max(14px, env(safe-area-inset-top)); left:50%; transform:translateX(-50%);
  z-index:9999; display:flex; flex-direction:column; gap:8px;
  width:calc(100% - 28px); max-width:400px; pointer-events:none; }
.toast { background:var(--msg-info-bg); border:1px solid var(--msg-info-line); border-left-width:5px;
  border-radius:14px; padding:14px 14px 14px 14px; display:flex; align-items:flex-start;
  gap:12px; box-shadow:0 14px 40px -8px rgba(0,0,0,.45); pointer-events:all;
  animation:toast-in .22s ease; }
.toast--error  { background:var(--msg-error-bg); border-color:var(--msg-error-line); }
.toast--success{ background:var(--msg-ok-bg);    border-color:var(--msg-ok-line); }
.toast--info   { background:var(--msg-info-bg);  border-color:var(--msg-info-line); }
.toast__icon { font-size:18px; flex-shrink:0; margin-top:1px; }
.toast__body { flex:1; min-width:0; }
.toast__title { font-size:14px; font-weight:700; color:var(--color-text); }
.toast--error .toast__title { color:var(--msg-error-line); }
.toast__msg { font-size:14px; font-weight:500; color:var(--color-text); margin-top:3px; line-height:1.45;
  word-break:break-word; }
.toast--error .toast__msg { color:var(--msg-error-ink); }
.toast__close { font-size:16px; color:var(--color-muted); flex-shrink:0;
  cursor:pointer; padding:2px 4px; line-height:1; }
@keyframes toast-in  { from{opacity:0;transform:translateY(-14px)} to{opacity:1;transform:translateY(0)} }
@keyframes toast-out { to  {opacity:0;transform:translateY(-14px)} }
.toast.is-out { animation:toast-out .2s ease forwards; }
