/* Loaded last: language, legibility and footer refinements over the earlier layers. */

/* English is rendered from the Russian source; keep the page hidden for the moment it takes. */
html.i18n-pending body { visibility: hidden; }
:root[lang="en"] .compare-control::before { content: 'Before'; }
:root[lang="en"] .compare-control::after { content: 'After'; }

/* Legibility: no running text below 12px; uppercase labels and counters no smaller than 11px. */
.cinema-copy .eyebrow { font-size: 12px; }
.cinema-copy .magic-action > span, .cinema-copy small, .cinema-controls, #cinema-hint, #cinema-replay { font-size: 13px; line-height: 1.5; }
/* detail-tools.css is injected after this file; an id keeps the hint legible. */
#portrait-wrap .photo-gesture-hint { font-size: 12px; }
#ai-more-options .local-tryon-note { font-size: 13px; }
.cinema-frame figcaption span, .request-kicker, .selected-shade .small-label, .ready-card-top .ready-number, .ai-idea-card .ai-idea-topic { font-size: 11px; }
.photo-gesture-hint, #status, #photo-label, #photo-context-status, #photo-context-help, #quick-status, #quick-panel > .ready-note,
#ready-selection .ready-selection-copy span, #analytics-preferences, #request-photo > div > span, #ai-request-summary .request-preserve,
#ai-form > .hint, #ai-form > .hint > a, #ai-availability, .ai-ideas-note, .ai-idea-card .ai-idea-description,
#additional-tools > summary > span, #hair-panel .section-title .small-label { font-size: 12px; }
#ai-request-summary .request-detail small { font-size: 11px; }
#ai-consent-text, #ai-form > .check-label, #request-photo-change, .local-tryon-note, #ai-use-settings, #ai-request-summary .request-detail,
.photo-footer .text-button, #ready-apply, .save-area .export-options > summary, #cinema-try { font-size: 13px; }
.view-switch button { font-size: 12px; }
#quick-cards > .ready-card > strong, .ai-idea-card strong { font-size: 13px; line-height: 1.3; }

/* Collection counter sits on the same line as the heart icon on phones. */
@media (max-width: 760px) {
  .topbar #saved-nav { display: inline-flex; align-items: center; gap: 3px; }
  .topbar #saved-nav span { font-size: 11px; margin-left: 0; }
  .topbar #faq-button { font-size: 13px; }
  .credit-pill { font-size: 12px; }
  .cinema-copy .eyebrow { font-size: 11px; }
}

