/* AniHoshi — member dashboard (/member/*) + the bits public profiles share with it
   (friend rows, title chips, rank badges, avatar decorations, action buttons).
   Colours come only from the --hs-* tokens so dark and light both work. */

.mb-page, .pf-page { --mb-red: #F06A6A; --mb-r: 4px; }
html[data-theme="light"] .mb-page, html[data-theme="light"] .pf-page { --mb-red: #D13F3F; }

/* folder colours (watch list) */
.folder-1, .folder-text-1 { --fc: var(--hs-ok); }
.folder-2, .folder-text-2 { --fc: var(--hs-ac); }
.folder-3, .folder-text-3 { --fc: var(--hs-star); }
.folder-4, .folder-text-4 { --fc: var(--mb-red); }
.folder-5, .folder-text-5 { --fc: var(--hs-tx-3); }
.mb-fdot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 2px; background: var(--fc, var(--hs-tx-4)); }

/* ============================================================ shell */
.mb-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 28px; padding-bottom: 64px; }
.mb-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1081px) and (min-height: 860px) { .mb-side { position: sticky; top: 84px; } }
.mb-main { min-width: 0; }

/* ---- ID card */
.mb-id { position: relative; overflow: hidden; background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-radius: var(--mb-r); }
.mb-id::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 70px; background:
    linear-gradient(120deg, color-mix(in srgb, var(--hs-ac) 30%, transparent) 0%, color-mix(in srgb, var(--hs-ac) 6%, transparent) 55%, color-mix(in srgb, var(--hs-star) 14%, transparent) 100%),
    repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--hs-tx) 4%, transparent) 9px 10px);
    border-bottom: 1px solid var(--hs-line); }
.mb-id-top { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 18px 14px; text-align: center; }
.mb-ava { position: relative; width: 96px; height: 96px; flex: 0 0 auto; border-radius: 50%; cursor: pointer; outline: 0; }
.mb-ava-clip { position: absolute; inset: 0; display: block; border-radius: 50%; overflow: hidden; background: var(--hs-bg-3); box-shadow: 0 0 0 3px var(--hs-bg-2), 0 0 0 4px var(--hs-line-2); }
.mb-ava.has-cosmetics .mb-ava-clip { box-shadow: none; }
.mb-ava-clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-ava .edit { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(4, 8, 14, 0.62); color: #fff; font: 700 11px var(--hs-f-body); opacity: 0; transition: opacity 0.15s; }
.mb-ava .edit i { font-size: 14px; }
.mb-ava:hover .edit, .mb-ava:focus-visible .edit { opacity: 1; }
.mb-ava:focus-visible .mb-ava-clip { box-shadow: 0 0 0 3px var(--hs-bg-2), 0 0 0 5px var(--hs-ac); }
.mb-ava .avatar-decoration { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; max-width: none; z-index: 2; pointer-events: none; object-fit: contain; }
.mb-id-who { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; max-width: 100%; margin-top: 12px; }
.mb-id .name { font: 800 19px/1.15 var(--hs-f-head); color: var(--hs-tx); letter-spacing: -0.01em; word-break: break-word; }
.mb-id-who .ak-title-eq { margin: 0; }
.mb-rank { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--mb-r); background: var(--hs-ac-soft); color: var(--hs-ac-tx); font: 700 12px var(--hs-f-body); }
.mb-rank .badg-level { margin: 0; }

.mb-mana { position: relative; padding: 0 18px 14px; }
.mb-mana-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; font: 600 11.5px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-mana-v { display: inline-flex; align-items: center; gap: 6px; color: var(--hs-tx-3); }
.mb-mana-v b { font-size: 14px; font-weight: 800; color: var(--hs-tx); font-variant-numeric: tabular-nums; }
.mb-m, .pf-m { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--hs-ac-fill); color: #fff; font: 800 9.5px/1 var(--hs-f-body); font-style: normal; }
.mb-mana-n { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-bar { height: 5px; border-radius: 2px; background: var(--hs-raise); overflow: hidden; }
.mb-bar i { display: block; height: 100%; min-width: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--hs-ac), color-mix(in srgb, var(--hs-ac) 55%, var(--hs-star))); }

.mb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hs-line); }
.mb-stats li { display: flex; flex-direction: column-reverse; align-items: center; justify-content: center; gap: 2px; padding: 10px 4px; min-width: 0; }
.mb-stats li + li { border-left: 1px solid var(--hs-line); }
.mb-stats li span:first-child { font: 700 10px var(--hs-f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--hs-tx-4); }
.mb-stats li span:last-child { max-width: 100%; font: 800 13.5px var(--hs-f-body); color: var(--hs-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

.mb-id-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-top: 1px solid var(--hs-line); }
.mb-id-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 4px; font: 600 11.5px var(--hs-f-body); color: var(--hs-tx-3); text-align: center; transition: color 0.15s, background 0.15s; }
.mb-id-links a + a { border-left: 1px solid var(--hs-line); }
.mb-id-links a i { font-size: 13px; color: var(--hs-tx-4); transition: color 0.15s; }
.mb-id-links a:hover { color: var(--hs-tx); background: var(--hs-hover); }
.mb-id-links a:hover i { color: var(--hs-ac); }

/* ---- tab rail */
.mb-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-radius: var(--mb-r); }
.mb-nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 3px; color: var(--hs-tx-3); font: 600 13.5px var(--hs-f-body); white-space: nowrap; transition: background 0.15s, color 0.15s; }
.mb-nav a i { width: 16px; text-align: center; font-size: 13px; color: var(--hs-tx-4); transition: color 0.15s; }
.mb-nav a:hover { background: var(--hs-hover); color: var(--hs-tx); }
.mb-nav a.active { background: var(--hs-ac-soft); color: var(--hs-tx); }
.mb-nav a.active i { color: var(--hs-ac); }
.mb-nav a.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: var(--hs-ac); }

.mb-acts { display: flex; gap: 8px; }
.mb-acts > a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; border-radius: var(--mb-r); border: 1px solid var(--hs-line); background: var(--hs-bg-2); color: var(--hs-tx-3); font: 600 12.5px var(--hs-f-body); transition: border-color 0.15s, color 0.15s; }
.mb-acts > a:hover { border-color: var(--hs-line-2); color: var(--hs-tx); }
.mb-acts > a.logout:hover { border-color: color-mix(in srgb, var(--mb-red) 50%, transparent); color: var(--mb-red); }
.mb-acts > a.mb-donate i { color: var(--mb-red); }

