:root {
  --bg: #f4f8fb;
  --paper: #fff;
  --ink: #0f2430;
  --muted: #4a6270;
  --line: #d5e3ea;
  --blue: #1f6feb;
  --blue-deep: #0b4db8;
  --teal: #1aa6a0;
  --green: #3d9a6a;
  --shadow: 0 18px 50px rgba(15, 36, 48, 0.08);
  --nav-h: 60px;
  --dock-h: 72px;
  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 90% -10%, rgba(31, 111, 235, 0.10), transparent 60%),
    radial-gradient(700px 400px at -10% 20%, rgba(26, 166, 160, 0.10), transparent 55%),
    var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, .btn { font: inherit; cursor: pointer; border: 0; }
.wrap { width: min(1080px, calc(100% - 2rem)); margin-inline: auto; }
.wrap-chat { width: min(1180px, calc(100% - 1rem)); }

.nav {
  position: sticky; top: 0; z-index: 20; height: var(--nav-h);
  display: flex; align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(244, 248, 251, 0.88);
  border-bottom: 1px solid rgba(213, 227, 234, 0.7);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: min(1080px, calc(100% - 2rem)); margin-inline: auto;
}
body.edu-chat .nav-in { width: min(1180px, calc(100% - 1rem)); }
body.edu-chat .brand { flex: 1; }
.brand {
  display: inline-flex; align-items: baseline; flex-wrap: wrap;
  gap: 0.28rem 0.4rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink); line-height: 1.1; max-width: min(380px, 52vw);
}
.brand em { font-style: normal; color: var(--blue); }
.brand .brand-edu {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); font-weight: 650; margin-left: 0.05rem;
}
.brand .brand-lab {
  flex-basis: 100%; font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase; color: #7a93a3; margin: 0;
}
@media (max-width: 640px) {
  .brand .brand-lab { display: none; }
  .brand { max-width: 46vw; }
}
.nav-meta { display: flex; align-items: center; gap: 0.55rem; font-size: 0.82rem; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.home-nav-tools.nav-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  margin-left: auto;
}

