/* RASIK AI — «Галерея»: проекты #/library (library.js), тарифы и кредиты #/credits #/plans и профиль #/profile (account.js).
   Owner: account screen agent. Loaded after gallery.css; build on the .g-* components and --g-* tokens (docs/DESIGN_GALLERY.md).
   Prefixes: .lb-* library · .ac-* credits & profile. */

/* ======================= #/library «Проекты» ======================= */
.lb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 28px; }
.lb-tabs { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.lb-seg { max-width: 100%; }
.lb-seg > button { padding-inline: 13px; }
.lb-seg .g-count { margin-left: 1px; }
.lb-seg > [aria-checked="true"] .g-count { color: var(--g-accent); }
.lb-search { position: relative; flex: 0 1 300px; min-width: 0; }
.lb-search > svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--g-muted); pointer-events: none; }
.lb-search .g-input { padding-left: 40px; }
.lb-search .g-input::-webkit-search-cancel-button { cursor: pointer; }

.lb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 22px; }
.lb-grid > .g-empty, .lb-grid > .empty { grid-column: 1 / -1; }
.lb-skel { display: grid; gap: 6px; align-content: start; }
.lb-skel .g-skel-line:first-of-type { margin-top: 10px; }

.lb-card { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; container-type: inline-size; }
.lb-media { display: block; width: 100%; padding: 0; text-align: left; border: 0; border-radius: var(--g-r-xs); background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lb-media:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 3px; }
.lb-media .g-art { transition: box-shadow var(--g-dur); }
.lb-media:hover .g-art { box-shadow: 0 0 0 1px var(--g-line-strong); }
.lb-media .g-art--text { background: var(--g-paper); }
.lb-media .g-art--text .g-art-text { padding: 22px 22px 0; font: 400 clamp(15px, 4.6cqi, 19px)/1.5 var(--g-font-display); letter-spacing: -.01em; color: var(--g-ink); -webkit-mask: linear-gradient(180deg, #000 70%, transparent); mask: linear-gradient(180deg, #000 70%, transparent); }
.lb-media .g-art--text .g-art-text::before { content: ""; display: block; width: 22px; height: 2px; margin-bottom: 14px; background: var(--g-accent); }
.lb-media .g-art--text:has(.g-art-tag) .g-art-text { padding-top: 44px; }
/* «Ролик под ключ» (library.js reelCls): the 9:16 frame in a 4:5 card loses ~30% of its height. The clean frame is
   anchored a little above centre — heads of a vertical shot stay in, more of the bottom (subtitle zone) goes; a titled
   cover is shown whole on the mat with the duration badge in the top corner, clear of the burned-in title; unfinished
   orders have no play mark (there is no film yet). */
.lb-reel > img { object-position: 50% 40%; }
.lb-reel--cover > img { object-position: center; }
.lb-reel--cover .g-art-dur { top: 10px; bottom: auto; }
.lb-reel--wip .g-art-play { display: none; }
@container (max-width: 128px) { .lb-reel--cover .g-art-dur { top: 6px; } }
.lb-body { display: grid; align-content: start; gap: 4px; min-width: 0; padding-top: 14px; }
.lb-title { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font: 600 14.5px/1.42 var(--g-font-ui); color: var(--g-ink); overflow-wrap: anywhere; }
.lb-meta { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12.5px; line-height: 1.45; color: var(--g-muted); font-variant-numeric: tabular-nums; }
.lb-st { margin: 3px 0 0; }
.lb-tools { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 44px; margin-top: 4px; }
.lb-open-l { padding-left: 0; padding-right: 4px; cursor: pointer; }
.lb-icons { display: flex; align-items: center; justify-content: flex-end; margin-right: -10px; margin-left: auto; }
.lb-icons .g-icon-btn { color: var(--g-muted); }
.lb-icons .g-icon-btn:hover, .lb-icons .g-icon-btn[aria-expanded="true"] { color: var(--g-ink); }
.lb-icons .g-icon-btn svg { width: 18px; height: 18px; }
@container (max-width: 259px) {
  .lb-open-l { display: none; }
  .lb-icons { margin-left: -10px; margin-right: 0; justify-content: flex-start; }
}
.lb-more { display: flex; justify-content: center; margin-top: 40px; }
.lb-more .g-count { margin-left: 4px; font-size: 12.5px; font-weight: 500; color: var(--g-muted); font-variant-numeric: tabular-nums; }
.lb-menu { min-width: 248px; }
.lb-menu [role="menuitem"] span { min-width: 0; }

/* item side sheet (#drawer; the UA dialog max-width would leave a gap on phones). The media is capped at half the
   screen so the facts stay in view; «Скачать» and «Повторить» live in the sticky .drawer-foot, and the drawer's own
   scroll padding keeps a focused control clear of the sticky head and foot. */
html[data-route="library"] dialog.drawer { max-width: 100%; }
dialog.drawer.lb-drawer { scroll-padding-block: 96px; }
.lb-d-media { position: relative; display: grid; place-items: center; min-height: 180px; max-height: 50vh; max-height: 50dvh; overflow: hidden; border-radius: var(--g-r-xs); background: var(--g-soft-2); }
.lb-d-media > img, .lb-d-media > video { display: block; max-width: 100%; max-height: 50vh; max-height: 50dvh; object-fit: contain; }
.lb-d-media > video { width: 100%; background: transparent; }
.lb-d-media--audio, .lb-d-media--text { place-items: stretch; min-height: 0; max-height: none; overflow: visible; }
.lb-d-aud { display: grid; gap: 16px; padding: 24px; background: var(--g-soft); border-radius: var(--g-r-xs); }
.lb-d-wave { display: block; height: 72px; color: var(--g-accent); }
.lb-d-wave svg { width: 100%; height: 100%; fill: currentColor; }
.lb-d-aud audio { width: 100%; }
.lb-d-text { max-height: 50vh; overflow: auto; padding: 18px 20px; border: 1px solid var(--g-line); border-radius: var(--g-r-xs); background: var(--g-paper); }
.lb-d-text p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.lb-d-meta { display: grid; gap: 16px; }
.lb-prompt { margin: 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--g-accent); font-size: 15px; line-height: 1.6; color: var(--g-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.lb-dl { display: grid; margin: 0; border-top: 1px solid var(--g-line); }
.lb-dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 16px; padding: 11px 0; border-bottom: 1px solid var(--g-line); }
.lb-dl dt { font: 600 11px/1.6 var(--g-font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--g-muted); }
.lb-dl dd { margin: 0; min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.lb-use .g-eyebrow { margin-bottom: 8px; }
.lb-use ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--g-line); }
.lb-use a { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 12px 2px; border-bottom: 1px solid var(--g-line); color: var(--g-ink); font: 500 14.5px/1.3 var(--g-font-ui); text-decoration: none; transition: color var(--g-dur); }
.lb-use a svg { flex: none; width: 18px; height: 18px; color: var(--g-accent); }
.lb-use a span { flex: 1 1 auto; min-width: 0; }
.lb-use a::after { content: ""; flex: none; width: 13px; height: 13px; background: currentColor; color: var(--g-muted); -webkit-mask: var(--g-arrow) center / contain no-repeat; mask: var(--g-arrow) center / contain no-repeat; transition: transform var(--g-dur) var(--g-ease); }
.lb-use a:hover { color: var(--g-accent); }
.lb-use a:hover::after { color: var(--g-accent); transform: translate(2px, -2px); }
.lb-use a:focus-visible { outline-offset: -2px; }
.lb-d-quiet { margin: -6px 0 0; }
.lb-d-hide { margin-left: -2px; padding-inline: 2px; color: var(--g-muted); font-weight: 500; }
.lb-d-hide svg { width: 16px; height: 16px; }
.lb-d-hide:hover { color: var(--g-danger); }
.lb-d-foot { display: flex; gap: 10px; }
.lb-d-foot > * { flex: 1 1 0; min-width: 0; }

@media (max-width: 899px) {
  .lb-search { flex: 1 1 100%; }
  .lb-tabs { flex: 1 1 100%; }
}
@media (max-width: 767px) {
  .lb-bar { margin-bottom: 22px; }
  .lb-tabs { flex: 0 0 calc(100% + 2 * var(--g-gutter)); max-width: none; margin-inline: calc(-1 * var(--g-gutter)); }
  .lb-seg { display: flex; flex-wrap: nowrap; width: 100%; max-width: none; padding-inline: var(--g-gutter); border-radius: 0; scroll-padding-inline: var(--g-gutter); }
  .lb-seg::after { content: ""; flex: none; width: 1px; }
  .lb-dl > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 639px) {
  .lb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
  .lb-body { padding-top: 10px; }
  .lb-title { font-size: 13.5px; }
  .lb-meta { font-size: 12px; }
  .lb-more { margin-top: 32px; }
}

/* ======================= #/credits «Тарифы и кредиты» ======================= */
.ac-h2 { margin: 0; font: 400 clamp(23px, 2.4vw, 27px)/1.25 var(--g-font-display); letter-spacing: -.02em; color: var(--g-ink); text-wrap: balance; }
.ac-h2:focus { outline: none; }
.ac-h2[tabindex] { scroll-margin-top: calc(var(--g-header-h) + env(safe-area-inset-top) + 28px); }
.ac-h2:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 4px; }
.ac-sec .g-section-head { align-items: flex-end; margin-bottom: 18px; }
.ac-sec .g-section-head > div { min-width: 0; }
.ac-sec .g-section-head .g-caption { max-width: 72ch; margin-top: 6px; }
.ac-sec .g-section-head > .g-link { margin-right: -10px; }