/* ---- page head */
.mb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--hs-line); }
.mb-head-t { display: flex; align-items: center; gap: 13px; min-width: 0; }
.mb-hi { width: 42px; height: 42px; flex: 0 0 42px; border-radius: var(--mb-r); display: inline-flex; align-items: center; justify-content: center; background: var(--hs-ac-soft); color: var(--hs-ac); font-size: 16px; border: 1px solid color-mix(in srgb, var(--hs-ac) 25%, transparent); }
.mb-crumb { display: block; margin-bottom: 3px; font: 700 10.5px var(--hs-f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--hs-tx-4); }
.mb-head h1 { margin: 0; font: 800 26px/1.1 var(--hs-f-head); letter-spacing: -0.015em; color: var(--hs-tx); }
.mb-head-a { display: flex; align-items: center; gap: 8px; }
.mb-head-a:empty { display: none; }

.mb-lead, .mb-tip { margin: 0 0 14px; font: 500 13px/1.5 var(--hs-f-body); color: var(--hs-tx-4); }
.mb-tip { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; font-size: 12.5px; }
.mb-tip i { color: var(--hs-ac); font-size: 12px; }

/* ============================================================ cards + form controls */
.mb-form { position: relative; }
.mb-card { position: relative; background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-radius: var(--mb-r); margin-bottom: 14px; }
.mb-card-h { padding: 16px 20px; border-bottom: 1px solid var(--hs-line); }
.mb-card-h h2 { display: flex; align-items: center; gap: 9px; margin: 0; font: 700 15.5px var(--hs-f-head); color: var(--hs-tx); }
.mb-card-h h2 i { font-size: 13px; color: var(--hs-ac); }
.mb-card-h p { margin: 4px 0 0; font: 500 12.5px/1.45 var(--hs-f-body); color: var(--hs-tx-4); }
.mb-card-h-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 0; }
.mb-collapse-in { border-top: 1px solid var(--hs-line); }
.mb-card-f { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--hs-line); }

.mb-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 24px; padding: 16px 20px; }
.mb-row + .mb-row { border-top: 1px solid var(--hs-line); }
.mb-lbl { padding-top: 9px; font: 600 13px/1.35 var(--hs-f-body); color: var(--hs-tx-2); }
.mb-lbl label { cursor: pointer; }
.mb-ctl { min-width: 0; max-width: 560px; }
.mb-help { margin-top: 7px; font: 500 12px/1.5 var(--hs-f-body); color: var(--hs-tx-4); }
.mb-help a, .mb-steps a, .mb-al-info a { color: var(--hs-ac); }
.mb-help a:hover, .mb-steps a:hover { text-decoration: underline; }
.mb-help.mb-status { margin-top: 4px; color: var(--hs-ac-tx); font-weight: 600; }
.mb-help-box { margin: 0; padding: 10px 12px; border-radius: var(--mb-r); background: var(--hs-bg-3); border: 1px solid var(--hs-line); }
.mb-page kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 3px; border: 1px solid var(--hs-line-2); border-bottom-width: 2px; background: var(--hs-bg-3); color: var(--hs-tx); font: 700 10.5px var(--hs-f-body); }

.mb-in { display: block; width: 100%; height: 38px; padding: 0 12px; margin: 0; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-field); color: var(--hs-tx); font: 500 13.5px var(--hs-f-body); outline: 0; box-shadow: none; transition: border-color 0.15s, box-shadow 0.15s; }
.mb-in::placeholder { color: var(--hs-tx-4); }
.mb-in:focus { border-color: var(--hs-ac); box-shadow: 0 0 0 3px var(--hs-ac-soft); }
.mb-in:disabled, .mb-in[readonly] { background: var(--hs-bg-3); color: var(--hs-tx-3); }
.mb-in[readonly]:focus { border-color: var(--hs-line-2); box-shadow: none; }
.mb-in-ico { position: relative; }
.mb-in-ico i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--hs-tx-4); pointer-events: none; }
.mb-in-ico .mb-in, .mb-f-search .mb-in { padding-left: 34px; }

.mb-join { display: flex; min-width: 0; }
.mb-join > * { border-radius: 0 !important; }
.mb-join > * + * { margin-left: -1px; }
.mb-join > :first-child { border-radius: var(--mb-r) 0 0 var(--mb-r) !important; min-width: 0; flex: 1; }
.mb-join > :last-child { border-radius: 0 var(--mb-r) var(--mb-r) 0 !important; }
.mb-join > .mb-btn { position: relative; }
.mb-join > .mb-btn:hover { z-index: 1; }

.mb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-bg-3); color: var(--hs-tx) !important; font: 700 12.5px/1 var(--hs-f-body); white-space: nowrap; cursor: pointer; text-decoration: none; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.mb-btn:hover { border-color: var(--hs-ac); }
.mb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mb-btn i { font-size: 12px; color: var(--hs-tx-3); }
.mb-btn-ghost { background: transparent; }
.mb-btn-danger { color: var(--mb-red) !important; }
.mb-btn-danger i { color: currentColor; }
.mb-btn-danger:hover { border-color: color-mix(in srgb, var(--mb-red) 55%, transparent); background: color-mix(in srgb, var(--mb-red) 8%, transparent); }
.mb-card-h .mb-btn, .mb-head-a .mb-btn { height: 32px; padding: 0 12px; }

.mb-note-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--mb-r); border: 1px dashed var(--hs-line-2); color: var(--hs-tx-3); font: 500 13px/1.4 var(--hs-f-body); transition: border-color 0.15s, color 0.15s; }
.mb-note-link > i:first-child { color: var(--hs-ac); }
.mb-note-link > i:last-child { margin-left: auto; font-size: 11px; color: var(--hs-tx-4); }
.mb-note-link b { color: var(--hs-tx); font-weight: 700; }
.mb-note-link:hover { border-color: var(--hs-ac); border-style: solid; color: var(--hs-tx-2); }

.mb-save { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 14px; background: var(--hs-bg-2); border: 1px solid var(--hs-line-2); border-radius: var(--mb-r); }
@media (min-width: 761px) { .mb-save { position: sticky; bottom: 14px; z-index: 6; box-shadow: var(--cn-shadow, 0 16px 34px rgba(0, 0, 0, 0.35)); } }
.mb-save-t { font: 500 12.5px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-page .hs-btn-sm { height: 34px; padding: 0 14px; gap: 7px; border-radius: var(--mb-r); }
.mb-page .hs-btn-sm i { font-size: 12px; }
.mb-page .hs-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* hidden native inputs (labels do the talking) */
.mb-seg input, .mb-switch input[type="checkbox"], .mb-check input, .mb-opt input, .mb-f-menu li > input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }

/* segmented radio */
.mb-seg { position: relative; display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; max-width: 100%; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-field); }
.mb-seg label { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; margin: 0; border-radius: 3px; color: var(--hs-tx-3); font: 600 12.5px var(--hs-f-body); white-space: nowrap; cursor: pointer; user-select: none; transition: background 0.15s, color 0.15s; }
.mb-seg label i { font-size: 11px; opacity: 0.8; }
.mb-seg label:hover { color: var(--hs-tx); background: var(--hs-hover); }
.mb-seg input:checked + label { background: var(--hs-ac-fill); color: #fff; }
.mb-seg input:focus-visible + label { outline: 2px solid var(--hs-ac); outline-offset: 1px; }
.mb-seg input:disabled + label { opacity: 0.4; cursor: not-allowed; background: none; }

/* switch (square, 4px) */
.mb-switch { position: relative; display: inline-flex; align-items: center; gap: 11px; margin: 0; cursor: pointer; user-select: none; }
.mb-sw { position: relative; flex: 0 0 38px; width: 38px; height: 22px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-raise); transition: background 0.15s, border-color 0.15s; }
.mb-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 3px; background: var(--hs-tx-3); transition: transform 0.18s ease, background 0.15s; }
.mb-switch input:checked ~ .mb-sw { background: var(--hs-ac); border-color: var(--hs-ac); }
.mb-switch input:checked ~ .mb-sw::after { transform: translateX(16px); background: #fff; }
.mb-switch input:focus-visible ~ .mb-sw { outline: 2px solid var(--hs-ac); outline-offset: 2px; }
.mb-switch input:disabled ~ .mb-sw, .mb-switch input:disabled ~ .mb-sw-t { opacity: 0.45; cursor: not-allowed; }
.mb-sw-t { font: 500 13px/1.4 var(--hs-f-body); color: var(--hs-tx-2); }

/* checkbox chips */
.mb-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-check { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px; margin: 0; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-field); color: var(--hs-tx-3); font: 600 12.5px var(--hs-f-body); cursor: pointer; user-select: none; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.mb-check:hover { color: var(--hs-tx); }
.mb-box { position: relative; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 3px; border: 1.5px solid var(--hs-line-2); background: var(--hs-bg-2); transition: background 0.15s, border-color 0.15s; }
.mb-check input:checked ~ .mb-box { background: var(--fc, var(--hs-ac)); border-color: var(--fc, var(--hs-ac)); }
.mb-check input:checked ~ .mb-box::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mb-check:has(input:checked) { color: var(--hs-tx); border-color: color-mix(in srgb, var(--fc, var(--hs-ac)) 55%, var(--hs-line-2)); background: color-mix(in srgb, var(--fc, var(--hs-ac)) 8%, var(--hs-field)); }
.mb-check input:focus-visible ~ .mb-box { outline: 2px solid var(--hs-ac); outline-offset: 2px; }

/* option cards (import mode) */
.mb-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mb-opt { position: relative; display: block; margin: 0; cursor: pointer; }
.mb-opt-b { position: relative; display: block; height: 100%; padding: 12px 14px 12px 40px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-field); transition: border-color 0.15s, background 0.15s; }
.mb-opt-b::before { content: ""; position: absolute; left: 14px; top: 14px; width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid var(--hs-line-2); background: var(--hs-bg-2); }
.mb-opt-b b { display: flex; align-items: center; gap: 7px; font: 700 13.5px var(--hs-f-body); color: var(--hs-tx); }
.mb-opt-b b i { font-size: 12px; color: var(--hs-tx-4); }
.mb-opt-b > span { display: block; margin-top: 4px; font: 500 12px/1.45 var(--hs-f-body); color: var(--hs-tx-4); }
.mb-opt:hover .mb-opt-b { border-color: color-mix(in srgb, var(--hs-ac) 50%, var(--hs-line-2)); }
.mb-opt input:checked + .mb-opt-b { border-color: var(--hs-ac); background: var(--hs-ac-soft); }
.mb-opt input:checked + .mb-opt-b::before { border-color: var(--hs-ac); background: var(--hs-ac); box-shadow: inset 0 0 0 3px var(--hs-bg-2); }
.mb-opt input:checked + .mb-opt-b b i { color: var(--hs-ac); }
.mb-opt input:focus-visible + .mb-opt-b { outline: 2px solid var(--hs-ac); outline-offset: 2px; }

.mb-num { display: inline-flex; align-items: center; gap: 9px; margin: 0; }
.mb-num .mb-in { width: 96px; font-variant-numeric: tabular-nums; }
.mb-num span { font: 600 12.5px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-select { position: relative; display: inline-block; width: 120px; }
.mb-select .mb-in { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; }
.mb-select::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--hs-tx-3); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.mb-select option { background: var(--hs-bg-2); color: var(--hs-tx); }

.mb-steps { display: grid; gap: 7px; margin: 0; padding: 14px 20px; list-style: none; border-bottom: 1px solid var(--hs-line); }
.mb-steps li { position: relative; padding-left: 18px; font: 500 12.5px/1.55 var(--hs-f-body); color: var(--hs-tx-3); }
.mb-steps li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 6px; height: 6px; border-radius: 1px; background: var(--hs-ac); }
.mb-steps b { color: var(--hs-tx); }

/* pills (import / export) */
.mb-pills { display: inline-flex; margin-bottom: 14px; border: 1px solid var(--hs-line-2); border-radius: var(--mb-r); overflow: hidden; background: var(--hs-bg-2); }
.mb-pills .tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 18px; color: var(--hs-tx-3); font: 700 13px var(--hs-f-body); cursor: pointer; transition: color 0.15s, background 0.15s; }
.mb-pills .tab + .tab { border-left: 1px solid var(--hs-line-2); }
.mb-pills .tab i { font-size: 12px; }
.mb-pills .tab:hover { color: var(--hs-tx); }
.mb-pills .tab.active { background: var(--hs-ac-soft); color: var(--hs-tx); box-shadow: inset 0 -2px 0 var(--hs-ac); }
.mb-pills .tab.active i { color: var(--hs-ac); }

