/* J.A.R.V.I.S Mini App — тот же HUD, что на ПК (ui.py, класс C):
   почти чёрный фон, бирюзовый основной, оранжевый — «говорит»,
   тонкие линии вместо теней, подписи капсом с разрядкой. */
:root {
  --bg:       #030609;
  --panel:    #070c11;
  --panel-2:  #0a1017;
  --line:     #151e27;
  --line-2:   #243240;
  --pri:      #3fd0bd;
  --pri-dim:  #2a8a7e;
  --pri-soft: rgba(63, 208, 189, .10);
  --acc:      #ff8a34;
  --acc2:     #d9e25a;
  --green:    #46e880;
  --red:      #ff4660;
  --text:     #d6dee5;
  --text-med: #8a96a1;
  --text-dim: #5c6873;
  --white:    #eef3f6;
  --state:    63, 208, 189;          /* цвет состояния шара, меняет app.js */
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Segoe UI", -apple-system, "SF Pro Text", Roboto, system-ui, sans-serif;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { display: block; }

#app {
  display: flex; flex-direction: column;
  height: 100%; max-width: 560px; margin: 0 auto;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(var(--state), .06), transparent 60%),
    var(--bg);
  transition: background .8s;
}

/* ─── Шапка ─────────────────────────────────────────────── */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand .mark { width: 22px; height: 22px; color: rgb(var(--state)); transition: color .6s; }
#screen-title {
  font-size: 13px; font-weight: 700; letter-spacing: 3px; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#indicators { display: flex; align-items: center; gap: 8px; }
.badge {
  display: flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 13px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px; color: var(--text-dim);
  transition: color .3s, border-color .3s;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); transition: background .3s, box-shadow .3s; }
.badge.online { color: var(--text-med); border-color: var(--line-2); }
.badge.online i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.badge.warn i { background: var(--acc); box-shadow: 0 0 8px var(--acc); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--pri); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:active { background: var(--pri-soft); }
#voice-toggle .slash { display: none; }
#voice-toggle.muted { color: var(--text-dim); }
#voice-toggle.muted .slash { display: inline; }
#voice-toggle.muted .wave { display: none; }

/* ─── Экраны ─────────────────────────────────────────────── */
#views { flex: 1; min-height: 0; position: relative; display: flex; }
.view { display: none; flex: 1; flex-direction: column; min-height: 0; }
.view.active { display: flex; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-body { flex: 1; overflow-y: auto; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.view-body::-webkit-scrollbar { display: none; }
.loading, .empty { color: var(--text-dim); text-align: center; margin-top: 28px; font-size: 14px; line-height: 1.6; }

/* ─── Джарвис: сцена с шаром ─────────────────────────────── */
#stage {
  position: relative; flex: 0 0 34%; min-height: 190px;
  transition: flex-basis .5s var(--ease);
}
#view-chat.is-empty #stage { flex: 1 1 auto; }
#orb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; outline: none; }
#state-pill {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  height: 24px; padding: 0 12px 0 10px; border-radius: 12px;
  border: 1px solid rgba(var(--state), .35); background: rgba(var(--state), .08);
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: rgba(var(--state), 1);
  pointer-events: none; white-space: nowrap;
  transition: color .5s, border-color .5s, background .5s;
}
#state-pill i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--state)); animation: blink 1.6s infinite; }
#subtitle {
  position: absolute; left: 18px; right: 18px; bottom: 30px;
  text-align: center; color: var(--white); font-size: 15px; line-height: 1.4;
  text-shadow: 0 1px 12px #000, 0 0 2px #000;
  pointer-events: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s, transform .4s var(--ease);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
#subtitle.on { opacity: 1; transform: none; }
#orb-hint {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-dim);
  pointer-events: none; transition: opacity .4s;
}
#view-chat:not(.is-empty) #orb-hint, #stage.talking #orb-hint { opacity: 0; }
/* В режиме чата ответ и так в ленте — субтитры только в «режиме шара»
   (чат спрятан, как на ПК) и на пустом экране. */
#view-chat:not(.is-empty):not(.focus) #subtitle { display: none; }
#view-chat.focus #stage { flex: 1 1 auto; }
#view-chat.focus #chat { display: none; }
#view-chat.focus #subtitle { font-size: 17px; bottom: 26px; }
#focus-btn { position: absolute; top: 6px; right: 8px; color: var(--text-dim); }
#focus-btn .to-chat, #view-chat.focus #focus-btn .to-focus { display: none; }
#view-chat.focus #focus-btn .to-chat { display: block; }
#view-chat.is-empty #focus-btn { display: none; }

