/**
 * Innet — Mobile contract (<768)
 * Canon: docs/BRAND-BOOK.md §4c
 * Load last among layout CSS. Dense desktop rows MUST stack here.
 */

/* Portrait <768, or short landscape on a coarse phone (844×390). */
@media (max-width: 767px),
  (hover: none) and (max-height: 540px),
  (max-height: 540px) and (orientation: landscape) {
  /* Shell: full width + padding (no 70/75vw squeeze) */
  #page-root,
  #page-root:has(> .home-quiet),
  #page-root:has(> .home-page),
  #page-root:has(> .page-editorial--about),
  html[data-vision~="large"] #page-root:has(> .home-quiet),
  html[data-vision~="large"] #page-root:has(> .home-page) {
    max-width: none;
    width: 100%;
    padding-inline: 1rem;
  }

  #page-root:has(> .home-quiet),
  html[data-vision~="large"] #page-root:has(> .home-quiet) {
    padding-top: 0;
  }

  body.is-member-page #page-root {
    max-width: none;
    padding-inline: 0.85rem;
  }

  /* Header lockup */
  .header-shell {
    padding-inline: 0.75rem;
  }

  /* Mark size from 20260826 belt (E-LOCKUP-TALL / MENU-CLIP). Not 66×42 — that pushed Menu off 390. */
  .logo-mark.logo-mark--img {
    width: clamp(3.25rem, 22vw, 4.25rem);
    height: auto;
    max-height: 40px;
    max-width: 4.25rem;
    min-width: 3.25rem;
    aspect-ratio: 991 / 637;
  }

  .header-left .tagline {
    display: none !important;
  }

  .header-left .logo {
    max-height: 48px;
    gap: 0.28rem;
  }

  .header-left .logo-text {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.75rem;
    line-height: 0.85;
  }

  .header-left .logo-tld {
    margin-block-start: 0;
  }

  .header-inner--v3 .header-actions {
    gap: 0.15rem;
  }

  .header-member-dock__inner {
    gap: 0.5rem;
  }

  .header-member-dock__title .page-title {
    font-size: 1.0625rem;
  }

  .header-member-dock__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    justify-content: stretch;
    gap: 0.2rem;
    padding: 0.2rem;
    overflow: visible;
    scrollbar-width: none;
  }

  .header-member-dock__tab,
  .header-member-dock__tab--links {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    padding-inline: 0.15rem;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
    overflow: hidden;
    text-overflow: unset;
    border-width: 1px;
  }

  .header-member-dock__title {
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  .header-member-dock__title .workspace-id {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Home quiet — section outer pad 0; keep hero bottom pad so mission↛footer glue */
  .home-quiet {
    min-height: 0;
    align-items: flex-start;
    margin-block: 0;
    padding-block: 0;
  }

  .hero-quiet {
    padding: 0 0 1.5rem;
  }

  .hero-quiet .brand-hero,
  .hero-quiet .page-title--hero {
    font-size: clamp(2.15rem, 9vw, 2.75rem);
    line-height: 1.08;
  }

  .hero-quiet .page-lead--hero {
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero-quiet .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .hero-quiet .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .home-quiet-links {
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.8125rem;
  }

  /* About / privacy */
  .page-editorial--about {
    padding-block: 0.25rem 1.5rem;
  }

  .page-editorial--about .about-hero .page-title {
    max-width: none;
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .page-editorial--about .about-hero .page-lead {
    font-size: 0.9375rem;
  }

  .about-toc {
    flex-wrap: wrap;
    overflow-x: hidden;
    gap: 0.35rem 0.65rem;
    padding-bottom: 0.65rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .about-toc::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .about-toc a {
    flex: 0 1 auto;
    white-space: nowrap;
    font-size: 0.75rem;
  }

  .page-editorial--about .about-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .page-editorial--about .about-layers__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.5rem 0;
  }

  .page-editorial--about .values-grid--flat {
    grid-template-columns: 1fr;
  }

  .category-rail {
    grid-template-columns: 1fr;
  }

  .page-editorial--about .about-principles__item {
    gap: 0.5rem;
  }

  .page-editorial--about .about-principles__n {
    font-size: 1.25rem;
  }

  .privacy-page.page-editorial--about .privacy-layer-grid--flat {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  /* Reset editorial @720 grid-column:2 (implicit 2nd col) */
  .privacy-schema__toolbar,
  .privacy-schema__toolbar:has(.privacy-learned:not([hidden])) {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .privacy-schema__toolbar .privacy-schema__foot,
  .privacy-schema__toolbar .privacy-learned,
  .privacy-schema__toolbar .privacy-schema__actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .privacy-schema__toolbar .privacy-schema__foot {
    order: 1;
  }

  .privacy-schema__toolbar .privacy-learned {
    order: 2;
    justify-self: start;
    font-size: 0.95rem;
  }

  .privacy-schema__toolbar .privacy-schema__actions {
    order: 3;
    justify-self: stretch;
  }

  .privacy-schema__toolbar .privacy-reveal-btn {
    width: 100%;
    justify-content: center;
  }

  .privacy-learned__clock {
    flex-wrap: wrap;
  }

  /* Dashboard */
  .member-page--dashboard {
    min-height: 0;
    padding-top: 0.25rem;
  }

  .dashboard-fluid {
    gap: 0.65rem;
    align-items: start;
  }

  .dashboard-hero-row,
  .dashboard-secure-row,
  .dashboard-tools-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.35rem 0;
  }

  .throw-pad {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .throw-pad__hub {
    grid-column: 1 / -1;
    order: -1;
  }

  .throw-pad--empty {
    grid-template-columns: 1fr 1fr;
  }

  .throw-pad--empty .throw-pad__hub {
    grid-column: 1 / -1;
    order: -1;
  }

  .throw-pad__wing--start,
  .throw-pad__wing--end {
    align-items: stretch;
    text-align: center;
  }

  .throw-pad__gestures {
    max-width: none;
    margin-inline: 0;
  }

  .throw-pad__btn {
    min-width: 0;
    width: 100%;
    min-height: 2.5rem;
  }

  .access-status-grid {
    grid-template-columns: 1fr !important;
    gap: 0.45rem;
  }

  .panel-access .meta-item:has(.access-countdown) {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: start;
  }

  .panel-access .access-countdown {
    font-size: clamp(1.1rem, 4.8vw, 1.35rem);
    flex-wrap: wrap;
    overflow-x: hidden;
    max-width: 100%;
  }

  .panel-access .access-countdown--expired .access-countdown__link {
    flex-wrap: wrap;
    white-space: normal;
  }

  .member-page .link-section__head .btn {
    min-height: 2.5rem;
  }

  /* Payment: title / status / input / buttons */
  .member-page--dashboard .payment-strip {
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .member-page--dashboard .payment-strip__empty {
    white-space: normal;
  }

  .member-page--dashboard .payment-strip__enter {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    justify-self: stretch;
  }

  .member-page--dashboard .payment-strip__input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .member-page--dashboard .payment-strip__enter .btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  /* Security: quota then actions (stack, no side void) */
  .security-toolbar {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    align-items: stretch;
  }

  .security-toolbar .panel-id-quota {
    order: -1;
    align-items: center;
    text-align: center;
    max-width: none;
    width: 100%;
    padding: 0 0 0.55rem;
    border-inline-start: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .member-page .metric-grid--id-quota {
    justify-items: center;
  }

  .member-page .metric-grid--id-quota .metric-card {
    align-items: center;
  }

  .member-page .metric-grid--id-quota .metric-value {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .member-page .metric-grid--id-quota .metric-label,
  .panel-id-quota__hint {
    text-align: start;
    max-width: none;
  }

  .panel-id-quota .btn {
    width: auto;
    min-width: 0;
    align-self: flex-start;
  }

  .panel-security .security-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .panel-security .security-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  .security-phrase__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .security-phrase__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  .member-page--dashboard .access-config-field {
    flex-direction: column;
    align-items: stretch;
  }

  /* Row rule `flex: 1 1 16rem` becomes a ~16rem-tall field in a column (html 138%). */
  .member-page--dashboard .access-config-field .link-input {
    flex: 0 0 auto;
    flex-basis: auto;
    width: 100%;
    min-height: 44px;
    height: 44px;
    max-height: 48px;
    padding-block: 0;
  }

  .member-page--dashboard .access-config-field .btn {
    margin-inline-start: 0;
    width: 100%;
    justify-content: center;
  }

  .member-page--dashboard .panel-access > h2,
  .member-page--dashboard .panel-access > .dash-soft-lead,
  .member-page--dashboard .access-line .status-label {
    display: none;
  }

  .member-page--dashboard .access-pin-field .link-input {
    width: 8.5rem;
    max-width: 100%;
    flex: 0 0 auto;
  }

  .dashboard-foot-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-top: 0.65rem;
  }

  /* Footer: brand + 3×2 links only; Aa+ overlay on base (never a 3rd grid row) */
  .site-footer {
    padding: 0;
    margin-top: 0.35rem;
  }

  .site-footer .footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "links";
    grid-template-rows: auto auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.06rem;
    padding: 0.12rem 0.85rem 0.08rem;
    position: relative;
  }

  .footer-about-stack {
    grid-area: brand;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex: none;
    position: relative;
    z-index: 1;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .site-footer .footer-links {
    grid-area: links;
    position: relative;
    z-index: 1;
  }

  /* Watermark overlays footer base — out of flow; hit ≥44; do not shrink on Aa+ */
  .footer-access {
    grid-area: unset !important;
    order: unset !important;
    position: absolute !important;
    inset-inline-end: 0.15rem;
    inset-block-end: 0;
    justify-self: auto;
    align-self: auto;
    z-index: 2;
    pointer-events: none;
    margin: 0 !important;
    flex: none !important;
  }

  .footer-access #vision-footer-toggle,
  .footer-access .vision-footer-toggle,
  html[data-vision~="large"] .footer-access #vision-footer-toggle,
  html[data-vision~="large"] .footer-access .vision-footer-toggle,
  html[data-vision~="large"] .footer-access #vision-footer-toggle[aria-pressed="true"] {
    pointer-events: auto;
    opacity: 1;
    font-size: inherit;
    min-height: 44px !important;
    min-width: 44px !important;
    height: auto;
    padding: 0.1rem 0.15rem;
    transform: none;
  }

  .footer-about-stack,
  .footer-brand,
  .footer-brand--meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.05rem 0.3rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .footer-brand--meta {
    font-size: 0.6rem;
    line-height: 1.15;
  }

  .footer-meta {
    white-space: normal;
    font-size: 0.6rem;
    line-height: 1.15;
    max-width: 100%;
  }

  .site-footer .footer-links .footer-donate {
    display: none !important;
  }

  /* §1e / §4c: 3 col × 2 row — not 2×3. Mid col wider for «Конфиденциальность». */
  .site-footer .footer-links {
    grid-area: links;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.85fr) minmax(0, 0.75fr);
    gap: 4px 6px;
    width: 100%;
    margin-inline-start: 0;
    justify-content: stretch;
    align-items: stretch;
    justify-items: stretch;
    flex-wrap: nowrap;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* Explicit 3×2 — order in index.html: About Archive Pricing / FAQ Privacy Terms */
  .site-footer .footer-links a:nth-child(1) { grid-column: 1; grid-row: 1; }
  .site-footer .footer-links a:nth-child(2) { grid-column: 2; grid-row: 1; }
  .site-footer .footer-links a:nth-child(3) { grid-column: 3; grid-row: 1; }
  .site-footer .footer-links a:nth-child(4) { grid-column: 1; grid-row: 2; }
  .site-footer .footer-links a:nth-child(5) { grid-column: 2; grid-row: 2; }
  .site-footer .footer-links a:nth-child(6) { grid-column: 3; grid-row: 2; }

  .site-footer .footer-links a {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: flex-start;
    align-items: center;
    padding: 0.15rem 0.08rem !important;
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: visible;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
    text-overflow: unset;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .footer-about-stack {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .tier-card-grid,
  .tier-card-grid--compact,
  .tier-card-grid--app {
    grid-template-columns: 1fr !important;
  }

  .pricing-card-grid {
    grid-template-columns: 1fr !important;
  }

  .dash-need-chip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--surface);
  }

  .dash-need-chip__text {
    flex: 1 1 12rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
  }

  .dash-need-chip__cta {
    flex: 0 0 auto;
    min-height: 2.5rem;
  }

  .header-member-dock__hint-wrap,
  .dash-coach {
    display: none !important;
  }

  html,
  body,
  #app-shell {
    max-width: 100%;
  }

  .header-inner--v3 {
    max-width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
  }

  .header-inner--v3 .header-left,
  .header-left {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 6.25rem;
    height: auto;
  }

  .header-left .logo {
    min-width: 0;
    flex-shrink: 1;
    max-height: 48px;
  }

  .header-status,
  .header-status--solo {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    justify-content: center;
    overflow: visible;
    z-index: 2;
  }

  .header-status__chip {
    min-width: 36px;
    width: 36px;
    min-height: 36px;
    height: 36px;
    max-height: 36px;
    padding: 0;
    flex-shrink: 1;
  }

  .site-header--v3 .menu-toggle-label,
  .menu-toggle-label {
    display: none;
  }

  /* 2.75rem × html 138% = 61px and clips #menu-toggle past clientWidth.
     Touch floor is --touch 44px (px, not rem). Do not shrink the hamburger. */
  .site-header--v3 .menu-toggle,
  .menu-toggle {
    box-sizing: border-box;
    flex: 0 0 44px;
    flex-shrink: 0;
    min-width: 44px;
    width: 44px;
    max-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0;
  }

  .header-status__label {
    display: none !important;
  }

  .header-inner--v3 .header-actions {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    margin-inline-start: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  html[data-vision~="large"] .auth-status__label {
    display: inline !important;
    font-size: 12px;
  }

  /* Aa+ html 172% must scale content, not chrome. Book §1e: hide lamp labels
     (already). Keep Aa+ visible. Hamburger / tools ≥44px, not html 16px. */
  html[data-vision~="large"] .logo-mark.logo-mark--img {
    width: 62px;
    min-width: 62px;
    max-width: 62px;
    height: 40px;
    max-height: 40px;
  }

  html[data-vision~="large"] .header-left .logo-text {
    font-size: 13px;
  }

  html[data-vision~="large"] .header-inner,
  html[data-vision~="large"] .header-inner--v3,
  html[data-vision~="large"] .header-inner--v3 .header-actions {
    min-height: 83px;
  }

  html[data-vision~="large"] .header-inner--v3 .header-left,
  html[data-vision~="large"] .header-left {
    min-width: 84px;
    max-width: 120px;
  }

  html[data-vision~="large"] .header-tools__display .lang-dropdown__toggle,
  html[data-vision~="large"] .header-tools__display .vision-large-btn,
  html[data-vision~="large"] .header-tools__display .vision-cb-btn,
  html[data-vision~="large"] .header-tools__display .theme-cycle-btn,
  html[data-vision~="large"] .header-tools__display .mood-switch {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
  }

  html[data-vision~="large"] .header-tools__display .lang-dropdown__toggle {
    width: auto;
    max-width: none;
    min-width: 44px;
  }

  html[data-vision~="large"] .header-status,
  html[data-vision~="large"] .header-status--solo {
    width: auto;
    max-width: none;
    flex-direction: row;
    align-items: center;
  }

  html[data-vision~="large"] .header-status__chip {
    min-width: 36px;
    width: 36px;
    min-height: 36px;
    max-height: 36px;
    height: 36px;
    padding: 0;
  }

  html[data-vision~="large"] .auth-status__toggle {
    min-height: 44px;
    max-height: 44px;
    height: 44px;
    min-width: 44px;
    padding-block: 0;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  html[data-vision~="large"] .header-tools__display .vision-large-btn .vision-large-btn__art {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  html[data-vision~="large"] .header-tools__display .vision-large-btn .aa-mark--a {
    font-size: 16px;
  }

  html[data-vision~="large"] .header-tools__display .vision-large-btn .aa-mark--a2 {
    font-size: 13px;
  }

  html[data-vision~="large"] .header-tools__display .vision-large-btn .aa-mark--plus {
    font-size: 12px;
  }

  html[data-vision~="large"] .site-header--v3 .menu-toggle,
  html[data-vision~="large"] .menu-toggle {
    box-sizing: border-box;
    flex: 0 0 44px;
    flex-shrink: 0;
    min-width: 44px;
    width: 44px;
    max-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0;
  }

  html[data-vision~="large"] .header-member-dock__tab,
  html[data-vision~="large"] .header-member-dock__tab--links {
    min-height: 44px;
    font-size: 12px;
    padding-inline: 4px;
    padding-block: 0;
  }

  html[data-vision~="large"] .header-member-dock__title .page-title {
    font-size: 18px;
  }

  .page-auth,
  .page-auth--combo,
  .page-auth--one-gesture {
    overflow: visible;
  }

  /* Login air: finish density header→КАБИНЕТ→card; CTA stays in fold (E-20260903-LOGIN-AIR) */
  #page-root:has(> .page-auth) {
    padding-top: 0;
    padding-bottom: 0.45rem;
    flex-grow: 0;
  }

  body:has(#page-root > .page-auth) .site-footer {
    margin-top: 0.2rem;
  }

  .page-auth--combo .auth-layout {
    padding-top: 0;
  }

  .page-auth--combo .auth-header {
    margin-bottom: 0.2rem;
  }

  .page-auth--combo .auth-header .eyebrow {
    margin-top: 0;
    margin-bottom: 0.1rem;
  }

  .page-auth--combo .auth-header .page-title {
    margin-top: 0;
    margin-bottom: 0;
  }

  .page-auth--combo .auth-header .page-lead {
    display: none;
  }

  .page-auth--combo .auth-card--flat {
    overflow: visible;
    padding: 0.65rem 0.7rem;
  }

  #create-intro {
    display: flex;
    flex-direction: column;
  }

  #create-intro > .auth-create-lead {
    order: 0;
    margin-bottom: 0.35rem;
  }

  #create-intro > #register-confirm {
    order: 1;
    width: 100%;
    min-height: 2.75rem;
  }

  #create-intro > #create-error {
    order: 2;
  }

  #create-intro > .auth-disclosure--more {
    order: 3;
  }

  #create-intro > #register-context {
    order: 4;
  }

  .toast {
    top: 4.85rem;
    bottom: auto;
    transform: translateX(-50%) translateY(-120%);
    z-index: 240;
  }

  .toast.is-visible {
    transform: translateX(-50%) translateY(0);
  }

  .panel-access {
    display: flex;
    flex-direction: column;
  }

  .panel-access > h2 {
    order: 0;
    margin-bottom: 0.3rem;
  }

  .panel-access > .access-lines {
    order: 1;
  }

  .panel-access > .access-how {
    order: 2;
  }

  .panel-access > .access-qr-fold {
    order: 3;
  }

  .panel-access > .dash-soft-lead {
    order: 4;
  }

  .panel-access > .access-line-pick {
    order: 5;
  }

  .panel-access > .access-status-grid {
    order: 6;
  }

  .panel-access > .access-downtime,
  .panel-access > .access-proto-note {
    order: 7;
  }

  /* QR purpose tile — stack on phone (seal.css 2-col only ≤420; landscape 844 breaks) */
  .qr-tile {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0.5rem 0.65rem;
    box-sizing: border-box;
  }

  .qr-tile .qr-wrap,
  .qr-tile .qr-wrap.innet-seal--qr,
  .qr-wrap.qr-wrap--fit {
    width: min(100%, 11rem);
    max-width: 100%;
    margin-inline: auto;
  }

  .qr-tile__meta {
    width: 100%;
    align-items: stretch;
  }

  .qr-tile__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.35rem;
  }

  .qr-tile__actions .btn {
    width: 100%;
    min-height: 2.75rem;
    justify-content: center;
  }

  .page-auth--key .auth-disclosure--sheet[open] .auth-disclosure__body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
  }

  .panel-security .dash-soft-lead {
    display: none;
  }

  .panel-security h2 {
    margin: 0.35rem 0 0.25rem;
    font-size: 1.05rem;
  }

  .security-copy-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    margin: 0 0 0.45rem;
  }

  .security-copy-field .btn-primary {
    width: 100%;
    min-height: 2.75rem;
  }

  .security-qr-inline {
    width: min(100%, 11rem);
    margin: 0 auto 0.4rem;
  }

  .security-qr-inline canvas,
  .security-qr-inline img {
    max-width: 100%;
    height: auto;
  }

  /* Privacy: 17 card-rows were ~5× viewport. Keep 4 facts, one tight row. */
  .privacy-page .privacy-schema__head {
    display: none;
  }

  .privacy-page .privacy-schema__row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0.08rem 0.45rem;
    padding: 0.16rem 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
  }

  .privacy-page .privacy-schema__row + .privacy-schema__row {
    border-top: none;
  }

  .privacy-page .privacy-schema__param {
    font-size: 0.8125rem;
    line-height: 1.25;
  }

  .privacy-page .privacy-schema__why,
  .privacy-page .privacy-schema__ret {
    grid-column: 1 / -1;
    display: inline;
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .privacy-page .privacy-schema__why::before,
  .privacy-page .privacy-schema__ret::before,
  .privacy-page .privacy-schema__val::before {
    content: none;
  }

  .privacy-page .privacy-schema__row .privacy-schema__val {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    background: none;
    font-size: 0.75rem;
    line-height: 1.25;
  }

  .privacy-page .privacy-schema__group {
    margin: 0.28rem 0 0.4rem;
  }

  .privacy-page .about-contact {
    margin: 0.45rem 0 0.2rem;
    font-size: 0.8125rem;
  }

  .privacy-page .eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.7rem;
  }

  .privacy-page .privacy-schema__group-title {
    margin: 0 0 0.2rem;
    font-size: 0.6875rem;
  }

  .privacy-page .page-lead,
  .privacy-page .privacy-schema__lead {
    display: none;
  }

  .privacy-page .page-title {
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 0 0 0.35rem;
  }

  .privacy-page .privacy-schema__foot {
    font-size: 0.75rem;
    margin-top: 0.35rem;
  }

  .tier-card--compact {
    min-height: 0;
    padding: 0.65rem 0.75rem;
    gap: 0.2rem;
  }

  .donate-page .donate-paid-card,
  .donate-page .donate-success {
    padding: 0.7rem 0.8rem;
  }

  .donate-page .page-title--compact {
    font-size: 1.25rem;
  }

  .pricing-card {
    padding: 0.55rem 0.7rem;
    gap: 0.25rem;
  }

  .pricing-card__amount {
    font-size: 1.15rem;
  }

  .pricing-page .page-nav-hint,
  .pricing-page .page-lead {
    display: none;
  }

  .pricing-page .pricing-card-grid {
    margin: 0.4rem 0;
    gap: 0.45rem;
  }

  .terms-page .editorial-block {
    margin-block: 0.65rem;
  }

  .terms-page .editorial-block h2 {
    font-size: 1.05rem;
    margin: 0 0 0.3rem;
  }

  .terms-page .editorial-block p,
  .terms-page .editorial-block li {
    margin: 0 0 0.35rem;
  }

  .terms-page .page-lead {
    margin-bottom: 0.5rem;
  }

  .donate-page .donate-top-grid {
    margin-bottom: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .donate-page .donate-lead-tight {
    max-width: none;
    font-size: 0.8125rem;
  }

  .donate-page .tier-card--compact {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0.1rem;
    min-height: 3.15rem;
    padding: 0.4rem 0.65rem;
  }

  .donate-page .tier-card--compact .tier-card__amount {
    font-size: 1.05rem;
  }

  .donate-page .tier-card--compact .tier-card__name {
    font-size: 0.875rem;
  }

  .donate-page .tier-card--compact .tier-card__hint {
    grid-column: 1 / -1;
    font-size: 0.75rem;
  }

  .donate-paid-fold > summary,
  .donate-facts-fold > summary {
    min-height: 2.5rem;
  }

  .donate-page .donate-energy-link {
    margin: 0.35rem 0 0;
  }

  #page-root:has(> .page-lab-form) {
    padding-block: 0.45rem;
  }

  .page-lab-form .innet-seal--form .stir-pad {
    width: 6.5rem;
    height: 6.5rem;
    min-width: 6.5rem;
    min-height: 6.5rem;
    flex: 0 0 6.5rem;
    margin-inline: 0;
  }

  .page-lab-form .form-seal-row {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-top: 0.25rem;
  }

  .page-lab-form .form-chips-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .page-lab-form .form-chips {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem;
    flex: 0 1 auto;
    min-width: 0;
  }

  .page-lab-form .form-chip {
    min-width: 0;
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
  }

  .page-lab-form .form-chip--theme,
  .page-lab-form .form-chip--screen {
    grid-column: 1 / -1;
  }

  .page-lab-form .form-chips-more {
    margin: 0;
  }

  .page-lab-form .form-chips-more__summary {
    list-style: none;
    cursor: pointer;
    padding: 0.35rem 0.55rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
    background: var(--surface-muted, var(--surface));
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 600;
  }

  .page-lab-form .form-chips-more__summary::-webkit-details-marker {
    display: none;
  }

  .page-lab-form .form-chips--rest {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
  }

  .page-lab-form .eyebrow {
    display: none;
  }

  .page-lab-form .page-head {
    margin-bottom: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .page-lab-form .stir-lead {
    margin-bottom: 0.2rem;
  }

  .page-lab-form .innet-seal--form {
    padding: 0.4rem 0.55rem;
  }

  body.is-dashboard-dock #page-root {
    padding-block: 0.4rem 0.55rem;
  }

  .member-page--dashboard #dash-pane-links .dashboard-fluid {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .member-page--dashboard .panel-links .panel__head {
    margin-bottom: 0.3rem;
  }

  .member-page--dashboard .panel-links .link-card__desc,
  .member-page--dashboard .panel-links .link-card__head .status-label {
    display: none;
  }

  .member-page--dashboard .panel-links .link-card {
    padding: 0.45rem 0.6rem;
    gap: 0.3rem;
  }

  .member-page--dashboard .panel-links .link-field {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.35rem;
  }

  .member-page--dashboard .panel-links .link-field .btn {
    flex: 0 0 auto;
    min-height: 2.5rem;
    min-width: 5.5rem;
  }

  .member-page--dashboard .panel-links--locked .links-locked-strip {
    margin-top: 0.3rem;
    padding: 0.35rem 0.5rem;
  }

  .member-page--dashboard .panel-links .links-app-hint {
    display: none;
  }

  /* Donate is not a tab: ID + badge one row, then tabs. H1 clipped (tablist name). */
  .header-member-dock__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.28rem;
    padding: 0.2rem 0 0.32rem;
  }

  .header-member-dock__title {
    position: relative;
    grid-column: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    width: 100%;
    min-width: 0;
  }

  .header-member-dock__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    justify-content: stretch;
    gap: 0.2rem;
    overflow: visible;
  }

  .header-member-dock__tools {
    justify-self: stretch;
    justify-content: flex-start;
    margin-inline-start: 0;
  }

  .header-member-dock__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.2rem 0.15rem;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--text-muted);
    font-weight: 500;
    box-shadow: none;
  }

  /* Glass ~704 / 480–767: one-line wordmark. 390 keeps a tighter stack (MENU-CLIP). */
  @media (min-width: 480px) {
    .header-inner--v3 .header-left,
    .header-left {
      max-width: none;
    }

    .header-left .logo-text {
      flex-direction: row;
      align-items: baseline;
      white-space: nowrap;
      line-height: 1;
    }

    .header-left .logo-tld {
      margin-block-start: 0;
      font-size: 0.82em;
    }
  }
}