/* alerts (main.js AjaxForm + member scripts inject .alert) */
.mb-page .alert, .pf-page .alert { position: relative; margin: 0 0 14px; padding: 11px 38px 11px 14px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); border-left-width: 3px; background: var(--hs-bg-2); color: var(--hs-tx-2); font: 500 13px/1.5 var(--hs-f-body); }
.mb-page .alert-success { border-color: color-mix(in srgb, var(--hs-ok) 40%, transparent); border-left-color: var(--hs-ok); background: color-mix(in srgb, var(--hs-ok) 9%, var(--hs-bg-2)); color: var(--hs-tx); }
.mb-page .alert-danger { border-color: color-mix(in srgb, var(--mb-red) 40%, transparent); border-left-color: var(--mb-red); background: color-mix(in srgb, var(--mb-red) 9%, var(--hs-bg-2)); color: var(--hs-tx); }
.mb-page .alert-info, .mb-page .alert-warning { border-color: color-mix(in srgb, var(--hs-ac) 40%, transparent); border-left-color: var(--hs-ac); background: var(--hs-ac-soft); color: var(--hs-tx); }
.mb-page .alert .close { position: absolute; right: 8px; top: 7px; width: 24px; height: 24px; border: 0; border-radius: 3px; background: none; color: var(--hs-tx-3); font-size: 18px; line-height: 1; cursor: pointer; }
.mb-page .alert .close:hover { background: var(--hs-hover); color: var(--hs-tx); }
.mb-page .alert .mr-2 { margin-right: 8px; }
.mb-page .alert .mb-2 { margin-bottom: 6px; }
.mb-page .alert .list-unstyled { margin: 0; padding: 0; list-style: none; }
.mb-page .text-success { color: var(--hs-ok); }
.mb-page .text-danger { color: var(--mb-red); }
.mb-page .mb-form > .alert { margin: 0 0 14px; }
.mb-form > .loading { min-height: 0; height: 0; }
.mb-form > .loading::before { position: fixed; top: 50%; }
.mb-form > .loading::after { position: fixed; top: 50%; }