/* Language flags — top right (lt en ru pl ua) */
.edu-lang-switch {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
}
.edu-lang-switch .flag-circle {
  width: 22px; height: 22px; min-width: 22px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(15, 36, 48, 0.16); background: #fff;
  display: inline-grid; place-items: center; overflow: hidden; cursor: pointer;
  opacity: 0.78; transition: transform .15s var(--ease), opacity .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.edu-lang-switch .flag-circle:hover { opacity: 1; transform: scale(1.08); border-color: rgba(31, 111, 235, 0.45); }
.edu-lang-switch .flag-circle.is-on {
  opacity: 1; border-color: rgba(31, 111, 235, 0.75);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.18);
}
.edu-lang-switch .flag {
  width: 100%; height: 100%; display: block; border-radius: 50%; position: relative;
}
.flag-lt { background: linear-gradient(180deg, #fdb913 0 33%, #006a44 33% 66%, #c1272d 66% 100%); }
.flag-en { background: #012169; }
.flag-en::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom right, transparent 44%, #fff 44% 56%, transparent 56%),
    linear-gradient(to top right, transparent 44%, #fff 44% 56%, transparent 56%),
    linear-gradient(#fff, #fff) center/100% 18% no-repeat,
    linear-gradient(#fff, #fff) center/18% 100% no-repeat;
}
.flag-en::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom right, transparent 46.5%, #c8102e 46.5% 53.5%, transparent 53.5%),
    linear-gradient(to top right, transparent 46.5%, #c8102e 46.5% 53.5%, transparent 53.5%),
    linear-gradient(#c8102e, #c8102e) center/100% 10% no-repeat,
    linear-gradient(#c8102e, #c8102e) center/10% 100% no-repeat;
}
.flag-ru { background: linear-gradient(180deg, #fff 0 33%, #0039a6 33% 66%, #d52b1e 66% 100%); }
.flag-pl { background: linear-gradient(180deg, #fff 0 50%, #dc143c 50% 100%); }
.flag-ua { background: linear-gradient(180deg, #0057b7 0 50%, #ffd700 50% 100%); }
@media (max-width: 640px) {
  .edu-lang-switch { gap: 3px; }
  .edu-lang-switch .flag-circle { width: 20px; height: 20px; min-width: 20px; }
}
#userChip {
  display: inline-flex; align-items: center; gap: 0.35rem; position: relative;
}
.wallet-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.28rem 0.7rem; font-weight: 700; color: var(--ink); font-size: 0.82rem;
  box-shadow: 0 8px 18px rgba(15, 36, 48, 0.04);
}
.wallet-pill:hover { border-color: #b9d0ea; }
.wallet-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); display: inline-block; }
.edu-icon-soft {
  width: 36px; height: 36px; border: 0; border-radius: 12px;
  background: transparent; color: #6b728a;
  display: grid; place-items: center; cursor: pointer; text-decoration: none;
  position: relative; flex: none;
}
.edu-icon-soft:hover { background: rgba(15, 36, 48, 0.05); color: var(--ink); }
.edu-wa:hover { background: #ecfdf5; }
.edu-bell-dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px #fff;
}
.edu-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--blue); color: #fff; display: grid; place-items: center;
  text-decoration: none; box-shadow: 0 6px 14px rgba(31, 111, 235, 0.28);
}
.edu-avatar:hover { background: var(--blue-deep); }
.edu-bell-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: min(260px, 78vw); padding: 0.85rem 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 36, 48, 0.12);
}
.edu-bell-pop strong { display: block; font-size: 0.88rem; color: var(--ink); }
.edu-bell-pop p { margin: 0.35rem 0 0; font-size: 0.8rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55rem 1rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: transparent; color: var(--muted); }
.btn-send {
  width: 44px; height: 44px; border-radius: 14px; padding: 0;
  background: var(--blue); color: #fff; flex: none;
}
.btn-send:hover { background: var(--blue-deep); }
.btn-send svg { width: 18px; height: 18px; }
.btn-mic {
  width: 44px; height: 44px; border-radius: 14px; padding: 0;
  background: #eef3f8; color: #2a3a50; border: 1px solid var(--line); flex: none;
}
.btn-mic:hover { background: #e4ebf4; color: var(--blue); border-color: #c9daf5; }
.btn-mic svg { width: 18px; height: 18px; }
.btn-mic.is-listening {
  background: #fee2e2; color: #b42318; border-color: #f3b4b0;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
  animation: edu-mic-pulse 1.2s ease-in-out infinite;
}
.btn-mic.is-disabled, .btn-mic:disabled {
  opacity: 0.45; cursor: not-allowed;
}
@keyframes edu-mic-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

h1, h2, .serif { font-family: "Fraunces", serif; }
.kicker {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 0.4rem;
}
.hero-mini { padding: 1.6rem 0 1.2rem; }
.hero-mini h1 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.02em; }
.hero-mini p { color: var(--muted); margin-top: 0.45rem; max-width: 48ch; }
.hero-mini .hero-lead { margin-bottom: 0.85rem; }
.hero-features {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.45rem; max-width: 36rem;
}
.hero-features li {
  display: grid; gap: 0.1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  font-size: 0.84rem;
}
.hero-features li strong {
  font-size: 0.82rem; font-weight: 700; color: var(--ink);
}
.hero-features li span {
  color: var(--muted); font-size: 0.78rem; line-height: 1.35;
}

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.2rem; box-shadow: var(--shadow);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.card p, .muted { color: var(--muted); font-size: 0.9rem; }
a.card:hover { border-color: rgba(31, 111, 235, 0.35); transform: translateY(-2px); }

.form { display: grid; gap: 0.7rem; margin-top: 1rem; }
.remember-row {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.84rem; font-weight: 500; color: var(--muted);
  margin: 0.1rem 0 0.2rem; cursor: pointer; user-select: none;
}
.remember-row input[type="checkbox"] {
  width: 1rem; height: 1rem; margin: 0; padding: 0; flex: none;
  accent-color: var(--blue); cursor: pointer;
}
.remember-row span { line-height: 1.35; }
label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
input, textarea, select {
  width: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--line);
  border-radius: 12px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.8rem; }
.crumb a { color: var(--blue); }
.banner {
  background: linear-gradient(135deg, #eef6f4, #eef4fb);
  border: 1px solid #cfe6e2; border-radius: 14px;
  padding: 0.85rem 1rem; font-size: 0.88rem; color: var(--muted); margin: 1rem 0;
}
.err { color: #b42318; font-size: 0.88rem; min-height: 1.2em; }
.split { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 880px) {
  .split-2 { grid-template-columns: 1.1fr 0.9fr; }
  .split-chat { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
}

.chat, .chat-shell {
  background: var(--paper); border: 1px solid var(--line); border-radius: 22px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow);
}
.chat-workspace {
  position: relative;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 0.7rem;
  height: calc(100dvh - var(--nav-h) - var(--dock-h) - env(safe-area-inset-bottom, 0px) - 0.75rem);
  min-height: 420px;
  margin: 0.5rem 0 0;
}
.chat-rail {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.chat-rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line);
}
.chat-rail-head h2 { font-size: 0.92rem; font-weight: 700; }
.chat-rail-head small { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 600; margin-top: 0.1rem; }
.btn-new {
  flex: none; border-radius: 999px; padding: 0.35rem 0.7rem;
  background: var(--blue); color: #fff; font-size: 0.72rem; font-weight: 700;
}
.btn-new:hover { background: var(--blue-deep); }
.chat-thread-list { flex: 1; overflow-y: auto; padding: 0.45rem; }
.chat-thread-item {
  width: 100%; text-align: left; background: transparent;
  border: 1px solid transparent; border-radius: 14px;
  padding: 0.7rem 0.75rem; margin-bottom: 0.25rem; color: var(--ink);
}
.chat-thread-item:hover { background: #eef4f8; }
.chat-thread-item.is-on { background: #e8f0fe; border-color: #c9daf5; }
.chat-thread-item .t-title {
  font-weight: 700; font-size: 0.84rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-thread-item .t-meta {
  display: flex; justify-content: space-between; gap: 0.5rem; align-items: center;
  margin-top: 0.28rem; font-size: 0.7rem; color: var(--muted);
}
.chat-thread-item .t-created { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-item .t-meta-right {
  display: inline-flex; align-items: center; gap: 0.4rem; flex: none; white-space: nowrap;
}
.chat-thread-item .t-class {
  margin-top: 0.2rem; font-size: 0.72rem; font-weight: 700; color: var(--teal);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-thread-item .t-pend { color: #8a692f; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.chat-rail-empty { padding: 1rem 0.8rem; color: var(--muted); font-size: 0.82rem; }
.chat-scrim { display: none; }
.btn-rail {
  display: none; width: 38px; height: 38px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); align-items: center; justify-content: center;
}
.btn-rail span { display: block; width: 16px; height: 1.6px; background: var(--ink); margin: 3px 0; border-radius: 2px; }
.chat-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.7rem 1rem 0.55rem; border-bottom: 0; background: #fbfcfd;
}
.chat-who { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.chat-who-mark {
  width: 36px; height: 36px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--blue), var(--teal));
  color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
}
.chat-who strong { font-size: 0.92rem; display: block; }
.chat-who em {
  display: block; font-style: normal; color: var(--muted); font-size: 0.72rem; font-weight: 500;
}
.chat-title-row {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  padding: 0 0.85rem 0.65rem; border-bottom: 1px solid var(--line); background: #fbfcfd;
}
.chat-title-row input {
  border: 1px solid transparent; background: transparent; border-radius: 10px;
  padding: 0.28rem 0.45rem; font-weight: 700; font-size: 0.9rem; color: var(--ink);
  flex: 1 1 140px; min-width: 120px;
}
.chat-title-row input:hover { border-color: var(--line); background: #fff; }
.chat-title-row input:focus {
  outline: 0; border-color: #b9d0ea; background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}
.chat-title-row .hint { color: var(--muted); font-size: 0.68rem; white-space: nowrap; }
.chat-class-bind {
  display: flex; align-items: center; gap: 0.4rem; flex: 1 1 180px; justify-content: flex-end;
}
.chat-class-bind select {
  width: auto; min-width: 160px; max-width: 220px; padding: 0.35rem 0.55rem;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 0.78rem; font-weight: 600; color: var(--ink);
}
.class-chip {
  font-size: 0.7rem; font-weight: 700; color: var(--teal);
  background: #eef8f6; border: 1px solid #cfe6e2; border-radius: 999px;
  padding: 0.22rem 0.55rem; white-space: nowrap;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.chat-shell {
  height: 100%;
  min-height: 0;
  margin: 0;
}
@media (max-width: 860px) {
  .btn-rail { display: inline-flex; flex-direction: column; }
  .chat-workspace { grid-template-columns: 1fr; }
  .chat-rail {
    position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 300px);
    z-index: 16; transform: translateX(-110%); transition: transform .22s var(--ease);
  }
  .chat-workspace.rail-open .chat-rail { transform: none; }
  .chat-scrim {
    display: none; position: absolute; inset: 0; background: rgba(15, 36, 48, 0.28); z-index: 15;
  }
  .chat-workspace.rail-open .chat-scrim { display: block; }
  .chat-title-row .hint { display: none; }
}
.chat-log {
  flex: 1; overflow-y: auto; padding: 1.1rem 1rem 0.6rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.chat-empty {
  margin: auto; text-align: center; max-width: 28ch; padding: 1.5rem 0.5rem;
}
.chat-empty h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.4rem; }
.chat-empty p { color: var(--muted); font-size: 0.92rem; }
.msg {
  padding: 0.75rem 0.95rem; border-radius: 16px; font-size: 0.94rem;
  white-space: pre-wrap; max-width: 86%; line-height: 1.45;
}
.msg.user { background: #e8f0fe; margin-left: auto; border-bottom-right-radius: 6px; }
.msg.assistant {
  background: #f3f7f6; margin-right: auto; border-bottom-left-radius: 6px;
  border: 1px solid #e2ebe8;
}
.msg.system { background: #eef6f4; color: var(--muted); font-size: 0.86rem; max-width: 100%; }
.msg .who { font-size: 0.7rem; font-weight: 700; color: var(--muted); margin-bottom: 0.22rem; letter-spacing: 0.02em; }
.msg .msg-body { white-space: pre-wrap; }
.msg-actions {
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
  margin-top: 0.65rem; padding-top: 0.55rem;
  border-top: 1px solid rgba(15, 40, 35, 0.08);
}
.msg-act {
  appearance: none; border: 1px solid #d7e0dd; background: #f7faf9;
  color: #2a3a36; font: inherit; font-size: 0.72rem; font-weight: 650;
  padding: 0.28rem 0.65rem; border-radius: 999px; cursor: pointer;
  line-height: 1.2;
}
.msg-act:hover { background: #eef4f2; border-color: #c5d4cf; }
.msg-act.is-speaking {
  background: #e8f0fe; border-color: #b7cef5; color: var(--blue);
}
.msg-act.is-loading { opacity: 0.65; cursor: wait; }
.msg-act.is-disabled, .msg-act:disabled {
  opacity: 0.45; cursor: not-allowed;
}
.msg-act-icon {
  width: 1.85rem; height: 1.85rem; padding: 0;
  display: inline-grid; place-items: center; border-radius: 999px;
}
.msg-act-icon svg { display: block; }
.chat-status { font-size: 0.75rem; color: var(--muted); padding: 0 1rem 0.35rem; min-height: 1.1em; }
.prem-wrap {
  padding: 0 0.75rem 0.15rem;
  background: #fbfcfd;
  border-top: 1px solid var(--line);
}
.prem-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.45rem 0.1rem 0.35rem;
}
.prem-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
  flex: 1; min-width: 0; background: transparent; color: var(--ink);
  font-size: 0.82rem; font-weight: 700; text-align: left; padding: 0.15rem 0;
}
.prem-toggle small { color: var(--muted); font-weight: 600; }
.prem-toggle i {
  width: 28px; height: 28px; border-radius: 999px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: #fff; font-style: normal; font-size: 0.85rem;
  color: var(--muted);
}
.prem-toggle.is-open i { color: var(--blue); border-color: #c9daf5; background: #eef4ff; }
.prem-badge {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  background: #e7f6ee; border: 1px solid #b7e0c6; color: #1f6b45; flex: none;
}
.id-ladder {
  list-style: none; margin: 0 0 1rem; padding: 0;
  display: grid; gap: 0.35rem;
}
.id-ladder li {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline;
  padding: 0.4rem 0.55rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fafbfc;
  font-size: 0.8rem;
}
.id-ladder li span { color: var(--muted); text-align: right; }
.id-ladder li.is-on {
  border-color: #b7e0c6; background: #f3fbf6;
}
.id-ladder li.is-on b { color: #1f6b45; }
.prem-panel { padding: 0 0 0.65rem; }
.prem-grid {
  display: grid; gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.prem-panel label {
  display: grid; gap: 0.22rem; font-size: 0.72rem; font-weight: 700; color: var(--muted);
}
.prem-panel input, .prem-panel select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.5rem 0.65rem; background: #fff; color: var(--ink); font: inherit; font-size: 0.86rem;
}
.prem-panel input:disabled { background: #f3f6f8; color: var(--muted); }
.prem-other { margin-top: 0.5rem; }
.prem-actions {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.65rem;
}
.prem-actions .muted { font-size: 0.74rem; margin: 0; }
#premErr { margin-top: 0.35rem; font-size: 0.78rem; }
@media (max-width: 700px) {
  .prem-grid { grid-template-columns: 1fr; }
  .prem-toggle { font-size: 0.76rem; }
}
.chat-compose {
  display: flex; gap: 0.5rem; align-items: flex-end;
  padding: 0.7rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: #fbfcfd;
}
.chat-compose textarea {
  min-height: 44px; max-height: 160px; resize: none; border-radius: 14px;
  padding: 0.7rem 0.85rem; line-height: 1.4;
}

.file-list { list-style: none; display: grid; gap: 0.65rem; margin-top: 0.85rem; }
.file-list a { color: var(--blue); font-size: 0.88rem; }
.file-row {
  display: grid; gap: 0.45rem; padding: 0.65rem 0.75rem;
  border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd;
}
.file-main { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.35rem; }
.file-classify {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.45rem;
}
.file-classify select,
.file-up-meta select {
  width: 100%; font-size: 0.82rem; padding: 0.4rem 0.55rem;
}
.file-up-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.55rem;
  margin: 0.55rem 0 0.75rem;
}
.file-tag {
  display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 650;
  padding: 0.2rem 0.5rem; border-radius: 999px; background: #eef3f8; color: var(--muted);
}
.code-pill {
  font-family: ui-monospace, monospace; background: #eef4fb; padding: 0.2rem 0.55rem;
  border-radius: 8px; letter-spacing: 0.08em; font-weight: 700;
}
.slot-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 650; padding: 0.22rem 0.65rem 0.22rem 0.5rem;
  border-radius: 999px; border: 1px solid var(--line); color: var(--ink);
}
.slot-chip .slot-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #9aa3af; box-shadow: 0 0 0 2px rgba(154, 163, 175, 0.25);
}
.slot-chip.on { background: #e7f6ee; border-color: #b7e0c6; }
.slot-chip.on .slot-dot { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.22); }
.slot-chip.off { background: #f4f6f8; border-color: #d8dee6; color: #5b6572; }
.slot-chip.off .slot-dot { background: #9aa3af; box-shadow: 0 0 0 2px rgba(154, 163, 175, 0.2); }
.set-pills {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 0 0 1.1rem; padding: 0.22rem; width: fit-content;
  background: #eef4f8; border-radius: 999px;
}
.set-pills a {
  padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700;
  color: var(--muted);
}
.set-pills a.is-on { background: var(--blue); color: #fff; }
.set-pane { padding-bottom: 2rem; }
.btn-tiny { padding: 0.2rem 0.55rem; font-size: 0.75rem; }
.roster-stack { display: grid; gap: 1rem; }
.roster-title {
  font-weight: 700; font-size: 1.05rem; border: 1px solid transparent;
  padding: 0.25rem 0.4rem; border-radius: 10px; max-width: 16rem;
}
.roster-title:hover, .roster-title:focus { border-color: var(--line); background: #fff; }
.roster-scroll { overflow-x: auto; }
.roster-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
.roster-table th {
  text-align: left; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--line);
}
.roster-table td { padding: 0.4rem; border-bottom: 1px solid #eef3f6; vertical-align: top; }
.roster-char { max-width: 220px; color: var(--muted); font-size: 0.82rem; }
.roster-fields {
  display: grid; gap: 0.55rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.roster-fields label, .js-padd > label {
  display: grid; gap: 0.28rem; font-size: 0.8rem; font-weight: 600; color: var(--muted);
}
.js-padd textarea { min-height: 96px; }
.file-list .btn-tiny { margin-left: 0.4rem; }
.stat { font-family: "Fraunces", serif; font-size: 1.8rem; font-weight: 600; letter-spacing: -0.03em; }

/* Piniginė — operacijos + Stripe pay */
.edu-tx { list-style: none; margin-top: 0.85rem; display: grid; gap: 0.55rem; }
.edu-tx li {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem;
}
.edu-tx li:last-child { border-bottom: 0; }
.edu-tx small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; font-weight: 500; }
.edu-tx .tx-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.edu-tx .tx-amt.plus { color: var(--green); }
.edu-tx .tx-amt.minus { color: #b42318; }
.edu-pay-wrap {
  display: grid; grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 1rem; padding: 1.2rem 0 2.5rem; align-items: start;
}
.edu-pay-left h1 { font-family: "Fraunces", serif; font-size: 1.55rem; margin: 0.2rem 0 0.6rem; }
.edu-pay-meta { margin: 1rem 0 1.2rem; display: grid; gap: 0.7rem; }
.edu-pay-meta dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.edu-pay-meta dd { font-size: 0.92rem; margin-top: 0.15rem; word-break: break-word; }
.edu-pay-mount { margin-top: 1rem; min-height: 120px; }
@media (max-width: 820px) {
  .edu-pay-wrap { grid-template-columns: 1fr; }
}

footer.note { padding: 2rem 0 1rem; font-size: 0.8rem; color: var(--muted); }
.hidden { display: none !important; }
.wrap-narrow { width: min(440px, calc(100% - 2rem)); }
.seg {
  display: flex; gap: 0.3rem; background: #eef4f8; padding: 0.22rem;
  border-radius: 999px; width: fit-content;
}
body.edu-chat { height: 100dvh; overflow: hidden; }
body.edu-chat.edu-has-dock { padding-bottom: 0; }

/* —— Dienos LIVE mokslinė suvestinė (Mokykla) —— */
.day-hero-top {
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap;
}
.day-hero-actions { display: flex; align-items: center; gap: 0.45rem; }
.day-lead { margin-top: 0.35rem; color: var(--ink); font-weight: 600; }
.day-card { margin-bottom: 0.85rem; }
.day-card h3 { margin: 0.15rem 0 0.85rem; font-size: 1.15rem; }
.day-meta-grid, .day-lunar {
  display: grid; gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.day-meta-grid > div, .day-lunar > div {
  background: #f5f8fb; border: 1px solid var(--line); border-radius: 12px; padding: 0.65rem 0.75rem;
}
.day-meta-grid span, .day-lunar span {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem;
}
.day-meta-grid strong, .day-lunar strong { font-size: 0.92rem; font-weight: 650; color: var(--ink); }
.day-table-wrap { overflow-x: auto; }
.day-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.day-table th, .day-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid #eef3f6; text-align: left; }
.day-table th[scope="row"] {
  width: 38%; color: var(--muted); font-weight: 650; font-size: 0.8rem;
}
.day-table-planets .num { font-variant-numeric: tabular-nums; font-family: ui-monospace, monospace; font-size: 0.82rem; }
.day-tag {
  display: inline-block; font-size: 0.65rem; font-weight: 800; padding: 0.05rem 0.35rem;
  border-radius: 6px; background: #f3e8d8; color: #8a5a20; vertical-align: middle;
}
.day-kpis { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.day-kpi {
  display: inline-flex; flex-direction: column; gap: 0.15rem; min-width: 110px;
  padding: 0.65rem 0.8rem; border-radius: 14px; border: 1px solid #b7e0c6; background: #e7f6ee;
}
.day-kpi b { font-size: 1rem; }
.day-kpi small { color: var(--muted); font-size: 0.72rem; font-weight: 650; }
.day-kpi .slot-dot { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.22); margin-bottom: 0.15rem; }
.day-summary { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; color: var(--ink); font-size: 0.9rem; }
.day-mods { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.85rem; }
.day-mod {
  font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: #f4f6f8; color: var(--muted); text-transform: uppercase;
}
.day-mod.on { background: #e7f6ee; border-color: #b7e0c6; color: #1f6b45; }
.day-loading { padding: 1.2rem; }


/* —— Mokslo metų kalendorius + layeriai —— */
.sy-card { overflow: hidden; }
.sy-today {
  min-width: 160px; padding: 0.75rem 0.9rem; border-radius: 14px;
  border: 1px solid var(--line); background: #f5f8fb; text-align: right;
}
.sy-today span { display:block; font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.sy-today strong { display:block; margin-top:.2rem; font-size:.95rem; }
.sy-today small { color:var(--muted); font-size:.78rem; }
.sy-today.is-holiday { background:#e8f7f5; border-color:#b7e4df; }
.sy-today.is-teaching { background:#eef6ff; border-color:#c5d9f5; }
.sy-layers { display:flex; flex-wrap:wrap; gap:.45rem; margin:1rem 0 1.1rem; }
.sy-layer-chip {
  border:1px solid var(--line); background:#fff; color:var(--muted);
  border-radius:999px; padding:.35rem .85rem; font-size:.8rem; font-weight:700;
}
.sy-layer-chip.is-on { background:var(--teal); border-color:var(--teal); color:#fff; }
.sy-months {
  display:grid; gap:1rem;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
}
.sy-month {
  background:#f8fbfd; border:1px solid var(--line); border-radius:16px; padding:.85rem .8rem 1rem;
}
.sy-month h4 { font-size:.92rem; margin:0 0 .55rem; font-weight:700; }
.sy-dows, .sy-grid {
  display:grid; grid-template-columns:repeat(7, 1fr); gap:3px; text-align:center;
}
.sy-dows span { font-size:.65rem; font-weight:800; color:var(--muted); letter-spacing:.04em; padding:.15rem 0; }
.sy-day {
  aspect-ratio:1; display:flex; align-items:center; justify-content:center;
  border-radius:9px; font-size:.78rem; font-weight:650; color:var(--ink);
  background:#fff; border:1px solid transparent;
}
.sy-day.is-pad { background:transparent; border:0; }
.sy-day.is-out { opacity:.28; }
.sy-day.is-weekend { color:#7a90a0; }
.sy-day.is-holiday { color:#0d5c57; font-weight:800; }
.sy-day.tone-autumn.is-holiday { background:#fff1e4; border-color:#f0d0ad; }
.sy-day.tone-winter.is-holiday { background:#e8f1fb; border-color:#bfd3ef; }
.sy-day.tone-spring.is-holiday { background:#e9f7ef; border-color:#b8e0c8; }
.sy-day.is-today { box-shadow:0 0 0 2px var(--blue); }
.sy-day.layer-hidden.is-holiday {
  background:#fff !important; border-color:transparent !important; color:var(--ink); font-weight:650;
}
.sy-legend { margin-top:1.1rem; padding-top:.9rem; border-top:1px solid var(--line); }
.sy-legend ul { list-style:none; display:grid; gap:.45rem; margin-top:.55rem; }
.sy-legend li { display:flex; gap:.55rem; align-items:flex-start; font-size:.86rem; }
.sy-legend em { font-style:normal; color:var(--muted); font-weight:600; margin-left:.25rem; }
.sy-legend small { color:var(--muted); }
.sy-swatch {
  width:12px; height:12px; border-radius:4px; margin-top:.25rem; flex:0 0 auto;
  border:1px solid var(--line); background:#ddd;
}
.sy-swatch.tone-autumn { background:#f0d0ad; }
.sy-swatch.tone-winter { background:#bfd3ef; }
.sy-swatch.tone-spring { background:#b8e0c8; }

/* MetaCore Edu OS dashboard intro */
.edu-os-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-top:1rem;}
.edu-os-card{background:var(--paper);border:1px solid var(--line);border-radius:22px;padding:1.25rem;box-shadow:var(--shadow);transition:.2s var(--ease);}
.edu-os-card:hover{transform:translateY(-3px);border-color:rgba(31,111,235,.35);}
.edu-os-card span{font-size:.68rem;font-weight:800;letter-spacing:.12em;color:var(--teal);}
.edu-os-card h3{margin:.7rem 0 .45rem;font-size:1.05rem;}
.edu-os-card p{color:var(--muted);font-size:.88rem;}
.edu-os-main{background:linear-gradient(145deg,#eef6ff,#ffffff);border-color:rgba(31,111,235,.25);}
@media(max-width:900px){.edu-os-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:560px){.edu-os-grid{grid-template-columns:1fr;}}

/* Mobile — /live/ nav + LAIKAS layout */
@media (max-width: 640px) {
  .nav-in {
    width: min(1080px, calc(100% - 0.85rem));
    gap: 0.4rem;
  }
  .nav-meta {
    gap: 0.2rem;
    max-width: min(64vw, 250px);
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-meta::-webkit-scrollbar { display: none; }
  .edu-lang-switch { gap: 2px; flex: none; }
  .edu-lang-switch .flag-circle { width: 18px; height: 18px; min-width: 18px; }
  .wallet-pill { padding: 0.22rem 0.52rem; font-size: 0.74rem; white-space: nowrap; }
  .edu-icon-soft { width: 32px; height: 32px; border-radius: 10px; }
  .edu-avatar { width: 30px; height: 30px; }
  .hero-mini { padding: 1rem 0 0.85rem; }
  .hero-mini h1 { font-size: 1.35rem; }
  .day-hero-top { flex-direction: column; align-items: stretch; }
  .sy-today { min-width: 0; width: 100%; text-align: left; margin-top: 0.35rem; }
  .sy-months { grid-template-columns: 1fr; }
  .sy-card { margin-bottom: 0.5rem; }
  .edu-os-grid { margin-top: 0.75rem; }
}

/* ŠMSM LIVE — architecture + charts */
.smsm-arch { overflow: hidden; }
.smsm-arch-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.15rem;
}
.smsm-arch-head h3 { margin: 0.1rem 0 0; }
.smsm-pill {
  flex-shrink: 0; align-self: center;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em;
  color: #fff; background: linear-gradient(135deg, #1f6feb, #1aa6a0);
  box-shadow: 0 8px 20px rgba(31,111,235,.22);
}
.smsm-focus-line { margin: 0.45rem 0 1rem; color: var(--ink); line-height: 1.45; }
.smsm-focus-line strong { color: var(--blue-deep); }
.smsm-arch-note { margin-top: 0.75rem; font-size: 0.78rem; }
.smsm-stage {
  perspective: 1100px;
  padding: 0.4rem 0 0.2rem;
}
.smsm-stage-inner {
  transform: rotateX(12deg) rotateY(-8deg);
  transform-style: preserve-3d;
  display: grid; gap: 0.55rem;
}
.smsm-plane {
  transform: translateZ(var(--z, 18px));
  padding: 0.55rem 0.65rem;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,36,48,.06);
  backdrop-filter: blur(4px);
}
.smsm-plane span {
  display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem;
}
.smsm-rail {
  height: 1px; margin: 0 1.2rem;
  background: linear-gradient(90deg, transparent, rgba(31,111,235,.28), transparent);
}
.smsm-nodes { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.smsm-node {
  position: relative;
  min-width: 92px; padding: 0.55rem 0.7rem; border-radius: 14px;
  border: 1px solid var(--line); background: #fff;
  box-shadow: 0 10px 24px rgba(15,36,48,.06);
  transform: translateZ(12px);
}
.smsm-node b { font-size: 0.82rem; display: block; }
.smsm-node i {
  display: block; margin-top: 0.15rem;
  font-style: normal; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85;
}
.smsm-node.is-edu { background: #f4f7fb; border-color: #c9d7ea; }
.smsm-node.is-sci { background: #eef8f6; border-color: #b7e4df; }
.smsm-node.is-focus {
  background: linear-gradient(145deg, #1f6feb, #1aa6a0);
  border-color: transparent; color: #fff;
  transform: translateZ(42px) scale(1.06);
  box-shadow: 0 16px 36px rgba(31,111,235,.28);
}
.smsm-brief-lines { margin-top: 0.85rem; }
.smsm-kpis .day-kpi { background: #eef6ff; border-color: #c5d9f5; }
.smsm-chart-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 0.4rem;
}
.smsm-chart-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.smsm-chart-top h4 { font-size: 0.92rem; margin: 0; }
.smsm-legend {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em;
}
.smsm-legend span {
  padding: 0.15rem 0.4rem; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted);
}
.smsm-legend .is-on {
  background: rgba(26,166,160,.12); border-color: rgba(26,166,160,.35); color: #0f6b66;
}
.smsm-legend .is-gap {
  background: #eef2f5; color: #6a7a86;
}
.smsm-bars {
  display: flex; align-items: flex-end; gap: 0.35rem; height: 140px;
  padding: 0.35rem 0.2rem 0;
}
.smsm-bar {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.15rem;
}
.smsm-bar-col {
  width: 100%; max-width: 28px; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
}
.smsm-bar.is-gap .smsm-bar-col { background: #d8e2ea; opacity: 0.55; }
.smsm-bar strong { font-size: 0.68rem; font-variant-numeric: tabular-nums; }
.smsm-bar small {
  font-size: 0.62rem; color: var(--muted); text-align: center; line-height: 1.15;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.smsm-branch-list { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.smsm-chips {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin: 0.55rem 0 0; padding: 0;
}
.smsm-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 0.8rem; color: var(--ink);
  box-shadow: 0 4px 12px rgba(15,36,48,.04);
}
.smsm-chip strong { font-weight: 700; }
.smsm-chip span {
  min-width: 1.4rem; text-align: center;
  padding: 0.05rem 0.35rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; font-variant-numeric: tabular-nums;
  background: #eef6ff; color: var(--blue-deep);
}
.smsm-cal-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.35rem 0 0.15rem; padding: 0 0.15rem;
}
.smsm-cal-divider span {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.smsm-cal-divider::before,
.smsm-cal-divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.smsm-section-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.smsm-section-head h3 { margin: 0.1rem 0 0; }
.smsm-lead { margin: 0.35rem 0 0; font-size: 0.82rem; line-height: 1.45; max-width: 42rem; }
.smsm-footnote { margin: 0.35rem 0 0.55rem; font-size: 0.76rem; line-height: 1.45; }
.smsm-pill-soft {
  background: #eef6ff; color: var(--blue-deep);
  box-shadow: none; border: 1px solid #c5d9f5;
}
.smsm-balance {
  display: grid; gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  margin: 0.55rem 0 0.35rem;
}
.smsm-bal-card {
  padding: 0.75rem 0.85rem; border-radius: 14px;
  border: 1px solid var(--line); background: #fff;
  box-shadow: 0 6px 16px rgba(15,36,48,.04);
}
.smsm-bal-card.is-model {
  background: linear-gradient(160deg, #f7fbff, #eef8f6);
  border-color: #c5d9f5;
}
.smsm-bal-card small {
  display: block; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.smsm-bal-card b {
  display: block; margin: 0.25rem 0 0.12rem;
  font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--blue-deep);
}
.smsm-bal-card span { font-size: 0.75rem; color: var(--ink); line-height: 1.3; }
.smsm-stat-strip {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem;
  margin: 0.55rem 0 0.85rem; padding: 0.55rem 0.7rem;
  border-radius: 12px; background: #f4f7fb; border: 1px solid #e2eaf3;
  font-size: 0.78rem; color: var(--ink);
}
.smsm-stat-strip b { font-variant-numeric: tabular-nums; color: var(--blue-deep); margin-right: 0.2rem; }
.smsm-chart-grid-dense {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.smsm-chart {
  padding: 0.7rem 0.75rem 0.55rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.smsm-chart-title { min-width: 0; }
.smsm-chart-meta {
  display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem;
}
.smsm-epi, .smsm-unit {
  display: inline-block; padding: 0.12rem 0.4rem; border-radius: 6px;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.03em;
  text-transform: uppercase; border: 1px solid var(--line); color: var(--muted);
}
.smsm-epi { background: #eef8f6; border-color: #b7e4df; color: #0f6b66; }
.smsm-unit { background: #f4f7fb; }
.smsm-chart-grid-dense { margin-top: 0.15rem; }
.smsm-science { overflow: hidden; }
.smsm-chart-grid-science {
  margin-top: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.smsm-rdi-spotlight {
  margin-top: 0.55rem;
  padding: 1rem 1.05rem 0.85rem;
  border-radius: 16px;
  border: 1px solid #c5d9f5;
  background: linear-gradient(145deg, #f7fbff 0%, #eef8f6 100%);
  box-shadow: 0 10px 28px rgba(31,111,235,.08);
}
.smsm-rdi-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.smsm-rdi-head h4 { margin: 0.15rem 0 0; font-size: 1.05rem; }
.smsm-rdi-metrics {
  display: grid; gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.smsm-rdi-metric {
  padding: 0.75rem 0.85rem; border-radius: 14px;
  border: 1px solid rgba(15,36,48,.08); background: rgba(255,255,255,.82);
}
.smsm-rdi-metric.is-primary {
  background: linear-gradient(145deg, #1f6feb, #1aa6a0);
  border-color: transparent; color: #fff;
}
.smsm-rdi-metric.is-primary b { color: #fff; }
.smsm-rdi-metric.is-primary span,
.smsm-rdi-metric.is-primary small { color: rgba(255,255,255,.88); }
.smsm-rdi-metric.is-muted { background: #f4f7fb; }
.smsm-rdi-metric b {
  display: block; font-size: 1.65rem; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--blue-deep);
}
.smsm-rdi-metric span {
  display: block; margin-top: 0.15rem;
  font-size: 0.78rem; font-weight: 700; color: var(--ink);
}
.smsm-rdi-metric small {
  display: block; margin-top: 0.2rem;
  font-size: 0.68rem; color: var(--muted); line-height: 1.35;
}
.smsm-rdi-note { margin: 0.75rem 0 0; font-size: 0.76rem; line-height: 1.45; }
@media (max-width: 640px) {
  .smsm-stage-inner { transform: none; }
  .smsm-plane { transform: none; background: transparent; border: 0; padding: 0; }
  .smsm-node.is-focus { transform: none; }
  .smsm-bars { height: 120px; }
  .smsm-arch-head, .smsm-section-head { flex-wrap: wrap; }
  .smsm-chart-grid-dense { grid-template-columns: 1fr; }
  .smsm-rdi-metric b { font-size: 1.45rem; }
}

/* Wallet: local + MetaCore bridge (Kiber/Mediatorius pattern) */
.edu-wallet-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.edu-wallet-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}
.edu-wallet-actions .btn { width: 100%; text-align: center; }
.edu-wallet-mc-head {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.edu-wallet-mc-pill {
  display: inline-flex; align-items: center;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  background: var(--blue-deep); color: #fff;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.edu-wallet-mc-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem;
}
.edu-wallet-mc-stats > div {
  background: #f4f7fb; border: 1px solid rgba(15,36,48,.06);
  border-radius: 14px; padding: 0.7rem 0.8rem;
}
.edu-wallet-mc-stats small {
  display: block; font-size: 0.68rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.edu-wallet-mc-stats strong {
  display: block; margin-top: 0.2rem; font-size: 1.15rem;
  font-variant-numeric: tabular-nums; color: var(--blue-deep);
}
.edu-wallet-mc-chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.45rem 0 0.2rem;
}
.edu-wallet-mc-chips button {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 0.32rem 0.75rem;
  font-size: 0.78rem; font-weight: 650;
}
.edu-wallet-mc-chips button:hover {
  border-color: var(--blue); color: var(--blue);
}
.edu-check {
  display: flex; align-items: center; gap: 0.45rem;
  margin: 0.35rem 0 0.55rem; font-size: 0.9rem; color: var(--ink);
  cursor: pointer;
}
.edu-form-hr {
  border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0 0.9rem;
}
@media (max-width: 820px) {
  .edu-wallet-row { grid-template-columns: 1fr; }
}
html[data-edu-pending="1"] body { visibility: hidden; }
