/* Page layouts: home, section, article, recipe, search, profile, settings, static, 404. */

.page-block { padding: 48px var(--gutter) 0; display: flex; flex-direction: column; gap: 18px; }
.section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 24px; font-weight: var(--fw-bold); line-height: 1.5; }
.section-head p { font-size: 14px; font-weight: var(--fw-light); color: var(--c-muted-2); }
.section-head a { margin-inline-start: auto; font-size: 14px; font-weight: var(--fw-medium); }

/* ---------- home ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding: 40px var(--gutter) 0; }
.home-hero__main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.home-hero__cover { height: 400px; border-radius: var(--r-2xl); border-color: var(--c-line-2); }
.home-hero__cover .cover__icon { width: 120px; height: 120px; }
.home-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; font-weight: var(--fw-medium); color: var(--c-muted-2); }
.home-hero h1 { font-size: 40px; font-weight: var(--fw-bold); line-height: 1.35; letter-spacing: -.01em; text-wrap: pretty; }
.home-hero h1 a { color: inherit; }
.home-hero h1 a:hover { color: var(--c-rose); }
.home-hero__lead { font-size: 18px; font-weight: var(--fw-light); line-height: 1.85; color: var(--c-muted); max-width: 62ch; text-wrap: pretty; }
.grid-cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.band { margin: 48px var(--gutter) 0; padding: 28px; border-radius: var(--r-3xl); background: var(--c-tint-2); border: 1px solid #F3E0D6; display: flex; flex-direction: column; gap: 20px; }
.band__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.band__head h2 { font-size: 24px; font-weight: var(--fw-bold); }
.band__head a { margin-inline-start: auto; font-size: 14px; font-weight: var(--fw-medium); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

@media (max-width: 1023px) {
  .home-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .home-hero__cover { height: 320px; }
  .home-hero h1 { font-size: 34px; }
  .grid-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-block { padding-top: 40px; }
  .band { margin-top: 40px; padding: 22px; }
}
@media (max-width: 639px) {
  .home-hero { padding-top: 20px; gap: 24px; }
  .home-hero__cover { height: 220px; }
  .home-hero__cover .cover__icon { width: 84px; height: 84px; }
  .home-hero h1 { font-size: 27px; line-height: 1.4; }
  .home-hero__lead { font-size: 16px; }
  .grid-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .cat-card { padding: 14px 6px; }
  .cat-card img { width: 44px; height: 44px; }
  .page-block { padding-top: 32px; }
  .section-head h2, .band__head h2 { font-size: 21px; }
  .section-head p { flex-basis: 100%; order: 3; }
  .band { margin-top: 32px; padding: 16px; border-radius: var(--r-2xl); }
  .grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .recipe-card .cover { height: 140px; }
}

/* ---------- section ---------- */
.cat-hero {
  background: var(--grad-hero); padding: 34px var(--gutter) 26px; display: flex; align-items: center; gap: 26px;
  border-bottom: 1px solid var(--c-line);
}
.cat-hero__icon { width: 104px; height: 104px; border-radius: 28px; background: var(--c-surface); border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cat-hero__icon img { width: 74px; height: 74px; }
.cat-hero__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cat-hero h1 { font-size: 38px; font-weight: var(--fw-bold); line-height: 1.35; }
.cat-hero p { font-size: 16px; font-weight: var(--fw-light); line-height: 1.8; color: var(--c-muted); max-width: 640px; }
.cat-hero .btn { margin-inline-start: auto; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 22px var(--gutter); flex-wrap: wrap; }
.toolbar__side { margin-inline-start: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.list-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; padding: 6px var(--gutter) 0; }
.list-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--c-muted-2); }
.page-nav { padding: 40px var(--gutter) 0; }
@media (max-width: 1023px) {
  .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .cat-hero h1 { font-size: 32px; }
}
@media (max-width: 639px) {
  .cat-hero { flex-wrap: wrap; gap: 16px; padding-top: 24px; }
  .cat-hero__icon { width: 72px; height: 72px; border-radius: 20px; }
  .cat-hero__icon img { width: 52px; height: 52px; }
  .cat-hero h1 { font-size: 27px; }
  .cat-hero p { font-size: 15px; }
  .cat-hero .btn { margin-inline-start: 0; }
  .cat-hero__body { flex: 1 1 calc(100% - 100px); }
  .toolbar { padding-block: 16px; gap: 12px; }
  .toolbar .chips { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-block: 2px; width: calc(100% + var(--gutter) * 2); }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .toolbar__side { margin-inline-start: 0; width: 100%; justify-content: space-between; }
  .list-grid { grid-template-columns: 1fr; gap: 26px; }
  .article-card .cover { height: 190px; }
}

