/* Hearth's look for hearth.hexwork.co.uk (layout_hearth.php): Hexwork's brand red (#C8102E) and link pink (#FF4D6A)
   on near-black (#09070A), Syne for headings, Geist for text. Dark only. Standalone and phone first: nothing scrolls
   sideways at 320px. The bots' marks are transparent PNGs with their glow kept, so they sit straight on the page. */
:root {
  color-scheme: dark;
  --link: #FF4D6A;
  --link-hi: #FF7A90;
  --red: #C8102E;
  --red-deep: #A50D26;
  --ink: #F6F1F3;
  --muted: #ABA0A6;
  --paper: #09070A;
  --card: #110E13;
  --raised: #19141B;
  --rule: #2A222C;
  --rule-strong: #43374A;
  --ok: #4ADE80;
  --warn: #FBBF24;
  --bad: #FF6B6B;
  --display: "Syne", "Arial Black", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--link);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 400 1rem/1.55 var(--body); color: var(--ink); background: var(--paper); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hi); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 20; padding: 8px 12px; background: var(--raised); color: var(--ink); border-radius: 8px; }
.skip:focus { top: 8px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--raised); color: var(--ink); font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s; white-space: nowrap; }
.btn:hover { background: #241C27; border-color: #5C4C63; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 1px rgba(255, 77, 106, 0.3), 0 10px 30px -10px rgba(200, 16, 46, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.btn-quiet { background: transparent; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 0.92rem; }
.btn-big { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.btn-discord { background: #5865F2; border-color: #5865F2; color: #fff; }
.btn-discord:hover { background: #4752C4; border-color: #4752C4; color: #fff; }
.bws-dmark { width: 20px; height: 20px; flex-shrink: 0; }
.btn-small .bws-dmark { width: 17px; height: 17px; }

/* ---- Messages ---- */
.flash { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--rule-strong); background: var(--card); }
.flash-ok { border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.07); }
.flash-error { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.08); }

/* ---- The frame ---- */
.hs-top { position: sticky; top: 0; z-index: 10; background: rgba(9, 7, 10, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.hs-top-in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hs-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 800 1.3rem/1 var(--display); flex-shrink: 0; }
.hs-brand b { color: var(--link); font-weight: 800; }
.hs-brand:hover { color: var(--ink); }
.hs-nav { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hs-nav-link { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.hs-nav-link:hover, .hs-nav-link.is-here { color: var(--ink); }
.hs-me { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hs-me img, .hs-me-init { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.hs-me-init { display: inline-grid; place-items: center; background: var(--raised); border: 1px solid var(--rule-strong); font-weight: 700; font-size: 0.85rem; }
.hs-me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; font-size: 0.95rem; }
.hs-signout { margin: 0; }
.hs-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 16px 56px; }
.hs-foot { border-top: 1px solid var(--rule); padding: 20px 16px; color: var(--muted); font-size: 0.9rem; }
.hs-foot p { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }

/* ---- Landing ---- */
.hs-hero { text-align: center; max-width: 720px; margin: 8px auto 40px; }
.hs-hero-mark { width: 168px; height: 168px; display: block; margin: 0 auto 4px; }
.hs-kicker { color: var(--link); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.82rem; margin-bottom: 6px; }
.hs-hero h1 { font-size: clamp(2.6rem, 11vw, 4.4rem); margin-bottom: 14px; }
.hs-hero h1 span { color: var(--link); }
.hs-lede { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 24px; }
.hs-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hs-note { margin: 18px auto 0; max-width: 520px; color: var(--muted); font-size: 0.95rem; padding: 12px 16px; border: 1px dashed var(--rule-strong); border-radius: 12px; }
.hs-bot-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.hs-bot-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.hs-bot-card img { width: 72px; height: 72px; flex-shrink: 0; margin: -6px -4px -6px -6px; }
.hs-bot-card h3 { margin-bottom: 6px; font-size: 1.15rem; }
.hs-bot-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) {
  .hs-bot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hs-bot-card { flex-direction: column; gap: 10px; }
  .hs-bot-card img { margin: -6px 0 -4px -8px; }
}
.hs-bot-card.is-soon img { opacity: 0.6; filter: saturate(0.6); }
.hs-job { display: inline-block; font: 600 0.72rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); vertical-align: 3px; margin-left: 4px; }
.hs-chip { display: inline-block; font: 600 0.72rem/1 var(--body); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--muted); vertical-align: 2px; }

/* ---- Pages ---- */
.hs-page { max-width: 900px; margin: 0 auto; }
.hs-sub { color: var(--muted); margin-top: -4px; }
.hs-fine { color: var(--muted); font-size: 0.88rem; margin: 10px 0 0; }
.hs-back { margin: 0 0 14px; font-size: 0.95rem; }
.hs-back a { text-decoration: none; }
.hs-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.hs-message { max-width: 520px; margin: 24px auto; text-align: center; }
.hs-message img { display: block; margin: 0 auto 8px; }
.hs-empty { margin-top: 12px; }

/* ---- Your servers ---- */
.hs-guilds { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.hs-guild { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.hs-guild-main { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.hs-guild-main:hover .hs-guild-name { color: var(--link); }
.hs-gicon { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.hs-gicon-lg { width: 64px; height: 64px; }
.hs-ginit { display: inline-grid; place-items: center; background: var(--raised); border: 1px solid var(--rule-strong); font: 800 1.2rem/1 var(--display); color: var(--ink); }
.hs-guild-text { display: flex; flex-direction: column; min-width: 0; }
.hs-guild-name { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-guild-role { color: var(--muted); font-size: 0.88rem; }
.hs-mini { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.hs-mini-bot > a, .hs-mini-bot > span { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--rule); background: var(--paper); text-decoration: none; }
.hs-mini-bot img { width: 32px; height: 32px; }
.hs-mini-bot.is-in > span { border-color: rgba(255, 77, 106, 0.45); background: rgba(200, 16, 46, 0.1); }
.hs-mini-bot.is-out img, .hs-mini-bot.is-na img, .hs-mini-bot.is-soon img, .hs-mini-bot.is-unknown img { filter: grayscale(1); opacity: 0.38; }
.hs-mini-bot.is-out > a { border-style: dashed; border-color: var(--rule-strong); }
.hs-mini-bot.is-out > a:hover { border-color: var(--link); }
.hs-mini-bot.is-out > a:hover img { filter: none; opacity: 1; }
.hs-mini-add { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font: 700 0.62rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 999px; background: var(--red); color: #fff; }

/* ---- A server's home ---- */
.hs-server-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; min-width: 0; }
.hs-server-head > div { min-width: 0; }
.hs-server-head h1 { margin-bottom: 4px; }
.hs-server-head .hs-sub { margin: 0; }
.hs-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.hs-botcard { display: flex; flex-direction: column; }
.hs-botcard.is-in { border-color: rgba(255, 77, 106, 0.35); box-shadow: 0 0 0 1px rgba(255, 77, 106, 0.08), 0 24px 60px -40px rgba(200, 16, 46, 0.9); }
.hs-botcard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hs-botcard-head img { width: 56px; height: 56px; flex-shrink: 0; margin: -4px; }
.hs-botcard.is-out .hs-botcard-head img, .hs-botcard.is-na .hs-botcard-head img, .hs-botcard.is-soon .hs-botcard-head img, .hs-botcard.is-unknown .hs-botcard-head img { filter: grayscale(1); opacity: 0.45; }
.hs-botcard h2 { margin: 0 0 6px; }
.hs-botcard-line { color: var(--muted); font-size: 0.95rem; }
.hs-pills { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hs-pill { display: inline-block; font: 600 0.78rem/1 var(--body); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--muted); }
.hs-pill.is-ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.07); }
.hs-pill.is-warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.45); }
.hs-pill.is-premium { color: #fff; border-color: var(--red); background: var(--red); }
.hs-check-h { font-size: 0.95rem; margin: 4px 0 8px; }
.hs-check { margin: 0 0 12px; padding-left: 1.3em; font-size: 0.95rem; }
.hs-check li { margin-bottom: 6px; }
.hs-check li::marker { color: var(--link); font-weight: 700; }
.hs-acts { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.hs-acts .hs-fine { margin: 0; }

/* ---- Banner inside Hearth (views/hearth/banner/) ---- */
.flash-warn { border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.07); }
.flash ul, .hb-limit ul { margin: 6px 0 0; padding-left: 1.2em; }
.flash p:last-child, .hb-limit p:last-child { margin-bottom: 0; }
.hb-page { max-width: 900px; }
.hb-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; min-width: 0; }
.hb-head img { width: 64px; height: 64px; flex-shrink: 0; margin: -6px; }
.hb-head > div { min-width: 0; }
.hb-head h1 { margin-bottom: 4px; }
.hb-head .hs-sub { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; overflow-wrap: anywhere; }
.hb-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.hb-tabs::-webkit-scrollbar { display: none; }
.hb-tabs a { flex-shrink: 0; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.hb-tabs a:hover { color: var(--ink); }
.hb-tabs a.is-here { color: var(--ink); border-bottom-color: var(--red); }
.hb-problems { margin: 0 0 16px; padding: 14px 16px; border: 1px solid rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.07); border-radius: var(--radius); }
.hb-problems h2 { font-size: 1.02rem; color: var(--warn); margin: 0; display: inline; }
.hb-problems summary { cursor: pointer; list-style-position: outside; margin-left: 1.1em; color: var(--warn); }
.hb-problems[open] summary { margin-bottom: 8px; }
.hb-problems ul { margin: 0; padding-left: 1.2em; }
.hb-problems li { margin-bottom: 6px; }
.hb-problems .hs-fine { margin-top: 6px; }
.hb-when { display: block; color: var(--muted); font-size: 0.82rem; }
.hb-plan { margin: 0 0 16px; padding: 14px 16px; border: 1px dashed var(--rule-strong); border-radius: var(--radius); }
.hb-plan h2 { font-size: 1.02rem; margin-bottom: 8px; }
.hb-plan-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hb-plan-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hb-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.hb-jump a { padding: 6px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 0.9rem; text-decoration: none; color: var(--ink); }
.hb-jump a:hover { border-color: var(--link); color: var(--ink); }
.hb-sec { margin-bottom: 16px; scroll-margin-top: 76px; min-width: 0; }
.hb-sec > h2 { margin-bottom: 4px; }
.hb-sec h3 { margin: 22px 0 8px; font-size: 1rem; }
.hb-sec-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.hb-sec-head h2 { margin: 0; }
.hb-note { padding: 10px 14px; border-left: 3px solid var(--link); background: var(--raised); border-radius: 0 10px 10px 0; font-size: 0.95rem; }
.hb-limit { margin: 0 0 14px; padding: 12px 16px; border: 1px solid rgba(255, 77, 106, 0.55); background: rgba(200, 16, 46, 0.1); border-radius: 12px; }
.hb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.hb-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; min-width: 0; }
.hb-field > label, .hb-sec legend { font-weight: 600; font-size: 0.95rem; }
.hb-field small, .hb-check small, .hb-choice small { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.hb-opt { color: var(--muted); font-weight: 400; }
.hs input[type=text], .hs input[type=number], .hs input[type=datetime-local], .hs select, .hs textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font: 400 1rem/1.4 var(--body); }
.hs textarea { resize: vertical; min-height: 88px; }
.hs select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
.hs input:focus-visible, .hs select:focus-visible, .hs textarea:focus-visible { border-color: var(--link); box-shadow: 0 0 0 3px rgba(255, 77, 106, 0.25); border-radius: 10px; }
.hs [aria-invalid=true] { border-color: var(--bad); }
.hs input[type=datetime-local] { color-scheme: dark; }
.hs input[type=checkbox], .hs input[type=radio] { accent-color: var(--red); width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.hb-err { margin: 0; color: var(--bad); font-size: 0.88rem; font-weight: 600; }
.hb-warn { margin: 0; color: var(--warn); font-size: 0.85rem; }
.hb-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; cursor: pointer; min-width: 0; }
.hb-check > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.hb-check-lead { padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--raised); margin-top: 12px; }
.hb-check.is-locked { cursor: default; color: var(--muted); }
.hb-inline { display: inline !important; color: var(--muted); font-size: 0.78rem; text-transform: none; }
.hb-picklist { max-height: 240px; overflow-y: auto; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0 14px; }
.hb-pick { margin: 6px 0; }
.hb-pick.is-cat span { font-size: 0.8rem; letter-spacing: 0.05em; font-weight: 700; color: var(--muted); flex-direction: row; gap: 6px; flex-wrap: wrap; }
.hb-pick > span { flex-direction: row; align-items: center; gap: 6px; }
.hb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.hb-rows { display: grid; gap: 10px; }
.hb-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; align-items: end; gap: 0 12px; padding: 12px 14px 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--raised); min-width: 0; margin: 0; }
.hb-row-reward { grid-template-columns: 110px minmax(0, 1fr) auto; }
.hb-row.is-unused { border-style: dashed; opacity: 0.8; }
.hb-row-boost { display: block; padding: 10px 14px 4px; }
.hb-row-boost legend { padding: 0 6px; margin-left: -6px; }
.hb-remove { margin-bottom: 24px; color: var(--muted); font-size: 0.9rem; }
.hb-row-boost .hb-remove { margin-bottom: 12px; }
.hb-kind { display: flex; gap: 20px; margin-bottom: 4px; }
.hb-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hb-day { position: relative; }
.hb-day input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hb-day span { display: inline-grid; place-items: center; min-width: 46px; min-height: 40px; padding: 0 8px; border: 1px solid var(--rule-strong); border-radius: 10px; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.hb-day input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.hb-day input:focus-visible + span { box-shadow: var(--focus); }
.hb-choices { border: 0; padding: 0; margin: 12px 0 14px; display: grid; gap: 8px; min-width: 0; }
.hb-choices legend { margin-bottom: 8px; }
.hb-choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; cursor: pointer; min-width: 0; }
.hb-choice > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hb-choice:has(input:checked) { border-color: rgba(255, 77, 106, 0.6); background: rgba(200, 16, 46, 0.08); }
.hb-save { display: flex; justify-content: flex-end; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--rule); }
.hb-ph { margin-top: 4px; }
.hb-ph-list { list-style: none; margin: 6px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 6px 14px; }
.hb-ph-list li { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); min-width: 0; }
.hb-ph-btn { flex-shrink: 0; padding: 5px 9px; min-height: 32px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--raised); color: var(--link); cursor: pointer; font: inherit; }
.hb-ph-btn:hover { border-color: var(--link); }
.hb-ph-btn code { font-size: 0.85rem; }
.hb-preview { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 26px 14px 12px; border-radius: 12px; background: #313338; color: #DBDEE1; margin-top: 6px; }
.hb-preview img { width: 36px; height: 36px; border-radius: 50%; background: #1E1F22; flex-shrink: 0; }
.hb-preview p { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.hb-preview-label { position: absolute; top: 6px; left: 14px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #949BA4; }
.hb-mention { background: rgba(88, 101, 242, 0.3); color: #C9CDFB; padding: 0 2px; border-radius: 3px; }
.hb-designs-set { border: 0; padding: 0; margin: 12px 0 10px; min-width: 0; }
.hb-designs-set legend { margin-bottom: 8px; }
.hb-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.hb-design { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--rule); border-radius: 12px; cursor: pointer; min-width: 0; }
.hb-design input { position: absolute; top: 14px; right: 14px; }
.hb-design:has(input:checked) { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.hb-design.is-locked { cursor: not-allowed; }
.hb-design.is-locked .hb-design-art { filter: grayscale(0.7); opacity: 0.55; }
.hb-design-name { font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hb-design small { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.hb-design-art { position: relative; display: block; height: 64px; border-radius: 8px; overflow: hidden; background: #1A1418; margin-bottom: 4px; }
.hb-design-art i { position: absolute; left: 10px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); }
.hb-design-art b { position: absolute; left: 10px; right: 30px; bottom: 12px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) 62%, rgba(255, 255, 255, 0.12) 62%); }
.is-minimal .hb-design-art { background: #F3EFF1; }
.is-minimal .hb-design-art b { height: 2px; }
.is-bold .hb-design-art b { height: 12px; border-radius: 6px; }
.is-bold .hb-design-art i { width: 34px; height: 34px; border-radius: 10px; }
.is-aurora .hb-design-art { background: radial-gradient(circle at 20% 20%, rgba(74, 222, 128, 0.55), transparent 55%), radial-gradient(circle at 80% 40%, rgba(129, 140, 248, 0.6), transparent 55%), #0B0B1A; }
.is-midnight .hb-design-art { background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1px 1px at 50% 70%, #fff, transparent), linear-gradient(160deg, #0A1238, #050816); }
.hb-lock-chip { display: inline-flex; align-items: center; gap: 4px; margin: 0; font: 600 0.72rem/1 var(--body); padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255, 77, 106, 0.5); color: var(--link); background: rgba(200, 16, 46, 0.1); white-space: nowrap; width: max-content; }
.hb-accent-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.hb-accent-row .hb-check { margin: 0; }
.hs input[type=color] { width: 64px; height: 44px; padding: 3px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--paper); cursor: pointer; }
/* Leaderboard */
.hb-seg { display: inline-flex; padding: 3px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper); max-width: 100%; }
.hb-seg a { padding: 7px 14px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
.hb-seg a:hover { color: var(--ink); }
.hb-seg a.is-here { background: var(--red); color: #fff; }
.hb-board { list-style: none; margin: 12px 0 0; padding: 0; }
.hb-board-head, .hb-board-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 64px 130px; align-items: center; gap: 10px; padding: 8px 10px; }
.hb-board-head { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; border-bottom: 1px solid var(--rule); }
.hb-board-head span:nth-child(3), .hb-board-head span:nth-child(4), .hb-lvl, .hb-xp { text-align: right; }
.hb-board-row { border-bottom: 1px solid var(--rule); }
.hb-board-row:last-child { border-bottom: 0; }
.hb-rank { font: 700 1.05rem/1 var(--body); font-variant-numeric: tabular-nums; color: var(--muted); text-align: center; }
.is-top .hb-rank { color: var(--ink); }
.is-top1 .hb-rank { color: #FBBF24; }
.hb-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.hb-who:hover .hb-who-name { color: var(--link); }
.hb-who img, .hb-av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.hb-av { display: inline-grid; place-items: center; background: var(--raised); border: 1px solid var(--rule-strong); font-weight: 700; }
.hb-av-lg { width: 56px; height: 56px; font-size: 1.3rem; }
.hb-who-text { display: flex; flex-direction: column; min-width: 0; }
.hb-who-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-who-user { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-lvl { font-weight: 700; }
.hb-xp { font-weight: 600; display: flex; flex-direction: column; align-items: flex-end; }
.hb-unit { display: none; }
.hb-total { color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.hb-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 0.9rem; }
.hb-empty { padding: 20px 0 4px; text-align: center; }
/* Members */
.hb-lookup-row { display: flex; gap: 10px; }
.hb-lookup-row input { flex: 1; }
.hb-member-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; min-width: 0; }
.hb-member-head img { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.hb-member-head > div { min-width: 0; }
.hb-member-head h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.hb-member-head .hs-sub { margin: 0; }
.hb-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 0 0 14px; }
.hb-stats > div { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--raised); }
.hb-stats dt { color: var(--muted); font-size: 0.8rem; }
.hb-stats dd { margin: 2px 0 0; font: 700 1.3rem/1.2 var(--body); font-variant-numeric: tabular-nums; }
.hb-bar { height: 10px; border-radius: 5px; background: var(--raised); border: 1px solid var(--rule); overflow: hidden; }
.hb-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--link)); }
.hb-progress .hs-fine { margin-top: 6px; }
.hb-xp-form { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--rule); }
.hb-seg-radio { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 3px; margin: 0 0 14px; background: var(--paper); }
.hb-seg-radio label { position: relative; }
.hb-seg-radio input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hb-seg-radio span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.hb-seg-radio input:checked + span { background: var(--red); color: #fff; }
.hb-seg-radio input:focus-visible + span { box-shadow: var(--focus); }
.hb-narrow { max-width: 180px; }
/* Import */
.hs-pill.is-bad { color: var(--bad); border-color: rgba(255, 107, 107, 0.5); }
.hb-import-status .hb-stats { margin-top: 10px; }

@media (max-width: 640px) {
  .hb-grid { grid-template-columns: minmax(0, 1fr); }
  .hb-row, .hb-row-reward { grid-template-columns: minmax(0, 1fr) 96px; align-items: start; }
  .hb-row-reward .hb-narrow { order: 2; }
  .hb-row-reward > .hb-field:not(.hb-narrow) { order: 1; }
  .hb-row .hb-remove { grid-column: 1 / -1; margin: -4px 0 12px; order: 3; }
  .hb-narrow { max-width: none; }
  .hb-board-head { display: none; }
  .hb-board-row { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "rank who xp" "rank who lvl"; row-gap: 0; padding: 10px 4px; }
  .hb-rank { grid-area: rank; }
  .hb-who { grid-area: who; }
  .hb-xp { grid-area: xp; }
  .hb-lvl { grid-area: lvl; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
  .hb-lvl::before { content: "Level "; }
  .hb-lvl .visually-hidden { display: none; }
  .hb-unit { display: inline; color: var(--muted); font-weight: 400; font-size: 0.82rem; }
  .hb-xp { flex-direction: row; gap: 4px; align-items: baseline; }
  .hb-total { display: none; }
  .hb-seg { width: 100%; }
  .hb-seg a { flex: 1; justify-content: center; padding: 7px 8px; }
  .hb-save .btn { width: 100%; }
  .hb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .hs-main { padding-top: 20px; }
  .hs-guild { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main open" "bots bots"; row-gap: 12px; }
  .hs-guild-main { grid-area: main; }
  .hs-guild-open { grid-area: open; }
  .hs-mini { grid-area: bots; }
  .hs-me-name { display: none; }
  .hs-cards { grid-template-columns: minmax(0, 1fr); }
  .hs-bot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .hs-me { display: none; }
  .hs-brand span { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