/* Download settings: one centered disclosure instead of a marker stranded at the panel edge. */
.workspace .save-area .export-options > summary { list-style: none; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.workspace .save-area .export-options > summary::-webkit-details-marker { display: none; }
.workspace .save-area .export-options:not([open]) > summary::after, .workspace .save-area .export-options[open] > summary::after { content: '▾'; color: var(--muted); }
.workspace .save-area .export-options[open] > summary::after { content: '▴'; }

/* Footer: brand, guides, documents, app and language in one calm block. */
.site-footer {
  max-width: 1440px; margin: 40px auto 0; padding: 36px 28px calc(24px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: minmax(200px, 1.3fr) 1fr 1fr 1fr minmax(260px, 1.5fr); gap: 28px 36px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.6;
}
.site-footer .brand { display: inline-flex; align-items: center; height: auto; margin: 0; padding: 0; font-size: 26px; line-height: 1; color: var(--ink); text-decoration: none; }
.site-footer .install-card strong { color: var(--ink); }
.site-footer-brand p { margin: 12px 0 0; max-width: 34ch; }
.site-footer h2 { margin: 4px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.site-footer .site-footer-links { display: flex; flex-direction: column; align-items: flex-start; align-self: start; gap: 0; margin: 0; }
.site-footer-links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); text-decoration: none; }
.site-footer-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.site-footer-app { display: grid; align-content: start; justify-items: start; gap: 8px; }
.site-footer .install-card { width: 100%; margin: 0; }
#install-card:not([hidden]) + #pwa-open { display: none; }
.site-footer-meta {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
  padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px;
}
.site-footer-meta p { margin: 0; }
.site-footer-lang { display: flex; align-items: center; gap: 6px; }
.site-footer-lang a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.site-footer-lang a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.site-footer-lang a:hover { color: var(--accent); }
#analytics-preferences { display: block; margin: 0 auto 20px; }
@media (max-width: 1000px) {
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer-brand, .site-footer-app { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer { grid-template-columns: 1fr 1fr; gap: 22px 16px; margin-top: 28px; padding: 28px 18px calc(20px + env(safe-area-inset-bottom)); }
  .site-footer-meta { flex-direction: column; align-items: flex-start; }
}

/* Password visibility control sits inside the field. */
label:has(> .password-toggle) { position: relative; }
label:has(> .password-toggle) > input { padding-right: 88px; }
.password-toggle {
  position: absolute; right: 6px; bottom: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.password-toggle:hover { background: var(--accent-soft); }

/* Native UI type on every platform: SF on iPhone/Mac (Arial before), Segoe UI on Windows, Roboto on Android.
   Manrope/Inter/Golos were named but never loaded. Display headings keep their serif. */
:root, .brand, h1 { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }

/* The ideas board needs an account; a greyed-out tab only looked broken to guests. */
#ideas-button:disabled { display: none; }

/* A ready look rendered by AI in advance lies over the demo photo, under the "before" layer. */
.portrait-wrap .look-render {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transform-origin: center; pointer-events: none; animation: look-render-in .28s ease-out;
}
.look-render-badge {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: #201b17cc; color: #fff; font-size: 12px; line-height: 1.5; letter-spacing: .02em; pointer-events: none;
}
.portrait-wrap .look-render[hidden], .look-render-badge[hidden], #portrait-wrap:has(#image-labels:not([hidden])) .look-render-badge { display: none; }
@keyframes look-render-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .portrait-wrap .look-render { animation: none; } }

/* Pricing sits with the studio sections on wide screens; phones reach it from the footer.
   A link has no button box, so it is centred like the buttons beside it. */
.topbar nav a.nav-pricing { display: inline-flex; align-items: center; align-self: stretch; text-decoration: none; }
@media (max-width: 760px) { .topbar nav a.nav-pricing { display: none; } }

/* ColourSesh brand layer (docs/DESIGN-2026-10-01.md). Tokens live in ui.css (light) and theme.css (dark).
   The mark sits before the wordmark; the dot after "ColourSesh" stays attached to the word. */
.brand { gap: 0; }
.brand .brand-mark { margin-right: 10px; }
.site-footer .brand-mark { width: 34px; height: 34px; }
/* Display headings take the brand serif where the studio speaks in headlines; tools stay in the system sans. */
.cinema-copy h2, .magic-intro h2, #saved-view .page-heading h1, .signin-card h2 { font-family: var(--font-display); font-weight: 500; }
.page-heading h1 span { color: var(--muted); }
.credit-pill { color: var(--accent); }
.nav-button.active { color: var(--accent); }
@media (max-width: 760px) {
  /* The wordmark shrinks with the screen so the menu, credits and sign-in never run into it. */
  .topbar .brand { font-size: clamp(15px, 4.4vw, 21px); letter-spacing: -.04em; flex-shrink: 1; min-width: 0; white-space: nowrap; }
  .topbar .brand .brand-mark { width: clamp(24px, 7.4vw, 30px); height: clamp(24px, 7.4vw, 30px); margin-right: 6px; border-radius: 9px; flex-shrink: 0; }
}
@media (max-width: 359px) {
  /* Narrow phones: the mark alone, the name stays for screen readers in the link's label. */
  .topbar .brand { font-size: 0; letter-spacing: 0; }
  .topbar .brand .brand-mark { margin-right: 0; }
}
