/* =========================================================
   Розв'язання: форма завдання, аркуш із розв'язком, історія,
   картка реквізитів в оплаті. Доповнює app.css.
   ========================================================= */

/* Верхня панель на телефоні: баланс в один рядок, назва бренду ховається на найвужчих екранах */
.balance-chip { white-space: nowrap; }
@media (max-width: 480px) {
  .app-top { gap: 8px; padding-inline: 12px; }
}
@media (max-width: 400px) {
  .app-top .brand__name { display: none; }
}

/* ---------- Форма «Розв'язати» ---------- */
.solve { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; max-width: 1240px; }
.solve__sheet {
  position: relative;
  display: grid; gap: 22px;
  padding: clamp(20px, 3vw, 34px);
  border-radius: var(--r-l);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-print);
}
.solve__hello { display: grid; gap: 2px; }
.solve__note { font-size: 1.5rem; color: var(--blue); line-height: 1; transform: rotate(-2deg); transform-origin: left; }
.solve__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.75rem); letter-spacing: -0.035em; line-height: 1.15; text-wrap: balance; }
.solve__or { font-family: var(--font-hand); font-weight: 600; font-size: 1.15em; color: var(--ink-3); letter-spacing: 0; }

.drop {
  position: relative;
  border: 2px dashed var(--line-strong); border-radius: var(--r-l);
  background-color: var(--page);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.drop--over { border-color: var(--blue); background-color: var(--blue-tint); }
.drop--filled { border-style: solid; border-color: var(--line); }
.drop__empty { display: grid; justify-items: center; gap: 8px; padding: clamp(24px, 4vw, 40px) 16px; text-align: center; }
.drop__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--marker); border: 2px solid var(--ink); box-shadow: var(--shadow-sticker); transform: rotate(-4deg); margin-bottom: 6px; }
.drop__icon svg { width: 30px; height: 30px; }
.drop__lead { font-size: 1.05rem; max-width: 30ch; }
.drop__sub { font-size: 0.88rem; color: var(--ink-3); }
.drop__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.drop__btns .btn { cursor: pointer; }
/* Камера — головна кнопка на телефоні, на комп’ютері — вибір файлу */
@media (hover: hover) and (pointer: fine) { .drop__camera { display: none; } }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 14px; }
.shot { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-m); overflow: hidden; background: var(--studio); box-shadow: var(--shadow-print); }
.shot:nth-child(odd):not(.shot--add) { transform: rotate(-1.2deg); }
.shot:nth-child(even):not(.shot--add) { transform: rotate(1deg); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot__n { position: absolute; left: 8px; top: 8px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 0.78rem; font-weight: 800; }
.shot__del { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(29, 27, 46, 0.72); color: #fff; }
.shot__del svg { width: 16px; height: 16px; }
@media (hover: hover) { .shot__del:hover { background: var(--danger); } }
.shot__state { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; background: rgba(255, 255, 255, 0.7); color: var(--blue); text-align: center; }
.shot__state--error { background: rgba(253, 230, 230, 0.94); color: var(--danger); font-size: 0.78rem; font-weight: 700; line-height: 1.35; }
.shot--add { box-shadow: none; background: transparent; border: 2px dashed var(--line-strong); }
.shot--add label { display: grid; place-content: center; justify-items: center; gap: 6px; height: 100%; color: var(--ink-3); font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.shot--add svg { width: 26px; height: 26px; }
@media (hover: hover) { .shot--add:hover { border-color: var(--blue); } .shot--add:hover label { color: var(--blue); } }

.solve__text textarea { min-height: 110px; font-size: 1.02rem; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.examples__label { font-size: 0.84rem; color: var(--ink-3); font-weight: 600; margin-right: 2px; }
.examples__chip {
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--paper-2);
  font-size: 0.84rem; font-weight: 550; color: var(--ink-2); text-align: left;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}
@media (hover: hover) { .examples__chip:hover { border-color: var(--blue); color: var(--blue-deep); background: var(--blue-tint); } }

.solve__group { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.subjects { display: flex; flex-wrap: wrap; gap: 6px; }
.subj {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--paper); font-weight: 650; font-size: 0.9rem;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.subj span { font-size: 1.05em; }
@media (hover: hover) { .subj:hover { border-color: var(--ink); } }
.subj:active { transform: scale(0.97); }
.subj[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.solve__row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; align-items: start; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mode {
  display: grid; gap: 2px; text-align: left;
  padding: 12px 14px; border-radius: var(--r-m);
  border: 1px solid var(--line-strong); background: var(--paper);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
@media (hover: hover) { .mode:hover { border-color: var(--ink); } }
.mode__name { font-weight: 750; font-size: 0.95rem; }
.mode__hint { font-size: 0.8rem; color: var(--ink-3); line-height: 1.35; }
.mode[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue); }
.mode[aria-pressed="true"] .mode__name { color: var(--blue-deep); }
.solve__grade select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6680' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }

.solve__go { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--line); }
.solve__go .form-alert { flex-basis: 100%; }
.solve__submit { min-width: 220px; font-size: 1.05rem; }
.solve__submit svg { width: 20px; height: 20px; }
.solve__cost { font-size: 0.9rem; color: var(--ink-2); }
.solve__cost b { color: var(--ink); }
.demo-flag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-xs); background: var(--warn-tint); color: var(--warn); font-size: 0.76rem; font-weight: 750; }

.solve__side { display: grid; gap: 14px; position: sticky; top: 84px; }
.solve__side .panel + .panel { margin-top: 0; }
.tips .panel__title { align-items: center; }
.tips .panel__title svg { width: 20px; height: 20px; color: var(--blue); }
.tips__list { display: grid; gap: 12px; margin-top: 14px; font-size: 0.9rem; color: var(--ink-2); line-height: 1.5; }
.tips__list li { padding-left: 16px; position: relative; }
.tips__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 2px; background: var(--marker); outline: 1px solid var(--ink); }
.tips__list b { color: var(--ink); }
.recent-tasks .panel__title { justify-content: space-between; align-items: baseline; }
.recent-tasks__all { font-size: 0.86rem; }
.recent-tasks__list { display: grid; margin-top: 10px; }
.recent-tasks__list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; border-top: 1px solid var(--line); }
.recent-tasks__list li:first-child a { border-top: 0; }
.recent-tasks__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--studio); font-size: 1.05rem; }
.recent-tasks__text { display: grid; min-width: 0; }
.recent-tasks__text b { font-size: 0.9rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-tasks__text span { font-size: 0.8rem; color: var(--ink-3); }
@media (hover: hover) { .recent-tasks__list a:hover b { color: var(--blue); } }

@media (max-width: 1100px) {
  .solve { grid-template-columns: 1fr; }
  .solve__side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  .solve__sheet { padding: 18px 16px; gap: 18px; }
  .solve__row { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr 1fr; }
  .mode { padding: 10px 12px; }
  .mode__hint { display: none; }
  .subjects { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .subj { flex: none; }
  .solve__submit { width: 100%; }
  .examples { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .examples__chip { flex: none; white-space: nowrap; }
}

/* ---------- Завдання й розв'язок ---------- */
.task { max-width: 1180px; }
.task__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.task__back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 650; font-size: 0.92rem; text-decoration: none; }
.task__back svg { width: 18px; height: 18px; }
@media (hover: hover) { .task__back:hover { color: var(--blue); } }
.task__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.task__actions svg { width: 17px; height: 17px; }
.task__title-row { margin-bottom: 18px; }
.task__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem); letter-spacing: -0.035em; line-height: 1.15; text-wrap: balance; }
.task__meta { margin-top: 6px; color: var(--ink-3); font-size: 0.9rem; font-weight: 550; }
.task__grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }

.cond {
  position: sticky; top: 84px;
  padding: 18px; border-radius: var(--r-l);
  background: var(--marker-soft);
  border: 1px solid #efe0a0;
  box-shadow: var(--shadow-print);
  transform: rotate(-0.6deg);
}
.cond__label { font-size: 1.35rem; color: var(--ink-2); line-height: 1; margin-bottom: 10px; }
.cond__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.cond__photo { display: block; padding: 0; border: 0; border-radius: var(--r-s); overflow: hidden; background: #fff; aspect-ratio: 3 / 4; cursor: zoom-in; box-shadow: 0 1px 3px rgba(29, 27, 46, 0.15); }
.cond__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease-out); }
@media (hover: hover) { .cond__photo:hover img { transform: scale(1.04); } }
.cond__photos:has(.cond__photo:only-child) { grid-template-columns: 1fr; }
.cond__photos:has(.cond__photo:only-child) .cond__photo { aspect-ratio: auto; max-height: 420px; }
.cond__photos:has(.cond__photo:only-child) .cond__photo img { height: auto; max-height: 420px; object-fit: contain; }
.cond__text { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; line-height: 1.55; }
.cond__photos + .cond__text { padding-top: 12px; border-top: 1px dashed rgba(29, 27, 46, 0.2); }