/* ─── Лента разговора ───────────────────────────────────── */
#chat {
  flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 10px 14px 6px;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}
#chat::-webkit-scrollbar { display: none; }
#view-chat.is-empty #chat { flex: 0 0 auto; border-top: 0; padding: 0; }
#messages { display: flex; flex-direction: column; gap: 8px; }
.msg {
  max-width: 86%; padding: 9px 13px; border-radius: 16px;
  font-size: 15px; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap;
  animation: pop .22s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.msg.user {
  align-self: flex-end; color: #04110f; background: var(--pri);
  border-bottom-right-radius: 5px; font-weight: 500;
}
.msg.bot {
  align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.msg.bot b { color: var(--white); }
.msg.bot code { font: 13px ui-monospace, "Cascadia Mono", Menlo, monospace; background: #0f161d; padding: 1px 5px; border-radius: 5px; }
.msg.bot a { color: var(--pri); text-decoration: none; border-bottom: 1px solid rgba(63,208,189,.4); }
.msg.bot .li { display: block; padding-left: 14px; position: relative; }
.msg.bot .li::before { content: ""; position: absolute; left: 3px; top: .65em; width: 4px; height: 4px; border-radius: 50%; background: var(--pri); }
.msg.sys {
  align-self: center; max-width: 92%; text-align: center;
  font-size: 12px; color: var(--text-dim); padding: 3px 10px;
}
.msg.sys.warn { color: var(--acc); }
.msg.img { padding: 5px; }
.msg.img img { width: 100%; border-radius: 12px; display: block; }
.msg.img .cap { font-size: 12px; color: var(--text-med); padding: 5px 5px 2px; }
.msg.pending { opacity: .55; }
.day-sep { align-self: center; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin: 6px 0 2px; }
.typing { display: flex; gap: 5px; padding: 12px 14px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--pri); animation: bounce 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }

/* ─── Подсказки ─────────────────────────────────────────── */
#chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 14px 2px;
  scrollbar-width: none; flex-shrink: 0;
}
#chips::-webkit-scrollbar { display: none; }
#view-chat:not(.is-empty) #chips { display: none; }
.chip {
  flex-shrink: 0; height: 32px; padding: 0 13px; border-radius: 16px;
  border: 1px solid var(--line-2); background: var(--panel);
  font-size: 13px; color: var(--text-med); white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.chip:active { border-color: var(--pri); color: var(--pri); }

/* ─── Поле ввода ────────────────────────────────────────── */
#input-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 12px 6px; padding: 5px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 26px;
  flex-shrink: 0; transition: border-color .2s, box-shadow .2s;
}
#input-bar:focus-within { border-color: rgba(63,208,189,.55); box-shadow: 0 0 0 3px var(--pri-soft); }
#text-in { flex: 1; min-width: 0; height: 38px; background: none; border: 0; outline: none; font-size: 15px; }
#text-in::placeholder { color: var(--text-dim); }
.round-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--pri); transition: transform .12s, background .2s, opacity .2s; }
.round-btn svg { width: 19px; height: 19px; }
.round-btn:active { transform: scale(.9); }
.round-btn.primary { background: var(--pri); color: #04110f; }
.round-btn.primary:disabled { opacity: .3; }
#mic-btn { background: var(--pri-soft); }
#mic-btn.rec, #mic-btn.listening { background: var(--green); color: #031008; animation: ring 1.4s infinite; }
#mic-btn.hands-free { box-shadow: 0 0 0 2px var(--green); }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(70,232,128,.5); } 100% { box-shadow: 0 0 0 12px rgba(70,232,128,0); } }

/* ─── Нижняя панель ─────────────────────────────────────── */
#tabbar {
  position: relative;
  display: flex; flex-shrink: 0;
  border-top: 1px solid var(--line); background: var(--panel);
  padding: 4px 4px calc(4px + var(--safe-b));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 5px; border-radius: 12px; color: var(--text-dim);
  transition: color .2s;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab svg .fill { fill: currentColor; }
.tab span { font-size: 10px; font-weight: 600; letter-spacing: .4px; }
.tab.active { color: var(--pri); }
.tab.active svg { filter: drop-shadow(0 0 6px rgba(63,208,189,.5)); }
.tab:active { background: var(--pri-soft); }
.tab { position: relative; z-index: 1; }
/* Подсветка активной вкладки переезжает к ней (transform — рисует видеокарта). */
#tab-glider { position: absolute; left: 0; top: 4px; height: calc(100% - 8px - var(--safe-b)); border-radius: 12px;
  background: var(--pri-soft); box-shadow: inset 0 0 0 1px rgba(63,208,189,.18);
  transition: transform .38s cubic-bezier(.3,1.35,.5,1), width .38s cubic-bezier(.3,1.35,.5,1);
  pointer-events: none; will-change: transform; }