/* balance + current plan */
.ac-sum { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--g-line); border-radius: var(--g-r-xs); background: var(--g-paper); overflow: hidden; }
.ac-sum > .g-skel, .ac-sum > .g-empty, .ac-sum > .empty { grid-column: 1 / -1; }
.ac-bal, .ac-now { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 28px 30px 30px; }
.ac-now { border-left: 1px solid var(--g-line); background: var(--g-soft); }
.ac-bal p, .ac-now p { margin: 0; }
.ac-bal-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 2px 0 6px !important; color: var(--g-ink); }
.ac-bal-n .g-big-num { font-size: clamp(42px, 6vw, 66px); }
.ac-bal-n span { font: 600 17px/1.2 var(--g-font-ui); color: var(--g-muted); }
.ac-demo { margin-top: 12px !important; }
.ac-bal-act { gap: 6px 14px; margin-top: 18px; }
.ac-now-t { margin: 2px 0 8px !important; font: 400 clamp(26px, 3vw, 32px)/1.2 var(--g-font-display); letter-spacing: -.02em; color: var(--g-ink); }
.ac-now .g-small { color: var(--g-ink); }
.ac-now .g-small.g-muted { color: var(--g-muted); max-width: 44ch; }
.ac-now .g-small b { font-weight: 700; }
.ac-meter { height: 5px; margin: 14px 0 12px; background: var(--g-soft-2); }
.ac-now .g-tag { background: var(--g-paper); }
/* no subscription: what a credit costs per plan — three compact cells instead of an empty soft block */
.ac-cmp { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.ac-cmp li { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 12px 14px 11px; border: 1px solid var(--g-line); border-radius: var(--g-r-xs); background: var(--g-paper); }
.ac-cmp li.is-hot { border-color: var(--g-accent); }
.ac-cmp-t { font: 600 11px/1.5 var(--g-font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--g-muted); overflow-wrap: anywhere; }
.ac-cmp b { font: 700 19px/1.25 var(--g-font-ui); letter-spacing: -.01em; color: var(--g-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-cmp small { font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--g-ok); font-variant-numeric: tabular-nums; }
.ac-now-go { justify-self: start; margin: 8px 0 -10px -10px; }

/* subscriptions */
.ac-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ac-plans > .g-empty, .ac-plans > .empty { grid-column: 1 / -1; }
.ac-plan { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 26px 24px 24px; border: 1px solid var(--g-line); border-radius: var(--g-r-md); background: var(--g-paper); }
.ac-plan.is-hot { border-color: var(--g-accent); box-shadow: inset 0 3px 0 var(--g-accent); }
.ac-plan.is-cur { background: var(--g-soft); }
.ac-plan p { margin: 0; }
.ac-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.ac-plan-t { margin: 0; font: 400 27px/1.2 var(--g-font-display); letter-spacing: -.02em; color: var(--g-ink); }
.ac-plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: 8px !important; }
.ac-plan-price b { font: 800 clamp(30px, 3.2vw, 36px)/1.05 var(--g-font-ui); letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--g-ink); }
.ac-plan-price span { font-size: 14px; color: var(--g-muted); }
.ac-plan-cr { font-size: 14.5px; color: var(--g-ink); }
.ac-plan-cr b { color: var(--g-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-perks { display: grid; gap: 10px; margin: 8px 0 10px; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--g-line); }
.ac-perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.ac-perks li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 4px; background: var(--g-accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.ac-plan > .g-btn, .ac-plan > .g-btn-secondary { margin-top: auto; }

/* credit packs + promo */
.ac-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ac-packs > .g-skel, .ac-packs > .g-note { grid-column: 1 / -1; }
.ac-pack { display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 44px; padding: 20px 20px 16px; border: 1px solid var(--g-line); border-radius: var(--g-r-md); background: var(--g-paper); color: var(--g-ink); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--g-dur), background-color var(--g-dur); -webkit-tap-highlight-color: transparent; }
.ac-pack:hover { border-color: var(--g-accent); }
.ac-pack:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.ac-pack.is-loading { place-items: center; grid-auto-flow: column; justify-content: center; gap: 10px; min-height: 132px; color: var(--g-muted); font-weight: 600; cursor: progress; }
.ac-pack-cr { font-size: 15px; font-weight: 600; color: var(--g-muted); }
.ac-pack-cr b { margin-right: 2px; font: 800 30px/1.1 var(--g-font-ui); letter-spacing: -.02em; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.ac-pack-bonus { min-height: 1.4em; font-size: 13px; font-weight: 600; color: var(--g-ok); font-variant-numeric: tabular-nums; }
.ac-pack-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--g-line); }
.ac-pack-price { font: 700 16px/1.3 var(--g-font-ui); font-variant-numeric: tabular-nums; }
.ac-pack .g-link--inline { font-size: 14px; }
.ac-pack:hover .g-arr::after { transform: translate(2px, -2px); }
.ac-promo { max-width: 560px; margin-top: 24px; }
.ac-promo-row { display: flex; gap: 8px; }
.ac-promo-row .g-input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.ac-promo-row .g-input::placeholder { text-transform: none; letter-spacing: 0; }
.ac-promo-msg.is-ok { color: var(--g-ok); font-weight: 600; }
.ac-promo-msg.is-err { color: var(--g-danger); font-weight: 600; }
.ac-promo-msg b { color: inherit; }

