/* themes, accent, reduce motion, chat size */
html[data-theme="midnight"] { --bg: #0f1530; --card: #171f42; --card2: #1c2550; --card3: #222c5c; --field: #0b1026; --line: #2a3566; --edge: #3a477e; }
html[data-theme="forest"] { --bg: #0f1f17; --card: #15291f; --card2: #1a3226; --card3: #203b2d; --field: #0b1711; --line: #23412f; --edge: #305843; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; }

/* buttons in the top bar of the home page */
.nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.nav button { position: relative; border: 1px solid var(--edge); border-radius: 999px; background: var(--card3); color: var(--fg); font: 700 12px "WP Emoji", system-ui, sans-serif; padding: 7px 12px; cursor: pointer; }
.nav button:hover { filter: brightness(1.2); }
.nav .dot { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; border-radius: 8px; background: #e0443e; color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; box-sizing: border-box; }

/* windows */
.sx .dialog { width: min(480px, 100%); }
.sx .dialog-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.sx h3 { margin: 4px 0 0; font-size: 11px; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.sx .row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; }
.sx .row.tap { cursor: pointer; }
.sx .row.tap:hover { border-color: var(--edge); }
.sx .grow { flex: 1; min-width: 0; }
.sx .grow b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx .grow small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.sx .av { width: 36px; height: 36px; border-radius: 50%; background: var(--edge); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; position: relative; }
.sx .av img { width: 100%; height: 100%; object-fit: cover; }
.sx .av.big { width: 64px; height: 64px; font-size: 26px; }
.sx .av.on::after { content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; border: 2px solid var(--card2); box-sizing: content-box; }
.sx .mini { border: 1px solid var(--edge); border-radius: 999px; background: transparent; color: var(--fg); font: 700 12px "WP Emoji", system-ui, sans-serif; padding: 6px 12px; cursor: pointer; flex: none; }
.sx .mini:hover { background: var(--card3); }
.sx .mini.solid { background: var(--accent); color: #111; border-color: transparent; }
.sx .mini:disabled { opacity: 0.5; cursor: default; }
.sx form.search { display: flex; gap: 8px; }
.sx form.search input { flex: 1; min-width: 0; max-width: none; text-align: left; background: var(--field); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 14px "WP Emoji", system-ui, sans-serif; }
.sx .empty, .sx .note { color: var(--muted); font-size: 12px; margin: 0; }
.sx .msgline { min-height: 16px; font-size: 12px; color: #ff8a8a; margin: 0; }

/* profile */
.sx .phead { display: flex; align-items: center; gap: 14px; }
.sx .phead .grow b { font-size: 20px; }
.sx .pbtns { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.sx .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sx .pill2 { padding: 3px 10px; border-radius: 999px; background: var(--card2); border: 1px solid var(--edge); font-size: 11px; font-weight: 700; }
.sx .pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sx .pstat { padding: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.sx .pstat b { display: block; font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx .pstat span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sx .chart { display: flex; align-items: flex-end; gap: 10px; height: 70px; padding: 14px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; box-sizing: content-box; }
.sx .chart i { flex: 1; background: var(--edge); border-radius: 4px; min-height: 3px; }
.sx .chart i:last-child { background: var(--accent); }

/* leaderboard */
.sx .tabs2 { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; align-self: flex-start; }
.sx .tabs2 button { border: 0; background: var(--card2); color: var(--muted); font: 700 12px "WP Emoji", system-ui, sans-serif; padding: 7px 14px; cursor: pointer; }
.sx .tabs2 button.on { background: var(--accent); color: #111; }
.sx .rank { width: 22px; font-weight: 800; font-size: 16px; flex: none; }
.sx .row.top1 { border-color: var(--accent); }
.sx .row.top2 { border-color: var(--edge); }
.sx .row.me { border-style: dashed; }
.sx .wins { font-weight: 800; font-size: 14px; flex: none; }

/* badges */
.sx .badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sx .badge { padding: 12px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); font: inherit; cursor: default; }
.sx .badge svg { width: 34px; height: 34px; }
.sx .badge b { font-size: 12px; color: var(--fg); }
.sx .badge small { font-size: 10px; }
.sx .badge.done { background: var(--card2); border-color: var(--fg); color: var(--fg); cursor: pointer; }
.sx .badge.pin { box-shadow: 0 0 0 2px var(--accent); }
.sx .bar2 { width: 100%; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.sx .bar2 i { display: block; height: 100%; background: var(--muted); }

/* settings */
.sx .set { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; }
.sx .box2 { padding: 14px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 14px; }
.sx .themes { display: flex; gap: 10px; }
.sx .themes button { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font: 600 12px "WP Emoji", system-ui, sans-serif; cursor: pointer; }
.sx .themes button.on { border: 2px solid var(--fg); padding: 9px; }
.sx .dots { display: flex; gap: 10px; }
.sx .dots button { width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; }
.sx .dots button.on { box-shadow: 0 0 0 2px var(--card2), 0 0 0 4px var(--fg); }
/* own colors */
.sx .themes { flex-wrap: wrap; align-items: stretch; }
.sx input[type=color] { flex: none; max-width: none; padding: 0; background: none; border: 0; cursor: pointer; }
.sx .themes input.cpick { width: 44px; border-radius: 10px; border: 1px solid var(--line); padding: 3px; background: var(--field); }
.sx .dots input.cdot { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; }
.sx .dots input.cdot.on { box-shadow: 0 0 0 2px var(--card2), 0 0 0 4px var(--fg); }
.sx input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.sx input[type=color]::-webkit-color-swatch { border: 0; border-radius: inherit; }
.sx input[type=color]::-moz-color-swatch { border: 0; border-radius: inherit; }
.sx .dots input.cdot:not(.on) { background: conic-gradient(#ff6b8b, #ffcf5e, #7ee787, #5eb0ff, #c08bff, #ff6b8b); }
.sx .dots input.cdot:not(.on)::-webkit-color-swatch { opacity: 0; }
.sx .dots input.cdot:not(.on)::-moz-color-swatch { opacity: 0; }
.sx input[type=range] { flex: 1; accent-color: var(--accent); }
.sx .sw { width: 40px; height: 22px; border-radius: 11px; border: 0; background: var(--edge); position: relative; cursor: pointer; flex: none; }
.sx .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: left 0.15s; }
.sx .sw[aria-checked="true"] { background: var(--accent); }
.sx .sw[aria-checked="true"]::after { left: 21px; background: var(--bg); }
.sx .sizes { display: flex; border: 1px solid var(--edge); border-radius: 999px; overflow: hidden; }
.sx .sizes button { border: 0; background: transparent; color: var(--muted); font: 700 12px "WP Emoji", system-ui, sans-serif; padding: 5px 12px; cursor: pointer; }
.sx .sizes button.on { background: var(--accent); color: #111; }

/* invite toast */
.invite { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 12px; background: var(--card2); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-width: calc(100vw - 24px); }
.invite span { font-size: 13px; }
.invite button { border: 0; border-radius: 999px; padding: 6px 12px; font: 700 12px "WP Emoji", system-ui, sans-serif; cursor: pointer; }
.invite .yes { background: var(--accent); color: #111; }
.invite .no { background: var(--card3); color: var(--fg); }
@media (max-width: 520px) { .sx .pstats, .sx .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nav button { padding: 6px 9px; } }

/* direct messages */
.sx .dm-list { display: flex; flex-direction: column; gap: 6px; height: 280px; overflow-y: auto; padding: 4px 2px; }
.sx .dm { align-self: flex-start; max-width: 80%; background: var(--card3); border-radius: 14px 14px 14px 4px; padding: 7px 11px; font-size: var(--chat-size); overflow-wrap: anywhere; }
.sx .dm.mine { align-self: flex-end; background: var(--accent); color: #111; border-radius: 14px 14px 4px 14px; }
.sx .dm small { display: block; font-size: 10px; opacity: 0.6; margin-top: 2px; }
.sx .dmform { border-top: 0; padding: 0; display: block; }
.sx .dmform input { background: var(--field); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: 14px "WP Emoji", system-ui, sans-serif; }
.sx .mini.back { align-self: flex-start; }
.sx .dmform input { width: 100%; max-width: none; box-sizing: border-box; text-align: left; }

/* profile window: wide, the top takes its colour from the picture (--tint) */
.modal.sx { z-index: 35; }
.sx.wide .dialog { width: min(980px, 100%); max-height: min(860px, 100%); position: relative; }
.sx.wide .dialog-head { position: absolute; top: 12px; right: 12px; z-index: 3; padding: 0; border: 0; background: none; }
.sx.wide .dialog-head h2 { display: none; }
.sx.wide .x { background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px); border-color: rgba(255, 255, 255, 0.25); }
.sx.wide .dialog-body { padding: 0; gap: 0; }
.pf { --tint: var(--accent); display: flex; flex-direction: column; }
.pf-wait { padding: 40px; text-align: center; }
.pf-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 6px 24px; padding: 0 28px 22px; background: var(--card); border-bottom: 1px solid var(--line); }
.pf-av { position: relative; width: 124px; height: 124px; margin-top: -62px; z-index: 1; }
.sx .av.xl { width: 124px; height: 124px; border-radius: 50%; border: 5px solid var(--card); box-sizing: border-box; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.pf-dot { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; border: 5px solid var(--card); background: #7a7a85; box-sizing: border-box; }
.pf-dot.online, .pf-st.online::before { background: #3ddc84; }
.pf-dot.away, .pf-st.away::before { background: #f0b232; }
.pf-dot.busy, .pf-st.busy::before { background: #e0443e; }
.pf-who { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.pf-name { margin: 0; text-transform: none; color: var(--fg); display: flex; align-items: center; gap: 10px; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; min-width: 0; }
.pf-name span { overflow: hidden; text-overflow: ellipsis; }
.pf-icon { width: 26px; height: 26px; flex: none; }
.pf-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 14px; }
.pf-st { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); font-weight: 600; }
.pf-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7a7a85; }
.pf-sep { opacity: 0.5; }
.pf-bio { margin: 4px 0 0; font-size: 16px; max-width: 52ch; overflow-wrap: anywhere; }
.pf-bio.dim { color: var(--muted); font-style: italic; }
.pf-who .pills { margin-top: 6px; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-self: start; padding-top: 14px; }
.pf-btn { border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--card) 60%, transparent); color: var(--fg); font: 700 14px "WP Emoji", system-ui, sans-serif; padding: 9px 16px; cursor: pointer; }
.pf-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 12%, var(--card)); }
.pf-btn.main { background: var(--accent); color: #111; border-color: transparent; }
.pf-btn.main:hover { filter: brightness(1.1); background: var(--accent); }
.pf-btn.quiet { border-color: transparent; background: none; color: var(--muted); font-weight: 600; }
.pf-btn:disabled { opacity: 0.55; cursor: default; }
.pf-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.pf-main { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.pf-side { padding: 24px 24px 28px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 45%, var(--card)); display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.pf-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pf-sec h3 { margin: 0; font-size: 12px; letter-spacing: 0.12em; }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.pf-num { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--tint) 70%, var(--line)); }
.pf-num b { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-num span { font-size: 12px; color: var(--muted); }
.pf-num.rate { flex-direction: row; align-items: center; gap: 12px; }
.pf-num.rate > div { display: flex; flex-direction: column; min-width: 0; }
.pf-ring { width: 52px; height: 52px; flex: none; }
.pf-ring .bg { stroke: var(--line); }
.pf-ring .fg { stroke: var(--tint); }
.pf-chart { display: flex; align-items: stretch; gap: 12px; height: 170px; }
.pf-bar { flex: 1; min-width: 0; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; }
.pf-bar em { font-style: normal; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.pf-bar i { align-self: end; width: 100%; max-width: 56px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--tint) 35%, var(--edge)); }
.pf-bar.now i { background: var(--tint); }
.pf-bar.now em { color: var(--fg); }
.pf-bar small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pf-conn { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-conn img { width: 32px; height: 32px; flex: none; }
.pf-conn > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-conn b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-conn small { color: var(--muted); font-size: 12px; }
.pf-go { color: var(--fg); text-decoration: none; font-size: 18px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.pf-go:hover { background: color-mix(in srgb, var(--fg) 12%, transparent); }
.pf-friend { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--fg); font: 600 14px "WP Emoji", system-ui, sans-serif; text-align: left; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; cursor: pointer; }
.pf-friend:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); }
.pf-friend .av { width: 30px; height: 30px; }
.pf-friend span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-profile] { cursor: pointer; }
@media (max-width: 820px) {
  .pf-hero { grid-template-columns: auto minmax(0, 1fr); padding: 0 18px 20px; }
  .pf-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .pf-cols { grid-template-columns: minmax(0, 1fr); }
  .pf-side { border-left: 0; border-top: 1px solid var(--line); }
  .pf-main { padding: 20px 18px; }
}
@media (max-width: 520px) {
  .pf-hero { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .pf-av, .sx .av.xl { width: 96px; height: 96px; margin-top: -48px; }
  .pf-name { font-size: 28px; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-chart { height: 140px; gap: 6px; }
}

/* banner on top of the profile */
.pf-banner { position: relative; aspect-ratio: 4 / 1; min-height: 112px; overflow: hidden; background-color: color-mix(in srgb, var(--tint) 35%, var(--card)); background-size: cover; background-position: center; background-repeat: no-repeat; }
.pf-banner.auto { background-image: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--tint) 75%, transparent) 0%, transparent 60%), linear-gradient(120deg, color-mix(in srgb, var(--tint) 40%, #000) 0%, color-mix(in srgb, var(--tint) 18%, var(--card)) 100%); }
.pf-banner.own { cursor: pointer; }
.pf-banner-edit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(0, 0, 0, 0.5); color: #fff; font: 700 15px "WP Emoji", system-ui, sans-serif; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.pf-banner-edit svg { width: 22px; height: 22px; }
.pf-banner.own:hover .pf-banner-edit, .pf-banner.own:focus-visible .pf-banner-edit, .pf-banner.drop .pf-banner-edit { opacity: 1; }
.pf-banner.own:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.pf-banner.drop { outline: 3px dashed var(--accent); outline-offset: -8px; }
@media (hover: none) { .pf-banner.own .pf-banner-edit { opacity: 0; } }

/* banner editor */
.bn-back { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.72); display: grid; place-items: center; padding: 14px; }
.bn-dlg { box-sizing: border-box; width: min(1040px, 100%); max-height: calc(100dvh - 28px); overflow: auto; display: flex; flex-direction: column; background: var(--card); color: var(--fg); border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65); }
.bn-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.bn-head h2 { margin: 0; font-size: 18px; }
.bn-x { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--edge); background: var(--card3); color: var(--fg); font-size: 18px; cursor: pointer; }
.bn-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; }
.bn-left { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bn-right { padding: 14px 18px 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; background: color-mix(in srgb, var(--bg) 45%, var(--card)); min-width: 0; }
.bn-stage { position: relative; aspect-ratio: 4 / 1; border-radius: 10px; overflow: hidden; background: #16161a; border: 1px solid var(--line); touch-action: none; user-select: none; }
.bn-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bn-stage.grab { cursor: grab; }
.bn-stage.moving { cursor: grabbing; }
.bn-stage.drop { outline: 3px dashed var(--accent); outline-offset: -6px; }
.bn-stage canvas { width: 100%; height: 100%; display: block; }
.bn-guide { position: absolute; left: 2.83%; bottom: 0; width: 12.67%; aspect-ratio: 1; transform: translateY(50%); border-radius: 50%; border: 3px dashed rgba(255, 255, 255, 0.85); overflow: hidden; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); pointer-events: none; }
.bn-guide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.bn-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-align: center; border: 2px dashed var(--edge); border-radius: 10px; }
.bn-empty b { font-size: 18px; }
.bn-empty small { color: var(--muted); font-size: 12px; }
.bn-hint { margin: 0; color: var(--muted); font-size: 12px; }
.bn-sec { display: flex; flex-direction: column; gap: 10px; }
.bn-sec h3 { margin: 0; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.bn-group { display: flex; flex-direction: column; gap: 16px; }
.bn-seg-row { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; align-self: flex-start; }
.bn-seg { border: 0; background: var(--card2); color: var(--muted); font: 700 13px "WP Emoji", system-ui, sans-serif; padding: 7px 16px; cursor: pointer; }
.bn-seg.on { background: var(--accent); color: #111; }
.bn-field { display: grid; grid-template-columns: 90px minmax(0, 1fr) 56px; align-items: center; gap: 8px; font-size: 13px; }
.bn-field input[type=range] { width: 100%; accent-color: var(--accent); }
.bn-field output { white-space: nowrap; overflow: hidden; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.bn-tools, .bn-presets, .bn-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.bn-chip { border: 1px solid var(--edge); border-radius: 999px; background: transparent; color: var(--fg); font: 600 12px "WP Emoji", system-ui, sans-serif; padding: 5px 12px; cursor: pointer; }
.bn-chip.on { background: var(--accent); color: #111; border-color: transparent; }
.bn-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.bn-sw.on { border-color: var(--fg); }
.bn-field input[type=color] { grid-column: 2 / 4; width: 60px; height: 32px; padding: 0; border: 1px solid var(--edge); border-radius: 6px; background: none; cursor: pointer; }
.bn-check { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: auto; font-size: 13px; cursor: pointer; }
.bn-check input { accent-color: var(--accent); width: auto; margin: 0; flex: none; }
.bn-meter { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.bn-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bn-bar i { display: block; height: 100%; width: 0; background: #3f9a62; transition: width 0.2s; }
.bn-bar i[data-pct="80"], .bn-bar i[data-pct="81"], .bn-bar i[data-pct="82"], .bn-bar i[data-pct="83"], .bn-bar i[data-pct="84"], .bn-bar i[data-pct="85"], .bn-bar i[data-pct="86"], .bn-bar i[data-pct="87"], .bn-bar i[data-pct="88"], .bn-bar i[data-pct="89"], .bn-bar i[data-pct="90"], .bn-bar i[data-pct="91"], .bn-bar i[data-pct="92"], .bn-bar i[data-pct="93"], .bn-bar i[data-pct="94"], .bn-bar i[data-pct="95"], .bn-bar i[data-pct="96"], .bn-bar i[data-pct="97"] { background: #d1a23a; }
.bn-bar i.bad { background: #c0453e; }
.bn-foot { position: sticky; bottom: 0; background: var(--card); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); }
.bn-status { margin: 0; font-size: 13px; color: var(--muted); min-height: 18px; flex: 1 1 200px; }
.bn-status.bad { color: #ff9b9b; }
.bn-status.ok { color: #8fe3a4; }
.bn-status.warn { color: #f0c36a; }
.bn-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.bn-btn { border: 1px solid var(--edge); border-radius: 10px; background: var(--card3); color: var(--fg); font: 700 14px "WP Emoji", system-ui, sans-serif; padding: 9px 16px; cursor: pointer; }
.bn-btn.small { font-size: 12px; padding: 6px 10px; border-radius: 8px; }
.bn-btn.main { background: var(--accent); color: #111; border-color: transparent; }
.bn-btn.danger { color: #ffb4bc; border-color: #6a3138; background: transparent; }
.bn-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.bn-btn:focus-visible, .bn-seg:focus-visible, .bn-chip:focus-visible, .bn-sw:focus-visible, .bn-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bn-back [hidden], .bn-dlg [hidden] { display: none !important; }
@media (max-width: 820px) { .bn-body { grid-template-columns: minmax(0, 1fr); } .bn-right { border-left: 0; border-top: 1px solid var(--line); } .bn-field { grid-template-columns: 80px minmax(0, 1fr) 38px; } }
@media (max-width: 520px) { .bn-empty b { font-size: 14px; } .bn-empty small:last-of-type { display: none; } }
.pf-takedown { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); }
