/* Tariferia themes — light: "Oliva & Lino", dark: "Nero & Champagne" */
:root {
  --bg: #F2EDE2; --paper: #F8F4EA; --ink: #302E26; --muted: #6B6555; --line: #DDD5C3;
  --accent: #555D3E; --on-accent: #F2EDE2; --accent-soft: #E3E2D1; --gold: #B39B70; --eyebrow: #85704B;
  --lead: #4A473C; --input: #FBF8F1; --star-dim: #D8CEBA;
  --inverse-bg: #302E26; --inverse-ink: #F2EDE2; --inverse-muted: #CFC5AF;
  --ok: #E2E5D2; --ok-ink: #45502E; --err: #F0DCD2; --err-ink: #8A3A22; --warn: #F0E6CC; --warn-ink: #6C5420;
  --shadow: 0 1px 2px rgba(48,46,38,.06), 0 10px 28px rgba(48,46,38,.08);
  color-scheme: light;
  --radius: 12px;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif; --sans: 'Inter', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #242320; --paper: #2C2B27; --ink: #F1E8D8; --muted: #A49A8C; --line: #3B3934;
    --accent: #BDA57A; --on-accent: #242320; --accent-soft: #383226; --gold: #BDA57A; --eyebrow: #BDA57A;
    --lead: #D8CFBF; --input: #1F1E1B; --star-dim: #4A4740;
    --inverse-bg: #F1E8D8; --inverse-ink: #242320; --inverse-muted: #6A6255;
    --ok: #2E3426; --ok-ink: #C5CDA2; --err: #3F2A24; --err-ink: #EBA791; --warn: #3B3424; --warn-ink: #E2C57F;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #242320; --paper: #2C2B27; --ink: #F1E8D8; --muted: #A49A8C; --line: #3B3934;
  --accent: #BDA57A; --on-accent: #242320; --accent-soft: #383226; --gold: #BDA57A; --eyebrow: #BDA57A;
  --lead: #D8CFBF; --input: #1F1E1B; --star-dim: #4A4740;
  --inverse-bg: #F1E8D8; --inverse-ink: #242320; --inverse-muted: #6A6255;
  --ok: #2E3426; --ok-ink: #C5CDA2; --err: #3F2A24; --err-ink: #EBA791; --warn: #3B3424; --warn-ink: #E2C57F;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); transition: background-color .2s, color .2s; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: 1.45rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 64px; min-height: 70vh; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; margin: .4em 0 0; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
.grow { flex: 1; min-width: 0; }

/* top bar */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 76px; position: relative; }
.brand { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: -.01em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.mainnav { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: nowrap; font-size: .92rem; }
.mainnav > a, .mainnav .chip { white-space: nowrap; }
.mainnav a { color: var(--ink); }
.mainnav a.active { color: var(--accent); font-weight: 600; }
.mainnav .btn { color: var(--on-accent); }
.chip { background: var(--accent-soft); color: var(--accent) !important; font-weight: 600; padding: 4px 12px; border-radius: 99px; }
.langs { color: var(--muted); font-size: .8rem; }
.langs a { color: var(--muted); padding: 0 3px; }
.langs a.on { color: var(--ink); font-weight: 600; }
.burger { display: none; margin-left: auto; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 1180px) {
  .burger { display: block; }
  .mainnav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column;
             align-items: flex-start; padding: 16px; border-bottom: 1px solid var(--line); gap: 12px; }
  #navtoggle:checked ~ .mainnav { display: flex; }
}

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 6px;
       padding: 11px 20px; font: 500 .95rem var(--sans); cursor: pointer; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-block { width: 100%; justify-content: center; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.link-btn.danger { color: var(--err-ink); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .92rem; }
.form label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { width: auto; flex: 1; min-width: 120px; }
form.inline { display: inline; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; background: var(--ok); color: var(--ok-ink); }
.flash-err { background: var(--err); color: var(--err-ink); }
.flash-warn { background: var(--warn); color: var(--warn-ink); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.narrow { max-width: 720px; margin: 0 auto; }
.auth { max-width: 420px; margin: 24px auto; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* hero */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: center; padding: 32px 0 28px; }
.hero-slim { grid-template-columns: 1fr; max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .74rem; font-weight: 500; color: var(--eyebrow); margin: 0 0 10px; }
.lead { font-family: var(--serif); font-size: 1.22rem; line-height: 1.5; color: var(--lead); max-width: 60ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-stats { display: grid; gap: 12px; margin: 0; }
.hero-stats div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.hero-stats dt { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.hero-stats dd { margin: 0; color: var(--muted); font-size: .85rem; }
.hero-stats.small { grid-template-columns: repeat(3, auto); }
.hero-stats.small dt { font-size: 1.2rem; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-stats { grid-template-columns: repeat(3, 1fr); } .hero-stats dt { font-size: 1.15rem; } }

.filters { display: grid; grid-template-columns: 1fr 200px 160px auto; gap: 10px; margin-bottom: 24px; }
@media (max-width: 760px) { .filters { grid-template-columns: 1fr 1fr; } .filters input { grid-column: 1 / -1; } }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.card-img { aspect-ratio: 4/3; background: var(--accent-soft) center/cover no-repeat; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 6px 0 10px; font-size: 1.3rem; }
.card-meta { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--eyebrow); font-weight: 600; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }
.stars { color: var(--gold); letter-spacing: 1px; }
.stars .dim { color: var(--star-dim); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pager a { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
.pager a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* recipe */
.recipe-hero { aspect-ratio: 21/8; background: var(--accent-soft) center/cover no-repeat; border-radius: var(--radius); margin-bottom: 24px; }
@media (max-width: 600px) { .recipe-hero { aspect-ratio: 4/3; } }
.byline { color: var(--muted); }
.recipe-cols { display: grid; grid-template-columns: 340px 1fr; gap: 32px; margin-top: 24px; }
@media (max-width: 800px) { .recipe-cols { grid-template-columns: 1fr; } }
.ingredients { padding-left: 1.1em; margin: 0; }
.ingredients li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
                    font: 600 .95rem var(--serif); display: grid; place-items: center; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
@media (max-width: 700px) { .actions-row { grid-template-columns: 1fr; } }
.rate-form { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 2px; }
.rate-form input { display: none; }
.rate-form label { font-size: 1.8rem; color: var(--star-dim); cursor: pointer; line-height: 1; }
.rate-form input:checked ~ label, .rate-form label:hover, .rate-form label:hover ~ label { color: var(--gold); }
.rate-form .btn { margin-right: 12px; order: -1; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photos figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.photos img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.photos figcaption { padding: 8px 10px; font-size: .82rem; color: var(--muted); }
.comments { list-style: none; padding: 0; }
.comments li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comments p { margin: 4px 0 0; }
.c-head { font-size: .88rem; }

/* wallet */
.balances { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 860px) { .balances { grid-template-columns: 1fr 1fr; } }
.bal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 2px; }
.bal span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bal strong { font-family: var(--serif); font-weight: 500; font-size: 1.8rem; }
.bal small { color: var(--muted); }
.bal-main { background: var(--inverse-bg); color: var(--inverse-ink); border-color: var(--inverse-bg); }
.bal-main span, .bal-main small { color: var(--inverse-muted); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .cols2 { grid-template-columns: 1fr; } }
.onchain { margin-top: 16px; padding: 12px 14px; background: var(--bg); border-radius: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 12px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.tbl th, .tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok-ink); font-weight: 600; }
.neg { color: var(--err-ink); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.badge-paid, .badge-approved { background: var(--ok); color: var(--ok-ink); }
.badge-pending { background: var(--warn); color: var(--warn-ink); }
.badge-rejected { background: var(--err); color: var(--err-ink); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* profile */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 500 2.4rem var(--serif); display: grid; place-items: center; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 12px; }

/* earn */
.rules { display: grid; gap: 12px; }
.rule { display: flex; gap: 16px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.rule h3 { margin: 0; }
.rule p { margin: 2px 0 0; font-size: .9rem; }
.rule-icon { font-size: 1.8rem; }
.rule-pts { font: 500 1.5rem var(--serif); color: var(--accent); white-space: nowrap; }
.flow { counter-reset: f; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .flow { grid-template-columns: 1fr; } }
.flow li { counter-increment: f; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; }
.flow li::before { content: counter(f); font: 700 1.3rem var(--serif); color: var(--eyebrow); }
.flow span { color: var(--muted); font-size: .9rem; }
.spend li { margin-bottom: 6px; }

/* leaderboard & admin */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; }
.count { background: var(--line); border-radius: 99px; padding: 0 8px; font-size: .78rem; }
.board { list-style: none; padding: 0; margin: 0; }
.board li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank { width: 28px; text-align: center; font-weight: 700; }
.pts { margin-left: auto; font-weight: 600; color: var(--accent); }
.adm-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.adm-row img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
.adm-row form { display: flex; gap: 6px; flex-direction: column; }

.foot { border-top: 1px solid var(--line); background: var(--paper); font-size: .85rem; color: var(--muted); }
.foot-in { padding-top: 28px; padding-bottom: 20px; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-brand { color: inherit; text-decoration: none; }
.foot-brand span { display: flex; flex-direction: column; line-height: 1.3; }
.foot-brand strong { color: var(--ink, inherit); font-size: 1rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--ink, inherit); text-decoration: underline; }
.foot-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8rem; }
@media (max-width: 640px) { .foot-top { flex-direction: column; align-items: flex-start; } }

/* premium, featured, deposits */
.card-img { position: relative; }
.card-tag { position: absolute; top: 10px; left: 10px; background: rgba(36,35,32,.82); color: #F1E8D8; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.card-tag-feat { left: auto; right: 10px; background: #BDA57A; color: #242320; }
.badge-premium { background: var(--inverse-bg); color: var(--inverse-ink); }
.featured-strip { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px 22px; margin-bottom: 24px; }
.featured-strip h2 { margin-top: 0; }
.premium-box { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin: 0; display: grid; gap: 10px; }
.premium-box .hint { margin: 0; }
.paywall { position: relative; margin-top: 24px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center;
           background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
@media (max-width: 760px) { .paywall { grid-template-columns: 1fr; } }
.paywall-fade { color: var(--muted); }
.paywall-box h3 { font-size: 1.3rem; margin: 10px 0 6px; }
.feature-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.feature-box h3 { margin: 0 0 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.stats-grid div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stats-grid strong { display: block; font-family: var(--serif); font-size: 1.3rem; }
.stats-grid span { color: var(--muted); font-size: .82rem; }
.meter { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--accent); }

/* photo visuals */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-coin { width: 30px; height: 30px; object-fit: contain; }
.hero-photo { grid-template-columns: 1fr 1.05fr; padding-top: 24px; }
.hero-img { position: relative; margin: 0; }
.hero-img > img:first-child { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); background: var(--accent-soft); }
.hero-coin { position: absolute; left: -28px; bottom: -28px; width: 108px; height: 108px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.28)); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 32px; }
.stat-row div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.stat-row dt { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; }
.stat-row dd { margin: 0; color: var(--muted); font-size: .85rem; }
@media (max-width: 760px) { .hero-photo { grid-template-columns: 1fr; } .hero-coin { width: 76px; height: 76px; left: 12px; bottom: -22px; } .stat-row dt { font-size: 1.15rem; } }
.banner { border-radius: 20px; background: var(--ink) center/cover no-repeat; margin: 8px 0 28px; overflow: hidden; }
.banner-in { padding: 48px 40px; max-width: 640px; background: linear-gradient(90deg, rgba(36,35,32,.88) 0%, rgba(36,35,32,.62) 70%, rgba(36,35,32,0) 100%); color: #F1E8D8; }
.banner .eyebrow { color: #BDA57A; }
.banner .lead { color: #E3D9C7; }
.banner-coin { width: 72px; height: 72px; object-fit: contain; margin-bottom: 8px; }
@media (max-width: 600px) { .banner-in { padding: 28px 20px; max-width: none; background: rgba(36,35,32,.78); } }
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; max-width: 980px; margin: 0 auto; }
.auth-wrap .auth { margin: 24px 0; width: 100%; justify-self: center; }
.auth-img { margin: 0; }
.auth-img img { width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; border-radius: 20px; background: var(--accent-soft); }
@media (max-width: 820px) { .auth-wrap { grid-template-columns: 1fr; } .auth-img { display: none; } }
.bal-main { position: relative; overflow: hidden; }
.bal-coin { position: absolute; right: -10px; bottom: -10px; width: 72px; height: 72px; object-fit: contain; opacity: .9; }
.featured-strip { width: fit-content; max-width: 100%; }
.featured-strip .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 270px)); }
@media (max-width: 600px) { .featured-strip { width: auto; } .featured-strip .grid { grid-template-columns: 1fr; } }

/* referrals */
.ref-code { font: 700 2rem ui-monospace, Menlo, monospace; letter-spacing: .12em; color: var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; text-align: center; margin-bottom: 14px; }
.ref-ok { color: var(--ok-ink); }

/* language menu */
.langmenu { position: relative; font-size: .85rem; }
.langmenu summary { list-style: none; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu[open] summary { color: var(--ink); background: var(--paper); }
.langmenu-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
                 box-shadow: var(--shadow); padding: 6px; display: grid; min-width: 140px; z-index: 20; }
.langmenu-list a { padding: 7px 10px; border-radius: 6px; color: var(--ink); }
.langmenu-list a:hover { background: var(--accent-soft); text-decoration: none; }
.langmenu-list a.on { font-weight: 600; color: var(--accent); }
@media (max-width: 1180px) { .langmenu-list { position: static; box-shadow: none; margin-top: 6px; grid-template-columns: repeat(3, auto); } }

/* theme toggle */
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 30px; padding: 0; cursor: pointer;
                color: var(--muted); display: inline-grid; place-items: center; }
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.mainnav a { font-family: var(--serif); font-size: 1.02rem; }
.mainnav .btn, .mainnav .chip { font-family: var(--sans); font-size: .85rem; }
.topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }

/* premium status */
.premium-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 16px 0 8px; }
@media (max-width: 820px) { .premium-hero { grid-template-columns: 1fr; } }
.premium-card { display: grid; gap: 12px; padding: 24px; margin: 0; }
.premium-card .badge { justify-self: start; }
.premium-until { margin: 0; color: var(--muted); font-size: .9rem; }
.premium-price { display: flex; align-items: baseline; gap: 8px; }
.premium-price strong { font: 500 2.4rem var(--serif); }
.premium-price span { color: var(--muted); }
.premium-locked { display: grid; gap: 8px; justify-items: start; }
.premium-strip { display: flex; justify-content: space-between; gap: 12px; background: var(--accent-soft); color: var(--ink); border-radius: 10px;
                 padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.premium-strip:hover { text-decoration: none; filter: brightness(.98); }

/* step editor */
.steps-field { display: grid; gap: 10px; }
.field-label { font-weight: 500; font-size: .92rem; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: start; background: var(--paper); border: 1px solid var(--line);
             border-radius: 10px; padding: 10px 10px 10px 12px; }
.step-label { grid-column: 1 / -1; font: 500 1rem var(--serif); color: var(--eyebrow); }
.step-item textarea { min-height: 64px; resize: vertical; }
.step-remove { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 34px; height: 34px; font-size: 1.2rem;
               line-height: 1; cursor: pointer; }
.step-remove:hover { color: var(--err-ink); border-color: var(--err-ink); }
.step-add { justify-self: start; }

/* cover photo */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bonus-pill { display: inline-block; background: var(--accent); color: var(--on-accent); font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.cover-field { display: grid; gap: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 14px; }
.cover-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cover-drop { display: grid; place-items: center; aspect-ratio: 16/9; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; overflow: hidden;
              background: var(--bg) url('img/placeholder.webp') center/cover no-repeat; position: relative; }
.cover-drop::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.cover-drop:hover { border-color: var(--accent); }
.cover-drop img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.cover-drop-text { position: relative; display: grid; gap: 4px; text-align: center; padding: 12px; }
.cover-drop-text strong { font: 500 1.15rem var(--serif); }
.cover-drop-text small { color: var(--muted); }
.cover-field.has-cover .cover-drop { border-style: solid; border-color: var(--accent); }
.cover-tips { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .86rem; display: grid; gap: 2px; }
.cover-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-color: var(--accent); background: var(--accent-soft); margin-top: -8px; }
.cover-cta strong { font: 500 1.1rem var(--serif); margin-right: 6px; }
.cover-cta .hint { margin: 4px 0 0; }
.cover-cta input[type=file] { width: auto; max-width: 100%; }
.cover-cta-small { background: var(--paper); border-color: var(--line); }
.recipe-hero { position: relative; }
.hero-admin { position: absolute; right: 12px; top: 12px; }
.btn-ghost-light { background: rgba(36,35,32,.7); color: #F1E8D8; }

[hidden] { display: none !important; }
.cover-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.cover-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-drop { background-clip: padding-box; background-origin: padding-box; }

/* brand logos: light logo in the light theme, dark logo in the dark theme */
.brand { display: inline-flex; align-items: center; }
.brand .logo { height: 56px; width: auto; }
.brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
@media (max-width: 600px) { .brand .logo { height: 42px; } .topbar-in { min-height: 64px; } }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.foot-mark { height: 34px; width: auto; }
:root[data-theme="dark"] .foot-mark { filter: saturate(.7) brightness(1.15); }

/* community */
.community-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.community-head .lead { margin-bottom: 0; }
.community-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; margin-top: 16px; }
@media (max-width: 960px) { .community-layout { grid-template-columns: 1fr; } .community-side { order: -1; } .community-side .panel:not(:first-child) { display: none; } }
.community-side .panel h3 { margin-top: 0; }
.earn-mini { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.earn-mini li { display: flex; justify-content: space-between; gap: 10px; }
.earn-mini strong { color: var(--accent); font: 500 1.1rem var(--serif); }
.stats-tight { grid-template-columns: 1fr 1fr 1fr; margin: 0; }
.stats-tight div { padding: 8px 10px; }
.stats-tight strong { font-size: 1.05rem; }
.rules-list { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
.flair-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.flair-chip { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .03em; padding: 3px 10px; border-radius: 99px;
              background: var(--accent-soft); color: var(--accent); border: 1px solid transparent; white-space: nowrap; }
a.flair-chip:hover { text-decoration: none; border-color: var(--accent); }
.flair-chip.on { background: var(--accent); color: var(--on-accent); }
.flair-tips { background: color-mix(in srgb, #6f8a4a 18%, transparent); color: #5d7a3a; }
.flair-story { background: color-mix(in srgb, #b07a4a 18%, transparent); color: #9a6236; }
.flair-question { background: color-mix(in srgb, #4a78a0 18%, transparent); color: #3f6b94; }
.flair-regional { background: color-mix(in srgb, #a0504a 18%, transparent); color: #94433d; }
.flair-tools { background: color-mix(in srgb, #7a6a9a 18%, transparent); color: #6c5b8f; }
:root[data-theme="dark"] .flair-tips, :root[data-theme="dark"] .flair-story, :root[data-theme="dark"] .flair-question, :root[data-theme="dark"] .flair-regional, :root[data-theme="dark"] .flair-tools { filter: brightness(1.6) saturate(.8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.flair-tips,.flair-story,.flair-question,.flair-regional,.flair-tools) { filter: brightness(1.6) saturate(.8); } }
.flair-chip.on[class*="flair-"] { background: var(--accent); color: var(--on-accent); filter: none; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.post-row { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; transition: border-color .15s; }
.post-row:hover { border-color: var(--muted); }
.post-row.low { opacity: .55; }
.post-main { flex: 1; min-width: 0; color: var(--ink); }
.post-main:hover { text-decoration: none; }
.post-main h3 { margin: 6px 0 4px; font-size: 1.3rem; }
.post-meta { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post-snippet { margin: 0 0 6px; color: var(--muted); font-size: .92rem; }
.post-foot { font-size: .84rem; color: var(--muted); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.post-thumb img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
@media (max-width: 560px) { .post-thumb img { width: 72px; height: 72px; } .post-main h3 { font-size: 1.1rem; } }
.prem-dot { color: var(--gold); }
.vote { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 40px; }
.vote-btn { background: none; border: 0; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.vote-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.vote-btn:disabled { cursor: pointer; opacity: .6; }
.vote-score { font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; }
.vote.up .vote-up, .vote.up .vote-score { color: #c4622d; }
.vote.down .vote-down, .vote.down .vote-score { color: #5a7fa8; }
.post-full { display: flex; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.post-content { flex: 1; min-width: 0; }
.post-content h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin: 8px 0 14px; }
.post-image { width: 100%; max-height: 520px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }
.post-body { font-size: 1.04rem; line-height: 1.7; margin-bottom: 14px; overflow-wrap: anywhere; }
.comments-section { margin-top: 24px; }
.cthread { list-style: none; margin: 0; padding: 0; }
.cthread-nested { margin-left: 18px; padding-left: 14px; border-left: 2px solid var(--line); }
.cnode { display: flex; gap: 8px; padding: 10px 0 2px; }
.cnode .vote { min-width: 32px; }
.cnode .vote-btn { font-size: .85rem; padding: 2px 4px; }
.cbody { flex: 1; min-width: 0; }
.ctext { margin: 4px 0; overflow-wrap: anywhere; }
.cnode.collapsed > .cbody > .ctext, .cnode.collapsed > .cbody > .cthread { display: none; }
.op-tag { background: var(--accent); color: var(--on-accent); font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.c-actions { display: flex; gap: 14px; font-size: .84rem; }
.c-reply-form { margin: 8px 0; }
.small { font-size: .85rem; }
.flair-pick { display: grid; gap: 8px; }
.flair-radio input { position: absolute; opacity: 0; }
.flair-radio .flair-chip { cursor: pointer; font-size: .82rem; padding: 6px 12px; }
.flair-radio input:checked + .flair-chip { background: var(--accent); color: var(--on-accent); filter: none; }
.flair-radio input:focus-visible + .flair-chip { outline: 2px solid var(--accent); outline-offset: 2px; }
.talk-strip { margin: 0 0 28px; }
.talk-head { display: flex; justify-content: space-between; align-items: baseline; }
.talk-head h2 { margin: 0 0 12px; }
.talk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .talk-grid { grid-template-columns: 1fr; } }
.talk-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); display: grid; gap: 8px; align-content: start; }
.talk-card:hover { text-decoration: none; border-color: var(--muted); }
.talk-card h3 { margin: 0; font-size: 1.15rem; }
.talk-card .flair-chip { justify-self: start; }
.talk-card .muted { font-size: .84rem; }
.community-layout > * { min-width: 0; }
.community-head > div { min-width: 0; flex: 1 1 320px; }

/* translations */
.tr-note { font-size: .86rem; color: var(--muted); background: var(--accent-soft); display: inline-block; padding: 5px 12px; border-radius: 99px; margin: 0 0 10px; }
.lang-pick { display: grid; gap: 4px; }
.lang-pick .hint { margin: 0; }
.translate-panel { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* tokenomics */
.alloc-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 14px 0 4px; gap: 2px; }
.alloc-bar i { display: block; height: 100%; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.a-community { background: var(--accent); }
.a-ecosystem { background: var(--gold); }
.a-liquidity { background: #5b8c6a; }
.a-team      { background: #6f7fa8; }
.a-reserve   { background: #a39e93; }
.tbl tr.on td { font-weight: 600; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tok-rules { margin: 14px 0; padding-left: 20px; color: var(--muted); }
.tok-rules li { margin: 4px 0; }
.alloc-bar + .stats-grid + h3 { margin-top: 22px; }

/* Roadmap page */
.rm-head { padding: 28px 0 8px; }
.rm-head h1 { margin: 0 0 8px; }
.rm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rm-tabs a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: .9rem; }
.rm-tabs a:hover { border-color: var(--eyebrow); }
h2[id], section[id] { scroll-margin-top: 90px; }
.rm-phases { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 0; position: relative; }
.rm-phases li { display: flex; gap: 16px; padding: 0 0 18px; position: relative; }
.rm-phases li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--line); }
.rm-num { flex: 0 0 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--serif); background: var(--paper); border: 2px solid var(--line); color: var(--muted); position: relative; z-index: 1; }
.rm-done .rm-num { background: var(--eyebrow); border-color: var(--eyebrow); color: var(--paper); }
.rm-now .rm-num { border-color: var(--eyebrow); color: var(--eyebrow); }
.rm-phases h3 { margin: 4px 0 2px; }
.rm-phases p { margin: 0; font-size: .92rem; max-width: 70ch; }
.rm-badge { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.rm-done .rm-badge { color: var(--eyebrow); border-color: var(--eyebrow); }
.rm-now .rm-badge { background: var(--eyebrow); border-color: var(--eyebrow); color: var(--paper); }
.wp { margin-top: 36px; padding: 24px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.wp h2 { margin-top: 0; }
.wp h3 { margin: 22px 0 6px; font-family: var(--serif); }
.wp p { margin: 0; line-height: 1.65; max-width: 72ch; }
@media (max-width: 600px) { .wp { padding: 18px; } }
.rm-link { margin: 24px 0 8px; }


/* =====================================================================
   ELEGANCE LAYER — refined editorial look (overrides the rules above)
   Fonts: Cormorant Garamond (display) + Inter (text), self-hosted.
   ===================================================================== */
:root { --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --radius: 10px; --ease: cubic-bezier(.2,.7,.2,1); }
body { font-size: 15.5px; line-height: 1.7; letter-spacing: .005em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.3rem); line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.15rem); line-height: 1.1; margin-top: 2em; }
h3 { font-size: 1.3rem; font-weight: 600; }
::selection { background: var(--accent-soft); color: var(--ink); }
main.wrap { padding-top: 40px; padding-bottom: 96px; }

/* eyebrow with a fine rule */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; letter-spacing: .28em; font-size: .7rem; font-weight: 500; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.lead { font-size: clamp(1.25rem, 1.8vw, 1.45rem); line-height: 1.55; font-style: italic; font-weight: 400; }

/* top bar */
.topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px); border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
.mainnav { gap: 22px; font-family: var(--sans); font-size: .84rem; letter-spacing: .03em; }
.mainnav > a:not(.btn):not(.chip) { position: relative; padding: 4px 0; }
.mainnav > a:not(.btn):not(.chip)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.mainnav > a:not(.btn):not(.chip):hover { text-decoration: none; }
.mainnav > a:not(.btn):not(.chip):hover::after, .mainnav a.active::after { transform: scaleX(1); }
.mainnav a.active { font-weight: 500; }

/* buttons */
.btn { border-radius: 999px; padding: 12px 26px; font-size: .86rem; font-weight: 500; letter-spacing: .05em; transition: background-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease), filter .25s; }
.btn:hover { filter: none; background: color-mix(in srgb, var(--accent) 88%, var(--ink)); box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--accent) 70%, transparent); transform: translateY(-1px); }
.btn-sm { padding: 7px 16px; font-size: .8rem; border-radius: 999px; }
.btn-ghost { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-ghost:hover { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip { font-weight: 500; letter-spacing: .02em; }

/* forms */
input, select, textarea { border-radius: 8px; border-color: color-mix(in srgb, var(--line) 85%, var(--muted)); padding: 12px 14px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.form label { font-size: .8rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.form label.check { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink); }

/* hero */
.hero-photo { gap: 56px; padding: 32px 0 48px; }
.hero-img > img:first-child { border-radius: 4px; box-shadow: 0 30px 60px -30px rgba(30,28,22,.45); }
.hero-img::after { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 4px; z-index: -1; }
.hero-img { isolation: isolate; }
.hero-coin, .banner-coin { display: none; }
.hero-cta { gap: 14px; margin-top: 30px; }
@media (max-width: 760px) { .hero-photo { gap: 32px; } .hero-img::after { inset: 10px -10px -10px 10px; } }

/* stats as a quiet hairline row */
.stat-row { gap: 0; margin: 0 0 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-row div { background: none; border: 0; border-radius: 0; padding: 22px 24px; }
.stat-row div + div { border-left: 1px solid var(--line); }
.stat-row dt { font-size: 2.4rem; line-height: 1; }
.stat-row dd { margin-top: 8px; text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; }
@media (max-width: 760px) { .stat-row div { padding: 16px 12px; } .stat-row dt { font-size: 1.6rem; } }

/* filters */
.filters { gap: 12px; margin-bottom: 40px; }

/* cards */
.grid { gap: 28px; }
.card { border: 0; border-radius: 8px; background: var(--paper); box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 80%, transparent), 0 14px 34px -24px rgba(30,28,22,.35); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--line), 0 26px 50px -28px rgba(30,28,22,.5); }
.card-img { transition: transform .8s var(--ease); }
.card:hover .card-img { transform: scale(1.04); }
.card > :first-child { overflow: hidden; }
.card-body { padding: 18px 20px 20px; }
.card-body h3 { font-size: 1.45rem; font-weight: 500; line-height: 1.15; }
.card-meta { font-size: .66rem; letter-spacing: .22em; font-weight: 500; }
.featured-strip { background: none; border-top: 1px solid var(--line); border-radius: 0; padding: 8px 0 0; }

/* panels, banners, auth */
.panel { border-radius: var(--radius); padding: 28px; border-color: color-mix(in srgb, var(--line) 80%, transparent); }
.banner { border-radius: 6px; }
.banner-in { padding: 72px 56px; }
.banner h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
@media (max-width: 600px) { .banner-in { padding: 36px 22px; } }
.auth-wrap { gap: 64px; }
.auth h1 { font-size: clamp(2.6rem, 4vw, 3.4rem); }
.auth-img img { border-radius: 4px; box-shadow: 0 30px 60px -30px rgba(30,28,22,.45); }

/* tables, rules, flow */
.tbl th { font-weight: 500; letter-spacing: .14em; font-size: .68rem; }
.rule { border-radius: var(--radius); padding: 20px 24px; border-color: color-mix(in srgb, var(--line) 80%, transparent); }
.rule-pts { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.flow li { border-radius: var(--radius); padding: 22px; }
.flow li::before { font-size: 2rem; font-weight: 500; }
.talk-card { border-radius: var(--radius); padding: 20px 22px; transition: border-color .25s, transform .3s var(--ease); }
.talk-card:hover { transform: translateY(-2px); }
.talk-card h3 { font-size: 1.3rem; font-weight: 500; }

/* recipe page */
.recipe-hero { border-radius: 6px; }
.steps li::before { font-size: 1.05rem; font-weight: 600; background: none; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ingredients li { border-bottom-style: solid; border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }

/* footer */
.foot { background: var(--paper); }
.foot-brand strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.foot-nav { gap: 8px 26px; letter-spacing: .03em; }

/* gentle entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero-text, .hero-img, .rm-head { animation: rise .9s var(--ease) both; }
  .hero-img { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
h1, h2, h3, .stat-row dt, .rule-pts, .stats-grid strong, .bal strong, .tbl .num, .flow li::before, .rm-num { font-variant-numeric: lining-nums tabular-nums; }
.stat-row dt { font-feature-settings: "lnum" 1; }
@media (max-width: 760px) { .filters .btn { grid-column: 1 / -1; justify-content: center; } }
/* Earn banner: photo subject on the left, quiet dark space on the right for the text */
.banner { background-position: left center; background-color: #1c1813; }
.banner-in { margin-left: auto; max-width: 600px; background: linear-gradient(270deg, rgba(24,20,16,.78) 0%, rgba(24,20,16,.5) 70%, rgba(24,20,16,0) 100%); }
@media (max-width: 600px) { .banner-in { margin-left: 0; max-width: none; background: rgba(24,20,16,.72); } }

/* ===== Staff panels (admin & moderator) ===== */
.pn-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.pn-head h1 { margin: 0; }
.pn-live { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); background: var(--paper); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
.pn-live i, .dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5E9E5A; box-shadow: 0 0 0 3px color-mix(in srgb, #5E9E5A 25%, transparent); vertical-align: middle; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 8px 0 28px; }
.kpis-4 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 860px) { .kpis, .kpis-4 { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--paper); padding: 18px 20px; display: grid; gap: 4px; color: var(--ink); }
a.kpi:hover { background: var(--bg); text-decoration: none; }
.kpi strong { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.kpi span { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.kpi-alert strong { color: var(--eyebrow); }
.pn-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.pn-cols aside { display: grid; gap: 16px; }
.pn-cols aside .panel { margin: 0; }
@media (max-width: 900px) { .pn-cols { grid-template-columns: 1fr; } }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); font-size: .92rem; }
.feed li:last-child { border-bottom: 0; }
.feed-ico { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); font-size: .85rem; }
.feed time { font-size: .78rem; white-space: nowrap; }
.feed-quote { margin-top: 4px; color: var(--muted); font-size: .85rem; border-left: 2px solid var(--line); padding-left: 10px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; font-size: .9rem; }
.role-tag { display: inline-block; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.role-admin { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.role-moderator { color: var(--eyebrow); border-color: var(--eyebrow); }
.pn-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pn-filter input { flex: 1; min-width: 200px; }
.pn-filter select { width: auto; }
.tbl-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; }
.tbl-wrap .tbl { margin-top: 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form + form { margin-left: 10px; }
.small { font-size: .82rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--paper); margin-bottom: 4px; }
.seg a { padding: 6px 16px; border-radius: 999px; color: var(--muted); font-size: .85rem; }
.seg a.on { background: var(--accent); color: var(--on-accent); }
.seg a:hover { text-decoration: none; }
.pn-actions { display: grid; gap: 14px; }
.pn-act { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; }
.pn-act > span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
@media (max-width: 640px) { .pn-act { grid-template-columns: 1fr; } }
.inline-form select { width: auto; }
.perm td:not(:first-child), .perm th:not(:first-child) { text-align: center; width: 120px; }
/* header: keep the logo intact and let the menu collapse earlier when logged in */
.brand { flex-shrink: 0; }
.langmenu summary { white-space: nowrap; }
.mainnav { gap: 18px; }
@media (max-width: 1360px) and (min-width: 1181px) { .mainnav { gap: 11px; font-size: .79rem; letter-spacing: .01em; } .mainnav .btn-sm { padding: 6px 11px; font-size: .76rem; letter-spacing: .02em; } .brand .logo { height: 50px; } }
/* sticky footer: footer always sits at the bottom of the window on short pages */
html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main.wrap { flex: 1 0 auto; width: 100%; min-height: 0; }
body > .foot { flex-shrink: 0; margin-top: auto; }

/* ===== Cooking mode ===== */
.cook-cta { display: flex; align-items: center; gap: 18px; margin: 28px 0 8px; padding: 18px 24px; border-radius: var(--radius);
  background: var(--inverse-bg); color: var(--inverse-ink); box-shadow: 0 18px 40px -26px rgba(30,28,22,.6); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.cook-cta:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 26px 50px -26px rgba(30,28,22,.7); }
.cook-cta-ico { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--inverse-ink) 10%, transparent); flex: 0 0 52px; }
.cook-cta strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; line-height: 1.15; }
.cook-cta small { color: var(--inverse-muted); font-size: .86rem; }
.cook-cta-go { font-size: 1.4rem; transition: transform .3s var(--ease); }
.cook-cta:hover .cook-cta-go { transform: translateX(4px); }

.cook { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 220px); }
.cook-top { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.cook-exit { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.cook-title { text-align: center; display: grid; gap: 2px; min-width: 0; }
.cook-title .eyebrow { justify-content: center; margin: 0; }
.cook-title .eyebrow::before { display: none; }
.cook-title strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-count { font-size: .78rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.cook-progress { height: 3px; background: var(--line); border-radius: 3px; margin: 18px 0 40px; overflow: hidden; }
.cook-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.cook-screen { flex: 1; animation: rise .5s var(--ease) both; }
.cook-screen h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.cook-step-text { font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.3; margin: 8px 0 28px; color: var(--ink); }
.cook-check { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 2px; }
.cook-check label { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 8px; cursor: pointer; font-size: 1.08rem; transition: background .2s; }
.cook-check label:hover { background: var(--paper); }
.cook-check input { width: 22px; height: 22px; accent-color: var(--accent); flex: 0 0 22px; }
.cook-check input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.cook-reward { background: var(--accent-soft); color: var(--ink); padding: 12px 16px; border-radius: 8px; font-size: .9rem; }
.cook-timer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cook-timer-left { font-family: var(--serif); font-size: 2.4rem; font-variant-numeric: lining-nums tabular-nums; color: var(--accent); }
.cook-timer.rang .cook-timer-left { color: var(--eyebrow); animation: pulse 1s ease-in-out 3; }
@keyframes pulse { 50% { opacity: .35; } }
.cook-next-peek { color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.cook-next-peek span { text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; margin-right: 6px; }
.cook-nav { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; margin-top: 32px;
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.cook-nav .btn { min-width: 150px; justify-content: center; padding: 15px 28px; font-size: .95rem; }
.cook-done .lead { margin-bottom: 24px; }
.cook-drop { display: grid; place-items: center; min-height: 220px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius);
  background: var(--paper); cursor: pointer; overflow: hidden; position: relative; text-transform: none !important; letter-spacing: 0 !important; }
.cook-drop:hover { border-color: var(--accent); }
.cook-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cook-drop img { width: 100%; max-height: 420px; object-fit: cover; }
.cook-drop-txt { font-size: 1.05rem; color: var(--ink); }
.cook-skip { text-align: center; margin-top: 14px; }
@media (max-width: 600px) {
  .cook-progress { margin-bottom: 28px; }
  .cook-nav .btn { min-width: 0; flex: 1; padding: 14px 16px; }
  .cook-cta { padding: 16px; gap: 14px; }
  .cook-cta strong { font-size: 1.25rem; }
}
.cook.at-end .cook-nav { position: static; background: none; padding-top: 0; margin-top: 8px; justify-content: center; }
.cook.at-end .cook-nav .btn { min-width: 0; flex: 0 0 auto; }

/* ===== Profiles (Facebook-style) ===== */
.av { border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: inline-block; vertical-align: middle; background: var(--accent-soft); }
.av-letter { display: inline-grid; place-items: center; color: #fff; font-family: var(--serif); font-weight: 500; line-height: 1; }
.nav-me { display: inline-flex; align-items: center; gap: 7px; }
.nav-me::after { display: none !important; }
@media (max-width: 1360px) and (min-width: 1181px) { .nav-me > span:not(.av) { display: none; } }

.pf { margin: -16px 0 24px; }
.pf-cover { position: relative; aspect-ratio: 1640 / 540; max-height: 380px; width: 100%; border-radius: 0 0 var(--radius) var(--radius); background: center/cover no-repeat var(--accent-soft); }
.pf-cover-empty { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, var(--bg)), color-mix(in srgb, var(--gold) 45%, var(--bg)) 60%, var(--paper)); }
.pf-cover-edit { position: absolute; right: 16px; bottom: 16px; background: rgba(24,20,16,.62); color: #F1E8D8; padding: 8px 16px; border-radius: 999px; font-size: .84rem; backdrop-filter: blur(6px); }
.pf-cover-edit:hover { background: rgba(24,20,16,.8); text-decoration: none; }
.pf-id { display: flex; align-items: flex-end; gap: 24px; padding: 0 28px; margin-top: -64px; position: relative; flex-wrap: wrap; }
.pf-av { position: relative; flex: 0 0 auto; }
.pf-av .av { border: 5px solid var(--bg); box-shadow: 0 10px 30px -12px rgba(30,28,22,.45); }
.pf-av-edit { position: absolute; right: 8px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pf-av-edit:hover { text-decoration: none; background: var(--bg); }
.pf-name { padding-bottom: 8px; min-width: 220px; }
.pf-name h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; }
.pf-handle { color: var(--muted); margin: 2px 0 6px; display: flex; align-items: center; gap: 8px; }
.pf-counts { margin: 0; font-size: .92rem; color: var(--muted); }
.pf-counts a { color: var(--muted); }
.pf-counts strong { color: var(--ink); font-weight: 600; }
.pf-actions { display: flex; gap: 10px; padding-bottom: 12px; flex-wrap: wrap; }
.pf-tabs { margin: 24px 0 0; padding: 0 12px; }
@media (max-width: 700px) {
  .pf-id { padding: 0 12px; margin-top: -48px; gap: 12px; }
  .pf-av .av { width: 112px !important; height: 112px !important; font-size: 46px !important; }
  .pf-name { min-width: 0; flex-basis: 100%; }
  .pf-cover { border-radius: 0; aspect-ratio: 16 / 7; }
}

.pf-cols { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .pf-cols { grid-template-columns: 1fr; } }
.pf-side { display: grid; gap: 16px; position: sticky; top: 96px; }
@media (max-width: 900px) { .pf-side { position: static; } }
.pf-side .panel { margin: 0; }
.pf-side h3 { margin-top: 0; }
.pf-side-head { display: flex; justify-content: space-between; align-items: baseline; }
.pf-side-head a { font-size: .84rem; }
.pf-bio { text-align: center; font-family: var(--serif); font-size: 1.15rem; font-style: italic; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pf-facts { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 11px; font-size: .93rem; }
.pf-facts li { display: flex; gap: 12px; align-items: flex-start; }
.pf-facts li > span { width: 22px; text-align: center; flex: 0 0 22px; }
.pf-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 8px; overflow: hidden; }
.pf-thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: opacity .2s; }
.pf-thumbs a:hover img { opacity: .85; }
.pf-people-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
.pf-people-mini a { display: grid; gap: 4px; justify-items: center; text-align: center; font-size: .78rem; color: var(--ink); }
.pf-people-mini span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pf-main { display: grid; gap: 16px; min-width: 0; }
.pf-main > .panel { margin: 0; }

.pf-strength { display: block; color: var(--ink); border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.pf-strength:hover { text-decoration: none; border-color: var(--gold); }
.pf-strength-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: .92rem; }
.pf-strength-top span { color: var(--accent); }
.pf-strength p { margin: 8px 0 0; }

.pf-composer-row { display: flex; gap: 12px; align-items: flex-start; }
.pf-composer textarea { border-radius: 22px; background: var(--bg); border-color: transparent; resize: vertical; min-height: 46px; padding: 12px 18px; }
.pf-composer-preview { margin: 12px 0 0 56px; max-height: 260px; border-radius: 8px; width: auto; }
.pf-composer-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pf-composer-photo { position: relative; cursor: pointer; color: var(--muted); font-size: .9rem; padding: 6px 12px; border-radius: 8px; }
.pf-composer-photo:hover { background: var(--bg); color: var(--ink); }
.pf-composer-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.pf-post { padding: 18px 20px 12px; }
.pf-post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pf-post-head time { display: block; }
.pf-post-body { font-size: 1rem; line-height: 1.65; margin: 0 0 12px; overflow-wrap: anywhere; }
.pf-post-img { margin: 0 -20px 10px; background: var(--bg); display: block; }
.pf-post-img img { width: 100%; max-height: 620px; object-fit: contain; }
.pf-share-card { display: grid; grid-template-columns: 180px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: var(--ink); margin-bottom: 8px; }
.pf-share-card:hover { text-decoration: none; border-color: var(--muted); }
.pf-share-card img { width: 100%; height: 100%; min-height: 130px; object-fit: cover; }
.pf-share-card > span { padding: 14px 18px; display: grid; gap: 4px; align-content: center; background: var(--bg); }
.pf-share-card strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.15; }
@media (max-width: 560px) { .pf-share-card { grid-template-columns: 1fr; } .pf-share-card img { aspect-ratio: 16 / 9; } }
.pf-cooked-link { display: inline-block; font-size: .9rem; margin-bottom: 6px; }
.pf-post-stats { display: flex; justify-content: space-between; min-height: 1.4em; padding: 2px 0 8px; }
.pf-post-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -8px; padding: 4px 0; }
.pf-post-actions form { display: contents; }
.pf-act { background: none; border: 0; padding: 8px; border-radius: 8px; color: var(--muted); font: 500 .9rem var(--sans); cursor: pointer; text-align: center; }
.pf-act:hover { background: var(--bg); text-decoration: none; color: var(--ink); }
.pf-act.on { color: #B24A3A; }
.pf-comments { display: grid; gap: 10px; padding-top: 12px; }
.pf-cmt { display: flex; gap: 8px; align-items: flex-start; }
.pf-cmt-bubble { background: var(--bg); border-radius: 16px; padding: 8px 14px; font-size: .92rem; overflow-wrap: anywhere; }
.pf-cmt-bubble a { color: var(--ink); }
.pf-cmt-new input { border-radius: 999px; background: var(--bg); border-color: transparent; padding: 8px 16px; font-size: .92rem; }

.pf-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pf-person { display: flex; gap: 14px; align-items: center; margin: 0; color: var(--ink); transition: border-color .2s, transform .25s var(--ease); }
.pf-person:hover { text-decoration: none; border-color: var(--muted); transform: translateY(-2px); }
.pf-person .grow { display: grid; gap: 2px; }
.pf-person strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.pf-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.pf-stats-row div { padding: 18px 20px; display: grid; gap: 4px; }
.pf-stats-row div + div { border-left: 1px solid var(--line); }
.pf-stats-row strong { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.pf-stats-row span { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.pf-stats-col { grid-template-columns: 1fr; border: 0; margin: 0; }
.pf-stats-col div { border-left: 0 !important; border-bottom: 1px solid var(--line); padding: 12px 0; }
.pf-about-text { font-size: 1.02rem; line-height: 1.75; margin-bottom: 20px; }
.pf-dl { display: grid; gap: 0; margin: 0; }
.pf-dl div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pf-dl dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-top: 3px; }
.pf-dl dd { margin: 0; }
@media (max-width: 560px) { .pf-dl div { grid-template-columns: 1fr; gap: 2px; } }

/* edit profile */
.pe { max-width: 860px; margin: 0 auto; }
.pe-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pe-head h1 { margin: 0; }
.pe-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; font-size: .9rem; color: var(--muted); }
.pe-steps li.ok { color: var(--ink); }
.pe-steps li span { display: inline-block; width: 22px; color: var(--accent); }
@media (max-width: 560px) { .pe-steps { grid-template-columns: 1fr; } }
.pe-cover-preview { position: relative; aspect-ratio: 1640 / 540; border-radius: 8px; background: center/cover no-repeat var(--accent-soft); margin-bottom: 60px; }
.pe-av-preview { position: absolute; left: 24px; bottom: -52px; }
.pe-av-preview .av { border: 4px solid var(--paper); }
.pe-photo-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .pe-photo-forms { grid-template-columns: 1fr; } }
.pe-upload { display: grid; gap: 6px; padding: 16px; background: var(--bg); border-radius: 8px; }
.pe-upload input[type=file] { background: var(--paper); }
/* profile header: only the photo overlaps the cover, the name sits below it */
.pf-id { margin-top: 0; padding-top: 14px; align-items: flex-end; }
.pf-av { margin-top: -96px; }
.pf-name { padding-bottom: 4px; }
@media (max-width: 700px) { .pf-id { margin-top: 0; } .pf-av { margin-top: -64px; } }
.pe h2, .pe .panel > h2:first-of-type { margin-top: 0; }