/* history table, grouped by day */
.ac-htable td { vertical-align: top; }
.ac-htable td b { font-weight: 600; }
.ac-htable .ac-time { width: 64px; color: var(--g-muted); white-space: nowrap; }
.ac-htable td small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 4px; }
.ac-gid { margin-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--g-muted); text-decoration: none; white-space: nowrap; }
a.ac-gid { position: relative; color: var(--g-accent); }
/* «№21» (generation or order) is a short inline link: widen its hit area to 44 px without moving the row's text */
a.ac-gid::before { content: ""; position: absolute; inset: -14px -12px; }   /* даже «№4» — не меньше 44×44 */
a.ac-gid:hover { text-decoration: underline; text-underline-offset: 3px; }
.ac-kind { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1.5 var(--g-font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--g-muted); }
.ac-kind::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ac-kind--in { color: var(--g-ok); }
.ac-kind--refund { color: var(--g-info); }
.ac-kind--hold { color: var(--g-warn); }
.ac-kind--out { color: var(--g-muted); }
.ac-note { font-size: 12.5px; color: var(--g-muted); }
.ac-htable td.num { font-size: 14.5px; font-weight: 600; }
.ac-htable tr.is-void td.num { color: var(--g-muted); font-weight: 500; text-decoration: line-through; text-decoration-thickness: 1px; }
.g-table .ac-grp th { padding: 22px 0 8px; border-bottom: 1px solid var(--g-line); font: 700 13px/1.3 var(--g-font-ui); letter-spacing: 0; text-transform: none; color: var(--g-ink); }
.g-table tbody:first-of-type .ac-grp th { padding-top: 16px; }
.ac-hnote { max-width: 70ch; margin: 14px 0 0; }