#tab-glider::after { content: ""; position: absolute; left: 50%; top: -5px; width: 18px; height: 3px; margin-left: -9px;
  border-radius: 2px; background: var(--pri); box-shadow: 0 0 10px var(--pri); }
.tab.pop svg { animation: tab-pop .42s cubic-bezier(.3,1.6,.5,1); }
@keyframes tab-pop { 0% { transform: scale(.8); } 55% { transform: scale(1.18) translateY(-2px); } 100% { transform: none; } }
/* Карточки вкладки выплывают каскадом при её открытии. */
.view-body.enter > * { animation: card-in .45s cubic-bezier(.2,.9,.3,1) both; }
.view-body.enter > *:nth-child(2) { animation-delay: .04s; } .view-body.enter > *:nth-child(3) { animation-delay: .08s; }
.view-body.enter > *:nth-child(4) { animation-delay: .12s; } .view-body.enter > *:nth-child(5) { animation-delay: .16s; }
.view-body.enter > *:nth-child(6) { animation-delay: .2s; } .view-body.enter > *:nth-child(7) { animation-delay: .24s; }
.view-body.enter > *:nth-child(n+8) { animation-delay: .28s; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
/* Нажатие на карточку-кнопку — чуть «вдавливается». */
.stat:active, .me-row:active, .fb-news:active, .macro:active { transform: scale(.98); }
.stat, .me-row, .fb-news { transition: transform .12s; }

/* ─── Карточки ──────────────────────────────────────────── */
.panel, .card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px;
}
.card h3, .group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--pri);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.group-label { color: var(--text-dim); margin: 10px 2px -2px; }
.card h3 .count { margin-left: auto; color: var(--text-dim); font-weight: 600; letter-spacing: .5px; }
.sub { color: var(--text-med); font-size: 13px; }

.hero {
  border-radius: var(--r-lg); padding: 18px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(63,208,189,.16), transparent 60%),
    var(--panel);
  border: 1px solid var(--line-2);
}
.hero-hi { font-size: 21px; font-weight: 700; color: var(--white); }
.hero-wx { font-size: 15px; margin-top: 8px; }
.hero-city { font-size: 12px; color: var(--text-dim); margin-top: 3px; letter-spacing: .3px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.stat:active { border-color: var(--line-2); }
.stat-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--pri-soft); }
.stat-num { font-size: 24px; font-weight: 700; line-height: 1; color: var(--white); }
.stat-num span { font-size: 14px; color: var(--text-dim); font-weight: 600; }
.stat-lbl { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.3; }

.list { display: flex; flex-direction: column; }
.list > div { padding: 6px 0; font-size: 14px; border-top: 1px solid var(--line); }
.list > div:first-child { border-top: 0; }

.fact { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fact:first-child { border-top: 0; }
.fact span { flex: 1; }
.fact .x { width: 26px; height: 26px; margin: -3px -4px 0 0; border-radius: 50%; color: var(--text-dim); display: grid; place-items: center; flex-shrink: 0; }
.fact .x:active { color: var(--red); background: rgba(255,70,96,.1); }
.more { margin-top: 8px; font-size: 13px; color: var(--pri); }
.voice-line { font-size: 13px; color: var(--text-med); padding: 3px 0; }
.voice-line b { color: var(--text); font-weight: 600; }

/* ─── Строки дел и привычек ─────────────────────────────── */
.add-row { display: flex; gap: 8px; padding: 12px 14px 0; flex-shrink: 0; }
.add-row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; outline: none; font-size: 15px;
}
.add-row input:focus { border-color: rgba(63,208,189,.55); }
.add-row input::placeholder { color: var(--text-dim); }
.add-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--pri); color: #04110f; font-size: 24px; font-weight: 600; line-height: 1; flex-shrink: 0; }
.add-btn:active { transform: scale(.92); }
.section-label { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-dim); margin: 6px 2px 0; font-weight: 700; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .1s, border-color .2s, opacity .3s;
}
.row.done { opacity: .45; }
.row .body { flex: 1; min-width: 0; }
.row .title { font-size: 15px; line-height: 1.35; }
.row .meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.row .meta.overdue { color: var(--red); }
.row .streak { color: var(--acc); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line-2); display: grid; place-items: center; color: #04110f; font-size: 14px; font-weight: 800;
  transition: transform .12s, background .2s, border-color .2s;
}
.check.on { background: var(--green); border-color: var(--green); }
.check.bell { border-color: rgba(255,138,52,.5); color: var(--acc); font-size: 12px; }
.check:active { transform: scale(.85); }
.row .x { width: 30px; height: 30px; border-radius: 50%; color: var(--text-dim); flex-shrink: 0; }
.row .x:active { color: var(--red); background: rgba(255,70,96,.1); }

