/* ИИ Фото Лаб — стили по согласованному дизайну */
:root {
  --blue: #1F45FF;
  --blue-hover: #1535C9;
  --blue-deep: #0A1A66;
  --blue-ink: #14309E;
  --blue-soft: #E8EDFF;
  --blue-softer: #F7F9FF;
  --ink: #0C0E14;
  --text: #2B303D;
  --muted: #4A5060;
  --muted-2: #5B6070;
  --line: #E2E5EC;
  --line-2: #D5D9E3;
  --ground: #F3F4F7;
  --white: #FFFFFF;
  --green-bg: #E3F5EA;
  --green: #14663C;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: 'Manrope', system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }
img { max-width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted-2); }
.label { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.link-strong { font-weight: 700; text-decoration: none; color: var(--ink); }
.hidden { display: none !important; }
.glass { filter: drop-shadow(0 10px 18px rgba(10, 26, 102, 0.18)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(31, 69, 255, 0.45); outline-offset: 2px; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: none; font-weight: 700; font-size: 15px; text-decoration: none; transition: background 0.15s, opacity 0.15s; }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #262A35; color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-hover); color: var(--white); }
.btn-white { background: var(--white); color: var(--blue); }
.btn-white:hover { color: var(--blue-hover); }
.btn-outline { background: var(--white); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-outline:hover { border-color: #B9BFCD; color: var(--ink); }
.btn-lg { min-height: 56px; font-size: 16px; font-weight: 800; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line); color: var(--muted-2); cursor: not-allowed; }
.btn-square { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; background: var(--ink); color: var(--white); border-radius: 4px; }
.btn-square:hover { background: #262A35; color: var(--white); }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.chip-blue { background: var(--blue-soft); color: var(--blue-ink); }
.chip-white { background: var(--white); color: var(--blue); }
.chip-gray { background: var(--ground); color: var(--text); }
.chip-green { background: var(--green-bg); color: var(--green); }
.chip-red { background: #FDECEC; color: #9B1C1C; }

/* Логотип и шапка */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue); color: var(--white); font-size: 13px; font-weight: 800; letter-spacing: -0.02em; }
.logo-name { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: 28px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.site-nav a.is-active { color: var(--blue); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .link-strong { font-size: 14px; padding: 12px 8px; }
.header-actions .btn { min-height: 44px; padding: 0 22px; font-size: 14px; }

/* Главная: первый экран */
.hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; margin-top: 16px; }
.hero-left { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 24px 0; }
.hero-meta { display: flex; gap: 32px; }
.wordmark { font-size: clamp(110px, 15vw, 220px); font-weight: 800; letter-spacing: -0.065em; line-height: 0.82; }
.wordmark span { color: var(--blue); }
.hero h1 { margin-top: 36px; max-width: 540px; font-size: clamp(28px, 3vw, 42px); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
.hero-sub { margin-top: 18px; max-width: 460px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.hero-cta { display: flex; align-items: center; gap: 18px; }
.hero-cta-title { display: block; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 800; }
.hero-cta-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--muted-2); }
.hero-right { flex: 1 1 520px; min-width: 0; position: relative; min-height: 600px; background: var(--blue); border-radius: 28px; overflow: hidden; }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.28); pointer-events: none; }
.vertical-text { position: absolute; right: 28px; top: 32px; writing-mode: vertical-rl; font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--white); }
.hero-icon { position: absolute; }
.hero-chips { position: absolute; right: 28px; bottom: 28px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hero-chip { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.4); color: var(--white); font-size: 13px; font-weight: 600; }
.hero-chip.is-solid { background: var(--white); color: var(--blue); font-weight: 700; border-color: var(--white); }

/* Секции */
.section { margin-top: 140px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.h2 { margin-top: 14px; font-size: clamp(34px, 4vw, 56px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.lead { max-width: 380px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 44px; }
.service-card { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 400px; padding: 28px; background: var(--white); border-radius: var(--radius); }
.service-card.is-blue { background: var(--blue); color: var(--white); }
.service-card.is-blue p, .service-card.is-blue a { color: var(--white); }
.service-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.service-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); margin-top: 8px; flex: none; }
.service-card.is-blue .dot { background: var(--white); }
.service-card-icon { display: flex; justify-content: center; }
.service-card p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.service-card a { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 700; text-decoration: none; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; margin-top: 32px; }
.step { border-top: 2px solid var(--ink); padding-top: 24px; }
.step-num { font-size: 64px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--blue); }
.step h3 { margin-top: 20px; font-size: 20px; font-weight: 800; }
.step p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }

.dark-block { background: var(--ink); color: var(--white); border-radius: 28px; padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.dark-block .label { color: #A9AFC2; }
.dark-block-left { flex: 1 1 380px; min-width: 0; }
.dark-block h2 { margin-top: 16px; font-size: clamp(32px, 3.6vw, 52px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.dark-block-text { margin-top: 20px; max-width: 440px; font-size: 16px; line-height: 1.6; color: #C9CEDC; }
.dark-block .btn { margin-top: 28px; }
.stats { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px 40px; align-content: center; }
.stat-num { font-size: 56px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.stat-text { margin-top: 10px; font-size: 14px; line-height: 1.5; color: #C9CEDC; }

.faq { display: flex; flex-wrap: wrap; gap: 48px; }
.faq-left { flex: 1 1 300px; min-width: 0; }
.faq-list { flex: 2 1 560px; min-width: 0; }
.faq details { border-top: 1px solid var(--line-2); padding: 22px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-2); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; font-size: 18px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { color: var(--blue); font-weight: 800; }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Подвал */
.site-footer { margin-top: 140px; border-top: 1px solid var(--line-2); padding: 48px 0 40px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand { flex: 1 1 280px; min-width: 0; }
.footer-brand p { margin-top: 16px; max-width: 300px; font-size: 14px; line-height: 1.55; color: var(--muted-2); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer-col .label { margin-bottom: 4px; }
.footer-col a { color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--blue); }
.footer-wordmark { margin-top: 64px; font-size: clamp(72px, 17vw, 260px); font-weight: 800; letter-spacing: -0.065em; line-height: 0.8; color: #E1E4EC; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; font-size: 13px; color: var(--muted-2); }

/* Тарифы */
.pricing-head { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.pricing-head h1 { margin-top: 14px; font-size: clamp(40px, 5.5vw, 76px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 48px; }
.plan { display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: 28px; background: var(--white); }
.plan.is-blue { background: var(--blue); color: var(--white); }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan h2 { margin-top: 16px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.plan-price { font-size: 64px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.plan-sub { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.plan.is-blue .plan-sub { color: var(--white); }
.plan ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--text); }
.plan.is-blue ul { color: var(--white); }
.plan-cta { margin-top: auto; }
.plan-note { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 999px; border: 1.5px solid var(--line-2); color: var(--muted-2); font-size: 15px; font-weight: 700; margin-top: auto; }
.price-rows { display: flex; flex-direction: column; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.price-row:last-child { border-bottom: 1px solid var(--line); }
.price-row span:first-child { font-size: 15px; font-weight: 700; }
.price-row span:last-child { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.terms { margin-top: 96px; }
.terms-grid { flex: 2 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 40px; }
.term-num { font-size: 32px; font-weight: 800; color: #6F8BFF; }
.term-text { margin-top: 8px; font-size: 15px; line-height: 1.55; color: #D9DDE8; }

/* Вход */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; }
.auth-promo { flex: 1 1 480px; min-width: 0; min-height: 420px; position: relative; overflow: hidden; background: var(--blue); color: var(--white); border-radius: 28px; padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-promo .logo, .auth-promo .logo:hover { color: var(--white); position: relative; }
.auth-promo .logo-mark { background: var(--white); color: var(--blue); }
.auth-promo .wordmark { font-size: clamp(100px, 12vw, 200px); position: relative; }
.auth-promo-text { margin-top: 28px; max-width: 380px; font-size: 18px; font-weight: 600; line-height: 1.5; position: relative; }
.auth-icons { position: relative; display: flex; gap: 8px; align-items: flex-end; }
.auth-form-wrap { flex: 1 1 480px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 32px 8px; }
.auth-form { width: 100%; max-width: 420px; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 999px; background: #E6E8EE; }
.segmented button { min-height: 44px; border-radius: 999px; border: none; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; }
.segmented button[aria-selected="true"] { background: var(--white); color: var(--ink); font-weight: 800; }
.form { margin-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.form h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.form-sub { margin-top: 8px; font-size: 15px; color: var(--muted-2); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field-label { font-size: 13px; font-weight: 700; }
.field-row { display: flex; justify-content: space-between; align-items: center; }
.input { min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--white); font-size: 15px; width: 100%; }
.input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31, 69, 255, 0.15); }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.check label { font-size: 13px; line-height: 1.5; color: var(--muted); }
.form-note { text-align: center; font-size: 13px; color: var(--muted-2); }
.alert { padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.alert-error { background: #FDECEC; color: #9B1C1C; }
.alert-ok { background: var(--green-bg); color: var(--green); }
.alert-info { background: var(--blue-soft); color: var(--blue-ink); }

/* Приложение: боковое меню */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 240px; max-width: 100%; background: var(--white); border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; gap: 28px; }
.sidebar .logo { padding: 0 8px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; border: none; background: transparent; width: 100%; text-align: left; }
.side-link:hover { background: var(--ground); color: var(--ink); }
.side-link.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.side-logout { color: var(--muted-2); }
.support-card { margin-top: auto; padding: 18px; border-radius: 20px; background: var(--ground); display: flex; flex-direction: column; gap: 10px; }
.support-card img { filter: drop-shadow(0 8px 14px rgba(10, 26, 102, 0.18)); }
.support-title { font-size: 15px; font-weight: 800; }
.support-text { font-size: 13px; line-height: 1.45; color: var(--muted-2); }
.support-card .link-strong { color: var(--blue); font-size: 13px; }
.app-main { flex: 999 1 560px; min-width: 0; padding: clamp(16px, 3.5vw, 44px); }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.page-head h1 { margin-top: 6px; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.avatar { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--white); text-decoration: none; font-size: 15px; font-weight: 800; text-transform: uppercase; }
.avatar:hover { color: var(--white); }
@media (max-width: 860px) {
  .sidebar { flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; order: 3; width: 100%; }
  .side-link { width: auto; }
  .support-card { display: none; }
  .side-logout { margin-left: auto; width: auto; }
}

/* Студия */
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 28px; }
.tab { display: flex; align-items: center; gap: 14px; padding: 15px 17px; border-radius: 20px; border: 1px solid var(--line); background: var(--white); text-align: left; color: var(--ink); }
.tab img { width: 52px; height: 52px; filter: drop-shadow(0 6px 10px rgba(10, 26, 102, 0.18)); }
.tab-title { display: block; font-size: 15px; font-weight: 700; }
.tab-sub { display: block; margin-top: 2px; font-size: 13px; color: var(--muted-2); }
.tab[aria-selected="true"] { border: 2px solid var(--blue); padding: 14px 16px; }
.tab[aria-selected="true"] .tab-title { font-weight: 800; }
.work { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.panel { flex: 1 1 380px; min-width: 0; background: var(--white); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 24px; }
.panel-title { margin-bottom: 12px; font-size: 14px; font-weight: 800; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 20px; border: 1.5px dashed #B8C3E8; border-radius: 20px; background: var(--blue-softer); text-align: center; transition: background 0.15s, border-color 0.15s; }
.dropzone.is-over { background: var(--blue-soft); border-color: var(--blue); }
.dropzone img { width: 72px; height: 72px; filter: drop-shadow(0 8px 14px rgba(10, 26, 102, 0.18)); }
.dropzone-title { font-size: 15px; font-weight: 700; }
.dropzone-sub { font-size: 13px; color: var(--muted-2); }
.file-row { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; }
.file-thumb { width: 88px; height: 88px; border-radius: 14px; object-fit: cover; background: #D5DBEA; flex: none; }
.file-name { font-size: 14px; font-weight: 700; word-break: break-all; }
.file-ok { margin-top: 4px; font-size: 13px; color: #1A7F4B; font-weight: 600; }
.desc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.textarea { width: 100%; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: #FAFBFD; font-size: 15px; line-height: 1.5; resize: vertical; min-height: 140px; }
.textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31, 69, 255, 0.15); }
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; border: none; background: transparent; font-size: 13px; font-weight: 700; color: var(--ink); }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); transition: background 0.15s; flex: none; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: left 0.15s; }
.switch[aria-pressed="true"] .switch-track { background: var(--blue); }
.switch[aria-pressed="true"] .switch-track::after { left: 21px; }
.auto-note { padding: 16px; border-radius: 16px; background: var(--blue-soft); font-size: 14px; line-height: 1.5; color: var(--blue-ink); }
.aspects { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.aspect { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: 13px; font-weight: 700; }
.aspect[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); }
.result { flex: 1 1 380px; min-width: 0; min-height: 420px; border-radius: var(--radius); border: 1.5px dashed #C9CFDD; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; }
.result.has-media { border-style: solid; border-color: var(--line); background: var(--white); padding: 16px; }
.result-title { font-size: 16px; font-weight: 800; }
.result-text { max-width: 280px; font-size: 14px; line-height: 1.5; color: var(--muted-2); }
.result-media { width: 100%; max-height: 640px; object-fit: contain; border-radius: 16px; background: var(--ground); }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--blue-soft); border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.banner { margin-top: 16px; }

/* Модальные окна */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(12, 14, 20, 0.5); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; overflow-y: auto; }
.modal { position: relative; width: 100%; max-width: 480px; background: var(--white); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--ground); display: flex; align-items: center; justify-content: center; }
.modal h2 { padding-right: 44px; font-size: 26px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.modal-text { font-size: 15px; line-height: 1.5; color: var(--muted); }
.modal-kicker { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 700; color: var(--blue); }
.lock { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, #C9D2E8, #8E9AB8); display: flex; align-items: center; justify-content: center; color: var(--white); flex: none; }
.offer { padding: 20px; border-radius: 20px; background: var(--blue-soft); }
.offer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.offer-name { font-size: 15px; font-weight: 800; }
.offer-price { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; color: var(--blue); }
.offer ul { margin: 14px 0 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--blue-ink); }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 19px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--white); text-align: left; }
.option[aria-checked="true"] { border: 2px solid var(--blue); background: var(--blue-softer); padding: 18px; }
.option-title { display: block; font-size: 15px; font-weight: 800; }
.option-sub { display: block; margin-top: 3px; font-size: 13px; color: var(--muted-2); }
.option-price { font-size: 22px; font-weight: 800; white-space: nowrap; }
.option[aria-checked="true"] .option-price { color: var(--blue); }
.pay-note { text-align: center; font-size: 12px; color: var(--muted-2); }

/* Кабинет */
.card { background: var(--white); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.sub-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.sub-info { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.sub-info img { width: 72px; height: 72px; filter: drop-shadow(0 8px 14px rgba(10, 26, 102, 0.18)); }
.card-title { font-size: 20px; font-weight: 800; }
.card-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sub-line { margin-top: 6px; font-size: 15px; color: var(--text); }
.sub-line-muted { margin-top: 4px; font-size: 14px; color: var(--muted-2); }
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 20px; }
.work-item { display: flex; flex-direction: column; gap: 10px; }
.work-thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; background: linear-gradient(135deg, #D5DBEA, #8E9AB8); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--white); }
.work-thumb img, .work-thumb video { width: 100%; height: 100%; object-fit: cover; }
.work-badge { position: absolute; left: 8px; top: 8px; padding: 4px 9px; border-radius: 999px; background: var(--white); color: var(--ink); font-size: 11px; font-weight: 800; }
.work-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-2); }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--ground); color: var(--ink); }
.empty { padding: 32px; text-align: center; font-size: 14px; color: var(--muted-2); }
.row2 { display: flex; flex-wrap: wrap; gap: 16px; }
.row2 > .card:first-child { flex: 2 1 480px; min-width: 0; }
.row2 > .card:last-child { flex: 1 1 300px; min-width: 0; }
.table-wrap { margin-top: 16px; overflow-x: auto; }
.table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted-2); font-size: 12px; font-weight: 700; padding: 12px 8px; }
.table td { padding: 14px 8px; border-top: 1px solid var(--line); }

/* Документы */
.docs-hero { display: flex; align-items: center; gap: 20px; margin-top: 32px; flex-wrap: wrap; }
.docs-hero img { filter: drop-shadow(0 10px 18px rgba(10, 26, 102, 0.18)); }
.docs-title { margin-top: 8px; font-size: clamp(36px, 4.5vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.docs-layout { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 40px; align-items: flex-start; }
.docs-nav { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; background: var(--white); border-radius: var(--radius); padding: 12px; }
.docs-nav a { display: flex; align-items: center; min-height: 48px; padding: 8px 16px; border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.docs-nav a:hover { background: var(--ground); }
.docs-nav a.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.doc { flex: 999 1 560px; min-width: 0; background: var(--white); border-radius: var(--radius); padding: clamp(24px, 4vw, 56px); font-size: 15px; line-height: 1.7; color: var(--text); }
.doc h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.doc .doc-date { margin-top: 10px; font-size: 14px; color: var(--muted-2); }
.doc h3 { margin: 32px 0 8px; font-size: 18px; font-weight: 800; color: var(--ink); }
.doc p { margin: 0 0 8px; }
.doc ul { margin: 0 0 8px; padding-left: 20px; }
.doc li { margin-bottom: 4px; }

.notfound { min-height: 50vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; }

/* Блок периодичности списаний в окне оплаты */
.periodicity { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); font-size: 13px; line-height: 1.5; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.periodicity-title { font-weight: 800; color: var(--ink); }
#resub-agree-wrap.hidden { display: none !important; }

/* Панель состояния подписки в студии */
.state-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; margin-bottom: 20px; background: var(--blue-soft); border-radius: 12px; }
.state-panel.is-error { background: #FDECEC; }
.state-body { flex: 1 1 280px; min-width: 0; }
.state-title { margin: 0; font-weight: 800; font-size: 16px; color: var(--ink); }
.state-text { margin: 4px 0 0; font-size: 14px; color: var(--muted, #4A5165); overflow-wrap: anywhere; }