/* price list (collapsible) */
.ac-prices { border-top: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); }
.ac-prices > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; min-height: 64px; padding: 18px 40px 18px 0; position: relative; list-style: none; cursor: pointer; }
.ac-prices > summary::-webkit-details-marker { display: none; }
.ac-prices > summary:focus-visible { outline-offset: 4px; }
.ac-prices > summary:hover .ac-h2 { color: var(--g-accent); }
.ac-sum-ic { position: absolute; right: 4px; top: 50%; display: grid; place-items: center; width: 32px; height: 32px; margin-top: -16px; border: 1px solid var(--g-line); border-radius: 50%; color: var(--g-ink); transition: transform var(--g-dur) var(--g-ease); }
.ac-sum-ic svg { width: 16px; height: 16px; transform: rotate(90deg); }
.ac-prices[open] .ac-sum-ic { transform: rotate(180deg); }
.ac-prices > div { padding: 0 0 18px; }
.ac-pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; padding-top: 4px; }
.ac-pgroup { min-width: 0; }
.ac-pgroup .g-eyebrow { margin: 0 0 6px; }
.ac-plist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--g-line); }
.ac-plist li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--g-line); }
.ac-pl-t { display: grid; gap: 1px; min-width: 0; }
.ac-pl-t b { font: 600 14px/1.35 var(--g-font-ui); }
.ac-pl-t small { font-size: 12.5px; line-height: 1.4; color: var(--g-muted); }
.ac-pl-t { flex: 1 1 auto; }
.ac-pl-p { flex: none; display: grid; justify-items: end; gap: 1px; max-width: 62%; text-align: right; font-variant-numeric: tabular-nums; }
.ac-pl-p b { font: 600 14px/1.35 var(--g-font-ui); white-space: nowrap; }
.ac-pl-p small { font-size: 12.5px; line-height: 1.4; color: var(--g-muted); white-space: nowrap; }
.ac-pnote { max-width: 70ch; margin: 18px 0 0; }
.ac-fine { display: flex; align-items: flex-start; gap: 10px; max-width: 76ch; margin: 42px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--g-muted); }
.ac-fine svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--g-accent); }
.ac-fine b { color: var(--g-ink); }

