
:root { --foreground: 13 8% 21%; --card-foreground: 13 8% 21%; --popover-foreground: 13 8% 21%; --primary: 13 8% 21%; --secondary-foreground: 13 8% 21%; --accent-foreground: 13 8% 21%; --muted-foreground: 13 6% 38%; --preview-beige: hsl(var(--secondary)); --preview-soft-ink: hsl(var(--foreground)); --preview-soft-border: hsl(var(--border)); --preview-button-fill: hsl(var(--background)); --preview-dark-fill: hsl(var(--primary)); --preview-wordmark-ink: hsl(var(--foreground)); }
:root { --background: 38 44% 97%; --card: 40 40% 99%; --popover: 40 40% 99%; --primary-foreground: 38 44% 97%; --secondary: 40 30% 93%; --muted: 40 28% 93%; --accent: 34 52% 48%; --destructive: 0 84.2% 60.2%; --destructive-foreground: 0 0% 98%; --border: 40 41% 75%; --input: 40 41% 75%; --ring: 0 0% 3.9%; --chart-1: 12 76% 61%; --chart-2: 173 58% 39%; --chart-3: 197 37% 24%; --chart-4: 43 74% 66%; --chart-5: 27 87% 67%; --radius: .75rem; --font-heading: "Literata", Georgia, serif; --font-body: "Inter", ui-sans-serif, system-ui, sans-serif; --font-display: "Literata", Georgia, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --sidebar-background: 0 0% 98%; --sidebar-foreground: 240 5.3% 26.1%; --sidebar-primary: 240 5.9% 10%; --sidebar-primary-foreground: 0 0% 98%; --sidebar-accent: 240 4.8% 95.9%; --sidebar-accent-foreground: 240 5.9% 10%; --sidebar-border: 220 13% 91%; --sidebar-ring: 217.2 91.2% 59.8%; }
.shared-shell {font:400 16px/1.5 var(--font-body); -webkit-font-smoothing:antialiased;}
.shared-shell,.shared-shell * {box-sizing:border-box;}
.shared-shell :is(h2,h3,p,ul){margin:0;font-weight:inherit;}
.shared-shell a {text-decoration:none;color:inherit;}
.shared-shell button {font:inherit;border:0;padding:0;background:transparent;color:inherit;cursor:pointer;}
.shared-shell ul {list-style:none;padding:0;}
.shared-shell svg {display:block;vertical-align:middle;}
.shared-shell .mx-auto { margin-left: auto; margin-right: auto; }
.shared-shell .mb-5 { margin-bottom: 1.25rem; }
.shared-shell .mt-14 { margin-top: 3.5rem; }
.shared-shell .mt-5 { margin-top: 1.25rem; }
.shared-shell .flex { display: flex; }
.shared-shell .grid { display: grid; }
.shared-shell .h-10 { height: 2.5rem; }
.shared-shell .w-10 { width: 2.5rem; }
.shared-shell .max-w-7xl { max-width: 80rem; }
.shared-shell .max-w-xs { max-width: 20rem; }
.shared-shell .flex-col { flex-direction: column; }
.shared-shell .items-center { align-items: center; }
.shared-shell .justify-between { justify-content: space-between; }
.shared-shell .gap-12 { gap: 3rem; }
.shared-shell .gap-2\.5 { gap: 0.625rem; }
.shared-shell .gap-4 { gap: 1rem; }
.shared-shell .space-y-3 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(.75rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(.75rem * var(--tw-space-y-reverse)); }
.shared-shell .border-t { border-top-width: 1px; }
.shared-shell .border-background\/15 { border-color: hsl(var(--background) / .15); }
.shared-shell .bg-foreground { background-color: hsl(var(--foreground)); }
.shared-shell .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.shared-shell .py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.shared-shell .pt-8 { padding-top: 2rem; }
.shared-shell .font-display { font-family: var(--font-display); }
.shared-shell .text-2xl { font-size: 1.5rem; line-height: 2rem; }
.shared-shell .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.shared-shell .text-xs { font-size: 0.75rem; line-height: 1rem; }
.shared-shell .uppercase { text-transform: uppercase; }
.shared-shell .leading-relaxed { line-height: 1.625; }
.shared-shell .tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.shared-shell .tracking-tight { letter-spacing: -0.025em; }
.shared-shell .text-accent { color: hsl(var(--accent)); }
.shared-shell .text-background { color: hsl(var(--background)); }
.shared-shell .text-background\/50 { color: hsl(var(--background) / .5); }
.shared-shell .text-background\/70 { color: hsl(var(--background) / .7); }
.shared-shell .text-foreground { color: hsl(var(--foreground)); }