/* ─── ПК-пульт ──────────────────────────────────────────── */
#pc-status { display: flex; flex-direction: column; gap: 12px; }
.pc-status-row { display: flex; align-items: center; gap: 12px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex-shrink: 0; box-shadow: 0 0 0 0 rgba(255,70,96,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,70,96,0); } 100% { box-shadow: 0 0 0 0 rgba(255,70,96,0); } }
#pc-status.online .pulse { background: var(--green); animation-name: pulse-g; }
@keyframes pulse-g { 0% { box-shadow: 0 0 0 0 rgba(70,232,128,.5); } 70% { box-shadow: 0 0 0 10px rgba(70,232,128,0); } 100% { box-shadow: 0 0 0 0 rgba(70,232,128,0); } }
.pc-status-title { font-size: 15px; font-weight: 700; color: var(--white); }
.pc-status-sub { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.pc-launch {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; border-radius: 23px; background: var(--pri); color: #04110f;
  font-size: 15px; font-weight: 700;
}
.pc-launch svg { width: 20px; height: 20px; }
.pc-launch:active { transform: scale(.98); }
.pc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pc-grid.two { grid-template-columns: 1fr 1fr; }
.pc-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: 78px; padding: 10px 4px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--text-med); text-align: center; line-height: 1.2;
  transition: transform .12s, border-color .2s, opacity .3s;
}
.pc-tile.wide { flex-direction: row; min-height: 52px; font-size: 13.5px; gap: 10px; color: var(--text); }
.pc-tile svg, .media-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--pri); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.media-btn svg .fill { fill: var(--pri); }
.pc-tile:active { transform: scale(.95); border-color: var(--pri-dim); }
.pc-tile.sent { border-color: var(--pri); box-shadow: inset 0 0 0 1px var(--pri); }
.media-bar { display: flex; align-items: center; justify-content: space-around; padding: 8px 10px; }
.media-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.media-btn.big { width: 56px; height: 56px; background: var(--pri-soft); border: 1px solid rgba(63,208,189,.35); }
.media-btn:active { transform: scale(.9); background: var(--pri-soft); }
.media-sep { width: 1px; height: 28px; background: var(--line-2); }
#view-pc.offline .pc-grid, #view-pc.offline .media-bar { opacity: .45; }
.pc-tile.macro { justify-content: flex-start; padding: 10px 12px; text-align: left; }
.pc-tile.macro svg { flex: none; width: 18px; height: 18px; }
.macro-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.macro-text b { font-weight: 600; font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.macro-text small { font-size: 11.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.macros-empty { grid-column: 1 / -1; padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--line-2);
  font-size: 12.5px; color: var(--text-dim); line-height: 1.35; }

/* ─── Всплывашки ────────────────────────────────────────── */
#toast-container {
  position: fixed; left: 50%; bottom: calc(76px + var(--safe-b)); transform: translateX(-50%);
  width: min(92vw, 520px); display: flex; flex-direction: column; gap: 8px; z-index: 50; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 14px;
  background: rgba(10,16,23,.96); border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px;
  animation: pop .25s var(--ease); pointer-events: auto;
  backdrop-filter: blur(10px);
}
.toast span { flex: 1; }
.toast.error { border-color: rgba(255,70,96,.5); }
.toast.success { border-color: rgba(70,232,128,.45); }
.toast.hide { opacity: 0; transform: translateY(8px); transition: .3s; }
.toast-action { color: var(--pri); font-weight: 700; font-size: 13px; }

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