.mb-empty { grid-column: 1 / -1; padding: 46px 20px; text-align: center; border: 1px dashed var(--hs-line-2); border-radius: var(--mb-r); background: var(--hs-bg-2); color: var(--hs-tx-4); font: 500 13.5px/1.5 var(--hs-f-body); }
.mb-empty-ico { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mb-empty-ico i { margin-bottom: 8px; width: 46px; height: 46px; border-radius: var(--mb-r); display: inline-flex; align-items: center; justify-content: center; background: var(--hs-bg-3); color: var(--hs-tx-4); font-size: 18px; }
.mb-empty-ico strong { font: 700 15px var(--hs-f-head); color: var(--hs-tx-2); }
.mb-empty-ico span { font-size: 12.5px; }

/* ============================================================ profile: connected accounts */
.mb-conns { display: grid; gap: 0; }
.mb-conn { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.mb-conn + .mb-conn { border-top: 1px solid var(--hs-line); }
.mb-conn-ico { width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--mb-r); display: inline-flex; align-items: center; justify-content: center; background: var(--hs-bg-3); border: 1px solid var(--hs-line-2); color: var(--hs-tx-3); font: 800 14px var(--hs-f-head); }
.mb-conn.is-on .mb-conn-ico { background: var(--hs-ac-soft); border-color: color-mix(in srgb, var(--hs-ac) 40%, transparent); color: var(--hs-ac); }
.mb-conn-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mb-conn-who strong { font: 700 14px var(--hs-f-body); color: var(--hs-tx); }
.mb-conn-who span { font: 500 12px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-conn.is-on .mb-conn-who span { color: var(--hs-ok); }
.mb-conn .mb-btn { height: 32px; padding: 0 12px; }
.mb-conn-lock { max-width: 220px; font: 500 12px/1.4 var(--hs-f-body); color: var(--hs-tx-4); text-align: right; }

/* ============================================================ import status + anilist */
.mb-status-box { margin-top: 2px; }
.mb-al-hero { display: flex; align-items: center; gap: 16px; padding: 20px; border-bottom: 1px solid var(--hs-line); background: linear-gradient(110deg, color-mix(in srgb, var(--hs-ac) 12%, transparent), transparent 60%); }
.mb-al-logo { width: 52px; height: 52px; flex: 0 0 52px; border-radius: var(--mb-r); display: inline-flex; align-items: center; justify-content: center; background: var(--hs-ac-fill); color: #fff; font-size: 20px; }
.mb-al-copy { flex: 1; min-width: 0; }
.mb-al-copy h2 { margin: 0; font: 800 18px var(--hs-f-head); color: var(--hs-tx); }
.mb-al-copy p { margin: 4px 0 0; font: 500 13px/1.5 var(--hs-f-body); color: var(--hs-tx-3); }
.mb-al-state { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-bg-2); color: var(--hs-tx-3); font: 700 12px var(--hs-f-body); white-space: nowrap; }
.mb-al-state i { font-size: 7px; color: var(--hs-tx-4); }
.mb-al-state.is-connected { color: var(--hs-ok); border-color: color-mix(in srgb, var(--hs-ok) 45%, transparent); }
.mb-al-state.is-connected i { color: var(--hs-ok); }
.mb-al-state.is-expired { color: var(--mb-red); border-color: color-mix(in srgb, var(--mb-red) 45%, transparent); }
.mb-al-state.is-expired i { color: var(--mb-red); }
.mb-al .al-sync-feedback:empty { display: none; }
.mb-al .al-sync-feedback, .mb-al > .mb-card > .alert { margin: 16px 20px 0; }
.mb-al-info { border-bottom: 1px solid var(--hs-line); }
.mb-al-info > p { margin: 0; padding: 14px 20px 0; font: 600 13px/1.5 var(--hs-f-body); color: var(--hs-tx-2); }
.mb-al-info .mb-steps { border-bottom: 0; }
.mb-al-info + .mb-row { border-top: 0; }
.mb-al-muted { color: var(--hs-tx-4); }
.mb-al-acts { justify-content: space-between; flex-wrap: wrap; }
.mb-al-note { flex: 1 1 260px; margin: 0; }
.mb-al-note:empty { display: none; }
.mb-al-btns { display: flex; gap: 8px; margin-left: auto; }
.mb-al-btns .mb-btn { height: 34px; }

/* ============================================================ continue watching */
.mb-cw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.mb-cw { position: relative; display: flex; gap: 14px; padding: 10px; background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-radius: var(--mb-r); transition: border-color 0.15s; }
.mb-cw:hover { border-color: var(--hs-line-2); }
.mb-cw-pos { position: relative; flex: 0 0 88px; align-self: flex-start; aspect-ratio: 3 / 4.2; border-radius: 3px; overflow: hidden; background: var(--hs-bg-3); }
.mb-cw-pos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.mb-cw-play { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: var(--mb-r); display: flex; align-items: center; justify-content: center; background: var(--hs-ac-fill); color: #fff; opacity: 0; transform: scale(0.85); transition: opacity 0.15s, transform 0.15s; }
.mb-cw:hover .mb-cw-pos img { transform: scale(1.05); }
.mb-cw:hover .mb-cw-play { opacity: 1; transform: none; }
.mb-cw-info { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2px 28px 0 0; }
.mb-cw-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 14.5px/1.3 var(--hs-f-body); color: var(--hs-tx); }
.mb-cw-t:hover { color: var(--hs-ac); }
.mb-cw-meta, .mb-wl-ep { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.mb-cw-meta span { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 3px; border: 1px solid var(--hs-line-2); color: var(--hs-tx-3); font: 700 10.5px var(--hs-f-body); }
.mb-cw-meta i { font-size: 9.5px; }
.mb-cw-meta .s, .mb-wl-ep .s { color: var(--hs-ac-tx); }
.mb-cw-meta .d, .mb-wl-ep .d { color: var(--hs-dub-tx); }
.mb-cw-meta .r { color: var(--hs-star); }
.mb-cw-ep { display: flex; align-items: baseline; gap: 5px; margin-top: auto; padding-top: 10px; font: 600 12px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-cw-ep b { font-weight: 800; font-size: 13px; color: var(--hs-tx); }
.mb-cw-ep em { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; }
.mb-cw-bar { height: 4px; margin: 7px 0 8px; border-radius: 2px; background: var(--hs-raise); overflow: hidden; }
.mb-cw-bar i { display: block; height: 100%; min-width: 3px; border-radius: 2px; background: var(--hs-ac); }
.mb-cw-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 600 11.5px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-cw-go { display: inline-flex; align-items: center; gap: 6px; color: var(--hs-ac); font-weight: 700; }
.mb-cw-go i { font-size: 9px; }
.mb-cw-go:hover { color: var(--hs-ac-tx); }
.mb-cw-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: var(--mb-r); display: flex; align-items: center; justify-content: center; border: 1px solid transparent; color: var(--hs-tx-4); font-size: 13px; cursor: pointer; transition: color 0.15s, background 0.15s, border-color 0.15s; }
.mb-cw-x:hover, .mb-cw-x:focus-visible { color: var(--mb-red); border-color: color-mix(in srgb, var(--mb-red) 40%, transparent); background: color-mix(in srgb, var(--mb-red) 10%, transparent); outline: 0; }
.mb-cw-x.is-busy { opacity: 0.4; pointer-events: none; }

/* ============================================================ watch list */
.mb-wl-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 12px; }
.mb-folders { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mb-folders .folder { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-bg-2); color: var(--hs-tx-3); font: 600 12.5px var(--hs-f-body); white-space: nowrap; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.mb-folders .folder i.fas { font-size: 11px; }
.mb-folders .folder:hover { color: var(--hs-tx); border-color: color-mix(in srgb, var(--hs-ac) 55%, var(--hs-line-2)); }
.mb-folders .folder.active { background: var(--hs-ac-fill); border-color: var(--hs-ac-fill); color: #fff; }
.mb-folders .folder.active .mb-fdot { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.mb-airing { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.mb-airing-l { margin-right: 6px; font: 700 10.5px var(--hs-f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hs-tx-4); }
.mb-airing .folder { display: inline-flex; align-items: center; height: 30px; padding: 0 9px; border-radius: 3px; color: var(--hs-tx-3); font: 600 12.5px var(--hs-f-body); white-space: nowrap; }
.mb-airing .folder:hover { color: var(--hs-ac); background: var(--hs-hover); }

.mb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mb-f-search { position: relative; flex: 1 1 260px; min-width: 0; }
.mb-f-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--hs-tx-4); pointer-events: none; }
.mb-f-search .mb-in { padding-left: 36px; }
.mb-f-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-field); color: var(--hs-tx); font: 700 13px var(--hs-f-body); white-space: nowrap; cursor: pointer; transition: border-color 0.15s; }
.mb-f-btn:hover, .mb-f-sort .show .mb-f-btn { border-color: var(--hs-ac); }
.mb-f-btn svg { color: var(--hs-tx-4); }
.mb-f-k { font-weight: 600; color: var(--hs-tx-4); }
.mb-f-go .hs-btn { height: 38px !important; padding: 0 16px; }
.hs .mb-f-menu { min-width: 200px; margin: 0; padding: 5px; list-style: none; border-radius: var(--mb-r); background: var(--hs-bg-2); border-color: var(--hs-line-2); top: calc(100% + 6px); }
.mb-f-menu li { position: relative; margin: 0; list-style: none; }
.mb-f-menu li > label { position: relative; display: flex; align-items: center; height: 32px; padding: 0 30px 0 10px; margin: 0; border-radius: 3px; color: var(--hs-tx-3); font: 600 13px var(--hs-f-body); cursor: pointer; white-space: nowrap; }
.mb-f-menu li > label:hover { background: var(--hs-hover); color: var(--hs-tx); }
.mb-f-menu li > input:checked + label { color: var(--hs-ac); background: var(--hs-ac-soft); }
.mb-f-menu li > input:checked + label::after { content: ""; position: absolute; right: 12px; top: 50%; width: 5px; height: 9px; margin-top: -6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.mb-wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 20px 14px; }
.mb-wl { position: relative; display: flex; flex-direction: column; min-width: 0; }
.mb-wl-pos { position: relative; display: block; aspect-ratio: 3 / 4.25; border-radius: var(--mb-r); overflow: hidden; background: var(--hs-bg-3); }
.mb-wl-pos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.mb-wl-pos:hover img { transform: scale(1.05); }
.mb-wl-ty { position: absolute; left: 6px; top: 6px; height: 20px; padding: 0 6px; border-radius: 3px; display: inline-flex; align-items: center; background: rgba(4, 8, 14, 0.72); color: #fff; font: 700 10.5px var(--hs-f-body); letter-spacing: 0.04em; }
.mb-wl-res { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 22px 8px 7px; background: linear-gradient(180deg, transparent, rgba(4, 8, 14, 0.88)); color: #fff; font: 700 11px var(--hs-f-body); }
.mb-wl-res i { color: var(--hs-ac); }
.mb-wl-info { display: flex; flex-direction: column; flex: 1; min-width: 0; padding-top: 9px; }
.mb-wl-info .name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 13.5px/1.3 var(--hs-f-body); color: var(--hs-tx); }
.mb-wl-info .name a:hover { color: var(--hs-ac); }
.mb-wl-ep { margin-top: 5px; font: 600 11.5px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-wl-ep span { display: inline-flex; align-items: center; gap: 4px; }
.mb-wl-ep i { font-size: 10px; }
.mb-wl .wl-folder { margin-top: auto; padding-top: 9px; }
.mb-wl .folder-toggle { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-bg-2); color: var(--hs-tx-2); font: 600 12px var(--hs-f-body); cursor: pointer; user-select: none; transition: border-color 0.15s; }
.mb-wl .folder-toggle svg { margin-left: auto; color: var(--hs-tx-4); transition: transform 0.15s; }
.mb-wl .folder-toggle:hover, .mb-wl .wl-folder.show .folder-toggle { border-color: var(--hs-ac); }
.mb-wl .wl-folder.show .folder-toggle svg { transform: rotate(180deg); }
.mb-wl .wl-folder.wl-busy { opacity: 0.55; pointer-events: none; }
.hs .mb-wl .wl-folder .dropdown-menu { left: 0; right: 0; min-width: 0; top: calc(100% + 4px); padding: 4px; border-radius: var(--mb-r); background: var(--hs-bg-2); border-color: var(--hs-line-2); }
.hs .mb-wl .wl-folder .dropdown-item { gap: 9px; padding: 7px 9px; border-radius: 3px; font-size: 12.5px; }
.hs .mb-wl .wl-folder .dropdown-item .mb-fdot { width: 8px; }
.hs .mb-wl .wl-folder .dropdown-item.active { color: var(--hs-tx); background: var(--hs-ac-soft); }
.hs .mb-wl .wl-folder .wl-remove { margin-top: 4px; border-top: 1px solid var(--hs-line); border-radius: 0 0 3px 3px; color: var(--mb-red) !important; }
.hs .mb-wl .wl-folder .wl-remove i { color: var(--mb-red); }
.hs .mb-wl .wl-folder .next-ep:empty { display: none; }

/* ============================================================ notifications */
.hs .member-notifications-page.user-notification { position: static; left: auto; right: auto; top: auto; width: auto; max-width: 100%; min-width: 0; padding: 0; }
.mb-noti-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; border-bottom: 1px solid var(--hs-line); }
.mb-noti-tabs { display: flex; gap: 22px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.mb-noti-tabs::-webkit-scrollbar { display: none; }
.mb-noti-tabs .tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 44px; color: var(--hs-tx-4); font: 600 13.5px var(--hs-f-body); white-space: nowrap; transition: color 0.15s; }
.mb-noti-tabs .tab i { font-size: 12px; }
.mb-noti-tabs .tab:hover { color: var(--hs-tx); }
.mb-noti-tabs .tab.active { color: var(--hs-tx); }
.mb-noti-tabs .tab.active i { color: var(--hs-ac); }
.mb-noti-tabs .tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--hs-ac); }
.hs .mb-noti .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 3px; background: var(--hs-ac-fill); color: #fff; font: 800 10.5px/1 var(--hs-f-body); }
.mb-noti-acts { display: flex; gap: 6px; padding: 6px 0; }
.mb-noti-acts .filter { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-bg-2); color: var(--hs-tx-3); font: 600 12px var(--hs-f-body); white-space: nowrap; transition: border-color 0.15s, color 0.15s; }
.mb-noti-acts .filter i { font-size: 11px; }
.mb-noti-acts .mark-as-read:hover { color: var(--hs-ok); border-color: color-mix(in srgb, var(--hs-ok) 50%, transparent); }
.mb-noti-acts .clear-all:hover { color: var(--mb-red); border-color: color-mix(in srgb, var(--mb-red) 50%, transparent); }