@media (max-width: 899px) {
  .ac-pgrid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ac-plans { gap: 12px; }
  .ac-plan { padding: 22px 16px 18px; }
  .ac-plan-t { font-size: 24px; }
  .ac-plan-price b { font-size: 28px; }
  .ac-perks li { font-size: 13.5px; }
}
@media (max-width: 759px) {
  .ac-plans { grid-template-columns: minmax(0, 1fr); max-width: 600px; }
}
@media (max-width: 767px) {
  .ac-sum { grid-template-columns: minmax(0, 1fr); }
  .ac-now { border-left: 0; border-top: 1px solid var(--g-line); }
  .ac-bal, .ac-now { padding: 22px 18px 24px; }
  .ac-plan { padding: 22px 18px 20px; }
  .ac-packs { grid-template-columns: minmax(0, 1fr); }
  .ac-pack { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; padding: 16px 18px; }
  .ac-pack-bonus { grid-column: 1; min-height: 0; }
  .ac-pack-bonus:empty { display: none; }
  .ac-pack-foot { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; gap: 2px; margin: 0; padding: 0; border: 0; align-self: center; }
  .ac-pack-cr b { font-size: 26px; }
  .ac-htable .ac-time { width: 52px; }
  .ac-htable th, .ac-htable td { padding-left: 6px; padding-right: 6px; }
  .ac-fine { margin-top: 32px; }
  .ac-sec .g-section-head > .g-link { margin: -8px 0 0 -10px; }
}
@media (max-width: 379px) {
  .ac-cmp { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ac-cmp li { grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 10px; padding: 10px 12px; }
  .ac-cmp b { font-size: 16px; }
  .ac-promo-row { flex-wrap: wrap; }
  .ac-promo-row .g-btn-secondary { flex: 1 1 100%; }
  .ac-htable .ac-time { width: 44px; font-size: 12.5px; }
  .ac-gid { margin-left: 6px; }
}

/* ======================= #/profile «Профиль» ======================= */
.ac-set { max-width: 940px; border-top: 1px solid var(--g-line); }
.ac-set--guest { margin-top: 12px; }
.ac-row { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px 44px; padding: 30px 0; border-bottom: 1px solid var(--g-line); }
.ac-row-h { min-width: 0; }
.ac-h3 { margin: 0; font: 400 22px/1.25 var(--g-font-display); letter-spacing: -.015em; color: var(--g-ink); }
.ac-row-h p { margin: 8px 0 0; max-width: 34ch; font-size: 13.5px; line-height: 1.55; color: var(--g-muted); }
.ac-row-h p b { color: var(--g-ink); }
.ac-row-b { display: grid; align-content: start; gap: 20px; min-width: 0; }
.ac-row-b > .g-text { margin: 0; color: var(--g-ink); }
.ac-me { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ac-me > div { display: grid; gap: 2px; min-width: 0; }
.ac-me b { font: 700 16px/1.3 var(--g-font-ui); overflow-wrap: anywhere; }
.ac-me span:not(.ac-ava) { font-size: 13.5px; color: var(--g-muted); overflow-wrap: anywhere; }
.ac-ava { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--g-line); border-radius: 50%; background: var(--g-soft); color: var(--g-ink); font: 700 17px/1 var(--g-font-ui); letter-spacing: .02em; }
.ac-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-inline .g-input { flex: 1 1 220px; min-width: 0; }
.ac-inline .g-btn-secondary { flex: none; }
.ac-theme > button { min-width: 96px; }
.ac-link { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ac-link code { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid var(--g-line); border-radius: var(--g-r-xs); background: var(--g-soft); color: var(--g-ink); font: 500 13px/1.45 var(--g-font-ui); overflow-wrap: anywhere; }
.ac-links { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--g-line); }
.ac-links a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 2px; border-bottom: 1px solid var(--g-line); color: var(--g-ink); font: 500 14.5px/1.3 var(--g-font-ui); text-decoration: none; transition: color var(--g-dur); }
.ac-links a svg { flex: none; width: 18px; height: 18px; color: var(--g-muted); transition: color var(--g-dur); }
.ac-links a span { flex: 1 1 auto; min-width: 0; }
.ac-links a::after { content: ""; flex: none; width: 13px; height: 13px; background: var(--g-muted); -webkit-mask: var(--g-arrow) center / contain no-repeat; mask: var(--g-arrow) center / contain no-repeat; transition: transform var(--g-dur) var(--g-ease), background-color var(--g-dur); }
.ac-links a:hover { color: var(--g-accent); }
.ac-links a:hover svg { color: var(--g-accent); }
.ac-links a:hover::after { background: var(--g-accent); transform: translate(2px, -2px); }
.ac-links a:focus-visible { outline-offset: -2px; }
.ac-logout, .ac-row-b > .g-link { justify-self: start; }
.ac-row-link { margin: -6px 0 0 -10px; }

@media (max-width: 767px) {
  .ac-row { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 0; }
  .ac-row-h p { max-width: 60ch; }
  .ac-h3 { font-size: 21px; }
}
@media (max-width: 479px) {
  .ac-theme { display: flex; width: 100%; }
  .ac-theme > button { flex: 1 1 0; min-width: 0; padding-inline: 8px; white-space: normal; text-align: center; line-height: 1.2; }
  .ac-link { flex-wrap: wrap; }
  .ac-link code { flex-basis: 100%; }
}