/* ─── Иконки (как SF Symbols) ───────────────────────────── */
.ico { display: inline-block; width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.14em; }
.hero-hi .ico { width: 22px; height: 22px; margin-right: 8px; vertical-align: -3px; color: var(--acc); }
.hero-city .ico, .sub .ico, .voice-line .ico { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }
.stat-ico .ico { width: 20px; height: 20px; color: var(--pri); }
.dash-grid .stat:first-child .stat-ico .ico { color: var(--acc); }
.x .ico { width: 14px; height: 14px; }
.check .ico { width: 14px; height: 14px; stroke-width: 3; color: var(--bg, #030609); }
.check.bell .ico { color: var(--acc); stroke-width: 2; }
.row .streak { display: inline-flex; align-items: center; gap: 3px; }
.streak .ico { width: 13px; height: 13px; }
.empty .empty-ico { width: 34px; height: 34px; color: var(--text-dim); opacity: .6; margin-bottom: 4px; }

/* ─── Учёба (с ПК) ─────────────────────────────────────── */
.study-add #study-due { flex: 0 0 34%; }
.now-next { display: flex; align-items: center; gap: 10px; color: var(--white); font-size: 14px; border-color: rgba(63,208,189,.35); background: var(--pri-soft); }
.now-next .ico { width: 18px; height: 18px; color: var(--pri); flex-shrink: 0; }
.week-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px;
  border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); color: var(--text-med); }
.day-chip b { font-size: 12px; font-weight: 700; }
.day-chip span { font-size: 10px; color: var(--text-dim); }
.day-chip i { position: absolute; top: 3px; right: 4px; font-style: normal; font-size: 9px; color: var(--pri); font-weight: 700; }
.day-chip.today b { color: var(--pri); }
.day-chip.on { border-color: var(--pri); background: var(--pri-soft); color: var(--white); }
.row.lesson { align-items: center; }
.lesson-time { flex: 0 0 48px; display: flex; flex-direction: column; font: 700 14px/1.2 Consolas, monospace; color: var(--pri); }
.lesson-time span { font-size: 11px; color: var(--text-dim); font-weight: 400; }
.section-label.warn { color: var(--red); }
.sub.pad { padding: 8px 2px; }
.sub.small { font-size: 12px; margin-top: 6px; }

/* ─── Обо мне, звонки, что умею (сводка) ───────────────── */
.me-group { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-dim); font-weight: 700; margin: 12px 0 2px; }
.me-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 0; border-top: 1px solid var(--line); text-align: left; }
.me-label { flex: 0 0 38%; font-size: 13px; color: var(--text-med); }
.me-value { flex: 1; min-width: 0; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-value.unset { color: var(--text-dim); font-style: italic; }
.me-input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; font-size: 14px; background: var(--panel-2);
  border: 1px solid rgba(63,208,189,.55); border-radius: 8px; outline: none; color: var(--white); }