.mb-noti-list { background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-radius: var(--mb-r); overflow: hidden; }
.mb-noti-list .mb-empty { border: 0; border-radius: 0; }
.mb-nrow { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; transition: background 0.15s; }
.mb-nrow + .mb-nrow { border-top: 1px solid var(--hs-line); }
.mb-nrow:hover { background: var(--hs-hover); }
.mb-nrow.new { background: color-mix(in srgb, var(--hs-ac) 6%, transparent); }
.mb-nrow.new::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hs-ac); }
.mb-nrow-main { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; color: inherit; }
a.mb-nrow-main[href]:hover .content { color: var(--hs-tx); }
.mb-nrow .poster { flex: 0 0 40px; display: block; }
.mb-nrow .poster img { display: block; width: 40px; object-fit: cover; background: var(--hs-bg-3); }
.mb-nrow .poster.is-pos img { height: 56px; border-radius: 3px; }
.mb-nrow .poster.is-ava img { height: 40px; border-radius: 50%; }
.mb-nrow .noti-icon { width: 40px; height: 40px; border-radius: var(--mb-r); display: flex; align-items: center; justify-content: center; background: var(--hs-ac-soft); color: var(--hs-ac); font-size: 15px; }
.mb-nrow .info { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.mb-nrow .content { font: 500 13.5px/1.45 var(--hs-f-body); color: var(--hs-tx-3); word-break: break-word; }
.mb-nrow.new .content { color: var(--hs-tx-2); }
.mb-nrow .highlight { font-weight: 700; color: var(--hs-tx); }
.mb-nrow .noti-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 500 12.5px/1.45 var(--hs-f-body); color: var(--hs-tx-4); }
.mb-nrow time { font: 600 11.5px var(--hs-f-body); color: var(--hs-tx-4); }
.mb-nrow.new time { color: var(--hs-ac-tx); }
.mb-nrow-acts { display: flex; gap: 4px; flex-shrink: 0; opacity: 0.55; transition: opacity 0.15s; }
.mb-nrow:hover .mb-nrow-acts, .mb-nrow-acts:focus-within { opacity: 1; }
.mb-nrow-acts button { width: 28px; height: 28px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-bg-2); color: var(--hs-tx-3); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color 0.15s, border-color 0.15s; }
.mb-nrow-acts .noti-mark:hover { color: var(--hs-ok); border-color: var(--hs-ok); }
.mb-nrow-acts .noti-delete:hover { color: var(--mb-red); border-color: var(--mb-red); }
.mb-nrow .ak-friend-acts { flex-shrink: 0; }