dialog.modal.photo-view { width: min(1000px, calc(100% - 24px)); background: #111; padding: 0; }
.photo-view img { display: block; width: 100%; max-height: calc(100dvh - 48px); object-fit: contain; }
.photo-view .modal__close { background: rgba(255, 255, 255, 0.9); color: var(--ink); z-index: 1; }

/* Аркуш зошита: клітинка, червоне поле зліва */
.sheet {
  position: relative; min-width: 0;
  padding: clamp(20px, 3vw, 36px) clamp(18px, 3vw, 40px) clamp(20px, 3vw, 32px) clamp(30px, 4.5vw, 64px);
  border-radius: var(--r-l);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent calc(clamp(18px, 3vw, 44px) - 1px), rgba(229, 72, 77, 0.55) calc(clamp(18px, 3vw, 44px) - 1px), rgba(229, 72, 77, 0.55) calc(clamp(18px, 3vw, 44px) + 1px), transparent calc(clamp(18px, 3vw, 44px) + 1px)),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px, 22px 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-print);
}
.sheet__body { min-height: 260px; }

/* Текст розв'язку */
.sol { font-size: 1.02rem; line-height: 1.7; overflow-wrap: break-word; }
.sol > :first-child { margin-top: 0; }
.sol p, .sol ul, .sol ol, .sol blockquote, .sol pre, .sol .sol-table, .sol hr { margin: 0 0 14px; }
.sol h1, .sol h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; margin: 26px 0 12px; }
.sol h1 { font-size: 1.45rem; }
.sol h2 { font-size: 1.2rem; }
.sol h2.task-h { display: inline-block; padding: 2px 12px 4px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 1.05rem; }
.sol h3, .sol h4 { font-weight: 800; font-size: 1.04rem; margin: 22px 0 8px; }
.sol .step-h { display: flex; align-items: flex-start; gap: 10px; }
.step-h__n {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; margin-top: -1px;
  border-radius: 50%; border: 2px solid var(--blue);
  color: var(--blue); font-family: var(--font-hand); font-size: 1.2rem; font-weight: 700; line-height: 1;
}
.sol ul, .sol ol { padding-left: 1.4em; }
.sol li + li { margin-top: 4px; }
.sol li::marker { color: var(--blue); font-weight: 700; }
.sol strong { font-weight: 750; }
.sol a { color: var(--blue); }
.sol code { padding: 1px 6px; border-radius: 6px; background: var(--studio); font-family: var(--font-mono); font-size: 0.88em; }
.sol pre { padding: 14px 16px; border-radius: var(--r-m); background: #1d1b2e; color: #f1eefe; overflow-x: auto; }
.sol pre code { padding: 0; background: none; color: inherit; font-size: 0.86rem; line-height: 1.6; }
.sol hr { border: 0; border-top: 1px dashed var(--line-strong); }
.sol blockquote { padding: 10px 16px; border-left: 3px solid var(--line-strong); color: var(--ink-2); background: rgba(243, 239, 227, 0.6); border-radius: 0 var(--r-s) var(--r-s) 0; }
.sol blockquote p:last-child { margin-bottom: 0; }
.sol blockquote.tip { border-left-color: var(--mint); background: #e9f7f0; color: #18523a; }
.sol .sol-table { overflow-x: auto; }
.sol table { border-collapse: collapse; min-width: 50%; font-size: 0.95rem; background: var(--paper); }
.sol th, .sol td { padding: 7px 12px; border: 1px solid var(--line-strong); text-align: left; }
.sol th { background: var(--studio); font-weight: 750; }
.sol .math-p { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.sol .katex { font-size: 1.12em; }
.sol .katex-display { margin: 0.4em 0; }
/* Відповідь — на жовтому маркері, як обводять у зошиті */
.sol p.answer {
  position: relative;
  display: block; width: fit-content; max-width: 100%;
  margin: 20px 0 18px; padding: 10px 18px 11px;
  border: 2px solid var(--ink); border-radius: 14px 18px 12px 16px;
  background: var(--marker);
  box-shadow: var(--shadow-sticker);
  font-size: 1.06rem;
}
.sol p.answer .katex-display { margin: 0.2em 0 0; }

.caret { display: inline-block; width: 9px; height: 1.15em; margin-left: 2px; vertical-align: -0.2em; border-radius: 2px; background: var(--blue); animation: caret 0.9s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.thinking { display: grid; justify-items: center; gap: 12px; padding: 48px 12px; text-align: center; }
.thinking__pencil { width: 64px; height: 64px; }
.thinking__text { font-family: var(--font-hand); font-size: 1.6rem; color: var(--ink-2); min-height: 1.3em; }
.thinking__lines { display: grid; gap: 10px; width: min(360px, 90%); margin-top: 6px; }
.thinking__lines i { display: block; height: 10px; border-radius: 6px; background: linear-gradient(100deg, #ece6d6 20%, #f8f4ea 40%, #ece6d6 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.thinking__lines i:nth-child(2) { width: 82%; }
.thinking__lines i:nth-child(3) { width: 64%; }
@media (prefers-reduced-motion: no-preference) {
  .thinking__pencil { animation: scribble 1.2s ease-in-out infinite; transform-origin: 20% 80%; }
}
@keyframes scribble { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(6px, -2px) rotate(4deg); } 50% { transform: translate(12px, 1px) rotate(-2deg); } 75% { transform: translate(5px, 2px) rotate(3deg); } }

.failed { display: grid; justify-items: start; gap: 10px; padding: 24px 0; }
.failed__title { font-family: var(--font-hand); font-size: 1.8rem; color: var(--red-pen); line-height: 1; }
.failed p:not(.failed__title) { color: var(--ink-2); max-width: 52ch; }
.failed__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* Уточнення */
.thread { display: grid; gap: 14px; margin-top: 26px; padding-top: 22px; border-top: 2px dashed var(--line); }
.msg { max-width: 100%; }
.msg--q { justify-self: end; max-width: min(560px, 90%); padding: 10px 16px; border-radius: 18px 18px 4px 18px; background: var(--blue); color: #fff; font-weight: 550; }
.msg--q p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--a { padding: 14px 18px; border-radius: 18px 18px 18px 4px; background: var(--paper-2); border: 1px solid var(--line); }
.msg--a.sol > :last-child { margin-bottom: 0; }
.msg--wait { justify-self: start; padding: 12px 18px; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

.ask { display: grid; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 2px dashed var(--line); }
.ask__label { font-size: 1.35rem; color: var(--blue); line-height: 1; }
.ask__quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ask__row { display: flex; gap: 8px; align-items: flex-end; }
.ask__input { min-height: 52px; resize: none; border-radius: var(--r-m); }
.ask__send { --btn-h: 52px; width: 52px; padding: 0; flex: none; border-radius: var(--r-m); }
.ask__send svg { width: 22px; height: 22px; }
.ask__left { font-size: 0.82rem; color: var(--ink-3); }
.ask__limit { margin-top: 24px; padding: 14px 16px; border-radius: var(--r-m); background: var(--studio); color: var(--ink-2); font-size: 0.92rem; }

@media (max-width: 960px) {
  .task__grid { grid-template-columns: 1fr; }
  .cond { position: static; transform: none; }
  .cond__photos:has(.cond__photo:only-child) .cond__photo { max-height: 300px; }
  .cond__photos:has(.cond__photo:only-child) .cond__photo img { max-height: 300px; }
}
@media (max-width: 520px) {
  .task__actions .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .task__actions .btn { padding: 0 11px; }
  .sol { font-size: 0.98rem; }
  .ask__quick { flex-wrap: nowrap; overflow-x: auto; margin-inline: -18px; padding: 0 18px 4px; scrollbar-width: none; }
  .ask__quick .examples__chip { flex: none; white-space: nowrap; }
}

/* ---------- Історія ---------- */
.history { max-width: 980px; }
.history__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.history__search { position: relative; flex: 1 1 280px; }
.history__search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.history__search .input { padding-left: 42px; }
.history__filters { margin: 14px 0 18px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.history__filters button { flex: none; border-radius: var(--r-pill); }
.task-list { display: grid; gap: 10px; }
.task-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px 16px 12px 12px; border-radius: var(--r-l);
  background: var(--paper); border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 150ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}
@media (hover: hover) { .task-card:hover { border-color: var(--ink); box-shadow: var(--shadow-sticker); transform: translate(-2px, -2px); } }
.task-card__thumb { width: 64px; height: 64px; border-radius: var(--r-m); object-fit: cover; background: var(--studio); }
.task-card__thumb--text { display: grid; place-items: center; font-size: 1.6rem; background: var(--marker-soft); }
.task-card__body { display: grid; gap: 2px; min-width: 0; }
.task-card__top { display: flex; gap: 10px; font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }
.task-card__subject { color: var(--blue); font-weight: 750; }
.task-card__title { font-weight: 750; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card__preview { font-size: 0.86rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card__status .tag svg { width: 14px; height: 14px; }
.task-list .empty { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .task-card { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .task-card__thumb { width: 52px; height: 52px; }
  .task-card__status { grid-column: 2; }
  .history__bar .btn { flex: 1 1 100%; }
}

/* ---------- Оплата: картка реквізитів ---------- */
.pay-card {
  position: relative; overflow: hidden;
  display: grid; gap: 4px;
  margin-bottom: 16px; padding: 18px 20px 16px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 225, 74, 0.35), transparent 55%),
    linear-gradient(135deg, #4b3df0, #2e22b0 70%);
  color: #fff;
  box-shadow: 0 18px 40px -18px rgba(46, 34, 176, 0.7);
}
.pay-card::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, 0.07); }
.pay-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pay-card__chip { width: 38px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, #ffe9a0, #d9b44a); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.pay-card__kind { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.pay-card__sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pay-card__sum span { font-size: 0.86rem; color: rgba(255, 255, 255, 0.75); }
.pay-card__sum b { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; letter-spacing: -0.04em; }
.pay-card__iban { font-family: var(--font-mono); font-size: clamp(0.86rem, 0.7rem + 0.8vw, 1.06rem); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.pay-card__holder { font-weight: 700; font-size: 0.95rem; }
.pay-card__code { font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); }
.pay-card__code b { padding: 1px 7px; border-radius: 6px; background: var(--marker); color: var(--ink); font-size: 0.9rem; }
.iban-req__all { margin: 4px 14px 14px; }
.iban-req__all.is-copied { border-color: var(--ok); color: var(--ok); }
.req-row--purpose .req-row__value { font-weight: 750; }
