/* Bidmania articles (public pages: .bma-*) and the article editor (.bme-*). Standalone: no Bootstrap. */

:root {
    --bm-ink: #221e1a;
    --bm-body: #5f5953;
    --bm-muted: #746d65;
    --bm-line: #e6e0d9;
    --bm-cream: #f6f4f1;
    --bm-paper: #fffdfb;
    --bm-teal: #1e6670;
    --bm-teal-2: #2e8790;
    --bm-teal-soft: #e3f0f1;
    --bm-coral: #e9784d;
    --bm-coral-dark: #a7482d;
    --bm-gold: #fff1c9;
    --bm-radius: 14px;
    --bm-shadow: 0 1px 2px rgba(34, 30, 26, .06), 0 8px 24px rgba(34, 30, 26, .06);
    --bm-font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bm-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.bma {
    margin: 0;
    background: var(--bm-cream);
    color: var(--bm-body);
    font-family: var(--bm-font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.bma a { color: var(--bm-teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.bma a:hover { color: var(--bm-coral-dark); }
.bma img { max-width: 100%; height: auto; }
.bma h1, .bma h2, .bma h3, .bma h4 { color: var(--bm-ink); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.bma :focus-visible { outline: 3px solid var(--bm-coral); outline-offset: 2px; border-radius: 4px; }

.bma-visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.bma-skip {
    position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px;
    background: var(--bm-ink); color: #fff !important; font-weight: 700; text-decoration: none;
}
.bma-skip:focus { top: 12px; }

.bma-eyebrow {
    display: inline-block;
    font-family: var(--bm-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bm-coral-dark);
    text-decoration: none;
}

/* ---------------------------------------------------------------- header */

.bma-header { background: var(--bm-paper); border-bottom: 1px solid var(--bm-line); position: sticky; top: 0; z-index: 20; }
.bma-header__inner {
    max-width: 1180px; margin: 0 auto; padding: 12px 20px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.bma-logo img { display: block; height: 40px; width: auto; }
.bma-search { flex: 1 1 320px; display: flex; max-width: 520px; }
.bma-search input {
    flex: 1; min-width: 0; height: 44px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--bm-ink);
    border: 1px solid var(--bm-line); border-right: 0; border-radius: 999px 0 0 999px; background: #fff;
}
.bma-search input:focus { outline: none; border-color: var(--bm-teal-2); box-shadow: 0 0 0 3px var(--bm-teal-soft); }
.bma-search button {
    height: 44px; padding: 0 20px; font: inherit; font-weight: 800; color: #fff; cursor: pointer;
    border: 0; border-radius: 0 999px 999px 0; background: var(--bm-teal);
}
.bma-search button:hover { background: var(--bm-teal-2); }
.bma-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; font-weight: 700; font-size: 15px; }
.bma-nav a { color: var(--bm-ink); text-decoration: none; }
.bma-nav a:hover, .bma-nav a.is-current { color: var(--bm-teal); }
.bma-nav__sell { padding: 8px 16px; border-radius: 999px; background: var(--bm-coral); color: #fff !important; }
.bma-nav__sell:hover { background: var(--bm-coral-dark); }

/* ---------------------------------------------------------------- layout */

.bma-main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.bma-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--bm-muted); margin-bottom: 18px; }
.bma-crumbs a { color: var(--bm-muted); text-decoration: none; }
.bma-crumbs a:hover { color: var(--bm-teal); text-decoration: underline; }
.bma-crumbs span[aria-current] { color: var(--bm-ink); }

.bma-hero { padding: 28px 0 8px; max-width: 760px; }
.bma-hero h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 6px 0 12px; }
.bma-hero p { font-size: 19px; margin: 0; }

.bma-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; }
.bma-topics a {
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--bm-line); background: var(--bm-paper);
    color: var(--bm-ink); font-weight: 700; font-size: 14px; text-decoration: none;
}
.bma-topics a:hover { border-color: var(--bm-teal-2); color: var(--bm-teal); }
.bma-topics a.is-active { background: var(--bm-ink); border-color: var(--bm-ink); color: #fff; }

.bma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.bma-grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.bma-card { background: var(--bm-paper); border: 1px solid var(--bm-line); border-radius: var(--bm-radius); overflow: hidden; box-shadow: var(--bm-shadow); transition: transform .15s ease, box-shadow .15s ease; }
.bma-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(34,30,26,.08), 0 14px 32px rgba(34,30,26,.1); }
.bma-card__link { display: flex; flex-direction: column; height: 100%; color: inherit !important; text-decoration: none; }
.bma-card__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bm-teal-soft); }
.bma-card__img--blank {
    display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 900; color: var(--bm-teal-2);
    background: linear-gradient(135deg, var(--bm-teal-soft), var(--bm-gold));
}
.bma-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; flex: 1; }
.bma-card__title { color: var(--bm-ink); font-size: 20px; font-weight: 800; line-height: 1.25; }
.bma-card__summary { font-size: 15px; line-height: 1.55; }
.bma-card__meta { margin-top: auto; font-size: 13px; color: var(--bm-muted); }