/* ============================================================ friends (member + public) */
.mb-ftabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mb-ftabs a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: var(--mb-r); border: 1px solid var(--hs-line-2); background: var(--hs-bg-2); color: var(--hs-tx-3); font: 600 13px var(--hs-f-body); white-space: nowrap; transition: border-color 0.15s, color 0.15s; }
.mb-ftabs a i { font-size: 12px; }
.mb-ftabs a:hover { color: var(--hs-tx); border-color: color-mix(in srgb, var(--hs-ac) 55%, var(--hs-line-2)); }
.mb-ftabs a.is-on { background: var(--hs-ac-fill); border-color: var(--hs-ac-fill); color: #fff; }
.mb-ftabs-n { opacity: 0.75; font-weight: 600; font-variant-numeric: tabular-nums; }

.mb-frows { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.mb-frow { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; min-width: 0; padding: 12px; background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-radius: var(--mb-r); transition: border-color 0.15s; }
.mb-frow:hover { border-color: var(--hs-line-2); }
.mb-frow .ak-friend-who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.mb-frow .ak-friend-ava-link { flex: 0 0 auto; display: block; }
.mb-fava { position: relative; display: block; width: 46px; height: 46px; border-radius: 50%; }
.mb-fava > img:not(.avatar-decoration) { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--hs-bg-3); }
.mb-frow .ak-friend-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mb-frow .ak-friend-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; min-width: 0; }
.mb-frow .ak-friend-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14px var(--hs-f-body); color: var(--hs-tx); }
.mb-frow .ak-friend-name:hover { color: var(--hs-ac); }
.mb-frow .ak-friend-title .ak-title-eq { margin: 0; }
.mb-frow .ak-friend-rankline { display: flex; align-items: center; gap: 6px; min-width: 0; font: 600 11.5px var(--hs-f-body); color: var(--hs-tx-4); white-space: nowrap; }
.mb-frow .ak-friend-rankline .badg-level { margin: 0; }
.mb-frow .ak-friend-rank { color: var(--hs-ac-tx); }
.mb-frow .ak-friend-mana::before { content: "·"; margin-right: 6px; color: var(--hs-tx-4); }
.mb-frow .ak-friend-acts { display: flex; gap: 6px; flex-shrink: 0; }