/* 360 belt: lockup wordmark (innet.one) + min-width 5.25rem ate the hamburger.
   Hide wordmark, not lamps. Mark stays. 390 keeps the stacked TLD. */
@media (max-width: 360px) {
  .header-left .logo-text {
    display: none !important;
  }

  .header-inner--v3 .header-left,
  .header-left {
    flex: 0 1 auto;
    min-width: 0;
    max-width: none;
  }

  .logo-mark.logo-mark--img {
    width: 62px;
    min-width: 62px;
    max-width: 62px;
    height: 40px;
    max-height: 40px;
  }

  html[data-vision~="large"] .header-inner--v3 .header-left,
  html[data-vision~="large"] .header-left {
    min-width: 0;
    max-width: none;
  }

  html[data-vision~="large"] .logo-mark.logo-mark--img {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    height: 38px;
    max-height: 38px;
  }

  /* E-390-FOOTER-OVERLAP: «Конфиденциальность» 6px over cell at 13.8px — tighten, don't clip */
  .site-footer .footer-links {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.8fr) minmax(0, 0.8fr);
    gap: 4px 5px;
  }

  .site-footer .footer-links a {
    font-size: 0.6rem;
    letter-spacing: -0.03em;
  }
}

/* Landscape phone is often 844×390 — desktop chrome (768+) hyphenates Кабинет. */
@media (hover: none) and (max-height: 540px) {
  .nav-desktop,
  .header-inner--v3 .nav-pill,
  .header-inner--v3 .nav-member-inline {
    display: none !important;
  }

  .menu-toggle {
    display: inline-flex !important;
  }

  .nav-mobile {
    display: none;
  }

  .nav-mobile.is-open {
    display: flex !important;
  }
}

.terms-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.terms-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.terms-cta .btn {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.terms-fold {
  margin: 0.4rem 0;
}

@media (min-width: 768px) {
  .terms-cta {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .terms-cta .btn {
    min-width: 12rem;
  }
}