@media (min-width: 900px) {
    .bma-card--featured { grid-column: 1 / -1; }
    .bma-card--featured .bma-card__link { flex-direction: row; }
    .bma-card--featured .bma-card__img { width: 56%; aspect-ratio: auto; min-height: 320px; }
    .bma-card--featured .bma-card__body { padding: 32px; justify-content: center; }
    .bma-card--featured .bma-card__title { font-size: 32px; }
    .bma-card--featured .bma-card__summary { font-size: 17px; }
    .bma-card--featured .bma-card__meta { margin-top: 8px; }
}

.bma-empty { padding: 40px; text-align: center; background: var(--bm-paper); border: 1px dashed var(--bm-line); border-radius: var(--bm-radius); }
.bma-pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 36px 0 0; font-weight: 700; }
.bma-pager a { padding: 10px 18px; border-radius: 999px; background: var(--bm-paper); border: 1px solid var(--bm-line); text-decoration: none; }

/* ---------------------------------------------------------------- article */

.bma-article { max-width: 760px; margin: 0 auto; }
.bma-article__head h1 { font-size: clamp(32px, 4.6vw, 50px); margin: 10px 0 14px; }
.bma-article__dek { font-size: 21px; line-height: 1.5; color: var(--bm-ink); margin: 0 0 14px; }
.bma-article__meta { font-size: 14px; color: var(--bm-muted); margin: 0 0 24px; }
.bma-article__hero { margin: 0 0 28px; }
.bma-article__hero img { display: block; width: 100%; border-radius: var(--bm-radius); }

.bma-toc { background: var(--bm-paper); border: 1px solid var(--bm-line); border-radius: var(--bm-radius); padding: 18px 22px; margin: 0 0 30px; }
.bma-toc ol { margin: 8px 0 0; padding-left: 20px; }
.bma-toc li { margin: 4px 0; }
.bma-toc a { text-decoration: none; font-weight: 600; }
.bma-toc a:hover { text-decoration: underline; }

