/* Телефон (< 768 px): своя вёрстка. Экран «Зараз» — колода карточек действий со свайпом,
   модули — отдельные экраны, нижняя панель вкладок. 16 px поля, без горизонтального скролла. */
body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.m-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem;
  padding: .55rem 16px; padding-top: max(.55rem, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.m-top .demo-badge { font-size: .65rem; padding: .2rem .45rem; }
.m-top .cur button { min-width: 36px; min-height: 34px; }
.m-top .lang { min-width: 40px; min-height: 36px; }
.screens { padding: 0 16px; touch-action: pan-y; }
.screen { padding-top: 1rem; }
.screen.in-r { animation: in-r .32s cubic-bezier(.2, .8, .2, 1); }
.screen.in-l { animation: in-l .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes in-r { from { transform: translateX(28px); opacity: .3; } }
@keyframes in-l { from { transform: translateX(-28px); opacity: .3; } }

.now-m { display: flex; flex-direction: column; gap: .8rem; }
.kin-m { font-size: clamp(1.55rem, 8vw, 2.1rem); margin-top: .2rem; }
.now-m > .lead { font-size: .95rem; }

.deck { overflow: hidden; margin: 0 -16px; padding: 4px 16px 10px; touch-action: pan-y; }
.deck-track { display: flex; align-items: flex-start; transition: transform .38s cubic-bezier(.2, .8, .2, 1), height .38s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.deck-track > .act { flex: 0 0 100%; margin-right: 0; user-select: none; -webkit-user-select: none; }
.deck-track > .act[aria-hidden="true"] { opacity: .5; transform: scale(.96); }
.deck-track > .act { transition: opacity .3s, transform .3s, border-color .3s; }
.dots { display: flex; justify-content: center; gap: .3rem; margin-top: -.4rem; }
.dots button { width: 32px; height: 32px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width .3s, background .3s; }
.dots button[aria-selected="true"]::before { width: 22px; background: var(--accent); }

.act-sample .viewer { aspect-ratio: 3 / 2; }
.act .big { font-size: 1.9rem; }
.units { font-size: 2.7rem; }
.rate { font-size: 1.7rem; }
.tally.is-compact .kv dd { font-size: 1rem; }

.mod-grid, .sd-grid { grid-template-columns: 1fr; }
.mod-head h2 { font-size: 1.55rem; }
.samples { margin: 0 -16px; padding: 0 16px .3rem; }
.sample-tab { flex: 0 0 72%; }
.pays li { grid-template-columns: auto 1fr auto; }
.pays li > .muted { grid-column: 2; }
.pays li > .chip { grid-column: 3; grid-row: 1; justify-self: end; }
.pays li > b { grid-column: 1 / span 2; }
.pays li > .btn { grid-column: 3; grid-row: 2; }
.bars li { grid-template-columns: 76px 1fr auto; }
.links li { grid-template-columns: 1fr auto; }
.links li > span { grid-column: 1; font-weight: 600; font-size: .85rem; }
.links li > code { grid-column: 1; }
.links li > .btn { grid-column: 2; grid-row: 1 / span 2; }
.bases { grid-template-columns: 1fr; }
.base { grid-template-columns: auto 1fr; align-items: baseline; gap: .6rem; }
.cal li { grid-template-columns: 1fr auto; }
.cal-day { grid-row: auto; grid-column: 1; }
.cal li > b, .cal li > .muted { grid-column: 1; }
.cal li > .chip { grid-column: 2; grid-row: 1; }
.cal li > .btn { grid-column: 2; grid-row: 2 / span 2; }
.label-card dl div { grid-template-columns: 92px 1fr; }
.codes li { grid-template-columns: auto 1fr; }
.codes li > span:nth-child(3) { grid-column: 1; }
.codes li > span:nth-child(4), .codes li > span:last-child { grid-column: 2; justify-self: end; }
.codes li > span:last-child { grid-column: 2; }
.foot { padding-bottom: 1.5rem; }

.m-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.m-tabs button {
  border: 0; background: none; display: grid; justify-items: center; gap: 2px; padding: .45rem 0 .5rem; min-height: 60px;
  font-size: .7rem; font-weight: 600; color: var(--ink2); cursor: pointer; min-width: 0;
}
.m-tabs button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tabs button[aria-current="page"] { color: var(--accent); }
.ico { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; font-size: 1rem; line-height: 1; }
.m-tabs [aria-current="page"] .ico { background: var(--accent-soft); }
.ico-now::before { content: "◎"; }
.ico-m1::before { content: "₴"; font-weight: 700; }
.ico-m2::before { content: "◆"; }
.ico-m3::before { content: "▲"; }
.ico-more::before { content: "⋯"; font-weight: 700; }

.sheet {
  border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; background: var(--card); color: var(--ink);
  animation: up .3s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(100%); } }
.sheet-body { padding: .6rem 16px calc(1rem + env(safe-area-inset-bottom)); display: grid; gap: .4rem; }
.grab { width: 44px; height: 5px; border-radius: 999px; background: var(--line); justify-self: center; margin-bottom: .4rem; }
.sheet-body h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.sheet-row { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; text-align: left; border: 0; background: var(--bg); border-radius: 14px; padding: .7rem .8rem; cursor: pointer; min-height: 56px; }
.sheet-row small { display: block; color: var(--ink2); font-size: .78rem; line-height: 1.3; }
.toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
.dlg { margin: auto; }
