/* «Слухавка»: доповнення до hvylia.css і rozdily.css для робочого кабінету.
   Лише змінні з hvylia.css. Кольорів, записаних прямо в правилах, тут немає. */

[hidden] { display: none !important; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img, svg { max-width: 100%; }
.main { max-width: 100%; }
body { overflow-x: hidden; }

/* Кнопки-«посилання» */
button.chip { border: 0; font: inherit; font-weight: 600; font-size: 15px; color: inherit; }
button.chip[aria-pressed="true"] { color: var(--surface); }
button.btn-miss { border: 0; width: 100%; font-family: inherit; }
button.btn-ghost { border: 0; font-family: inherit; font-size: 16px; }
button.r-play { border: 0; cursor: pointer; }
button.biz-item { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
button.biz-item.is-on { background: var(--accent-soft); }
button.biz-pill, button.biz-card, button.date-pill, button.avatar { border: 0; font-family: inherit; color: inherit; cursor: pointer; }
button.biz-card { width: 100%; text-align: left; }
button.date-arrows { border: 0; cursor: pointer; color: inherit; }
.p-skip, .pp, .p-speed-m, .p-speeds button { font-family: inherit; }
.p-speeds button { border: 0; cursor: pointer; }
.biz-pill.is-static, .biz-card.is-static { cursor: default; }
a.avatar, .avatar { color: inherit; }

/* Завантаження, порожньо, помилка: «тиша» і хвиля, що дихає */
.state { margin-top: 12px; }
.state .empty { padding: 26px 20px; }
.err-box { display: grid; gap: 10px; justify-items: start; padding: 14px; border-radius: 16px; background: var(--miss-soft); color: var(--miss-ink); font-size: 15px; line-height: 1.4; }
.err-box b { color: var(--miss-text); }
.err-box .btn { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--miss-line); }
.net-banner { position: sticky; top: 0; z-index: 4; margin: 0 -16px 8px; padding: 8px 16px; background: var(--taken-soft); color: var(--taken); font-size: 14px; font-weight: 600; text-align: center; }
.loading-wave { margin: 14px 4px; }
.loading-wave i { height: 30%; }

/* Підказка про сповіщення на журналі */
.hint-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; margin: 0 0 14px; padding: 14px; border-radius: 18px; background: var(--accent-soft); }
.hint-card .ic { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--accent); }
.hint-card b { font-weight: 700; }
.hint-card p { grid-column: 2; margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.hint-card .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Мітка дати */
.date-ctl { position: relative; display: flex; align-items: center; gap: 8px; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 8; min-width: 220px; padding: 6px; border-radius: 18px; background: var(--surface); box-shadow: 0 2px 4px rgba(var(--shade), .06), 0 16px 40px rgba(var(--shade), .2); }
.pop button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font: inherit; font-weight: 600; text-align: left; color: var(--ink); }
.pop button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.pop input[type="date"] { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }

/* Рядок журналу: поточний, знайдений за посиланням */
.row.is-focus { animation: focus 2.4s ease-out 1; }
@keyframes focus { 0%, 60% { box-shadow: inset 0 0 0 3px var(--accent), var(--shadow); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .row.is-focus { animation: none; box-shadow: inset 0 0 0 3px var(--accent), var(--shadow); } }
.r-play.is-off { background: var(--neutral-soft); color: var(--muted); cursor: default; }
.r-play[disabled] { opacity: 1; }
.row .r-meta .muted { color: var(--muted); }
.r-wave .dots { margin-top: 11px; }
.log-end { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* Чекають дзвінка: кнопки в закріпленій картці */
.wait-card .btn-row { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 8px; }
.wait-card .btn-row .btn-miss { margin-top: 0; }
.wait-card.is-mine { background: var(--taken-soft); box-shadow: inset 0 0 0 2px var(--taken-line); }
.wait-card.is-mine .sub { color: var(--muted); }
.wait-card.is-mine .claim-hint { color: var(--muted); }
.btn-miss.is-dial { background: var(--taken); color: var(--on-miss); }
.btn-line-sm { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--taken-line); font: inherit; font-weight: 700; color: var(--ink); }
.wait-card .err-line { grid-column: 1 / -1; margin-top: 6px; }
.wait-card button[aria-busy="true"] { opacity: .7; }
.wait-empty { padding: 18px 20px; }

/* Програвач */
.player.is-idle { display: none; }
.player .p-err { grid-column: 1 / -1; display: none; padding: 8px 10px; border-radius: 12px; background: var(--miss-soft); color: var(--miss-ink); font-size: 14px; }
.player.has-err .p-err { display: block; }
.p-wave { cursor: pointer; touch-action: none; }
.p-wave .wave path { stroke-width: 2.5px; }
.p-skip i { pointer-events: none; }
.p-idle-card { display: none; }
body.has-player .p-idle-card { display: none; }
@media (max-width: 999px) {
  .player { grid-template-columns: 44px 56px 44px minmax(0, 1fr) auto; grid-template-areas: "bigwave bigwave bigwave bigwave bigwave" "info info info info times" "back pp fwd . speed"; gap: 8px 10px; padding: 12px 14px 12px; }
  .p-times { display: flex; grid-area: times; gap: 4px; font-size: 14px; font-weight: 700; justify-self: end; }
  .p-times span:last-child { color: var(--muted); }
  .p-times span:last-child::before { content: "/ "; }
  .p-skip { display: inline-grid !important; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink); position: relative; }
  .p-skip svg { width: 22px; height: 22px; }
  .p-skip i { position: absolute; font-style: normal; font-size: 8px; font-weight: 800; top: 18px; }
  .p-skip[data-dir="-1"] { grid-area: back; }
  .p-skip[data-dir="1"] { grid-area: fwd; }
  .p-info span { display: inline; }
  .p-next, .p-meta-wide { display: none; }
  body.tabs.has-player .main { padding-bottom: 300px; }
  .player .p-err { grid-row: 4; }
}
.p-speed-m { cursor: pointer; }
.p-speeds button { display: inline-grid; place-items: center; min-width: 56px; min-height: 44px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); background: var(--bg); }
.p-speeds button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.p-idle { display: none; }
@media (min-width: 1000px) {
  .p-idle { display: grid; justify-items: center; gap: 6px; position: sticky; top: 20px; margin: 20px 20px 20px 0; padding: 28px 20px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); text-align: center; }
  .p-idle .flat { width: 140px; margin: 4px 0 12px; }
  .p-idle b { font-size: 17px; font-weight: 700; }
  .p-idle p { margin: 0; max-width: 30ch; font-size: 15px; line-height: 1.4; color: var(--muted); }
  .player.is-idle ~ .p-idle, .p-idle.is-on { display: grid; }
  .p-skip { width: 52px; height: 52px; }
  .p-skip i { top: 21px; font-size: 9px; }
  .p-skip[data-dir] { grid-area: auto; }
  .p-times { grid-area: auto; }
  .p-times span:last-child::before { content: none; }
  .p-speeds { display: flex !important; }
  .p-wave .wave path { stroke-width: 3.5px; }
  .p-info span { display: none; }
}
@media (max-width: 999px) { body:not(.has-player) .p-idle { display: none; } }

/* Меню: аркуші */
.biz-menu .biz-scrim { border: 0; cursor: default; }
.biz-sheet { max-height: 92vh; overflow-y: auto; }

/* Код підтвердження: вхід, налаштування, запасні коди, профіль */
.btn:disabled { background: var(--neutral-soft); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); cursor: not-allowed; }
.login-card.is-wide { max-width: 520px; }
.link-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--accent); text-align: center; }
.link-btn:hover { background: var(--accent-soft); }
.help .link-btn { margin: -6px 0; }
.fld-hint { font-size: 13px; line-height: 1.35; color: var(--muted); }
.input .code-in { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 26px; font-weight: 700; letter-spacing: .2em; }
.input .code-in::placeholder { letter-spacing: .1em; font-weight: 500; }
.input .code-in:disabled { color: var(--muted); }