@media(min-width:768px){.shared-shell .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.shared-shell .md\:flex-row{flex-direction:row}}
@media(min-width:1024px){.shared-shell .lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.shared-shell .lg\:px-10{padding-inline:2.5rem}}
.preview-header { z-index: 50; background: hsl(var(--background)/.97); border-bottom: 1px solid var(--preview-soft-border); color: var(--preview-soft-ink); }
.preview-header *, .preview-auth * { box-sizing: border-box; }
.preview-header button, .preview-auth button { font: inherit; cursor: pointer; }
.preview-auth .auth-primary { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--preview-soft-border); border-radius: 999px; background: var(--preview-button-fill); color: var(--preview-soft-ink); font-size: 13px; font-weight: 500; }
.preview-header svg.header-icon, .preview-auth svg.header-icon { width: 21px; height: 21px; fill: none; stroke: currentcolor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.preview-auth .auth-primary:hover { border-color: hsl(var(--accent)); background: hsl(var(--secondary)); }
.preview-auth .auth-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: transparent; color: var(--preview-soft-ink); }
.preview-header :focus-visible, .preview-auth :focus-visible { outline: 2px solid hsl(var(--accent)); outline-offset: 3px; }
.preview-auth { width: min(640px, -32px + 100vw); max-height: calc(100dvh - 32px); padding: 0px; border: 0px; border-radius: 20px; background: hsl(var(--background)); color: var(--preview-soft-ink); box-shadow: 0 24px 80px hsl(var(--foreground)/.31); overflow: auto; color-scheme: light; }
.preview-auth::backdrop { background: hsl(var(--foreground)/.4); backdrop-filter: blur(5px); }
.preview-auth .auth-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 28px 32px 22px; background: var(--preview-button-fill); border-bottom: 1px solid var(--preview-soft-border); }
.preview-auth h2 { font-family: "Literata", Georgia, serif; font-size: 38px; font-weight: 400; line-height: 1.1; margin: 0px 0px 10px; color: hsl(var(--foreground)); }
.preview-auth .auth-top p { font-size: 13px; line-height: 1.6; max-width: 45ch; margin: 0px; }
.preview-auth .auth-close { flex-shrink: 0; margin: -8px -12px 0px 0px; }
.preview-auth .auth-close:hover { background: rgba(255, 255, 255, 0.5); }
.preview-auth .auth-content { padding: 26px 32px 28px; }
.preview-auth .auth-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.preview-auth label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 500; }
.preview-auth .auth-wide { grid-column: 1 / -1; }
.preview-auth input:not([type="checkbox"]), .preview-auth select { width: 100%; min-height: 46px; border: 1px solid var(--preview-soft-border); border-radius: 10px; padding: 10px 12px; background: rgb(255, 255, 255); color: var(--preview-soft-ink); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-kerning: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-language-override: inherit; font-size: 16px; caret-color: var(--preview-soft-ink); }
.preview-auth input::placeholder { color: hsl(var(--muted-foreground)); opacity: 1; }
.preview-auth input:focus, .preview-auth select:focus { border-color: hsl(var(--accent)); }
.preview-auth .auth-consent { flex-direction: row; align-items: flex-start; font-weight: 400; line-height: 1.6; }
.preview-auth input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: hsl(var(--accent)); }
.preview-auth .auth-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.preview-auth .auth-link { font-size: 13px; min-height: 44px; text-decoration-line: underline; text-decoration-thickness: initial; text-decoration-style: initial; text-underline-offset: 4px; text-decoration-color: hsl(var(--border)); }
.preview-auth .auth-demo { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--preview-soft-border); }
.preview-auth .auth-demo p { font-size: 12px; line-height: 1.6; color: hsl(var(--muted-foreground)); margin: 0px 0px 6px; }
.preview-auth .auth-demo button { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.preview-auth .auth-feedback { padding: 14px 16px; margin-bottom: 20px; border-radius: 10px; background: hsl(var(--secondary)); font-size: 14px; line-height: 1.6; }
.preview-auth .auth-summary { font-size: 14px; line-height: 1.6; margin: 0px 0px 22px; }
@media (max-width: 767px) {
  .preview-auth .auth-top { padding: 24px; }
  .preview-auth .auth-content { padding: 22px 24px; }
  .preview-auth h2 { font-size: 34px; }
  .preview-auth .auth-fields { gap: 16px; }
  .preview-auth .auth-form-actions { align-items: stretch; flex-direction: column; }
  .preview-auth .auth-primary { width: 100%; }
}
@media (max-width: 420px) {
  .preview-auth .auth-fields { grid-template-columns: 1fr; }
  .preview-auth .auth-top { padding: 22px 20px; }
  .preview-auth .auth-content { padding: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .preview-auth[open] { animation: 0.22s ease-out 0s 1 normal none running auth-arrive; }
  @keyframes auth-arrive { 
  0% { transform: translateY(8px); }
  100% { transform: translateY(0px); }
}
}
:root { --preview-registration-fill: radial-gradient(ellipse at 5% 0%,hsl(var(--accent)/.20),transparent 52%),radial-gradient(ellipse at 100% 100%,hsl(var(--primary)/.10),transparent 55%),hsl(var(--background)); }
.preview-header .guest-registration { display: flex; min-width: 0px; margin-left: auto; background: var(--preview-registration-fill); border: 1px solid hsl(var(--border)); border-radius: 16px; }
.preview-header .guest-registration-intro { font-size: 12px; font-weight: 500; line-height: 1.45; }
.preview-header .guest-registration label { display: flex; flex-direction: column; min-width: 0px; font-size: 12px; white-space: nowrap; }
.preview-header .guest-registration input, .preview-header .guest-registration select { width: 100%; min-width: 0px; border: 1px solid var(--preview-soft-border); border-radius: 999px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-kerning: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-language-override: inherit; font-size: 13px; background: rgb(255, 255, 255); color: var(--preview-soft-ink); }
.preview-header .guest-registration input::placeholder { color: hsl(var(--muted-foreground)); opacity: 1; }
.preview-header .guest-register-submit { padding-inline: 16px; border-radius: 999px; border: 1px solid var(--preview-soft-border); font-size: 12px; }
.preview-header .guest-signin { padding-inline: 6px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.preview-header .brand > span { color: var(--preview-wordmark-ink); }
.preview-header .brand-om { filter: drop-shadow(rgba(130, 115, 76, 0.314) 0px 1px 0.35px); }
.preview-header { height: calc(101px*var(--header-scale,1)); overflow: clip visible; }
.preview-header[data-preview-state] .header-inner { box-sizing: border-box; width: calc(100% / var(--header-scale,1)); max-width: none; height: 100px; min-height: 0px; margin: 0px; padding: 0px 24px; display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 20px; transform: scale(var(--header-scale,1)); transform-origin: 0px 0px; }
.preview-header[data-preview-state] .brand { flex: 0 1 auto; min-width: 0; max-width: none; }
/* Плашка регистрации и панель после входа — один фиксированный размер 1224 × 92 на всех страницах;
   не зависит от загрузки шрифта логотипа и ширины окна (шапка масштабируется целиком). */
.preview-header .guest-registration { flex-wrap: nowrap; align-items: flex-end; flex: 0 0 1224px; height: 92px; gap: 6px; padding: 10px 12px; }
.preview-header .guest-registration-intro { flex: 0 0 92px; align-self: center; }
.preview-header .guest-registration label { flex: 1 1 100px; gap: 4px; }
.preview-header .guest-registration .guest-date { flex: 0 0 106px; }
.preview-header .guest-registration .guest-time { flex: 0 0 94px; }
.preview-header .guest-registration .guest-city, .preview-header .guest-registration .guest-name { flex: 1 1 100px; }
.preview-header .guest-registration .guest-account-type { flex: 0 0 198px; }
.preview-header .guest-registration .guest-provider { flex: 0 0 150px; }
.preview-header .guest-registration input, .preview-header .guest-registration select { height: 36px; padding: 8px; }
.preview-header .guest-register-submit, .preview-header .guest-signin { flex-shrink: 0; min-height: 36px; height: 36px; margin-top: 0px; padding-block: 0px; white-space: nowrap; }
@media (max-width: 1023px) {
  .preview-header[data-preview-state] .brand > span { min-width: 0; }
  .preview-header .guest-registration :is(input, select, button):focus-visible { outline-offset: -2px; }
}
@media (max-width: 479px) {
  .preview-header .guest-registration :is(.guest-account-type, .guest-provider) { grid-column: 1 / -1; }
}


/* Кнопка «Зарегистрироваться»: цвет сердцевины лотоса; при наведении — бежевый сайта с тёмным текстом. */
.preview-header .guest-register-submit{background-color:rgb(86 79 77)!important;color:rgb(251 248 244)!important;transition:background-color .2s,color .2s}
.preview-header .guest-register-submit:hover,.preview-header .guest-register-submit:focus-visible{background-color:hsl(40 30% 93%)!important;color:rgb(86 79 77)!important;box-shadow:inset 0 0 0 1px rgb(86 79 77 / .35)}


.platform-bottom-nav .pf-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 767px) {
  body { padding-block-end: calc(64px + env(safe-area-inset-bottom)); }
  .platform-bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 80;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: linear-gradient(135deg, rgb(255 253 248 / .78), rgb(247 242 232 / .58));
    border-top: 1px solid rgb(255 255 255 / .76);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .8);
    backdrop-filter: blur(16px) saturate(1.25);
  }
  .platform-bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 4px;
    border-radius: 12px;
    color: #7a7264;
  }
  .platform-bottom-nav a:active { background: rgb(166 124 61 / .12); }
  .platform-bottom-nav a:focus-visible { outline: 2px solid #a67c3d; outline-offset: -2px; }
  .platform-bottom-nav .pf-icon { display: block; width: 26px; height: 26px; flex: none; }
  .platform-bottom-nav a[aria-current] { color: #a67c3d; }
}

/* Верхняя панель не закреплена — прокручивается вместе со страницей. */.preview-header{position:relative!important;top:auto!important}
/* Uniform geometry, independent of each page's content. */
:where(html, body, .preview-auth) {scrollbar-width:none;}
:where(html, body, .preview-auth)::-webkit-scrollbar {display:none;}
.shared-shell.preview-header .brand {display:flex;align-items:center;gap:10px;font:400 24px/32px var(--font-display);text-decoration:none;}
.shared-shell.preview-header .brand>svg {width:40px;height:40px;flex-shrink:0;}
.shared-shell.preview-header .brand>span {letter-spacing:-.025em;white-space:nowrap;}
.shared-shell.preview-header .brand .text-accent {color:hsl(var(--accent));}
.shared-shell.preview-header [data-member-only] {display:none;}
.shared-shell.preview-header[data-preview-state="member"] [data-member-only] {display:flex;}
.shared-shell.preview-header[data-preview-state="member"] [data-guest-only] {display:none;}
.shared-shell.preview-auth {margin:auto;}
.shared-shell.preview-auth .auth-primary {font-size:13px;}
.shared-shell.preview-auth .auth-link {background:transparent;border:0;}
.shared-shell.bg-foreground {background:hsl(var(--foreground));color:hsl(var(--background)/.7);}
.shared-shell.bg-foreground h3 {font-weight:400;}
.shared-shell.bg-foreground .border-t {border-style:solid;border-width:1px 0 0;}
.shared-shell.bg-foreground .text-accent {color:hsl(var(--accent));}

/* Navigation placement from DESIGN.md: anchored to the original intro, 1800px container. */
@media(min-width:1024px){
 .calculator-platform-bar {padding-inline:40px;}
 .calculator-platform-intro {margin-left:-24px;}
}
@media(min-width:768px) and (max-width:1100px){
 .calculator-platform-intro {height:auto;min-height:86.9px;padding-top:52.9px;}
}
@media(max-width:767px){
 .shared-shell.preview-header .brand>svg {width:30px;height:30px;}
 .shared-shell.preview-header .brand>span {font-size:21px;line-height:1.05;}
 .calculator-platform-bar {height:0;padding-block:0;}
 .calculator-platform-intro {height:0;}
}

/* Разделы платформы — только нижняя панель телефона: одни значки без подписей (название — в aria-label), «Главная» — янтра. На широком экране панели нет. */
@media (min-width: 768px) { .platform-bottom-nav { display:none !important; } }

/* Панель после входа: та же плашка, что форма регистрации. От 1024 px справа по вертикали три значка
   «Мои сообщения», «Мой блог», «Мой кабинет»; 768–1023 px — в строку; на телефоне — в нижнем меню. */
.preview-header .member-panel {
  display: none; flex: 0 0 1224px; max-width: none; min-width: 0; height: 92px; margin-left: auto; padding: 4px 12px;
  flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px;
  background: var(--preview-registration-fill); border: 1px solid hsl(var(--border)); border-radius: 16px;
}
.shared-shell.preview-header[data-preview-state="member"] .member-panel { display: flex; }
.preview-header .member-icon {
  display: grid; place-items: center; width: 40px; height: 27px; border-radius: 8px;
  color: #726757; background: transparent; border: 0; transition: color .2s, background-color .2s;
}
.preview-header .member-icon[hidden] { display: none; }
.preview-header .member-icon:hover, .preview-header .member-icon[aria-current="page"], .preview-header .member-icon[aria-expanded="true"] { color: #a67c3d; }
.preview-header .member-icon:hover { background: rgb(166 124 61 / .12); }
.preview-header .member-icon svg.header-icon { width: 21px; height: 21px; stroke-width: 1.6; }
/* Без коричневой рамки при нажатии мышью или пальцем на кнопки и поля ввода — на всех страницах.
   Рамка фокуса остаётся только при переходе клавишей Tab (класс kbd-nav ставит site-shell-events.js). */
html:not(.kbd-nav) :is(a, button, summary, input, textarea, select, label, [tabindex], [role="tab"]):focus,
html:not(.kbd-nav) :is(a, button, summary, input, textarea, select, label, [tabindex], [role="tab"]):focus-visible,
html:not(.kbd-nav) :focus-within { outline: none !important; }
html:not(.kbd-nav) :is(input, textarea, select):focus { box-shadow: none !important; border-color: hsl(var(--border)) !important; }
html:not(.kbd-nav) :is(a, button, summary):focus-visible { box-shadow: none !important; }
html:not(.kbd-nav) .btn-primary:focus-visible:not(:hover) { background: var(--action) !important; color: var(--action-text) !important; border-color: var(--action) !important; }
html:not(.kbd-nav) .preview-header .guest-register-submit:focus-visible:not(:hover) { background-color: rgb(86 79 77) !important; color: rgb(251 248 244) !important; }

/* Крупные заголовки страниц, разделов и диалогов. */
.shared-shell.preview-header .brand > .font-display,.shared-shell.preview-header .brand > .font-display > .text-accent,footer.shared-shell .font-display,footer.shared-shell .font-display > .text-accent,main h1,.home-tariff h2,.preview-auth h2,.dialog-heading h2,.dialog-top h2,.story-dialog-head h2,.profile-head h2,.section-head h2,.members h2,.support-panel h2,.welcome h2,.story h3,.side-card h2,.members-all h2,.link-card-title,.vs-head h2,.intro h1,h2.h2,.lik-name,.chp-h,.chp-h3,.chp details summary,.chp-win b{
  font-family: "Literata", Georgia, serif !important;
  font-style: italic !important;
  font-weight: 500 !important;
}

/* Подсказка «?» у времени рождения в форме регистрации */
.preview-header .guest-registration .guest-time { display: flex; flex-direction: column; gap: 4px; min-width: 0px; font-size: 12px; white-space: nowrap; position: relative; }
.preview-header .guest-help-head { display: inline-flex; align-items: center; gap: 5px; }
.preview-header .guest-help { width: 15px; height: 15px; padding: 0; border: 1px solid rgb(205, 170, 112); border-radius: 50%; background: #fff; color: #a67c3d; font: 600 10px/1 Inter, sans-serif; cursor: help; display: inline-grid; place-items: center; }
.preview-header .guest-tip { position: absolute; z-index: 60; left: 0; top: 22px; width: 240px; padding: 10px 12px; border-radius: 10px; background: #3b3432; color: #fbf8f4; font-size: 12px; line-height: 1.5; white-space: normal; box-shadow: 0 10px 24px rgb(0 0 0 / .2); display: none; }
.preview-header .guest-help:hover + .guest-tip, .preview-header .guest-help:focus-visible + .guest-tip, .preview-header .guest-tip:hover, .preview-header .guest-tip.is-open { display: block; }
.preview-header .guest-tip-fill { display: block; margin-top: 8px; padding: 5px 12px; border: 1px solid rgb(229, 196, 119); border-radius: 999px; background: transparent; color: rgb(247, 224, 164); font: 500 12px Inter, sans-serif; cursor: pointer; }
.preview-header .guest-tip-fill:hover { background: rgb(255 255 255 / .08); }

/* Масштаб всех страниц сайта — на 10% меньше, но только на широком экране с мышью.
   На телефоне и планшете zoom ломал ширину страницы и делал поля ввода меньше 16px (iOS приближал страницу при вводе). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) { html { zoom: 0.9; } }

/* Логотип в подвале — как в шапке: одна строка, тот же шрифт, размер, межбуквенный интервал и янтра. */
footer.shared-shell .font-display.text-2xl { white-space: nowrap; letter-spacing: -.025em; font-size: 24px; line-height: 32px; }
footer.shared-shell .flex.items-center.gap-2\.5:has(> .font-display) { gap: 10px; }
footer.shared-shell .flex.items-center.gap-2\.5:has(> .font-display) > svg { width: 40px; height: 40px; flex-shrink: 0; }
@media (max-width: 767px) {
  footer.shared-shell .font-display.text-2xl { font-size: 21px; line-height: 1.05; }
  footer.shared-shell .flex.items-center.gap-2\.5:has(> .font-display) > svg { width: 30px; height: 30px; }
}
@media (min-width: 1024px) { footer.shared-shell .lg\:grid-cols-4 { grid-template-columns: minmax(300px, 1.25fr) repeat(3, minmax(0, 1fr)); } }


/* ===== Адаптивная шапка до 1023 px (телефон, планшет): без масштабирования, по DESIGN.md ===== */
@media (max-width: 1023px) {
  .preview-header[data-preview-state] { height: auto; padding-top: env(safe-area-inset-top, 0px); }
  .preview-header[data-preview-state] .header-inner {
    width: 100%; height: auto; min-height: 64px; transform: none;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
    flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  }
  .preview-header[data-preview-state] .brand { margin: 0; max-width: 100%; }
  /* После входа: значки «Сообщения», «Блог», «Кабинет» в строку справа от логотипа */
  .shared-shell.preview-header[data-preview-state="member"] .member-panel {
    flex: 0 0 auto; width: auto; height: auto; min-height: 0; margin: 0 0 0 auto; padding: 0;
    flex-direction: row; align-items: center; gap: 8px; background: none; border: 0;
  }
  .preview-header .member-icon { display: grid; width: 48px; height: 48px; border-radius: 12px; }
  .preview-header .member-icon svg.header-icon { width: 24px; height: 24px; }
  /* Гость: форма регистрации под логотипом на всю ширину */
  .preview-header .guest-registration {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; align-items: end;
    flex: 1 1 100%; width: 100%; height: auto; min-height: 0; margin: 0; padding: 10px 12px; gap: 8px;
  }
  .preview-header .guest-registration-intro { grid-column: 1 / -1; align-self: start; }
  .preview-header .guest-registration label { white-space: normal; }
  .preview-header .guest-registration :is(input, select) { height: 48px; font-size: 16px; }
  .preview-header .guest-register-submit, .preview-header .guest-signin { min-height: 48px; height: auto; padding: 8px; white-space: normal; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .preview-header[data-preview-state] .header-inner { min-height: 72px; padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px)); }
  .shared-shell.preview-header .brand > svg { width: 32px; height: 32px; }
  .shared-shell.preview-header .brand > span { font-size: 21px; line-height: 1.05; }
}
@media (max-width: 767px) {
  /* На телефоне разделы — в нижнем меню, пустую плашку сверху не показываем */
  .shared-shell.preview-header[data-preview-state] .member-panel { display: none; }
  .preview-header .guest-registration { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); }
  /* Подсказка «?» у времени не уходит за правый край экрана */
  .preview-header .guest-tip { left: auto; right: 0; width: min(240px, calc(100vw - 32px)); }
}


/* ===== Единый стандарт кнопок сайта (DESIGN.md → «Кнопки») =====
   Все текстовые кнопки одного размера: 44 px с мышью, 48 px на телефоне и сенсорном экране.
   Капсула, Inter 500 14 / 20 px, поля 0 20 px. Цвет задаёт вариант (основная, вторичная, опасная, игровая).
   Кнопки-иконки (закрыть окно, микрофон, редактировать) — 44 × 44 / 48 × 48.
   Окна и панель калькулятора используют свой стандарт (calculators.html). */
:root { --btn-h: 44px; --icon-btn: 44px; }
@media (max-width: 767px), (any-pointer: coarse) { :root { --btn-h: 48px; --icon-btn: 48px; } }
:is(.btn:not(.btn-text), .acc-btn, .acc-logout, .community-write, .home-tariff-select, .preview-auth .auth-primary, .chp-btn, .story-editor .button):not([hidden]) {
  box-sizing: border-box !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px;
  height: auto !important; min-height: var(--btn-h) !important;
  padding: 0 20px !important;
  border-radius: 999px !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: 14px !important; line-height: 20px !important; font-weight: 500 !important; font-style: normal !important;
}
:is(.preview-auth .auth-close, .dialog-close, .icon-action, .profile-edit, .story-editor .icon-button):not([hidden]) {
  box-sizing: border-box !important;
  width: var(--icon-btn) !important; height: var(--icon-btn) !important; min-width: var(--icon-btn) !important; min-height: var(--icon-btn) !important;
  padding: 0 !important; display: inline-grid !important; place-items: center !important;
}
.acc-help, .preview-header .guest-help { width: 15px !important; height: 15px !important; }

/* ===== Линии и рамки — только золото (DESIGN.md → «Линии и рамки») =====
   Тонкие линии: тёплое светлое золото #DAC9A7 (токен --border = 40 41% 75%).
   Рамки карточек, окон, панелей и блока тарифов: металлический градиент янтры (золото / холодное золото).
   Кольца мелких карточек: rgba(196,163,106,.55). Серый для линий не используется. */
:root { --border: 40 41% 75%; --input: 40 41% 75%; --line-gold: #DAC9A7; --ring-gold: rgba(196,163,106,.55);
  --gold-frame: linear-gradient(135deg, #fff9e9 0%, #c4a36a 22%, #f5f7f9 46%, #aeb9c4 65%, #d7b66c 84%, #fff4d6 100%); }
/* Блоки со сплошным фоном: градиент в самой границе (не прокручивается вместе с содержимым окна) */
:is(.home-tariffs, .preview-auth, dialog#profileDialog, dialog#groupDialog, dialog#confirmDialog, dialog#captureDialog, dialog#callDialog,
  body[data-page="calculator"] dialog:not(.preview-auth), body[data-page="calculator"] .panel,
  .acc-card, .calc-card, .side-card, .blog-card, #compose, .profile, .message-shell, .story-editor) {
  --frame-bg: #FDFDFB;
  border: 1px solid transparent !important;
  background: linear-gradient(var(--frame-bg), var(--frame-bg)) padding-box, var(--gold-frame) border-box !important;
}
:is(.preview-auth, dialog#profileDialog, dialog#groupDialog, dialog#confirmDialog, dialog#captureDialog, dialog#callDialog, .story-editor) { --frame-bg: #FBF8F4; }
:is(.acc-card, .side-card, #compose) { --frame-bg: #FFFDF9; }
body:not([data-page]) .blog-card { --frame-bg: #FFFDF9; }
.calc-card { --frame-bg: #FCFAF6; }
/* Карточки с фоновым изображением: рамка поверх, через ::after */
.system-card, .community-head { position: relative; }
.system-card { box-shadow: 0 3px 9px rgba(69,50,27,.13) !important; }
.system-card::after, .community-head::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1px;
  background: var(--gold-frame);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.community-head { border-color: transparent !important; }
/* Кольца мелких карточек (Чаупар) */
:is(.chp-card, .chp-about) { box-shadow: 0 0 0 1px var(--ring-gold), 0 3px 9px rgba(69,50,27,.10) !important; }
.profile-avatar { border: 1px solid var(--line-gold) !important; }

/* Плашка регистрации и панель после входа в шапке — исходный вид (по решению владельца сайта):
   тонкая светлая линия #E5E5E5 у плашки и полей, объём за счёт градиентов заливки.
   На компьютере — исходные размеры: поля и кнопки 36 px, «Зарегистрироваться» Inter 12 px. */
.preview-header :is(.guest-registration, .member-panel) { border: 1px solid #E5E5E5 !important; }
.preview-header .guest-registration :is(input, select, .guest-register-submit) { border-color: #E5E5E5 !important; }