.bma-prose { color: var(--bm-body); font-size: 18px; line-height: 1.75; }
.bma-prose > *:first-child { margin-top: 0; }
.bma-prose h2 { font-size: 30px; margin: 44px 0 14px; scroll-margin-top: 90px; }
.bma-prose h3 { font-size: 23px; margin: 32px 0 10px; scroll-margin-top: 90px; }
.bma-prose h4 { font-size: 19px; margin: 26px 0 8px; }
.bma-prose p { margin: 0 0 20px; }
.bma-prose strong { color: var(--bm-ink); }
.bma-prose ul, .bma-prose ol { margin: 0 0 22px; padding-left: 26px; }
.bma-prose li { margin: 6px 0; }
.bma-prose li > ul, .bma-prose li > ol { margin: 6px 0 0; }
.bma-prose blockquote {
    margin: 26px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--bm-coral);
    font-size: 20px; color: var(--bm-ink); font-style: italic;
}
.bma-prose hr { border: 0; border-top: 1px solid var(--bm-line); margin: 36px 0; }
.bma-prose code { font-family: var(--bm-mono); font-size: .88em; padding: 2px 6px; border-radius: 6px; background: #efe9e2; color: var(--bm-ink); }
.bma-prose pre { margin: 0 0 22px; padding: 16px 18px; overflow-x: auto; border-radius: 12px; background: var(--bm-ink); color: #f6f4f1; }
.bma-prose pre code { padding: 0; background: none; color: inherit; font-size: 14px; }
.bma-prose figure { margin: 30px 0; }
.bma-prose figure img { display: block; width: 100%; border-radius: 12px; }
.bma-prose figcaption { margin-top: 8px; font-size: 14px; color: var(--bm-muted); text-align: center; }
.bma-prose img { border-radius: 10px; }

.bma-table { overflow-x: auto; margin: 0 0 26px; border: 1px solid var(--bm-line); border-radius: 12px; background: var(--bm-paper); }
.bma-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.bma-table th, .bma-table td { padding: 11px 14px; border-bottom: 1px solid var(--bm-line); text-align: left; vertical-align: top; }
.bma-table th { background: #f1ece6; color: var(--bm-ink); font-weight: 800; white-space: nowrap; }
.bma-table tr:last-child td { border-bottom: 0; }
.bma-align-left { text-align: left !important; }
.bma-align-center { text-align: center !important; }
.bma-align-right { text-align: right !important; }

.bma-callout { display: block; margin: 0 0 24px; padding: 16px 20px; border-radius: 12px; background: var(--bm-teal-soft); border-left: 4px solid var(--bm-teal); color: var(--bm-ink); font-size: 17px; }
.bma-callout strong { color: var(--bm-teal); }
.bma-callout--warning { background: #fdeee7; border-left-color: var(--bm-coral-dark); }
.bma-callout--warning strong { color: var(--bm-coral-dark); }
.bma-callout--note { background: var(--bm-gold); border-left-color: #c79a1d; }
.bma-link-pending { text-decoration: underline dashed #c79a1d; text-underline-offset: 3px; background: var(--bm-gold); cursor: help; }
.bma-callout--note strong { color: #7a5b06; }

.bma-listings { margin: 34px 0; padding: 18px; border-radius: var(--bm-radius); background: var(--bm-paper); border: 1px solid var(--bm-line); box-shadow: var(--bm-shadow); }
.bma-listings__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.bma-listings__head a { font-weight: 700; font-size: 14px; text-decoration: none; }
.bma-listings__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.bma-listing { display: flex; flex-direction: column; gap: 6px; color: var(--bm-ink) !important; text-decoration: none; scroll-snap-align: start; min-width: 0; }
.bma-listing img, .bma-listing__noimg { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--bm-line); border-radius: 10px; }
.bma-listing__noimg { background: var(--bm-teal-soft); }
.bma-listing__title { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bma-listing__price { font-family: var(--bm-mono); font-size: 15px; font-weight: 500; color: var(--bm-teal); }
.bma-listing__price small { font-family: var(--bm-font); font-size: 12px; color: var(--bm-muted); }
.bma-listing:hover .bma-listing__title { color: var(--bm-teal); }

.bma-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 0; }
.bma-tags a { padding: 4px 12px; border-radius: 999px; background: #efe9e2; color: var(--bm-ink); font-size: 14px; text-decoration: none; }
.bma-tags a:hover { background: var(--bm-teal-soft); color: var(--bm-teal); }

.bma-related { max-width: 1180px; margin: 56px auto 0; }
.bma-related h2 { font-size: 28px; margin: 0 0 18px; }

.bma-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
    margin: 56px 0 0; padding: 30px 32px; border-radius: 20px; background: var(--bm-ink); color: #e9e3dc;
}
.bma-cta h2 { color: #fff; font-size: 26px; margin: 6px 0 6px; }
.bma-cta p { margin: 0; }
.bma-cta .bma-eyebrow { color: var(--bm-gold); }
.bma-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bma-cta .bma-btn:not(.bma-btn--primary) { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.4); }

.bma-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px;
    border-radius: 999px; border: 1px solid var(--bm-line); background: var(--bm-paper); color: var(--bm-ink) !important;
    font: inherit; font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.bma-btn:hover { border-color: var(--bm-teal-2); color: var(--bm-teal) !important; }
.bma-btn--primary { background: var(--bm-coral); border-color: var(--bm-coral); color: #fff !important; }
.bma-btn--primary:hover { background: var(--bm-coral-dark); border-color: var(--bm-coral-dark); color: #fff !important; }
.bma-btn[disabled] { opacity: .45; cursor: not-allowed; }

.bma-preview-bar { position: sticky; top: 0; z-index: 30; padding: 10px 20px; background: var(--bm-gold); color: var(--bm-ink); font-weight: 700; text-align: center; border-bottom: 1px solid #e8d79e; }

/* ---------------------------------------------------------------- footer */

.bma-footer { background: var(--bm-ink); color: #cfc7bf; margin-top: 40px; }
.bma-footer__inner {
    max-width: 1180px; margin: 0 auto; padding: 44px 20px 24px;
    display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px;
}
.bma-footer__brand img { display: block; height: 48px; width: auto; padding: 6px 12px; border-radius: 12px; background: var(--bm-paper); }
.bma-footer__brand p { margin: 12px 0 0; font-weight: 700; color: #fff; }
.bma-footer nav { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.bma-footer nav span { font-family: var(--bm-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--bm-gold); margin-bottom: 4px; }
.bma-footer a { color: #e9e3dc; text-decoration: none; }
.bma-footer a:hover { color: #fff; text-decoration: underline; }
.bma-footer__copy { max-width: 1180px; margin: 0 auto; padding: 18px 20px 30px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: #a69d94; }

@media (max-width: 860px) {
    .bma { font-size: 16px; }
    .bma-header { position: static; }
    .bma-nav { margin-left: 0; width: 100%; overflow-x: auto; gap: 14px; }
    .bma-footer__inner { grid-template-columns: 1fr 1fr; }
    .bma-footer__brand { grid-column: 1 / -1; }
    .bma-prose { font-size: 17px; }
    .bma-prose h2 { font-size: 25px; }
    .bma-cta { padding: 24px; }
}

/* ================================================================ editor */

.bme { background: #f3f0ec; font-size: 15px; line-height: 1.5; }
.bme-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 22px; background: var(--bm-ink); color: #fff; }
.bme-bar__brand { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; font-weight: 800; }
.bme-bar__brand img { height: 34px; width: auto; padding: 3px 8px; border-radius: 8px; background: var(--bm-paper); }
.bme-bar__nav { display: flex; align-items: center; gap: 18px; }
.bme-bar__nav a { color: #e9e3dc; text-decoration: none; }
.bme-bar__nav form { margin: 0; }
.bme-bar .bme-muted { color: #b9b0a7; }
.bme-bar .bme-linkbtn { color: #fff; }

.bme-main { max-width: 1400px; margin: 0 auto; padding: 22px 22px 60px; }
.bme-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.bme-head h1 { margin: 0; font-size: 28px; }
.bme-help { max-width: 820px; color: var(--bm-muted); margin: 6px 0 18px; }
.bme-hint { font-size: 13px; color: var(--bm-muted); margin: 6px 0 0; }
.bme-muted { color: var(--bm-muted); }
.bme-count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: #e7e1da; font-size: 12px; font-weight: 800; text-align: center; color: var(--bm-ink); }

.bme-alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; border: 1px solid; }
.bme-alert ul { margin: 6px 0 0; padding-left: 20px; }
.bme-alert--ok { background: #e7f4ec; border-color: #b9dcc6; color: #1f5133; }
.bme-alert--error { background: #fdeee7; border-color: #f1c2ae; color: #7c2f17; }
.bme-alert--warn { background: var(--bm-gold); border-color: #ecd48b; color: #5c4506; }

.bme-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--bm-line); margin: 16px 0; }
.bme-tabs a { padding: 10px 14px; margin-bottom: -1px; border: 1px solid transparent; border-radius: 10px 10px 0 0; color: var(--bm-body); font-weight: 700; text-decoration: none; }
.bme-tabs a:hover { color: var(--bm-teal); }
.bme-tabs a.is-active { background: var(--bm-paper); border-color: var(--bm-line); border-bottom-color: var(--bm-paper); color: var(--bm-ink); }

.bme-search { display: flex; gap: 8px; margin: 0 0 16px; max-width: 460px; }
.bme-search input { flex: 1; }

.bme input:not([type=checkbox]):not([type=file]), .bme select, .bme textarea {
    width: 100%; padding: 9px 12px; font: inherit; font-size: 15px; color: var(--bm-ink);
    background: #fff; border: 1px solid #d9d1c8; border-radius: 10px;
}
.bme textarea { resize: vertical; line-height: 1.55; }
.bme textarea[data-body], .bme-revbody { font-family: var(--bm-mono); font-size: 14px; min-height: 520px; }
.bme input:focus, .bme select:focus, .bme textarea:focus { outline: none; border-color: var(--bm-teal-2); box-shadow: 0 0 0 3px var(--bm-teal-soft); }
.bme input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--bm-teal); vertical-align: middle; }

.bme-bulk__bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 0; background: #f3f0ec; }
.bme-bulk__bar [data-bulk-count] { font-weight: 700; margin-right: 6px; }
.bme-day { margin: 0 0 22px; }
.bme-day__head { font-size: 17px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.bme-day__head label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.bme-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bm-paper); border: 1px solid var(--bm-line); border-radius: 12px; overflow: hidden; }
.bme-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--bm-muted); padding: 10px 12px; background: #f6f2ee; border-bottom: 1px solid var(--bm-line); }
.bme-table td { padding: 10px 12px; border-bottom: 1px solid #efe9e2; vertical-align: top; }
.bme-table tr:last-child td { border-bottom: 0; }
.bme-table tr:hover td { background: #fbf8f5; }
.bme-col-check { width: 40px; }
.bme-col-num { text-align: right; font-family: var(--bm-mono); white-space: nowrap; }
.bme-title { display: block; font-weight: 800; color: var(--bm-ink) !important; text-decoration: none; }
.bme-title:hover { color: var(--bm-teal) !important; }
.bme-slug { display: block; font-family: var(--bm-mono); font-size: 12px; color: var(--bm-muted); }
.bme-actions { white-space: nowrap; }
.bme-empty { padding: 30px; text-align: center; background: var(--bm-paper); border: 1px dashed var(--bm-line); border-radius: 12px; }

.bme-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #ece6df; color: var(--bm-body); white-space: nowrap; }
.bme-badge--live { background: #dcefe3; color: #1f5133; }
.bme-badge--ok { background: var(--bm-teal-soft); color: var(--bm-teal); }
.bme-badge--wait { background: var(--bm-gold); color: #6b500a; }
.bme-badge--warn { background: #fde3d7; color: var(--bm-coral-dark); }

.bme-edit { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; margin-top: 14px; }
.bme-edit__main { background: var(--bm-paper); border: 1px solid var(--bm-line); border-radius: 14px; padding: 20px; }
.bme-edit__side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding-bottom: 8px; }
.bme-card { background: var(--bm-paper); border: 1px solid var(--bm-line); border-radius: 14px; padding: 16px; }
.bme-card h2 { font-size: 15px; margin: 0 0 10px; }
.bme-field { display: block; margin: 0 0 14px; font-weight: 700; color: var(--bm-ink); }
.bme-field > input, .bme-field > textarea, .bme-field > select, .bme-prefix { margin-top: 5px; }
.bme-field small { font-weight: 500; color: var(--bm-muted); }
.bme-prefix { display: flex; align-items: stretch; }
.bme-prefix > span { display: flex; align-items: center; padding: 0 10px; font-family: var(--bm-mono); font-size: 13px; font-weight: 400; color: var(--bm-muted); background: #f1ece6; border: 1px solid #d9d1c8; border-right: 0; border-radius: 10px 0 0 10px; }
.bme-prefix input { border-radius: 0 10px 10px 0 !important; font-family: var(--bm-mono); font-size: 14px !important; }
.bme-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.bme-links { margin: 8px 0 0; font-weight: 700; }

.bme-bodyhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.bme-viewtabs { display: flex; gap: 4px; background: #efe9e2; padding: 3px; border-radius: 10px; }
.bme-viewtabs button { border: 0; background: transparent; padding: 5px 14px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; color: var(--bm-body); }
.bme-viewtabs button[aria-selected=true] { background: #fff; color: var(--bm-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.bme-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid #d9d1c8; border-bottom: 0; border-radius: 10px 10px 0 0; background: #f6f2ee; }
.bme-toolbar button, .bme-toolbar .bme-upload-btn { border: 1px solid transparent; background: transparent; padding: 4px 9px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 700; color: var(--bm-ink); cursor: pointer; }
.bme-toolbar button:hover, .bme-toolbar .bme-upload-btn:hover { background: #fff; border-color: #d9d1c8; }
.bme-toolbar + textarea { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.bme-preview { min-height: 520px; padding: 22px 26px; border: 1px solid #d9d1c8; border-radius: 0 0 10px 10px; background: #fff; }
.bme-upload-btn { cursor: pointer; }

.bme-serp { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--bm-line); border-radius: 10px; background: #fff; font-family: Arial, sans-serif; }
.bme-serp__url { font-size: 12px; color: #4d5156; }
.bme-serp__title { font-size: 18px; line-height: 1.3; color: #1a0dab; }
.bme-serp__desc { font-size: 13px; line-height: 1.5; color: #4d5156; }
[data-counter] { float: right; font-family: var(--bm-mono); font-size: 12px; }
[data-counter].is-over { color: var(--bm-coral-dark); font-weight: 700; }

.bme-hero { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #f1ece6; color: var(--bm-muted); border: 1px dashed #d9d1c8; }
.bme-hero img { width: 100%; height: 100%; object-fit: cover; }
.bme-status { min-height: 1em; margin: 0; font-size: 13px; color: var(--bm-teal); }
.bme-status.is-error { color: var(--bm-coral-dark); }

.bme-revs { list-style: none; margin: 0; padding: 0; }
.bme-revs li { padding: 5px 0; border-bottom: 1px solid #f0ebe5; }
.bme-revtitle { font-size: 22px; margin: 22px 0 10px; }
.bme-archive { margin: 0; text-align: center; }
.bme-linkbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--bm-coral-dark); cursor: pointer; text-decoration: underline; }

.bme-login { max-width: 420px; margin: 60px auto; padding: 28px; background: var(--bm-paper); border: 1px solid var(--bm-line); border-radius: 16px; box-shadow: var(--bm-shadow); }
.bme-login h1 { margin: 0 0 16px; font-size: 26px; }
.bme-stack { display: flex; flex-direction: column; gap: 14px; }
.bme-stack label { font-weight: 700; color: var(--bm-ink); }
.bme-stack input { margin-top: 5px; }

@media (max-width: 1100px) {
    .bme-edit { grid-template-columns: 1fr; }
    .bme-edit__side { position: static; max-height: none; }
}
@media (max-width: 720px) {
    .bme-table th:nth-child(3), .bme-table td:nth-child(3), .bme-table th:nth-child(6), .bme-table td:nth-child(6) { display: none; }
    .bme-bar { flex-wrap: wrap; }
}