.call { border-top: 1px solid var(--line); padding: 8px 0; }
.call:first-of-type { border-top: 0; }
.call summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.call summary::-webkit-details-marker { display: none; }
.call summary .ico { width: 16px; height: 16px; color: var(--pri); flex-shrink: 0; }
.call-who { flex: 1; color: var(--white); }
.call-when { font-size: 11px; color: var(--text-dim); }
.call-line { font-size: 13.5px; line-height: 1.45; padding: 6px 10px; margin-top: 6px; border-radius: 10px; background: var(--panel-2); }
.call-line b { display: block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--acc); margin-bottom: 1px; }
.call-line.j b { color: var(--pri); }
.ability-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Шесть вкладок на узком экране: вкладка может сжиматься, подпись — меньше. */
.tab { min-width: 0; }
.tab span { font-size: 9.5px; letter-spacing: .1px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-chips { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.study-add input { padding: 0 12px; font-size: 14px; }
.me-row { justify-content: flex-start; color: inherit; background: none; }
.me-row .me-value { text-align: right; }

/* ─── Футбол (сводка) ──────────────────────────────────── */
.card.fb h3 .ico { width: 14px; height: 14px; }
.fb-badge { margin-left: auto; padding: 2px 8px; border-radius: 9px; background: rgba(255,70,96,.15); color: var(--red);
  letter-spacing: 1px; animation: fb-blink 1.4s ease-in-out infinite; }
.fb-match { position: relative; overflow: hidden; margin: 2px -4px 0; padding: 12px 8px 14px; border-radius: 14px;
  border: 1px solid var(--line-2);
  background: linear-gradient(90deg, rgba(var(--h), .16), rgba(var(--h), 0) 42%, rgba(var(--a), 0) 58%, rgba(var(--a), .16)), var(--panel-2);
  animation: fb-in .5s ease-out both; }
.fb-match.live { border-color: rgba(255,70,96,.55); }
.fb-match.goal { animation: fb-flash 1.3s ease-out both; }
.fb-league { text-align: center; font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); font-weight: 700; margin-bottom: 8px; }
.fb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.fb-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.fb-team > .fb-name { font-size: 12.5px; font-weight: 600; color: var(--white); text-align: center; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fb-team:first-child { animation: fb-left .6s cubic-bezier(.2,.9,.3,1) both; }
.fb-team:last-child { animation: fb-right .6s cubic-bezier(.2,.9,.3,1) both; }
.fb-crest { position: relative; flex-shrink: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(var(--c), .16); box-shadow: inset 0 0 0 1.5px rgba(var(--c), .8); }
.fb-crest b { font-size: 7.5px; font-weight: 800; color: var(--white); letter-spacing: .3px; }
.fb-crest img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fb-crest:has(img) { background: none; box-shadow: none; }
.fb-crest img + b { display: none; }
.fb-crest.big { width: 54px; height: 54px; }
.fb-crest.big b { font-size: 14px; }
.fb-mid { position: relative; text-align: center; min-width: 96px; }
.fb-score { display: flex; justify-content: center; align-items: baseline; gap: 6px; font-size: 34px; font-weight: 800; color: var(--white); line-height: 1; }
.fb-score i { font-style: normal; color: var(--text-dim); font-size: 26px; }
.fb-score span { display: inline-block; }
.fb-score span.pop { animation: fb-pop 1.2s cubic-bezier(.3,1.6,.5,1) both; }
.fb-time { font-size: 28px; font-weight: 800; color: var(--white); line-height: 1.05; }
.fb-when { font-size: 12px; color: var(--text-med); margin-top: 3px; letter-spacing: .3px; }
.fb-count { font-size: 12px; color: var(--pri); font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.fb-live { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--red); }
.fb-live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.fb-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--red); animation: fb-ring 1.1s ease-out infinite; }
.fb-league.fb-goal { font-size: 13px; font-weight: 900; letter-spacing: 2px; color: var(--white);
  text-shadow: 0 0 12px rgba(255,255,255,.6); animation: fb-goal 2.4s ease-out both; }
.fb-confetti { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.fb-confetti i { position: absolute; width: 6px; height: 3px; border-radius: 1px; background: rgb(var(--c));
  animation: fb-burst 1.6s cubic-bezier(.15,.8,.35,1) forwards; }
.fb-watch { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; height: 40px;
  border-radius: 12px; background: var(--pri); color: #04110f; font-weight: 700; font-size: 14px; }
.fb-watch .ico { width: 14px; height: 14px; }
.fb-watch:active { transform: scale(.98); }
.fb-watch[data-off] { background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--line-2); }
.fb-form { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.fb-res { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--bg); }
.fb-res.rw { background: var(--green); } .fb-res.rd { background: var(--text-med); } .fb-res.rl { background: var(--red); }
.fb-lastres { margin: 0 0 0 6px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-up { display: flex; align-items: center; gap: 7px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.fb-up:first-of-type { border-top: 0; }
.fb-up-when { flex: 0 0 92px; font-size: 11.5px; color: var(--text-dim); }
.fb-up-t { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-news { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); background: none; }
.fb-news:first-of-type { border-top: 0; }
.fb-news span { font-size: 13.5px; line-height: 1.35; }
.fb-news small { font-size: 11px; color: var(--pri-dim); }
@keyframes fb-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes fb-left { from { opacity: 0; transform: translateX(-28px); } }
@keyframes fb-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes fb-pop { 0% { transform: scale(1); } 25% { transform: scale(1.7); color: rgb(var(--p)); } 100% { transform: scale(1); } }
@keyframes fb-ring { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }
@keyframes fb-blink { 50% { opacity: .55; } }
@keyframes fb-flash { 0% { box-shadow: inset 0 0 0 200px rgba(255,255,255,.18); } 100% { box-shadow: inset 0 0 0 200px rgba(255,255,255,0); } }
@keyframes fb-goal { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.35); }
  30% { transform: scale(1); } 100% { opacity: 1; } }
@keyframes fb-burst { from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fb-match, .fb-team, .fb-score span.pop, .fb-goal, .fb-confetti i, .fb-badge { animation: none !important; } }