.ak-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--mb-r, 4px); border: 1px solid var(--hs-line-2); background: var(--hs-bg-3); color: var(--hs-tx-2); font: 700 12px/1 var(--hs-f-body); white-space: nowrap; cursor: pointer; text-decoration: none; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.ak-btn i { font-size: 11px; }
.ak-btn:hover { border-color: var(--hs-ac); color: var(--hs-tx); }
.ak-btn-primary { background: var(--hs-ac-fill); border-color: var(--hs-ac-fill); color: #fff; }
.ak-btn-primary:hover { background: var(--hs-ac-fill-h); border-color: var(--hs-ac-fill-h); color: #fff; }
.ak-btn-danger { color: var(--mb-red); border-color: color-mix(in srgb, var(--mb-red) 40%, transparent); background: color-mix(in srgb, var(--mb-red) 8%, transparent); }
.ak-btn-danger:hover { color: var(--mb-red); border-color: var(--mb-red); }
.ak-btn-muted { color: var(--hs-tx-4); }
.ak-btn[hidden] { display: none !important; }
.ak-btn:disabled { opacity: 0.55; cursor: progress; }

/* friends.js "Cancel request" confirm — its injected sheet is dark-only; retint it */
body.hs .ak-friend-confirm-backdrop { background: rgba(4, 8, 14, 0.66); }
body.hs .ak-friend-confirm-card { width: min(400px, 100%); padding: 20px; border-radius: 4px; background: var(--hs-bg-2); border: 1px solid var(--hs-line-2); color: var(--hs-tx); font: 500 14px/1.5 var(--hs-f-body); }
body.hs .ak-friend-confirm-card h4 { color: var(--hs-tx); font: 800 16px var(--hs-f-head); }
body.hs .ak-friend-confirm-card p { color: var(--hs-tx-3); font-weight: 500; }
body.hs .ak-friend-confirm-actions button { height: 32px; padding: 0 14px; border-radius: 4px; font: 700 12.5px var(--hs-f-body); }
body.hs .ak-friend-confirm-keep { background: var(--hs-raise); color: var(--hs-tx); border: 1px solid var(--hs-line-2); }
body.hs .ak-friend-confirm-yes { background: var(--mb-red, #E5534B); color: #fff; }

/* ============================================================ avatar picker modal */
.mb-avm .modal-dialog { max-width: 680px; }
.mb-avm .modal-content { border-radius: 4px; background: var(--hs-bg-2); border-color: var(--hs-line-2); }
.mb-avm .modal-header { padding: 14px 18px; }
.mb-avm .modal-title { font: 800 16px var(--hs-f-head); }
.mb-avm .close { width: 32px; height: 32px; border-radius: 4px; }
.mb-avm .modal-body { padding: 0; }
.mb-avm-tabs { display: flex; gap: 6px; margin: 0; padding: 12px 18px; list-style: none; overflow-x: auto; border-bottom: 1px solid var(--hs-line); scrollbar-width: thin; }
.mb-avm-tabs li { flex: 0 0 auto; }
.mb-avm-tabs .tab { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--hs-line-2); color: var(--hs-tx-3); font: 600 12px var(--hs-f-body); white-space: nowrap; cursor: pointer; user-select: none; transition: border-color 0.15s, color 0.15s; }
.mb-avm-tabs .tab:hover { color: var(--hs-tx); border-color: var(--hs-ac); }
.mb-avm-tabs .tab.active { background: var(--hs-ac-fill); border-color: var(--hs-ac-fill); color: #fff; }
.mb-avm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 14px; padding: 18px; max-height: min(56vh, 440px); overflow-y: auto; }
.mb-avm-grid.hide { display: none; }
.mb-avm-grid[style*="display: block"] { display: grid !important; }
.mb-avm-grid .item span { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--hs-line-2); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.mb-avm-grid .item span:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--hs-ac); }
.mb-avm-grid .item span.active { border-color: var(--hs-ac); box-shadow: 0 0 0 4px var(--hs-ac-soft); }
.mb-avm-grid .item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-avm .modal-footer { justify-content: space-between; padding: 12px 18px; }
.mb-avm-hint { font: 500 12.5px var(--hs-f-body); color: var(--hs-tx-4); }

/* ============================================================ shared: chips, badges, decorations */
:is(.mb-shell, .pf-shell) .ak-title-eq { --tc: #B39DDB; display: inline-flex; align-items: center; gap: 5px; height: 20px; max-width: 100%; padding: 0 7px; margin-left: 0; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); background: color-mix(in srgb, var(--tc) 14%, transparent); color: color-mix(in srgb, var(--tc) 58%, var(--hs-tx)); font: 700 11px/1 var(--hs-f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
:is(.mb-shell, .pf-shell) .ak-title-eq i { font-size: 9.5px; opacity: 0.9; }
.ak-tc-crimson { --tc: #FF6B7A; } .ak-tc-coral { --tc: #FF8A65; } .ak-tc-amber { --tc: #FFB74D; } .ak-tc-gold { --tc: #F5C842; }
.ak-tc-lime { --tc: #9CCC65; } .ak-tc-mint { --tc: #4FD99A; } .ak-tc-teal { --tc: #3CC7D9; } .ak-tc-sky { --tc: #4FC3F7; }
.ak-tc-azure { --tc: #64B5F6; } .ak-tc-indigo { --tc: #7986CB; } .ak-tc-violet { --tc: #B39DDB; } .ak-tc-orchid { --tc: #CE93D8; }
.ak-tc-pink { --tc: #F48FB1; } .ak-tc-rose { --tc: #EF9A9A; } .ak-tc-salmon { --tc: #FFAB91; } .ak-tc-peach { --tc: #FFCC80; }
.ak-tc-sand { --tc: #E8C873; } .ak-tc-slate { --tc: #90A4AE; } .ak-tc-silver { --tc: #B0BEC5; } .ak-tc-ice { --tc: #8FD8E2; }

:is(.mb-shell, .pf-shell) img.badg-level { display: inline-block; width: 16px; height: 16px; min-width: 16px; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: contain; vertical-align: middle; flex-shrink: 0; background: transparent; }
:is(.mb-shell, .pf-shell) .badg-level.level-admin { width: 22px; height: 22px; }
:is(.mb-shell, .pf-shell) .badg-aura { position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
:is(.mb-shell, .pf-shell) .badg-aura .badg-level { position: relative; z-index: 2; border-radius: 3px; }

:is(.mb-shell, .pf-shell) .has-cosmetics { position: relative; overflow: visible !important; }
:is(.mb-shell, .pf-shell) .avatar-clip { position: absolute; inset: 0; display: block; border-radius: 50%; overflow: hidden; z-index: 1; }
:is(.mb-shell, .pf-shell) .avatar-clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; max-width: none; }
:is(.mb-shell, .pf-shell) .avatar-decoration { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; max-width: none; z-index: 2; pointer-events: none; object-fit: contain; border-radius: 0; }

/* ============================================================ responsive */
@media (max-width: 1280px) {
    .mb-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 22px; }
    .mb-row { grid-template-columns: 190px minmax(0, 1fr); }
}
@media (max-width: 1080px) {
    .mb-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 18px; }
    .mb-id::before { height: 100%; bottom: 0; border-bottom: 0; opacity: 0.55; }
    .mb-id-top { flex-direction: row; align-items: center; gap: 16px; padding: 16px; text-align: left; }
    .mb-ava { width: 76px; height: 76px; }
    .mb-id-who { align-items: flex-start; margin-top: 0; flex: 1; }
    .mb-id .name { font-size: 18px; }
    .mb-mana { padding: 0 16px 14px; }
    .mb-stats, .mb-id-links { position: relative; background: var(--hs-bg-2); }
    .mb-id-links a { flex-direction: row; gap: 7px; }
    .mb-nav { flex-direction: row; gap: 4px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
    .mb-nav::-webkit-scrollbar { display: none; }
    .mb-nav a { flex: 0 0 auto; height: 36px; gap: 8px; padding: 0 12px; font-size: 13px; }
    .mb-nav a.active::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 2px; border-radius: 2px 2px 0 0; }
    .mb-acts { justify-content: flex-end; }
    .mb-acts:not(:has(.mb-donate)) { display: none; }
    .mb-acts .logout { display: none; }
    .mb-acts > a { flex: 0 0 auto; padding: 0 14px; height: 32px; }
}
@media (max-width: 760px) {
    .mb-shell { padding-bottom: 40px; }
    .mb-head { margin-bottom: 14px; padding-bottom: 12px; }
    .mb-hi { width: 36px; height: 36px; flex-basis: 36px; font-size: 14px; }
    .mb-head h1 { font-size: 22px; }
    .mb-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 16px; }
    .mb-lbl { padding-top: 0; }
    .mb-card-h, .mb-card-f, .mb-steps, .mb-conn { padding-left: 16px; padding-right: 16px; }
    .mb-opts { grid-template-columns: minmax(0, 1fr); }
    .mb-seg { display: flex; }
    .mb-seg label { flex: 1 1 auto; justify-content: center; padding: 0 10px; }
    .mb-save { flex-direction: column; align-items: stretch; text-align: center; }
    .mb-save .hs-btn { width: 100%; }
    .mb-conn { flex-wrap: wrap; }
    .mb-conn-lock { max-width: none; width: 100%; text-align: left; padding-left: 48px; }
    .mb-cw-grid { grid-template-columns: minmax(0, 1fr); }
    .mb-cw-pos { flex-basis: 78px; }
    .mb-folders { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
    .mb-folders::-webkit-scrollbar { display: none; }
    .mb-wl-nav { gap: 8px; }
    .mb-f-search { flex-basis: 100%; }
    .mb-f-sort { flex: 1; }
    .mb-f-sort .dropdown, .mb-f-btn { width: 100%; }
    .mb-f-btn svg { margin-left: auto; }
    .mb-wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .mb-noti-bar { flex-direction: column; align-items: stretch; gap: 0; }
    .mb-noti-acts { padding: 8px 0 10px; }
    .mb-noti-acts .filter { flex: 1; justify-content: center; }
    .mb-nrow { flex-wrap: wrap; padding: 12px; }
    .mb-nrow .ak-friend-acts { width: 100%; padding-left: 52px; }
    .mb-nrow-acts { opacity: 1; }
    .mb-frows { grid-template-columns: minmax(0, 1fr); }
    .mb-frow { flex-wrap: wrap; }
    .mb-frow .ak-friend-acts { width: 100%; justify-content: flex-end; }
    .mb-avm .modal-dialog { margin: 0.5rem; }
    .mb-avm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; }
}
@media (max-width: 400px) {
    .mb-stats li span:last-child { font-size: 12.5px; }
    .mb-id-links a { font-size: 11px; gap: 5px; }
}