/* ---------- article ---------- */
.article-layout {
  display: grid; grid-template-columns: 220px minmax(0, 680px) 200px; justify-content: center; gap: 40px;
  padding: 40px var(--gutter) 0;
}
.toc { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.toc__title { font-size: 13px; font-weight: var(--fw-bold); color: var(--c-muted-2); letter-spacing: .04em; }
.toc ol { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.6; }
.toc a { display: block; padding: 8px 12px; border-inline-start: 2px solid var(--c-line); color: var(--c-muted); transition: background-color .15s, color .15s; }
.toc a:hover { color: var(--c-text); background: var(--c-surface-2); }
.toc a[aria-current="true"] { border-inline-start-color: var(--c-pink); color: var(--c-text); font-weight: var(--fw-bold); background: var(--c-tint-2); }
.article { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.article h1 { font-size: 42px; font-weight: var(--fw-bold); line-height: 1.32; letter-spacing: -.01em; text-wrap: pretty; }
.article__lead { font-size: 19px; font-weight: var(--fw-light); line-height: 1.8; color: var(--c-muted); text-wrap: pretty; }
.article__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 14px 0; border-block: 1px solid var(--c-line); font-size: 13px; font-weight: var(--fw-medium); color: var(--c-muted-2); }
.article__cover { height: 360px; border-radius: var(--r-xl); border-color: var(--c-line-2); }
.article__cover .cover__icon { width: 110px; height: 110px; }
.prose { display: flex; flex-direction: column; gap: 18px; }
.prose h2 { margin-top: 6px; font-size: 26px; font-weight: var(--fw-bold); line-height: 1.45; }
.prose h3 { font-size: 20px; font-weight: var(--fw-bold); line-height: 1.5; }
.prose p { font-size: 18px; font-weight: var(--fw-regular); line-height: 1.9; text-wrap: pretty; }
.prose ul, .prose ol { padding-inline-start: 22px; list-style: disc; display: flex; flex-direction: column; gap: 8px; font-size: 18px; line-height: 1.9; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--c-pink); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-inline-start: 3px solid var(--c-pink); padding: 4px 18px; color: var(--c-muted); font-size: 18px; line-height: 1.9; background: var(--c-tint-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
[dir="rtl"] .prose blockquote { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.prose img { border-radius: var(--r-lg); }
.feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; padding: 18px 0; border-top: 1px solid var(--c-line); }
.feedback__q { font-size: 15px; font-weight: var(--fw-medium); }
.feedback__share { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.feedback__share a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-pill); }
.feedback__share a:hover { background: var(--c-tint); }
.feedback__share img { width: 19px; height: 19px; }
.feedback__thanks { font-size: 14px; color: var(--c-ok); font-weight: var(--fw-medium); }
.article-actions { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 16px; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.article-actions .btn { min-height: 44px; border-radius: var(--r-sm); background: var(--c-surface-2); border-color: transparent; justify-content: flex-start; font-weight: var(--fw-medium); }
.article-actions .btn:hover { border-color: var(--c-line-2); }
.article-actions .btn[aria-pressed="true"] { border-color: #F3B7C7; }
.article-actions .btn__count { margin-inline-start: auto; font-size: 12px; color: var(--c-muted-2); }
.read-next { padding: 28px var(--gutter) 0; margin-top: 48px; border-top: 1px solid var(--c-line); display: flex; flex-direction: column; gap: 18px; }
.read-next h2 { font-size: 24px; font-weight: var(--fw-bold); }

@media (max-width: 1023px) {
  .article-layout { grid-template-columns: minmax(0, 720px); gap: 24px; padding-top: 28px; }
  .toc { position: static; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 16px; background: var(--c-surface-2); }
  .toc ol { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 1px solid var(--c-line-2); border-radius: var(--r-pill); padding: 6px 14px; background: var(--c-surface); font-size: 13px; }
  .toc a[aria-current="true"] { border-color: var(--c-pink); }
  .article-actions {
    position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 45; flex-direction: row; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid var(--c-line); border-radius: 0; background: var(--c-surface); box-shadow: var(--shadow-bar);
    justify-content: center; order: 3;
  }
  .article-actions .btn { flex: 1 1 0; max-width: 200px; justify-content: center; min-width: 0; padding: 0 10px; }
  .article-actions .btn__count { margin-inline-start: 4px; }
  .page--article .site-footer { padding-bottom: 92px; }
  .article h1 { font-size: 34px; }
}
@media (max-width: 639px) {
  .article h1 { font-size: 27px; line-height: 1.4; }
  .article__lead { font-size: 17px; }
  .article__cover { height: 220px; }
  .prose p, .prose ul, .prose ol { font-size: 17px; }
  .prose h2 { font-size: 22px; }
  .feedback__share { margin-inline-start: 0; }
  .read-next .grid-3 { gap: 18px; }
  .mini-card .cover { width: 104px; height: 84px; }
}

/* ---------- recipe ---------- */
.recipe-hero { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 40px; padding: 40px var(--gutter) 0; align-items: center; }
.recipe-hero__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.recipe-hero h1 { font-size: 42px; font-weight: var(--fw-bold); line-height: 1.3; }
.recipe-hero__lead { font-size: 18px; font-weight: var(--fw-light); line-height: 1.85; color: var(--c-muted); text-wrap: pretty; }
.recipe-hero__cover { height: 420px; border-radius: var(--r-3xl); }
.recipe-hero__cover .cover__icon { width: 110px; height: 110px; }
.recipe-hero__actions { display: flex; gap: 10px; padding-top: 4px; flex-wrap: wrap; }
.recipe-body { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 40px; padding: 44px var(--gutter) 0; align-items: start; }
.ingredients { display: flex; flex-direction: column; gap: 14px; background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: var(--r-2xl); padding: 24px; position: sticky; top: calc(var(--header-h) + 24px); }
.ingredients__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ingredients__head h2 { font-size: 20px; font-weight: var(--fw-bold); }
.ingredients__head span { margin-inline-start: auto; font-size: 13px; color: var(--c-muted-2); }
.ingredient { padding: 12px 0; border-top: 1px solid #EFE4DE; }
.ingredient .check__text { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.ingredient__name { font-size: 16px; font-weight: var(--fw-medium); line-height: 1.6; }
.ingredient__note { font-size: 13px; font-weight: var(--fw-light); color: var(--c-muted-2); line-height: 1.6; }
.ingredient__qty { font-size: 14px; font-weight: var(--fw-bold); color: var(--c-brown); flex: 0 0 auto; }
.steps h2 { font-size: 20px; font-weight: var(--fw-bold); padding-bottom: 10px; }
.steps ol { display: flex; flex-direction: column; gap: 0; counter-reset: step; }
.step { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--c-line); }
.step__n { width: 38px; height: 38px; border-radius: var(--r-pill); background: var(--grad-brand-text); color: #fff; font-size: 16px; font-weight: var(--fw-bold); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.step__body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }
.step__title { font-size: 18px; font-weight: var(--fw-bold); line-height: 1.55; }
.step__text { font-size: 16px; font-weight: var(--fw-regular); line-height: 1.85; color: var(--c-text-2); }
.step.is-done .step__n { background: var(--c-ok); }
.steps .callout { margin-top: 14px; }

@media (max-width: 1023px) {
  .recipe-hero { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .recipe-hero__cover { order: -1; height: 320px; }
  .recipe-hero h1 { font-size: 34px; }
  .recipe-body { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .ingredients { position: static; }
}
@media (max-width: 639px) {
  .recipe-hero__cover { height: 240px; }
  .recipe-hero h1 { font-size: 27px; }
  .recipe-hero__lead { font-size: 16px; }
  .recipe-hero__actions .btn--lg { flex: 1 1 auto; }
  .ingredients { padding: 18px; }
  .step { gap: 12px; flex-wrap: wrap; }
  .step__body { flex-basis: calc(100% - 52px); }
  .step .timer { margin-inline-start: 50px; }
  .step__title { font-size: 17px; }
}

/* ---------- search ---------- */
.search-head { padding: 36px var(--gutter) 0; display: flex; flex-direction: column; gap: 18px; }
.search-bar {
  height: 60px; border-radius: var(--r-pill); border: 1.5px solid var(--c-dark); display: flex; align-items: center; gap: 12px;
  padding-inline: 22px 10px; box-shadow: 0 0 0 4px #FFE3EC; background: var(--c-surface);
}
.search-bar:focus-within { box-shadow: 0 0 0 4px #FFE3EC, var(--ring); }
.search-bar input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 19px; font-weight: var(--fw-medium); }
.search-bar__clear { width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: var(--c-surface-2); display: flex; align-items: center; justify-content: center; color: var(--c-muted); }
.search-bar__go { width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: var(--grad-brand); display: flex; align-items: center; justify-content: center; color: #fff; }
.search-tabs { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--c-line); }
.search-tabs .tabs { border: 0; flex: 1 1 auto; }
.search-tabs .tab { font-size: 15px; padding: 0 16px; min-height: 46px; }
.search-tabs__note { font-size: 13px; color: var(--c-muted-2); }
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 10px var(--gutter) 0; align-items: start; }
.result-list { display: flex; flex-direction: column; }
.aside-card { border: 1px solid var(--c-line); border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.aside-card h2 { font-size: 15px; font-weight: var(--fw-bold); }
.aside-card .chip { min-height: 34px; padding: 0 12px; font-size: 13px; font-weight: var(--fw-regular); }
.results-empty { padding: 48px 0; text-align: center; color: var(--c-muted-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (max-width: 1023px) {
  .search-layout { grid-template-columns: 1fr; gap: 0; }
  .aside-card { margin-top: 28px; }
}
@media (max-width: 639px) {
  .search-head { padding-top: 24px; }
  .search-bar { height: 54px; padding-inline: 16px 8px; }
  .search-bar input { font-size: 16px; }
  .search-tabs { flex-wrap: wrap; }
  .search-tabs__note { flex-basis: 100%; padding-bottom: 10px; }
  .result-row { gap: 14px; padding: 18px 0; }
  .result-row .cover { width: 96px; height: 84px; }
  .result-row .cover__icon { width: 38px; height: 38px; }
  .result-row__title { font-size: 17px; }
  .result-row__snippet { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- profile ---------- */
.profile-head { background: var(--grad-hero); padding: 36px var(--gutter) 0; display: flex; flex-direction: column; gap: 24px; }
.profile-id { display: flex; align-items: center; gap: 24px; }
.profile-id__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.profile-id h1 { font-size: 34px; font-weight: var(--fw-bold); line-height: 1.35; }
.profile-id__line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--c-muted); }
.profile-id .btn { margin-inline-start: auto; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.profile-tabs { margin-top: 0; }
.collections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 26px var(--gutter) 0; }
.collection-title { padding: 30px var(--gutter) 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.collection-title h2 { font-size: 20px; font-weight: var(--fw-bold); }
.collection-title span { font-size: 13px; color: var(--c-muted-2); }
.saved-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 16px var(--gutter) 0; }
.liked-toolbar { display: flex; gap: 8px; padding: 24px var(--gutter) 0; align-items: center; flex-wrap: wrap; }
.liked-toolbar__note { margin-inline-start: auto; font-size: 13px; color: var(--c-muted-2); }
.liked-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; padding: 20px var(--gutter) 0; }
.account-strip { margin: 40px var(--gutter) 0; padding: 18px 22px; border: 1px solid var(--c-line); border-radius: var(--r-xl); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.account-strip__text { display: flex; flex-direction: column; gap: 2px; }
.account-strip__text strong { font-size: 15px; font-weight: var(--fw-bold); }
.account-strip__text span { font-size: 13px; color: var(--c-muted-2); }
.account-strip__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.account-strip__actions > a { font-size: 14px; font-weight: var(--fw-medium); color: var(--c-muted); }
.empty-state { padding: 48px var(--gutter) 0; text-align: center; color: var(--c-muted-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (max-width: 1023px) {
  .collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saved-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .liked-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .profile-head { padding-top: 24px; gap: 20px; }
  .profile-id { flex-wrap: wrap; gap: 16px; }
  .profile-id .avatar--lg { width: 84px; height: 84px; }
  .profile-id .avatar--lg > span { font-size: 30px; border-width: 3px; }
  .profile-id h1 { font-size: 26px; }
  .profile-id .btn { margin-inline-start: 0; width: 100%; }
  .stats { gap: 8px; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat-card__ico { width: 38px; height: 38px; }
  .stat-card__n { font-size: 21px; }
  .stat-card__l { font-size: 12px; }
  .saved-grid { grid-template-columns: 1fr; gap: 12px; }
  .liked-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .liked-card .cover { height: 120px; }
  .account-strip { padding: 16px; }
  .account-strip__actions { margin-inline-start: 0; width: 100%; justify-content: space-between; }
  .liked-toolbar__note { flex-basis: 100%; margin-inline-start: 0; }
}

/* ---------- settings ---------- */
.page-title { padding: 34px var(--gutter) 0; display: flex; flex-direction: column; gap: 6px; }
.page-title h1 { font-size: 34px; font-weight: var(--fw-bold); line-height: 1.35; }
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding: 26px var(--gutter) 0; align-items: start; }
.side-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--header-h) + 20px); }
.side-nav a, .side-nav button {
  min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 0; background: transparent; text-align: start;
  display: flex; align-items: center; font-size: 15px; color: var(--c-muted); font-weight: var(--fw-medium); width: 100%;
  transition: background-color .15s, color .15s;
}
.side-nav a:hover, .side-nav button:hover { background: var(--c-surface-2); color: var(--c-text); }
.side-nav [aria-current="true"], .side-nav [aria-selected="true"] { background: var(--c-tint); color: var(--c-text); font-weight: var(--fw-bold); }
.settings-panels { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { border: 1px solid var(--c-line); border-radius: var(--r-2xl); padding: 26px 28px; display: flex; flex-direction: column; gap: 22px; background: var(--c-surface); scroll-margin-top: calc(var(--header-h) + 16px); }
.panel__head { display: flex; flex-direction: column; gap: 4px; }
.panel__head h2 { font-size: 21px; font-weight: var(--fw-bold); line-height: 1.45; }
.panel__head p { font-size: 14px; font-weight: var(--fw-light); line-height: 1.75; color: var(--c-muted); }
.js .panel[hidden] { display: none; }
.avatar-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-row__text { display: flex; flex-direction: column; gap: 4px; }
.avatar-row__text strong { font-size: 15px; font-weight: var(--fw-bold); }
.avatar-row__text span { font-size: 13px; color: var(--c-muted-2); }
.avatar-row .btn { margin-inline-start: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.danger-zone { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: var(--r-lg); background: #FFF6F6; border: 1px solid #F5D3D3; flex-wrap: wrap; }
.danger-zone__text { display: flex; flex-direction: column; gap: 3px; flex: 1 1 260px; }
.danger-zone__text strong { font-size: 15px; font-weight: var(--fw-bold); color: var(--c-danger); }
.danger-zone__text span { font-size: 13px; font-weight: var(--fw-light); color: #6E4A4A; line-height: 1.7; }
.save-bar {
  position: sticky; bottom: 0; z-index: 40; margin-top: 28px; padding: 14px var(--gutter); background: var(--c-surface);
  border-top: 1px solid var(--c-line); box-shadow: var(--shadow-bar); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.save-bar__status { font-size: 14px; font-weight: var(--fw-medium); color: var(--c-ok); }
.save-bar[data-dirty="true"] .save-bar__status { color: var(--c-warn); }
.save-bar__actions { margin-inline-start: auto; display: flex; gap: 10px; }
.save-bar .btn { min-height: 48px; font-size: 15px; }
.save-bar .btn--primary { padding: 0 26px; }
.save-bar[data-dirty="false"] .btn--primary { opacity: .45; pointer-events: none; }
.settings-page .site-footer { margin-top: 0; }
@media (max-width: 1023px) {
  .settings-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .side-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; position: sticky; top: var(--header-h); z-index: 30; background: var(--c-surface); margin-inline: calc(var(--gutter) * -1); padding: 8px var(--gutter); border-bottom: 1px solid var(--c-line); gap: 6px; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a, .side-nav button { width: auto; white-space: nowrap; flex: 0 0 auto; border-radius: var(--r-pill); }
  .page-title h1 { font-size: 28px; }
}
@media (max-width: 639px) {
  .panel { padding: 20px 16px; border-radius: var(--r-xl); gap: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .avatar-row .btn { margin-inline-start: 0; width: 100%; }
  .save-bar__actions { width: 100%; }
  .save-bar__actions .btn { flex: 1 1 0; }
  .save-bar__status { flex-basis: 100%; }
}

/* ---------- static (terms / privacy / disclaimer) ---------- */
.static-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 48px; padding: 40px var(--gutter) 0; justify-content: center; align-items: start; }
.static-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--c-line); }
.static-head h1 { font-size: 36px; font-weight: var(--fw-bold); line-height: 1.4; }
.static-head p { font-size: 14px; color: var(--c-muted-2); }
.static-body { display: flex; flex-direction: column; gap: 16px; }
.static-body h2 { margin-top: 12px; font-size: 22px; font-weight: var(--fw-bold); line-height: 1.5; }
.static-body p, .static-body li { font-size: 16px; line-height: 1.95; color: var(--c-text-2); }
.static-body ul { list-style: disc; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.static-body li::marker { color: var(--c-pink); }
@media (max-width: 1023px) {
  .static-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .static-layout .side-nav { position: static; margin-inline: 0; padding: 0; border: 0; background: transparent; overflow-x: auto; }
  .static-layout .side-nav a { border: 1px solid var(--c-line-2); background: var(--c-surface-2); min-height: 40px; font-size: 14px; }
  .static-layout .side-nav [aria-current] { background: var(--c-dark); border-color: var(--c-dark); color: #fff; }
}
@media (max-width: 639px) {
  .static-head h1 { font-size: 27px; }
}

/* ---------- 404 ---------- */
.not-found { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 72px var(--gutter) 24px; }
.not-found__art { width: 120px; height: 120px; border-radius: 34px; background: var(--grad-hero); border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; }
.not-found__art img { width: 84px; height: 84px; }
.not-found__code { font-size: 72px; font-weight: var(--fw-bold); line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h1 { font-size: 30px; font-weight: var(--fw-bold); line-height: 1.45; }
.not-found p { font-size: 16px; font-weight: var(--fw-light); line-height: 1.85; color: var(--c-muted); max-width: 440px; }
.not-found .search-pill { width: min(100%, 380px); height: 50px; }
.not-found__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
@media (max-width: 639px) {
  .not-found { padding-top: 48px; }
  .not-found__code { font-size: 56px; }
  .not-found h1 { font-size: 24px; }
}