.mfa .lead { margin: 0 0 6px; }
.mfa-step { display: grid; justify-items: start; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.mfa-step:first-of-type { border-top: 0; }
.mfa-step h2, .biz-sheet.is-dialog .mfa-step h2 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; }
.mfa-step .note { margin: 0; }
.mfa-step > .btn-block, .mfa-step > form { width: 100%; }
.mfa-key { width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--bg); font: 700 17px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.qr-det { width: 100%; }
.qr-det summary { display: flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--accent); cursor: pointer; }
.qr-box { display: grid; justify-items: center; gap: 8px; padding: 6px 0 10px; }
.qr { display: block; width: min(220px, 100%); height: auto; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.qr-bg { fill: var(--surface); }
.qr-fg { fill: var(--ink); }

.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.codes-grid li { padding: 12px 6px; border-radius: 12px; background: var(--bg); text-align: center; font: 700 16px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; user-select: all; -webkit-user-select: all; }
.codes-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.codes-acts .btn { flex: 1 1 180px; }
.check-row { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 12px 0 8px; font-weight: 700; cursor: pointer; }
.check-row input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }

.mfa-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 8px; font-weight: 700; }
.mfa-state .card-lead { margin-bottom: 12px; }
.mfa-state .loading-wave { margin: 8px 0; }
.gate-out { margin-top: 14px; }
.biz-sheet .sheet-p { margin: 0 12px 10px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.biz-sheet ol.sheet-steps { margin: 0 12px 10px; padding-left: 22px; font-size: 15px; line-height: 1.5; }
.biz-sheet ol.sheet-steps li { margin: 4px 0; }
.biz-sheet .sheet-close { display: flex; width: calc(100% - 24px); margin: 12px 12px 0; }
.biz-item.is-soon { cursor: default; }
.biz-item .txt small { display: block; }
.biz-item[aria-disabled="true"] { cursor: default; }
.tabbar .badge[hidden] { display: none; }
.side .me .txt { min-width: 0; }
.side .me .txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me .txt a, .side .me .txt button { color: var(--accent); font: inherit; border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline; min-height: 24px; }
.side-actions { display: grid; gap: 2px; margin-top: 10px; }
.side-actions .snav-sep { margin: 4px 12px 8px; }
.side-actions button small { display: none; }

/* Сповіщення (toast) */
.toast-box { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { max-width: 520px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--surface); font-size: 15px; font-weight: 600; line-height: 1.35; box-shadow: 0 8px 30px rgba(var(--shade), .3); pointer-events: auto; }
.toast.is-err { background: var(--miss-text); }
.toast b { font-weight: 800; }
@media (min-width: 1000px) { .toast-box { bottom: 24px; left: 252px; } }

/* Демо */
.demo { margin-top: 0; }
.crumb { border: 0; background: none; font-family: inherit; cursor: pointer; }
.title-row .btn { white-space: nowrap; }
.seg button { display: grid; place-items: center; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 700; font-size: 15px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.days button.chip { min-width: 44px; padding: 0; justify-content: center; }
.opt { text-align: left; border: 0; font: inherit; color: inherit; width: 100%; }
.opt[aria-checked="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.opt[aria-checked="true"] .dot { box-shadow: inset 0 0 0 7px var(--accent); }
.stepper button { cursor: pointer; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn[aria-disabled="true"] { pointer-events: auto; }
.mini-state { margin-top: 12px; }
.ok-text { color: var(--ok-text); }
.sw input { min-height: 0; }
.chat-day { font-size: 13px; }
.camp-list .camp { text-align: left; }
.lock-note { display: flex; gap: 8px; align-items: flex-start; }
.actbar .btn[aria-disabled="true"] { min-height: 52px; }

/* Екран «Придумай свій пароль» (показується на будь-якій сторінці) */
.gate-out { margin-top: 12px; }
.login-card form .field:last-of-type { margin-bottom: 16px; }
.fld-hint { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); }

/* Вхід */
.login-card .err-line { margin: 0 0 14px; }
.btn-main[disabled] { opacity: .7; cursor: wait; }
.login-bg .wave path.w-bg { stroke-linecap: round; fill: none; vector-effect: non-scaling-stroke; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

body.form .tabbar { display: none; }

.side-actions button { min-height: 44px; padding-top: 6px; padding-bottom: 6px; font-size: 15px; line-height: 1.25; align-items: center; }
