/* ==========================================================================
   Simlocks platform: public tools + private account area.
   Same tokens as site.css (palette, fonts, notch/rough buttons). No new hues:
   team A = brass, team B = violet, success = patina.
   ========================================================================== */

/* ---------- shared primitives ---------- */
.icon-sm { height: 32px; min-width: 32px; padding: 0 6px; }
.icon-sm svg { width: 15px; height: 15px; }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(226, 92, 75, .1); }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }
.btn-block { width: 100%; }
.btn-xl { min-height: 64px; padding-inline: 40px; font-size: 1.1rem; letter-spacing: .04em; }
.btn-xl svg { width: 24px; height: 24px; }
.btn-danger { color: #fff; }
.btn-danger::before { background: linear-gradient(180deg, #ea7466, var(--danger)) !important; }
.btn.is-busy { pointer-events: none; }
.btn:hover svg[aria-hidden] use[href="#a-save"], .btn:hover .spinner { transform: none; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; background: none; border: 0; color: var(--violet); font: 500 var(--fs-small)/1.3 var(--font-body); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(185, 163, 255, .35); text-underline-offset: 3px; }
.link-btn:hover { color: var(--fg); text-decoration-color: currentColor; }
.link-btn svg { width: 15px; height: 15px; }
.link-btn[disabled] { opacity: .4; cursor: not-allowed; }
.inline-ic { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rchip, .lchip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; font: 500 .7rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--border); color: var(--fg-2); background: rgba(12, 10, 9, .55); }
.lchip.l-spirit { color: var(--spirit); border-color: color-mix(in srgb, var(--spirit) 45%, transparent); }
.lchip.l-weapon { color: var(--weapon); border-color: color-mix(in srgb, var(--weapon) 45%, transparent); }
.lchip.l-hybrid { color: var(--brass); border-color: var(--brass-a25); }
.ph-portrait, .ph-item { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font: 700 1rem/1 var(--font-display); text-transform: uppercase; }
.ph-portrait svg, .ph-item svg { width: 50%; height: 50%; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; font: 500 .72rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--border); color: var(--fg-2); vertical-align: middle; }
.badge svg { width: 12px; height: 12px; }
.badge.ok { color: var(--patina); border-color: rgba(95, 168, 138, .45); background: rgba(95, 168, 138, .08); }
.badge.warn { color: var(--warn); border-color: rgba(231, 181, 74, .45); background: rgba(231, 181, 74, .08); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 var(--s-4); border: 1px solid var(--border); border-left: 3px solid var(--info); background: var(--surface); font-size: var(--fs-small); color: var(--fg-2); }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--info); }
.notice p { margin: 0; }
.notice-warn { border-left-color: var(--warn); } .notice-warn svg { color: var(--warn); }
.notice-danger { border-left-color: var(--danger); background: rgba(226, 92, 75, .06); } .notice-danger svg { color: var(--danger); }
.spinner { display: inline-block; width: 16px; height: 16px; flex: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: slk-spin .7s linear infinite; opacity: .8; }
@keyframes slk-spin { to { transform: rotate(360deg); } }
.tool-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 180px; padding: var(--s-6); color: var(--muted); font: 500 var(--fs-small)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.tool-loading .spinner { width: 22px; height: 22px; color: var(--brass); }
.empty-state.slim { padding: var(--s-6) var(--s-4); }
.empty-state.slim h3 { font-size: 1.25rem; }
.empty-state p { margin: 0 auto; max-width: 52ch; }
.empty-state code { color: var(--brass-hi); }
.empty-state .btn { margin-top: var(--s-5); }
.empty-state.err { border-color: rgba(226, 92, 75, .45); }
.data-note { display: flex; gap: 10px; align-items: flex-start; margin: var(--s-5) 0 0; padding: 12px 14px; border: 1px dashed var(--border); color: var(--muted); font-size: var(--fs-small); line-height: 1.55; }
.data-note svg { width: 18px; height: 18px; flex: none; color: var(--brass); margin-top: 2px; }
.data-note b { color: var(--fg-2); font-weight: 600; }
.src { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-right: 4px; font: 500 .62rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; vertical-align: middle; border: 1px solid; }
.src-kit { color: var(--patina); border-color: rgba(95, 168, 138, .5); }
.src-rule { color: var(--violet); border-color: rgba(185, 163, 255, .45); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap thead th { font: 500 var(--fs-caption)/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--brass); background: var(--surface); }
.table-wrap tbody th { font-weight: 600; color: var(--fg); white-space: nowrap; }
.table-wrap tbody tr:hover { background: rgba(236, 228, 214, .025); }

/* ---------- favorites star (site-wide) ---------- */
.fav-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 11px; border: 1px solid var(--border); background: rgba(12, 10, 9, .5); color: var(--fg-2); font: 500 var(--fs-small)/1 var(--font-body); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.fav-btn svg { width: 17px; height: 17px; fill: transparent; transition: fill .25s, transform .4s var(--ease-out); }
.fav-btn:hover { color: var(--fg); border-color: var(--brass); }
.fav-btn:hover svg { transform: rotate(-12deg) scale(1.1); }
.fav-btn[aria-pressed="true"] { color: var(--brass-hi); border-color: var(--brass); background: var(--brass-a10); }
.fav-btn[aria-pressed="true"] svg { fill: var(--brass); color: var(--brass); }
.fav-btn[disabled] { opacity: .6; cursor: progress; }
.fav-btn.pop svg { animation: fav-pop .55s var(--ease-out); }
@keyframes fav-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45) rotate(-18deg); } 100% { transform: scale(1); } }
.fav-sm { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
.item-card .fav-sm { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; }
.item-card .item-card-body h3 { padding-right: 36px; }

/* ---------- header account button ---------- */
.acct-av { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); color: var(--fg-2); }
.acct-av svg { width: 17px; height: 17px; }
.acct-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.av-initial { font: 800 1rem/1 var(--font-display); color: var(--brass); }
.acct-av-lg { width: 40px; height: 40px; }
.acct-av-xl { width: 76px; height: 76px; border: 2px solid var(--brass); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--brass-a25); }
.acct-av-xl .av-initial { font-size: 2rem; }
.acct-btn { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 4px; border: 1px solid var(--border); border-radius: 22px; color: var(--fg); background: rgba(19, 17, 15, .4); font: 500 var(--fs-small)/1 var(--font-body); transition: border-color .2s, background .2s; white-space: nowrap; }
.acct-btn:hover { border-color: var(--brass); background: var(--brass-a10); }
.acct-btn .acct-av { width: 30px; height: 30px; }
.acct-btn.is-in .acct-av { border-color: var(--brass); }
.acct-txt { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 719px) { .acct-btn { padding: 0 4px; border-radius: 50%; width: 40px; justify-content: center; } .acct-btn .acct-txt { display: none; } }
.drawer-acct { display: flex; align-items: center; gap: 12px; margin: var(--s-4) 0 0; padding: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); }
.drawer-acct .acct-av { width: 42px; height: 42px; }
.drawer-acct b { display: block; font-weight: 600; }
.drawer-acct small { display: block; color: var(--muted); font-size: var(--fs-caption); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 400; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; background: rgba(28, 25, 22, .97); border: 1px solid var(--border); border-left: 3px solid var(--patina); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); color: var(--fg); font-size: var(--fs-small); pointer-events: auto; opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .3s var(--ease-out), transform .4s var(--ease-out); backdrop-filter: blur(10px); }
.toast.in { opacity: 1; transform: none; }
.toast svg { width: 18px; height: 18px; flex: none; color: var(--patina); }
.toast span { flex: 1; }
.toast-error { border-left-color: var(--danger); } .toast-error svg { color: var(--danger); }
.toast-action { flex: none; padding: 6px 10px; border: 1px solid var(--border); color: var(--brass-hi); font: 600 var(--fs-caption)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.toast-action:hover { border-color: var(--brass); }

/* ---------- modal ---------- */
.slk-modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--border); background: var(--surface); color: var(--fg); box-shadow: 0 40px 90px rgba(0, 0, 0, .65), 0 0 0 1px rgba(201, 162, 77, .08); overflow: hidden; }
.slk-modal[open] { display: flex; flex-direction: column; animation: modal-in .38s var(--ease-out); }
.slk-modal.closing { animation: modal-out .18s ease-in forwards; }
.slk-modal::backdrop { background: rgba(8, 7, 6, .72); backdrop-filter: blur(6px); animation: fade-in .3s; }
.slk-modal.closing::backdrop { opacity: 0; transition: opacity .18s; }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
.slk-modal-inner { position: relative; padding: 28px 28px 26px; overflow-y: auto; overscroll-behavior: contain; }
.slk-modal-inner::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--brass), var(--violet) 60%, transparent); }
.slk-modal h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); text-transform: uppercase; padding-right: 44px; margin-bottom: 8px; }
.slk-modal .eyebrow { margin-bottom: 10px; }
.slk-modal-text { color: var(--fg-2); font-size: var(--fs-ui); margin-bottom: var(--s-5); }
.slk-modal-x { position: absolute; top: 16px; right: 16px; z-index: 2; }
.slk-modal-body { margin-top: var(--s-4); }
.slk-modal-sm { width: min(440px, calc(100vw - 24px)); }
.slk-modal-wide { width: min(980px, calc(100vw - 24px)); }
.slk-modal-xl { width: min(1180px, calc(100vw - 24px)); }
@media (max-width: 599px) {
  .slk-modal { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-width: 1px 0 0; }
  .slk-modal[open] { animation: sheet-in .38s var(--ease-out); }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .slk-modal-inner { padding: 22px 16px 20px; }
}

/* ---------- forms ---------- */
.fld { display: grid; gap: 6px; margin-bottom: var(--s-4); min-width: 0; }
.fld > label, .fld-label { font: 500 var(--fs-small)/1.3 var(--font-body); color: var(--fg); }
.fld-hint { color: var(--muted); font-weight: 400; font-size: var(--fs-caption); margin-left: 4px; }
.fld .input { width: 100%; }
textarea.input { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; min-height: 56px; }
.fld.has-err .input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(226, 92, 75, .18); }
.fld-err { margin: 0; color: #f08a7d; font-size: var(--fs-caption); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); }
.form-error { margin: 0 0 var(--s-4); padding: 10px 12px; border: 1px solid rgba(226, 92, 75, .5); background: rgba(226, 92, 75, .08); color: #f4a196; font-size: var(--fs-small); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: var(--s-5); }
.sel { height: 44px; padding-right: 36px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-2) 50%), linear-gradient(135deg, var(--fg-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.sel-sm { height: 32px; font-size: var(--fs-small); padding: 0 28px 0 10px; background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; }
.switch { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; font-size: var(--fs-small); color: var(--fg); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { position: relative; flex: none; width: 40px; height: 22px; margin-top: 1px; border-radius: 12px; background: var(--ink-deep); border: 1px solid var(--border); transition: background .25s, border-color .25s; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .3s var(--ease-out), background .25s; }
.switch input:checked + .sw { background: var(--brass-a25); border-color: var(--brass); }
.switch input:checked + .sw::after { transform: translateX(18px); background: var(--brass-hi); }
.switch input:focus-visible + .sw { box-shadow: var(--focus); }
.switch input:disabled + .sw { opacity: .55; }
.switch small { display: block; color: var(--muted); font-size: var(--fs-caption); margin-top: 2px; }
.switch.sm { padding: 0; align-items: center; white-space: nowrap; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-small); color: var(--fg-2); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .ck { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1px solid var(--border); background: var(--ink-deep); transition: background .2s, border-color .2s; }
.check .ck svg { width: 13px; height: 13px; color: var(--brass-ink); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--ease-out); }
.check input:checked + .ck { background: var(--patina); border-color: var(--patina); }
.check input:checked + .ck svg { opacity: 1; transform: none; }
.check input:checked ~ span:last-child { color: var(--fg); text-decoration: line-through; text-decoration-color: rgba(95, 168, 138, .7); }
.check input:focus-visible + .ck { box-shadow: var(--focus); }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; align-items: end; }
.stepper .fld { margin: 0; }
.stepper .icon-btn { height: 48px; font-size: 1.3rem; }
.stepper input { text-align: center; font: 600 1.3rem/1 var(--font-mono); }

/* ---------- auth form + gate ---------- */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: var(--s-5); border-bottom: 1px solid var(--border); }
.auth-tabs button { position: relative; height: 46px; background: none; border: 0; color: var(--muted); font: 600 var(--fs-ui)/1 var(--font-body); cursor: pointer; transition: color .2s; }
.auth-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brass); transform: scaleX(0); transition: transform .4s var(--ease-out); }
.auth-tabs button[aria-selected="true"] { color: var(--fg); }
.auth-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.auth-head { margin-bottom: var(--s-5); }
.auth-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); text-transform: uppercase; margin-bottom: 8px; }
.auth-head p { color: var(--fg-2); margin: 0; }
.auth-form .btn { margin-top: var(--s-2); }
.auth-foot { margin-top: var(--s-4); text-align: center; }
.auth-legal { margin: 0; color: var(--muted); font-size: var(--fs-caption); line-height: 1.5; }
.auth-done { text-align: center; padding: var(--s-4) 0; }
.auth-done .big-ic { width: 56px; height: 56px; margin: 0 auto var(--s-4); color: var(--brass); }
.auth-done h2 { font-size: 2rem; text-transform: uppercase; margin-bottom: 8px; }
.auth-done p { color: var(--fg-2); }
.slk-modal-gate { width: min(820px, calc(100vw - 24px)); }
.gate { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 4px var(--s-6); align-items: start; }
.gate-art { grid-row: 1; grid-column: 1; min-height: 0; }
.gate-perks { grid-column: 1; grid-row: 2; list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-small); color: var(--fg-2); }
.gate-perks li { display: flex; gap: 8px; align-items: center; }
.gate-perks svg { width: 16px; height: 16px; color: var(--patina); flex: none; }
.gate-form { grid-column: 2; grid-row: 1 / span 2; }
.gate-art:empty { display: block; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 40%, var(--brass-a25), transparent 60%), url("img/game/backgrounds/home-hero.webp") center / cover; border: 1px solid var(--border); }
.gate-vs, .gate-team { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 18px 10px; border: 1px solid var(--border); background: radial-gradient(circle at 50% 50%, var(--brass-a10), transparent 70%), var(--ink-deep); }
.gate-vs img, .gate-vs .ph-portrait { width: 42%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 15%; border: 1px solid var(--border); }
.gate-vs img:first-child { border-color: var(--brass); transform: rotate(-4deg); }
.gate-vs img:last-child { border-color: var(--violet); transform: rotate(4deg); }
.gate-vs em { font: 900 1.6rem/1 var(--font-display); font-style: normal; color: var(--brass); }
.gate-team { flex-wrap: wrap; }
.gate-team img { width: calc(33% - 6px); aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 15%; border: 1px solid var(--border); }
@media (max-width: 719px) { .gate { grid-template-columns: 1fr; } .gate-art, .gate-perks, .gate-form { grid-column: 1; grid-row: auto; } .gate-art { display: none; } .gate-perks { margin: 0 0 var(--s-4); } }

/* ---------- save dialog previews ---------- */
.save-preview, .save-team, .save-draft { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 14px; margin-bottom: var(--s-4); border: 1px solid var(--border); background: var(--ink-deep); }
.save-preview em, .save-draft em { font: 800 1rem/1 var(--font-display); color: var(--brass); font-style: normal; text-transform: uppercase; }
.save-draft > span { display: flex; gap: 4px; }
.sp-ic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); }

/* ==========================================================================
   TOOLS HUB
   ========================================================================== */
.tools-hub { margin: var(--s-6) 0 var(--s-8); }
.tools-hub-head { max-width: 62ch; margin-bottom: var(--s-6); }
.tools-hub-head h2 { font-size: var(--fs-h2); text-transform: uppercase; margin-bottom: var(--s-3); }
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-4); }
.tool-card { grid-column: span 2; --c: var(--brass); }
.tool-card:nth-child(1), .tool-card:nth-child(2) { grid-column: span 3; }
.tool-card-violet { --c: var(--violet); } .tool-card-patina { --c: var(--patina); }
.tool-card-link { position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 55%), var(--surface); color: var(--fg); overflow: hidden; isolation: isolate; transition: border-color .3s, transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.tool-card-link::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at var(--mx, 70%) 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 55%); opacity: 0; transition: opacity .4s; }
.tool-card-link:hover { border-color: var(--c); transform: translateY(-4px); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
.tool-card-link:hover::after { opacity: 1; }
.tool-card-art { position: relative; display: block; height: 190px; overflow: hidden; border-bottom: 1px solid var(--border); background: radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%), var(--ink-deep); }
.tool-card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, var(--surface)); pointer-events: none; }
.ta { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.ta img { object-fit: cover; object-position: 50% 12%; transition: transform .7s var(--ease-out); }
.ta-vs img { width: 34%; height: 92%; }
.ta-vs img:first-child { transform: translateX(10%) rotate(-3deg); filter: drop-shadow(0 0 18px rgba(201, 162, 77, .35)); }
.ta-vs img:last-of-type { transform: translateX(-10%) rotate(3deg); filter: drop-shadow(0 0 18px rgba(185, 163, 255, .35)); }
.ta-vs em { position: absolute; z-index: 2; bottom: 34%; left: 50%; transform: translateX(-50%); font: 900 2.6rem/1 var(--font-display); font-style: normal; color: var(--brass-hi); text-shadow: 0 0 24px rgba(201, 162, 77, .6); }
.tool-card-link:hover .ta-vs img:first-child { transform: translateX(16%) rotate(-5deg); }
.tool-card-link:hover .ta-vs img:last-of-type { transform: translateX(-16%) rotate(5deg); }
.ta-team { gap: 0; padding: 0 6%; }
.ta-team img { width: 17%; height: 78%; margin: 0 -1%; border: 1px solid rgba(58, 52, 45, .9); }
.ta-team img:nth-child(odd) { height: 70%; }
.tool-card-link:hover .ta-team img { transform: translateY(-6px); }
.tool-card-link:hover .ta-team img:nth-child(even) { transform: translateY(-12px); }
.ta-random img { width: 46%; height: 96%; filter: grayscale(.6) brightness(.6) blur(1px); }
.ta-random em { position: absolute; bottom: 18%; font: 900 6rem/1 var(--font-display); font-style: normal; color: var(--violet); text-shadow: 0 0 40px rgba(185, 163, 255, .7); }
.tool-card-link:hover .ta-random img { filter: grayscale(0) brightness(.9); }
.ta-draft { gap: 10%; }
.ta-draft > span { display: flex; gap: 3px; height: 70%; }
.ta-draft img { width: 52px; height: 100%; border: 1px solid var(--brass); }
.ta-draft > span:last-child img { border-color: var(--violet); }
.ta-builds { flex-direction: column; justify-content: center; gap: 10px; padding-bottom: 20px; }
.ta-builds > span { display: flex; gap: 10px; justify-content: center; }
.ta-builds img { width: 54px; height: 54px; padding: 6px; border: 1px solid rgba(224, 138, 60, .6); background: rgba(224, 138, 60, .1); }
.ta-builds > span:last-child img { border-color: rgba(164, 123, 224, .6); background: rgba(164, 123, 224, .1); }
.tool-card-link:hover .ta-builds > span:first-child img { transform: translateX(-6px); }
.tool-card-link:hover .ta-builds > span:last-child img { transform: translateX(6px); }
.tool-card-body { position: relative; display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 0 22px 22px; margin-top: -32px; }
.tool-card-body .emblem { width: 56px; height: 56px; --c: inherit; color: var(--c); background: var(--surface); border-radius: 50%; }
.tool-card-body b { font: 800 1.7rem/1.05 var(--font-display); text-transform: uppercase; margin-top: 4px; }
.tool-card-body > span:not(.emblem):not(.tool-card-cta) { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.55; }
.tool-card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; color: var(--c); font: 600 var(--fs-caption)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.tool-card-cta svg { width: 16px; height: 16px; transition: transform .4s var(--ease-out); }
.tool-card-link:hover .tool-card-cta svg { transform: translateX(6px); }
@media (max-width: 1023px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tool-card, .tool-card:nth-child(1), .tool-card:nth-child(2) { grid-column: auto; } .tool-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 599px) { .tool-grid { grid-template-columns: 1fr; } .tool-card-art { height: 160px; } }

/* ==========================================================================
   TOOL PAGES: common
   ========================================================================== */
.tool-page { padding-bottom: var(--s-8); }
.tool-app { position: relative; margin: var(--s-6) 0 var(--s-7); min-width: 0; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tool-h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: clamp(1.6rem, 2.6vw, 2.1rem); text-transform: uppercase; margin: 0 0 var(--s-5); }
.tool-h2 > svg { width: 26px; height: 26px; color: var(--brass); flex: none; }
.tool-h2 .muted { font: 400 var(--fs-small)/1 var(--font-body); text-transform: none; }
.tool-h3 { font: 500 var(--fs-caption)/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin: 0 0 12px; }
.tool-prose { margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--border); }
.tool-prose h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); text-transform: uppercase; margin-bottom: var(--s-4); }
.saved-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: var(--s-4) 0; padding: 12px 16px; border: 1px solid rgba(95, 168, 138, .45); background: linear-gradient(90deg, rgba(95, 168, 138, .12), transparent); font-size: var(--fs-small); animation: rise .5s var(--ease-out); }
.saved-banner > svg { width: 18px; height: 18px; color: var(--patina); flex: none; }
.saved-banner span { flex: 1; min-width: 200px; }
.saved-banner a { display: inline-flex; align-items: center; gap: 6px; color: var(--patina); font-weight: 600; }
.saved-banner a svg { width: 15px; height: 15px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.fchip { height: 34px; padding: 0 13px; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg-2); font: 500 var(--fs-small)/1 var(--font-body); cursor: pointer; white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.fchip:hover { color: var(--fg); border-color: #5a5045; }
.fchip[aria-pressed="true"] { color: var(--brass-ink); background: var(--brass); border-color: var(--brass); font-weight: 600; }
.fchip-sm { height: 30px; padding: 0 10px; font-size: var(--fs-caption); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.label .src { margin-left: 6px; }
.more-link { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-4); color: var(--violet); font-weight: 500; font-size: var(--fs-small); }
.more-link svg { width: 15px; height: 15px; transition: transform .3s var(--ease-out); }
.more-link:hover svg { transform: translateX(4px); }
.empty-state h3 { font-size: 1.5rem; }

/* pickers */
.picker-bar { position: sticky; top: -28px; z-index: 3; display: grid; gap: 10px; margin: 0 -28px 16px; padding: 12px 28px 14px; background: linear-gradient(var(--surface) 80%, transparent); }
.picker-bar .input { width: 100%; }
@media (max-width: 599px) { .picker-bar { top: -22px; margin-inline: -16px; padding-inline: 16px; } .picker-bar .chips-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } }
.hp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.hp-tile { position: relative; display: flex; flex-direction: column; width: 100%; padding: 0 0 10px; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg); text-align: center; cursor: pointer; overflow: hidden; transition: border-color .2s, transform .3s var(--ease-out); }
.hp-tile .hp-img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 14%; background: var(--surface-2); transition: transform .5s var(--ease-out); }
.hp-tile b { margin-top: 8px; font: 700 1.05rem/1.1 var(--font-display); text-transform: uppercase; padding: 0 6px; }
.hp-tile small { color: var(--muted); font-size: .7rem; padding: 0 6px; }
.hp-tile:hover:not([disabled]) { border-color: var(--brass); transform: translateY(-2px); }
.hp-tile:hover:not([disabled]) .hp-img { transform: scale(1.06); }
.hp-tile[disabled] { opacity: .38; cursor: not-allowed; }
.hp-tile em { position: absolute; top: 6px; left: 6px; padding: 3px 6px; background: rgba(12, 10, 9, .85); color: var(--fg-2); font: 500 .62rem/1 var(--font-mono); font-style: normal; text-transform: uppercase; letter-spacing: .08em; }
.hp-toggle .ex-mark { display: none; background: var(--danger); color: #fff; }
.hp-toggle .hp-tile[aria-pressed="true"] { border-color: var(--danger); }
.hp-toggle .hp-tile[aria-pressed="true"] .hp-img { filter: grayscale(1) brightness(.5); }
.hp-toggle .hp-tile[aria-pressed="true"] .ex-mark { display: block; }
.hp-empty { text-align: center; padding: var(--s-6); }
.ip-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.ip-tile { --c: var(--brass); position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; border: 1px solid var(--border); border-left: 3px solid var(--c); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%), var(--ink-deep); color: var(--fg); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.ip-tile:hover:not([disabled]) { border-color: var(--c); }
.ip-tile[disabled] { opacity: .4; cursor: not-allowed; }
.ip-img { width: 40px; height: 40px; flex: none; object-fit: contain; }
.ip-tile b { display: block; font-size: var(--fs-small); font-weight: 600; line-height: 1.2; }
.ip-tile small { color: var(--muted); font: 400 var(--fs-caption)/1.3 var(--font-mono); }
.ip-tile em { position: absolute; top: 4px; right: 6px; font: 500 .6rem/1 var(--font-mono); font-style: normal; text-transform: uppercase; color: var(--muted); }

/* analysis */
.analysis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .9fr); gap: var(--s-5); }
.an-col { min-width: 0; padding: 20px; border: 1px solid var(--border); background: var(--surface); }
.an-h { display: flex; align-items: center; gap: 8px; font: 500 var(--fs-caption)/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin: 0 0 14px; }
.an-h:not(:first-child) { margin-top: var(--s-5); }
.an-h svg { width: 16px; height: 16px; }
.an-h .muted { letter-spacing: 0; text-transform: none; font-family: var(--font-body); }
.an-gap { color: var(--warn); } .an-good { color: var(--patina); }
.an-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.an-list li { display: grid; gap: 2px; padding: 10px 12px; border-left: 2px solid; background: var(--ink-deep); font-size: var(--fs-small); }
.an-list b { font-weight: 600; color: var(--fg); }
.an-list span { color: var(--fg-2); }
.an-list.gap li { border-color: var(--warn); }
.an-list.good li { border-color: var(--patina); }
.an-notes { margin: var(--s-4) 0 0; padding-left: 18px; color: var(--muted); font-size: var(--fs-small); }
.meters { display: grid; gap: 10px; }
.meter { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: var(--fs-small); }
.meter-l { color: var(--fg-2); }
.meter-bar { position: relative; height: 8px; background: var(--ink-deep); border: 1px solid var(--border); overflow: hidden; }
.meter-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--warn); transition: width .6s var(--ease-out); }
.meter.is-ok .meter-bar i { background: linear-gradient(90deg, var(--patina), #8fd0b3); }
.meter.is-zero .meter-l { color: var(--muted); }
.meter b { font: 600 var(--fs-small)/1 var(--font-mono); text-align: right; }
.meter b small { color: var(--muted); font-weight: 400; }
.leanbar { display: flex; height: 12px; border: 1px solid var(--border); background: var(--ink-deep); overflow: hidden; }
.leanbar i { width: var(--w); transition: width .6s var(--ease-out); }
.leanbar .l-spirit { background: var(--spirit); } .leanbar .l-hybrid { background: var(--brass); } .leanbar .l-weapon { background: var(--weapon); }
.leanlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font: 500 var(--fs-caption)/1.3 var(--font-mono); color: var(--fg-2); }
.leanlegend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 0; }
.leanlegend .l-spirit::before { background: var(--spirit); } .leanlegend .l-hybrid::before { background: var(--brass); } .leanlegend .l-weapon::before { background: var(--weapon); }
.tag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tag-list li { display: grid; grid-template-columns: 1fr auto 24px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-small); color: var(--fg-2); }
.tag-list b { font-family: var(--font-mono); text-align: right; color: var(--fg); }
.tag-heroes { display: flex; }
.tag-ic { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--bg); margin-left: -6px; object-fit: cover; background: var(--surface-2); }
.sugg { margin-top: var(--s-5); }
.sugg-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sugg-hero { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px dashed var(--brass-a25); background: var(--brass-a10); color: var(--fg); font-size: var(--fs-small); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.sugg-hero:hover:not([disabled]) { border-style: solid; border-color: var(--brass); }
.sugg-hero[disabled] { opacity: .45; cursor: not-allowed; }
.sugg-hero small { display: block; color: var(--muted); font-size: .7rem; }
.sugg-hero > svg { width: 14px; height: 14px; color: var(--brass); }
.sugg-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
@media (max-width: 1099px) { .analysis { grid-template-columns: 1fr 1fr; } .an-tags { grid-column: 1 / -1; } }
@media (max-width: 719px) { .analysis { grid-template-columns: 1fr; } .meter { grid-template-columns: 80px 1fr 40px; } }

/* counters */
.ctr-list { list-style: none; margin: 8px 0 var(--s-4); padding: 0; display: grid; gap: 6px; }
.ctr-list li { --c: var(--brass); position: relative; display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--border); border-left: 3px solid var(--c); background: var(--ink-deep); }
.ctr-item { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.ctr-item:hover b { color: var(--brass-hi); }
.ctr-img { width: 38px; height: 38px; flex: none; object-fit: contain; }
.ctr-item b { display: block; font-size: var(--fs-small); line-height: 1.2; }
.ctr-item small { color: var(--muted); font: 400 var(--fs-caption)/1.2 var(--font-mono); }
.ctr-why p { margin: 0 0 4px; font-size: var(--fs-small); color: var(--fg-2); line-height: 1.45; }
.ctr-why p:last-child { margin: 0; }
.ctr-why b { color: var(--fg); font-weight: 600; }
.ctr-n { position: absolute; top: -8px; right: 8px; padding: 2px 6px; background: var(--brass); color: var(--brass-ink); font: 600 .62rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 599px) { .ctr-list li { grid-template-columns: 1fr; } }
.item-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 var(--s-4); }
.item-pill { --c: var(--brass); display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 4px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--border)); background: color-mix(in srgb, var(--c) 9%, var(--ink-deep)); color: var(--fg); font-size: var(--fs-small); transition: border-color .2s; }
.item-pill:hover { border-color: var(--c); }
.pill-img { width: 26px; height: 26px; object-fit: contain; }
.tips { margin: 8px 0 0; padding-left: 18px; font-size: var(--fs-small); color: var(--fg-2); }
.tips li { margin-bottom: 6px; }

/* ==========================================================================
   TOOL 1 · matchup explorer
   ========================================================================== */
.mu-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s-4); align-items: stretch; margin-bottom: var(--s-4); }
.mu-slot { --accent: var(--brass); position: relative; display: flex; align-items: stretch; min-height: 260px; padding: 0; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg); text-align: left; cursor: pointer; overflow: hidden; isolation: isolate; transition: border-color .3s, box-shadow .4s; }
.mu-slot[data-side="b"] { --accent: var(--violet); flex-direction: row-reverse; text-align: right; }
.mu-slot::before { content: ""; position: absolute; inset: 0; z-index: -2; background: center 20% / cover no-repeat; background-image: none; }
.mu-slot.is-filled::before { background-image: var(--hbg, none); opacity: .32; filter: saturate(.8); transition: opacity .5s, transform 1.2s var(--ease-out); }
.mu-slot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, rgba(12, 10, 9, .9)), rgba(12, 10, 9, .55) 70%); }
.mu-slot[data-side="b"]::after { background: linear-gradient(270deg, color-mix(in srgb, var(--accent) 18%, rgba(12, 10, 9, .9)), rgba(12, 10, 9, .55) 70%); }
.mu-slot:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px rgba(0, 0, 0, .4); }
.mu-slot.is-filled:hover::before { opacity: .45; transform: scale(1.04); }
.mu-slot.is-empty { flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border-style: dashed; }
.mu-slot.is-empty::after { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }
.mu-slot.is-empty b { font: 800 1.6rem/1 var(--font-display); text-transform: uppercase; }
.mu-slot.is-empty small { color: var(--muted); font-size: var(--fs-small); }
.mu-plus { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1px dashed var(--accent); color: var(--accent); transition: transform .5s var(--ease-out); }
.mu-plus svg { width: 26px; height: 26px; }
.mu-slot.is-empty:hover .mu-plus { transform: rotate(90deg) scale(1.08); }
.mu-art { position: relative; flex: 0 0 44%; display: flex; align-items: flex-end; }
.mu-portrait { width: 100%; height: 100%; max-height: 300px; object-fit: cover; object-position: 50% 12%; -webkit-mask-image: linear-gradient(to top, transparent, #000 25%); mask-image: linear-gradient(to top, transparent, #000 25%); }
.motion .mu-slot.is-filled .mu-portrait { animation: mu-in .6s var(--ease-out); }
@keyframes mu-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.mu-meta { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 22px 20px; min-width: 0; }
.mu-slot[data-side="b"] .mu-meta { align-items: flex-end; }
.mu-meta b { font: 900 clamp(2rem, 4vw, 3.2rem)/.95 var(--font-display); text-transform: uppercase; color: var(--fg); text-shadow: 0 2px 20px rgba(0, 0, 0, .6); overflow-wrap: anywhere; }
.mu-meta > small { color: var(--fg-2); font-size: var(--fs-small); }
.mu-change { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--accent); font: 500 var(--fs-caption)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; opacity: .75; transition: opacity .2s; }
.mu-change svg { width: 14px; height: 14px; }
.mu-slot:hover .mu-change { opacity: 1; }
.mu-fav { position: absolute; top: 12px; right: 12px; z-index: 2; }
.mu-slot[data-side="b"] .mu-fav { right: auto; left: 12px; }
.mu-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.mu-vs span { font: 900 clamp(2.4rem, 5vw, 3.6rem)/1 var(--font-display); background: linear-gradient(180deg, var(--brass-hi), var(--brass) 50%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(201, 162, 77, .35)); }
.mu-swap { border-radius: 50%; width: 44px; height: 44px; padding: 0; }
.mu-swap:hover svg { transform: rotate(180deg); }
.mu-swap svg { transition: transform .5s var(--ease-out); }
.mu-out { margin-top: var(--s-6); }
.mu-body { display: grid; gap: var(--s-7); }
.mu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5); }
.mu-side { min-width: 0; padding: 22px; border: 1px solid var(--border); background: var(--surface); }
.mu-side:first-child { border-top: 2px solid var(--brass); } .mu-side:last-child { border-top: 2px solid var(--violet); }
.mu-h { font-size: 1.4rem; text-transform: uppercase; margin-bottom: var(--s-4); }
.mu-h span { color: var(--brass-hi); }
.mu-side:last-child .mu-h span { color: var(--violet); }
.mu-h span:last-child { color: var(--fg); }
.mu-name { font-size: 1.5rem; text-transform: uppercase; margin-bottom: var(--s-3); color: var(--brass-hi); }
.mu-grid > div:last-child > .mu-name { color: var(--violet); }
.mu-abilities { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mu-abilities li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--border); background: var(--surface); }
.mu-abilities b { font-weight: 600; font-size: var(--fs-ui); }
.mu-abilities p { margin: 4px 0 0; font-size: var(--fs-small); color: var(--fg-2); line-height: 1.5; }
.ab-ic { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--ink-deep); }
.ab-ic img { width: 80%; height: 80%; object-fit: contain; }
.ab-ic i { position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; display: grid; place-items: center; background: var(--brass); color: var(--brass-ink); font: 600 .7rem/1 var(--font-mono); font-style: normal; }
.ab-ph { font: 700 1.1rem/1 var(--font-display); color: var(--muted); }
.ult { display: inline-block; margin-left: 6px; padding: 2px 6px; background: var(--violet-a15); color: var(--violet); font: 500 .62rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; vertical-align: middle; }
.mu-tags td { color: var(--fg-2); }
.dot-yes { color: var(--fg); } .dot-yes::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--patina); transform: rotate(45deg); vertical-align: 1px; }
.dot-no { color: var(--muted); }
.role-card { padding: 20px; border: 1px solid var(--border); background: var(--surface); }
.role-card p { margin: 0 0 8px; font-size: var(--fs-small); }
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.changes li { padding: 10px 12px; border-left: 2px solid var(--border); background: var(--surface); font-size: var(--fs-small); color: var(--fg-2); }
.changes time { display: block; color: var(--brass); font: 500 var(--fs-caption)/1.3 var(--font-mono); margin-bottom: 2px; }
@media (max-width: 899px) { .mu-grid { grid-template-columns: 1fr; } }
@media (max-width: 719px) {
  .mu-stage { grid-template-columns: 1fr; }
  .mu-vs { flex-direction: row; }
  .mu-slot { min-height: 180px; }
  .mu-art { flex-basis: 40%; }
  .mu-portrait { max-height: 200px; }
}

/* ==========================================================================
   TOOL 2 · team builder
   ========================================================================== */
.tb-board { padding: 20px; border: 1px solid var(--border); background: radial-gradient(ellipse at 50% 0%, rgba(95, 168, 138, .1), transparent 60%), var(--surface); }
.tb-grid { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; counter-reset: none; }
.tb-grid > li { position: relative; min-width: 0; }
.tb-slot { position: relative; display: flex; flex-direction: column; width: 100%; aspect-ratio: 3 / 4.4; padding: 0; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg); cursor: pointer; overflow: hidden; text-align: left; transition: border-color .25s, transform .35s var(--ease-out); }
.tb-slot:hover { border-color: var(--patina); transform: translateY(-3px); }
.tb-slot.is-empty { align-items: center; justify-content: center; gap: 8px; border-style: dashed; color: var(--muted); text-align: center; }
.tb-slot.is-empty svg { width: 28px; height: 28px; color: var(--patina); transition: transform .4s var(--ease-out); }
.tb-slot.is-empty:hover svg { transform: rotate(90deg); }
.tb-slot.is-empty small { font: 500 var(--fs-caption)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.tb-n { position: absolute; top: 8px; left: 10px; font: 800 1.2rem/1 var(--font-display); color: var(--border); }
.tb-portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transition: transform .6s var(--ease-out); }
.tb-slot:hover .tb-portrait { transform: scale(1.05); }
.tb-meta { position: relative; margin-top: auto; padding: 30px 10px 10px; background: linear-gradient(transparent, rgba(12, 10, 9, .95) 55%); }
.tb-meta b { display: block; font: 800 1.2rem/1 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.tb-meta small { color: var(--fg-2); font-size: .68rem; }
.motion .tb-filled .tb-slot { animation: mu-in .45s var(--ease-out); }
.tb-x { position: absolute; top: 6px; right: 6px; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; background: rgba(12, 10, 9, .85); color: var(--fg-2); cursor: pointer; opacity: .85; transition: color .2s, border-color .2s, opacity .2s; }
.tb-x svg { width: 14px; height: 14px; }
.tb-x:hover { color: var(--danger); border-color: var(--danger); opacity: 1; }
.tb-count { margin-right: auto; font: 500 var(--fs-small)/1 var(--font-mono); color: var(--fg-2); }
.tb-analysis { margin-top: var(--s-7); }
@media (max-width: 899px) { .tb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 479px) { .tb-board { padding: 12px; } .tb-grid { gap: 6px; } .tb-meta b { font-size: 1rem; } }

/* ==========================================================================
   TOOL 3 · random hero
   ========================================================================== */
.rh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-5); align-items: start; }
.rh-stage { position: relative; min-height: 520px; display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--ink-deep); overflow: hidden; isolation: isolate; }
.rh-stage::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hbg, none) center 20% / cover no-repeat; opacity: .28; transition: opacity .6s; }
.rh-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 30% 40%, rgba(185, 163, 255, .14), transparent 60%), linear-gradient(transparent 40%, rgba(12, 10, 9, .9)); }
.rh-reel { position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.rh-reel.is-rolling { display: flex; }
.rh-reel .reel-img { width: 200px; height: 260px; object-fit: cover; object-position: 50% 12%; border: 1px solid var(--violet); box-shadow: 0 0 60px rgba(185, 163, 255, .35); filter: blur(.5px); }
.rh-reel b { font: 900 2.4rem/1 var(--font-display); text-transform: uppercase; color: var(--violet); }
.rh-result { flex: 1; display: flex; }
.rh-idle { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.rh-q { font: 900 9rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1px var(--violet); opacity: .7; }
.motion .rh-q { animation: rh-float 4s ease-in-out infinite; }
@keyframes rh-float { 50% { transform: translateY(-10px); opacity: .45; } }
.rh-card { flex: 1; display: grid; grid-template-columns: minmax(180px, 38%) 1fr; gap: var(--s-5); align-items: end; padding: 24px 24px 0; }
.motion .rh-card { animation: rh-in .7s var(--ease-out); }
@keyframes rh-in { from { opacity: 0; transform: scale(.96); filter: blur(6px); } }
.rh-portrait { width: 100%; aspect-ratio: 3 / 4.2; object-fit: cover; object-position: 50% 10%; -webkit-mask-image: linear-gradient(to top, transparent, #000 18%); mask-image: linear-gradient(to top, transparent, #000 18%); filter: drop-shadow(0 0 30px rgba(185, 163, 255, .3)); }
.rh-info { padding-bottom: 24px; min-width: 0; }
.rh-info h2 { font-size: clamp(3rem, 7vw, 5.4rem); text-transform: uppercase; line-height: .9; margin-bottom: 12px; background: linear-gradient(180deg, var(--fg), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; }
.rh-tag { margin: 14px 0; color: var(--fg-2); font-size: var(--fs-ui); max-width: 46ch; }
.rh-abilities { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rh-abilities li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); background: rgba(12, 10, 9, .6); font-size: var(--fs-caption); color: var(--fg-2); }
.rh-abilities img, .rh-abilities .ab-ph { width: 26px; height: 26px; object-fit: contain; }
.rh-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rh-ctrl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 20px 24px; border-top: 1px solid var(--border); background: rgba(12, 10, 9, .7); backdrop-filter: blur(6px); }
.rh-pool { margin: 0; }
.rh-side { display: grid; gap: 10px; }
.rh-box { padding: 16px; border: 1px solid var(--border); background: var(--surface); }
.rh-box .switch { padding: 0; }
.rh-ex-head { display: flex; justify-content: space-between; align-items: baseline; }
.rh-ex-head .tool-h3 b { color: var(--fg-2); }
.rh-ex-list { display: flex; flex-wrap: wrap; gap: 6px; }
.rh-ex-list p { margin: 0; }
.ex-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg-2); font-size: var(--fs-caption); cursor: pointer; }
.ex-chip:hover { border-color: var(--danger); color: var(--fg); }
.ex-chip > svg { width: 12px; height: 12px; }
.ex-ic { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.rh-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rh-hist a { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--border); color: var(--fg-2); font-size: var(--fs-caption); }
.rh-hist a:hover { border-color: var(--violet); color: var(--fg); }
.rh-hist li:first-child a { border-color: rgba(185, 163, 255, .5); color: var(--fg); }
.hist-ic { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
@media (max-width: 1023px) { .rh-layout { grid-template-columns: 1fr; } .rh-side { grid-template-columns: 1fr 1fr; } .rh-hist-box { grid-column: 1 / -1; } }
@media (max-width: 639px) {
  .rh-stage { min-height: 0; }
  .rh-card { grid-template-columns: 1fr; padding: 16px 16px 0; text-align: center; }
  .rh-portrait { width: 60%; margin: 0 auto; }
  .rh-info { padding-bottom: 16px; } .rh-info .chips, .rh-abilities, .rh-links { justify-content: center; } .rh-tag { margin-inline: auto; }
  .rh-idle { padding: var(--s-7) 0; } .rh-q { font-size: 6rem; }
  .rh-side { grid-template-columns: 1fr; }
  .rh-ctrl .btn-xl { width: 100%; }
}

/* ==========================================================================
   TOOL 4 · draft simulator
   ========================================================================== */
.dr-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-bottom: var(--s-4); }
.dr-top .tool-actions { margin-left: auto; }
.dr-turn { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }
.dr-turn b { color: var(--fg); }
.t-a { --t: var(--brass); } .t-b { --t: var(--violet); }
.dr-turn .t-a, .dr-turn .t-b, .dr-sum-h { color: var(--t); }
.dr-board { display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; gap: var(--s-4); align-items: start; }
.dr-team { --t: var(--brass); border: 1px solid var(--border); background: var(--surface); transition: border-color .3s, box-shadow .4s; }
.dr-b { --t: var(--violet); }
.dr-team.is-turn { border-color: var(--t); box-shadow: 0 0 0 1px var(--t), 0 0 40px color-mix(in srgb, var(--t) 18%, transparent); }
.dr-team-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, color-mix(in srgb, var(--t) 16%, transparent), transparent); color: var(--fg); text-align: left; cursor: pointer; }
.dr-team-head:disabled { cursor: default; }
.dr-team-head b { font: 900 1.6rem/1 var(--font-display); text-transform: uppercase; color: var(--t); }
.dr-team-head small { color: var(--muted); font: 500 var(--fs-caption)/1 var(--font-mono); }
.dr-team-head em { margin-left: auto; padding: 3px 8px; background: var(--t); color: var(--brass-ink); font: 600 .64rem/1.2 var(--font-mono); font-style: normal; text-transform: uppercase; letter-spacing: .1em; }
.motion .dr-team-head em { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.dr-picks { list-style: none; margin: 0; padding: 10px; display: grid; gap: 6px; }
.dr-pick { position: relative; display: grid; grid-template-columns: 44px 1fr 28px; align-items: center; gap: 10px; padding: 5px; border: 1px solid var(--border); border-left: 3px solid var(--t); background: var(--ink-deep); }
.motion .dr-pick:last-of-type { animation: pick-in .4s var(--ease-out); }
@keyframes pick-in { from { opacity: 0; transform: translateX(-10px); } }
.dr-portrait { width: 44px; height: 44px; object-fit: cover; object-position: 50% 10%; }
.dr-pick b { display: block; font: 800 1.05rem/1 var(--font-display); text-transform: uppercase; }
.dr-pick small { color: var(--muted); font-size: .68rem; }
.dr-x { display: grid; place-items: center; width: 26px; height: 26px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.dr-x svg { width: 14px; height: 14px; }
.dr-x:hover { color: var(--danger); }
.dr-empty { display: flex; align-items: center; height: 56px; padding: 0 14px; border: 1px dashed var(--border); color: var(--border); font: 800 1.1rem/1 var(--font-display); }
.dr-empty.is-next { border-color: var(--t); color: var(--t); background: color-mix(in srgb, var(--t) 6%, transparent); }
.motion .dr-empty.is-next { animation: pulse 1.6s ease-in-out infinite; }
.dr-pool { min-width: 0; padding: 14px; border: 1px solid var(--border); background: var(--ink-deep); }
.dr-pool-bar { display: grid; gap: 8px; margin-bottom: 12px; }
.dr-pool-bar .input { width: 100%; height: 42px; }
.dr-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.dr-hero { position: relative; display: flex; flex-direction: column; width: 100%; padding: 0 0 6px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); font-size: .72rem; text-align: center; cursor: pointer; overflow: hidden; transition: border-color .2s, transform .25s var(--ease-out); }
.dr-hero:hover:not([disabled]) { border-color: var(--brass); transform: translateY(-2px); }
.dr-hero-img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 12%; margin-bottom: 4px; }
.dr-hero span { padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-hero[disabled] { cursor: not-allowed; }
.dr-hero:not(.is-taken)[disabled] { opacity: .6; }
.dr-hero.is-taken .dr-hero-img { filter: grayscale(1) brightness(.4); }
.dr-hero.is-taken { border-color: color-mix(in srgb, var(--t) 50%, var(--border)); }
.dr-hero em { position: absolute; top: 4px; right: 4px; padding: 2px 6px; background: var(--t); color: var(--brass-ink); font: 700 .7rem/1.2 var(--font-mono); font-style: normal; }
.dr-summary { margin-top: var(--s-7); }
.dr-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.dr-side-sum { min-width: 0; padding: 20px; border: 1px solid var(--border); background: var(--surface); }
.dr-side-sum.dr-side-sum:first-child { border-top: 2px solid var(--brass); } .dr-side-sum:last-child { border-top: 2px solid var(--violet); }
.dr-side-sum > .meters, .dr-side-sum > .leanbar { margin-bottom: 12px; }
.dr-side-sum .an-list { margin: var(--s-4) 0; }
.dr-side-sum .label { margin: var(--s-4) 0 0; }
.dr-sum-h { font-size: 1.8rem; text-transform: uppercase; margin-bottom: var(--s-4); }
@media (max-width: 1099px) { .dr-board { grid-template-columns: 1fr 1fr; } .dr-pool { grid-column: 1 / -1; grid-row: 2; } .dr-grid { max-height: 420px; } }
@media (max-width: 719px) { .dr-top .tool-actions { margin-left: 0; } .dr-sum-grid { grid-template-columns: 1fr; } }
@media (max-width: 479px) { .dr-board { grid-template-columns: 1fr; } .dr-team-head b { font-size: 1.3rem; } .dr-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); } }

/* ==========================================================================
   TOOL 5 · build comparison
   ========================================================================== */
.bc-actions { margin-bottom: var(--s-4); }
.bc-actions .btn-primary { margin-left: auto; }
.bc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
.bc-col { --t: var(--brass); min-width: 0; padding: 18px; border: 1px solid var(--border); border-top: 2px solid var(--t); background: linear-gradient(180deg, color-mix(in srgb, var(--t) 7%, transparent), transparent 140px), var(--surface); }
.bc-b { --t: var(--violet); }
.bc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 14px; }
.bc-name { width: 100%; height: 48px; font: 800 1.5rem/1 var(--font-display) !important; text-transform: uppercase; color: var(--t) !important; background: transparent !important; border-color: transparent !important; padding: 0 8px !important; }
.bc-name:hover, .bc-name:focus { border-color: var(--border) !important; background: var(--ink-deep) !important; }
.bc-hero { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 14px 4px 4px; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg); font-size: var(--fs-small); text-align: left; cursor: pointer; transition: border-color .2s; }
.bc-hero:hover { border-color: var(--brass); }
.bc-hero small { display: block; color: var(--muted); font-size: .7rem; }
.bc-hero-ic { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.bc-hero-ph { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px dashed var(--border); color: var(--muted); }
.bc-hero-ph svg { width: 18px; height: 18px; }
.bc-total { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 12px; background: var(--border); border: 1px solid var(--border); }
.bc-total span { display: grid; padding: 10px 12px; background: var(--ink-deep); }
.bc-total b { font: 700 1.4rem/1.1 var(--font-mono); color: var(--fg); }
.bc-total span:first-child b { color: var(--t); }
.bc-total small { color: var(--muted); font: 500 .66rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.catbar { display: flex; height: 10px; border: 1px solid var(--border); background: var(--ink-deep); overflow: hidden; }
.catbar i { width: var(--w); background: var(--c); transition: width .6s var(--ease-out); }
.catlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 14px; font: 500 var(--fs-caption)/1.3 var(--font-mono); color: var(--fg-2); }
.catlegend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--c); }
.catlegend b { color: var(--fg); font-weight: 600; }
.bc-items { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 5px; counter-reset: bc; }
.bc-item { --c: var(--brass); display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--border); border-left: 3px solid var(--c); background: var(--ink-deep); }
.motion .bc-item:last-child { animation: pick-in .35s var(--ease-out); }
.bc-img { width: 40px; height: 40px; object-fit: contain; }
.bc-item-main b { display: block; font-size: var(--fs-small); font-weight: 600; line-height: 1.2; }
.bc-item-main small { color: var(--muted); font: 400 .7rem/1.3 var(--font-mono); }
.bc-cost { font: 600 var(--fs-small)/1 var(--font-mono); color: var(--fg-2); }
.bc-row-ctl { display: flex; gap: 2px; }
.bc-row-ctl .icon-btn { height: 28px; min-width: 28px; padding: 0; border-color: transparent; background: none; }
.bc-row-ctl .icon-btn:hover { border-color: var(--border); }
.bc-info { grid-column: 2 / -1; margin: 0; font-size: var(--fs-caption); color: var(--muted); line-height: 1.45; }
.bc-empty { display: flex; align-items: center; justify-content: center; gap: 8px; height: 90px; border: 1px dashed var(--border); color: var(--muted); font-size: var(--fs-small); }
.bc-empty svg { width: 16px; height: 16px; }
.bc-read { margin-top: 14px; padding: 14px; border: 1px solid var(--border); background: var(--ink-deep); }
.bc-read ul { margin: 8px 0 0; padding-left: 16px; font-size: var(--fs-small); color: var(--fg-2); }
.bc-read li { margin-bottom: 4px; }
.bc-read b { color: var(--fg); }
.bc-tobuilds { margin-top: 12px; }
.bc-diff { margin-top: var(--s-7); }
.bc-table td.up { color: var(--patina); font-family: var(--font-mono); } .bc-table td.down { color: var(--warn); font-family: var(--font-mono); }
.bc-table td { font-family: var(--font-mono); }
.bc-table thead th:nth-child(2) { color: var(--brass-hi); } .bc-table thead th:nth-child(3) { color: var(--violet); }
.bc-sets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.bc-set { min-width: 0; padding: 14px; border: 1px solid var(--border); background: var(--surface); }
.bc-set .label b { color: var(--fg); }
@media (max-width: 899px) { .bc-grid { grid-template-columns: 1fr; } .bc-sets { grid-template-columns: 1fr; } .bc-actions .btn-primary { margin-left: 0; } }
@media (max-width: 479px) { .bc-head { grid-template-columns: 1fr; } .bc-item { grid-template-columns: 34px minmax(0, 1fr) auto; } .bc-img { width: 34px; height: 34px; } .bc-row-ctl { grid-column: 1 / -1; justify-content: flex-end; } .bc-info { grid-column: 1 / -1; } }
.import-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.import-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--border); background: var(--ink-deep); }
.imp-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.imp-main small { display: block; color: var(--muted); font-size: var(--fs-caption); }
.imp-ic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.imp-btns { display: flex; gap: 6px; }

/* ==========================================================================
   AUTH PAGE
   ========================================================================== */
.is-auth { min-height: 100dvh; }
.auth-page { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100dvh; }
.auth-art { position: relative; overflow: hidden; isolation: isolate; border-right: 1px solid var(--border); background: var(--ink-deep); }
.auth-bg { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: saturate(.7); }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 20% 100%, rgba(201, 162, 77, .25), transparent 55%), linear-gradient(90deg, rgba(12, 10, 9, .95) 0%, rgba(12, 10, 9, .55) 70%, rgba(12, 10, 9, .8)); }
.auth-roster { position: absolute; z-index: -2; right: -6%; top: 50%; width: 70%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; transform: translateY(-50%) rotate(-8deg); opacity: .55; }
.auth-roster img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 12%; border: 1px solid var(--border); filter: grayscale(.4); }
.auth-roster img:nth-child(4n+2), .auth-roster img:nth-child(4n+4) { transform: translateY(30px); }
.motion .auth-roster img { animation: roster-in 1s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes roster-in { from { opacity: 0; transform: translateY(40px); } }
.auth-art-copy { position: relative; display: flex; flex-direction: column; justify-content: center; gap: var(--s-4); height: 100%; padding: var(--s-8) clamp(24px, 6vw, 80px); max-width: 620px; }
.auth-art-copy .wordmark { margin-bottom: var(--s-6); }
.auth-pitch { font: 900 clamp(2.6rem, 4.6vw, 4.6rem)/.92 var(--font-display); text-transform: uppercase; margin: 0; background: linear-gradient(180deg, var(--fg) 40%, var(--brass)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-perks { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: 12px; }
.auth-perks li { display: flex; align-items: center; gap: 12px; color: var(--fg-2); font-size: var(--fs-ui); }
.auth-perks svg { width: 34px; height: 34px; padding: 7px; flex: none; border: 1px solid var(--brass-a25); background: var(--brass-a10); color: var(--brass); border-radius: 50%; }
.auth-fine { margin-top: var(--s-5); color: var(--muted); font: 500 var(--fs-caption)/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: var(--s-7) var(--gutter); outline: none; }
.auth-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 auto; color: var(--fg-2); font-size: var(--fs-small); }
.auth-back svg { width: 16px; height: 16px; }
.auth-back:hover { color: var(--fg); }
.auth-card { width: 100%; max-width: 440px; margin: var(--s-6) 0 auto; padding: 32px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); position: relative; }
.auth-card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: linear-gradient(90deg, var(--brass), var(--violet)); }
.motion .auth-card { animation: modal-in .6s var(--ease-out) .1s both; }
@media (max-width: 899px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .auth-art-copy { padding: var(--s-6) var(--gutter) var(--s-5); }
  .auth-art-copy .wordmark { margin-bottom: var(--s-3); }
  .auth-pitch { font-size: clamp(2.2rem, 9vw, 3.4rem); }
  .auth-perks, .auth-fine { display: none; }
  .auth-roster { width: 90%; opacity: .3; }
  .auth-main { justify-content: flex-start; padding-top: var(--s-5); }
  .auth-back { margin-bottom: var(--s-4); }
  .auth-card { margin: 0; padding: 24px 18px; }
}

/* ==========================================================================
   ACCOUNT SHELL
   ========================================================================== */
.is-account { --side-w: 248px; }
.acct-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: var(--s-4); height: 64px; padding: 0 var(--gutter); border-bottom: 1px solid var(--border); background: rgba(19, 17, 15, .9); backdrop-filter: blur(14px); }
.acct-top .wordmark-text { font-size: 1.3rem; }
.acct-top-title { display: none; font: 500 var(--fs-caption)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.acct-top-links { display: flex; gap: var(--s-5); margin-left: auto; font-size: var(--fs-small); }
.acct-top-links a { color: var(--fg-2); }
.acct-top-links a:hover { color: var(--fg); }
.acct-sheet-btn { display: none; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 4px; margin-left: auto; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); color: var(--fg); cursor: pointer; }
.acct-sheet-btn .acct-av { width: 34px; height: 34px; }
.acct-sheet-btn .burger { width: 20px; height: 20px; }
.acct-shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100dvh - 64px); }
.acct-side { position: sticky; top: 64px; height: calc(100dvh - 64px); display: flex; flex-direction: column; padding: var(--s-5) 12px 12px; border-right: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), var(--bg)); overflow-y: auto; }
.acct-side-label { margin: 0 12px 10px; font: 500 .66rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.acct-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.acct-nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; color: var(--fg-2); font: 500 var(--fs-small)/1 var(--font-body); transition: color .2s, background .2s; }
.acct-nav a svg { width: 19px; height: 19px; flex: none; transition: color .2s, transform .3s var(--ease-out); }
.acct-nav a::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--brass); transform: scaleY(0); transition: transform .35s var(--ease-out); }
.acct-nav a:hover { color: var(--fg); background: rgba(236, 228, 214, .04); }
.acct-nav a:hover svg { transform: translateX(2px); }
.acct-nav a[aria-current="page"] { color: var(--fg); background: linear-gradient(90deg, var(--brass-a10), transparent); }
.acct-nav a[aria-current="page"] svg { color: var(--brass); }
.acct-nav a[aria-current="page"]::before { transform: scaleY(1); }
.acct-nav-count { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 10px; background: var(--surface-2); color: var(--fg-2); font: 600 .66rem/1 var(--font-mono); text-align: center; }
.acct-nav-count:empty { display: none; }
.acct-nav a[aria-current="page"] .acct-nav-count { background: var(--brass); color: var(--brass-ink); }
.acct-side-foot { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--border); display: grid; gap: 4px; }
.acct-me { display: flex; align-items: center; gap: 10px; padding: 8px; color: var(--fg); min-width: 0; }
.acct-me:hover { background: rgba(236, 228, 214, .04); }
.acct-me > span:last-child { min-width: 0; }
.acct-me b { display: block; font-size: var(--fs-small); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-me small { display: block; color: var(--muted); font-size: var(--fs-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-logout { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 500 var(--fs-small)/1 var(--font-body); cursor: pointer; text-align: left; }
.acct-logout svg { width: 18px; height: 18px; }
.acct-logout:hover { color: var(--danger); }
.acct-main { min-width: 0; padding: var(--s-6) clamp(16px, 3.5vw, 48px) var(--s-8); outline: none; }
.acct-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s-5); align-items: end; margin-bottom: var(--s-6); padding-bottom: var(--s-5); border-bottom: 1px solid var(--border); }
.acct-head .eyebrow, .acct-head h1, .acct-lede { grid-column: 1; }
.acct-head .eyebrow { margin-bottom: 6px; }
.acct-head h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); text-transform: uppercase; }
.acct-lede { margin: 8px 0 0; color: var(--fg-2); font-size: var(--fs-ui); max-width: 70ch; }
.acct-head-actions { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.acct-head-actions:empty { display: none; }
.motion .acct-view > * { animation: rise .5s var(--ease-out) both; }
.motion .acct-view > *:nth-child(2) { animation-delay: .05s; } .motion .acct-view > *:nth-child(3) { animation-delay: .1s; } .motion .acct-view > *:nth-child(4) { animation-delay: .15s; }

/* mobile sheet */
.acct-sheet { position: fixed; inset: 0; z-index: 120; }
.acct-sheet[hidden] { display: none; }
.acct-sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 7, 6, .7); backdrop-filter: blur(4px); animation: fade-in .25s; }
.acct-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); box-shadow: 0 -30px 60px rgba(0, 0, 0, .5); animation: sheet-up .4s var(--ease-out); }
.acct-sheet-panel::before { content: ""; display: block; width: 44px; height: 4px; margin: -6px auto 14px; border-radius: 2px; background: var(--border); }
@keyframes sheet-up { from { transform: translateY(60px); opacity: 0; } }
.acct-sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.acct-sheet-head > span:nth-child(2) { flex: 1; min-width: 0; }
.acct-sheet-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-sheet-head small { color: var(--muted); font-size: var(--fs-caption); }
.acct-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acct-tiles a { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 92px; padding: 14px; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg); font: 600 var(--fs-ui)/1.2 var(--font-body); }
.acct-tiles svg { width: 24px; height: 24px; color: var(--brass); }
.acct-tiles a[aria-current="page"] { border-color: var(--brass); background: linear-gradient(135deg, var(--brass-a10), transparent), var(--ink-deep); }
.acct-tiles a:active { transform: scale(.98); }
.acct-sheet-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.acct-sheet-foot .btn { flex: 1 1 30%; }
@media (max-width: 959px) {
  .acct-shell { grid-template-columns: minmax(0, 1fr); }
  .acct-side { display: none; }
  .acct-sheet-btn { display: inline-flex; }
  .acct-top-links { display: none; }
  .acct-top-title { display: block; }
  .acct-head { grid-template-columns: 1fr; }
  .acct-head-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: var(--s-4); }
}
@media (max-width: 479px) { .acct-top { gap: 10px; } .acct-top-title { display: none; } .acct-head-actions .btn { flex: 1 1 auto; } }

/* toolbar */
.acct-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s-5); }
.tb-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 320px; justify-content: flex-end; }
.tb-filters .input[type=search] { flex: 1 1 220px; max-width: 360px; height: 44px; }
.tb-filters [hidden] { display: none !important; }
.seg-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-scroll button { white-space: nowrap; height: 42px; }
@media (max-width: 639px) { .tb-filters { justify-content: stretch; } .tb-filters .input[type=search] { max-width: none; } .tb-filters .sel { flex: 1 1 140px; } }

/* empty states in the account */
.acct-empty { padding: var(--s-8) var(--s-5); border-style: solid; background: radial-gradient(ellipse at 50% 0%, var(--brass-a10), transparent 60%), var(--surface); }
.empty-ic { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto var(--s-4); border-radius: 50%; border: 1px dashed var(--brass); color: var(--brass); }
.empty-ic svg { width: 30px; height: 30px; }
.motion .empty-ic { animation: rh-float 4s ease-in-out infinite; }

/* ---------- dashboard ---------- */
.dash-hero { position: relative; margin-bottom: var(--s-5); border: 1px solid var(--border); overflow: hidden; isolation: isolate; background: var(--ink-deep); }
.dash-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hbg, url("img/game/backgrounds/home-hero.webp")) center 30% / cover no-repeat; opacity: .4; }
.dash-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 10, 9, .95) 20%, rgba(12, 10, 9, .4)), radial-gradient(ellipse at 0% 100%, rgba(201, 162, 77, .2), transparent 60%); }
.dash-hero-in { display: flex; align-items: center; gap: var(--s-5); padding: clamp(22px, 4vw, 40px); }
.dash-hero p { margin: 0; }
.dash-hero .eyebrow { margin-bottom: 8px; }
.dash-hello { font-size: clamp(2rem, 4.5vw, 3.4rem); text-transform: uppercase; margin-bottom: 8px; }
.dash-hello span { color: var(--brass-hi); }
@media (max-width: 559px) { .dash-hero-in { flex-direction: column; align-items: flex-start; } }
.onboard { margin-bottom: var(--s-5); padding: 22px; border: 1px dashed var(--brass-a25); background: var(--brass-a10); }
.onboard h2 { font-size: 1.8rem; text-transform: uppercase; margin-bottom: 4px; }
.onboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: var(--s-4); }
.onboard-grid a { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); transition: border-color .2s, transform .3s var(--ease-out); }
.onboard-grid a:hover { border-color: var(--brass); transform: translateY(-3px); }
.onboard-grid svg { width: 26px; height: 26px; color: var(--brass); margin-bottom: 8px; }
.onboard-grid span { color: var(--muted); font-size: var(--fs-caption); }
@media (max-width: 899px) { .onboard-grid { grid-template-columns: 1fr 1fr; } }
.dash-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: var(--s-5); }
.stat-card { position: relative; display: grid; gap: 2px; padding: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); overflow: hidden; transition: border-color .25s, transform .35s var(--ease-out); }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, var(--brass-a25), transparent 70%); opacity: .5; transition: opacity .3s, transform .5s var(--ease-out); }
.stat-card:hover { border-color: var(--brass); transform: translateY(-3px); }
.stat-card:hover::after { opacity: 1; transform: scale(1.3); }
.sc-ic { width: 22px; height: 22px; color: var(--brass); margin-bottom: 10px; }
.sc-n { font: 800 2.8rem/1 var(--font-display); }
.sc-l { font-weight: 600; font-size: var(--fs-small); }
.stat-card small { color: var(--muted); font-size: .72rem; }
@media (max-width: 1199px) { .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .dash-stats { grid-template-columns: 1fr 1fr; } .stat-card:last-child { grid-column: 1 / -1; } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
@media (max-width: 899px) { .dash-grid { grid-template-columns: 1fr; } }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--border); background: var(--surface); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s-4); }
.panel-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; text-transform: uppercase; }
.panel-head h2 svg { width: 20px; height: 20px; color: var(--brass); }
.panel-head a { font-size: var(--fs-small); }
.dash-goal { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--fg); }
.dash-goal:last-of-type { border-bottom: 0; }
.dg-main { flex: 1; display: grid; gap: 5px; min-width: 0; }
.dg-main b { font-size: var(--fs-small); font-weight: 600; }
.dg-main small { color: var(--muted); font: 400 var(--fs-caption)/1 var(--font-mono); }
.mini-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); }
.mini-ic svg { width: 18px; height: 18px; }
.pbar { position: relative; display: block; height: 6px; background: var(--ink-deep); border: 1px solid var(--border); overflow: hidden; }
.pbar i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, var(--brass), var(--brass-hi)); transition: width .8s var(--ease-out); }
.pbar-lg { height: 10px; margin: 14px 0 6px; }
.pbar.full i { background: linear-gradient(90deg, var(--patina), #8fd0b3); }
.ring-row { display: flex; align-items: center; gap: 14px; margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.ring-row p { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }
.ring { width: 54px; height: 54px; flex: none; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--patina); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease-out); }
.recent-list, .act-list { list-style: none; margin: 0; padding: 0; }
.recent-list li > a { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--fg); transition: background .2s; }
.recent-list li:last-child > a { border-bottom: 0; }
.recent-list li > a:hover { background: rgba(236, 228, 214, .03); }
.recent-list li > a > span:not(.stack):not(.mini-ic) { flex: 1; min-width: 0; }
.recent-list b { display: block; font-size: var(--fs-small); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list small { color: var(--muted); font-size: var(--fs-caption); }
.recent-list .go { width: 16px; height: 16px; color: var(--muted); transition: transform .3s var(--ease-out), color .2s; }
.recent-list a:hover .go { transform: translateX(4px); color: var(--brass); }
.stack { display: flex; flex: none; padding-left: 8px; }
.stack-ic { width: 30px; height: 30px; margin-left: -8px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-2); }
.stack-ic.lg { width: 38px; height: 38px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-grid a { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); background: var(--ink-deep); color: var(--fg); font-size: var(--fs-small); font-weight: 500; transition: border-color .2s, background .2s; }
.quick-grid a:hover { border-color: var(--brass); background: var(--brass-a10); }
.quick-grid svg { width: 18px; height: 18px; color: var(--brass); flex: none; }
@media (max-width: 399px) { .quick-grid { grid-template-columns: 1fr; } }

/* activity rows */
.act { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.act:last-child { border-bottom: 0; }
.act-ic { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); background: var(--ink-deep); color: var(--brass); }
.act-ic svg { width: 17px; height: 17px; }
.act-builds .act-ic { color: var(--weapon); } .act-favorites .act-ic { color: var(--brass-hi); } .act-teams .act-ic { color: var(--patina); } .act-matchups .act-ic { color: var(--violet); } .act-progress .act-ic { color: var(--success); } .act-account .act-ic { color: var(--fg-2); }
.act-main { min-width: 0; }
.act-main b { font-weight: 600; margin-right: 6px; }
.act-main span { color: var(--fg-2); overflow-wrap: anywhere; }
.act time { color: var(--muted); font: 400 var(--fs-caption)/1 var(--font-mono); white-space: nowrap; }
.act-list.compact .act { padding: 8px 0; }
.act-day { position: relative; padding-left: 22px; margin-bottom: var(--s-5); border-left: 1px solid var(--border); }
.act-date { position: relative; margin: 0 0 6px; font: 500 var(--fs-caption)/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.act-date::before { content: ""; position: absolute; left: -27px; top: 3px; width: 9px; height: 9px; background: var(--brass); transform: rotate(45deg); box-shadow: 0 0 0 4px var(--bg); }
.act-day .act-list { padding: 4px 16px; border: 1px solid var(--border); background: var(--surface); }
.more-wrap { display: flex; justify-content: center; margin-top: var(--s-4); }

/* ---------- record cards (builds, comparisons, teams, matchups) ---------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--s-4); }
.card-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.rec-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px; border: 1px solid var(--border); background: var(--surface); transition: border-color .25s, box-shadow .4s; scroll-margin-top: 90px; }
.rec-card:hover { border-color: #5a5045; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.rec-card.flash, .goal-card.flash { animation: flash 2.2s var(--ease-out); }
@keyframes flash { 0%, 40% { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-a25); } }
.rc-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc-hero { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--brass-a25); background: var(--surface-2); }
.rc-hero svg { width: 22px; height: 22px; }
.rc-title { min-width: 0; }
.rc-title h3 { font-size: 1.45rem; text-transform: uppercase; overflow-wrap: anywhere; }
.rc-title small { color: var(--muted); font-size: var(--fs-caption); }
.rc-items { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-item { width: 34px; height: 34px; padding: 3px; object-fit: contain; border: 1px solid var(--border); background: var(--ink-deep); }
.rc-more { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border: 1px dashed var(--border); color: var(--muted); font: 500 var(--fs-caption)/1 var(--font-mono); }
.rc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font: 400 var(--fs-caption)/1.3 var(--font-mono); color: var(--muted); }
.rc-meta b { color: var(--brass-hi); font-weight: 600; }
.rc-desc { margin: 0; font-size: var(--fs-small); color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.rc-actions .btn:first-child { margin-right: auto; }
.rc-actions .icon-btn { width: 38px; height: 38px; padding: 0; }
.group { margin-bottom: var(--s-6); }
.group-h { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; text-transform: uppercase; margin-bottom: var(--s-3); }
.group-h .muted { font: 500 var(--fs-small)/1 var(--font-mono); }
.cmp-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.cmp-mini > div { display: grid; gap: 6px; min-width: 0; padding: 10px; border: 1px solid var(--border); background: var(--ink-deep); }
.cmp-mini > div:first-child { border-top: 2px solid var(--brass); } .cmp-mini > div:last-child { border-top: 2px solid var(--violet); }
.cmp-mini b { font-size: var(--fs-small); overflow-wrap: anywhere; }
.cmp-mini small { color: var(--muted); font-size: .7rem; }
.cmp-mini em, .draft-mini em { align-self: center; font: 800 1rem/1 var(--font-display); font-style: normal; color: var(--brass); text-transform: uppercase; }
.cmp-mini .rc-item { width: 28px; height: 28px; }
.kind-badge { display: grid; place-items: center; flex: none; width: 52px; height: 48px; font: 600 .62rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; border: 1px solid; }
.k-team { color: var(--patina); border-color: rgba(95, 168, 138, .5); background: rgba(95, 168, 138, .08); }
.k-draft { color: var(--violet); border-color: rgba(185, 163, 255, .45); background: var(--violet-a15); }
.team-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.ts-hero { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--border); background: var(--ink-deep); }
.ts-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transition: transform .5s var(--ease-out); }
.ts-hero small { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 3px 3px; background: linear-gradient(transparent, rgba(12, 10, 9, .95)); font: 700 .7rem/1 var(--font-display); text-transform: uppercase; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card:hover .ts-img { transform: scale(1.06); }
.team-mini-an { padding: 12px; border: 1px solid var(--border); background: var(--ink-deep); }
.team-mini-an .meters { gap: 6px; }
.team-mini-an .meter { grid-template-columns: 82px 1fr 36px; font-size: var(--fs-caption); }
.team-mini-an p { margin: 10px 0 0; color: var(--fg-2); }
.team-mini-an p.good { color: var(--patina); }
.draft-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.dm-side { display: grid; gap: 6px; min-width: 0; padding: 10px; border: 1px solid var(--border); border-top: 2px solid var(--t); background: var(--ink-deep); }
.dm-side .label { color: var(--t); }
.dm-side .stack { flex-wrap: wrap; row-gap: 4px; }
.mu-mini { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 6px; height: 170px; padding: 0 12px 12px; margin: -18px -18px 0; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); background: var(--ink-deep); }
.mu-mini::before { content: ""; position: absolute; inset: 0 50% 0 0; z-index: -2; background: var(--bga, none) center / cover; opacity: .3; }
.mu-mini::after { content: ""; position: absolute; inset: 0 0 0 50%; z-index: -2; background: var(--bgb, none) center / cover; opacity: .3; }
.mm-side { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.mm-img { width: 92px; height: 110px; object-fit: cover; object-position: 50% 10%; -webkit-mask-image: linear-gradient(to top, transparent, #000 30%); mask-image: linear-gradient(to top, transparent, #000 30%); }
.mm-side b { font: 800 1.3rem/1 var(--font-display); text-transform: uppercase; margin-top: -10px; }
.mm-side:first-child b { color: var(--brass-hi); } .mm-side:last-child b { color: var(--violet); }
.mm-side small { color: var(--muted); font-size: .68rem; }
.mu-mini > em { align-self: center; font: 900 1.8rem/1 var(--font-display); font-style: normal; color: var(--fg); text-shadow: 0 0 20px rgba(201, 162, 77, .6); }
.mu-notes { padding: 12px 14px; border-left: 2px solid var(--brass); background: var(--ink-deep); font-size: var(--fs-small); color: var(--fg-2); }
.mu-notes .label { margin: 0 0 4px; }
.mu-notes p:last-child { margin: 0; }
.mu-modal { display: grid; gap: var(--s-5); }
.mu-modal .mu-body { gap: var(--s-6); }

/* ---------- favorites ---------- */
.fav-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.fav-card { position: relative; border: 1px solid var(--border); background: var(--surface); transition: border-color .25s, transform .35s var(--ease-out); }
.fav-card:hover { border-color: var(--brass); transform: translateY(-2px); }
.fav-link { display: flex; align-items: center; gap: 14px; padding: 12px 48px 12px 12px; color: var(--fg); }
.fav-img { display: grid; place-items: center; width: 64px; height: 64px; flex: none; overflow: hidden; border: 1px solid var(--border); background: var(--ink-deep); color: var(--brass); }
.fav-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.fav-item .fav-img img { object-fit: contain; padding: 8px; }
.fav-hero .fav-img { border-radius: 50%; border-color: var(--brass-a25); }
.fav-img svg { width: 26px; height: 26px; }
.fav-txt { min-width: 0; display: grid; gap: 2px; }
.fav-kind { font: 500 .62rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.fav-item .fav-kind { color: var(--weapon); } .fav-page .fav-kind { color: var(--violet); }
.fav-txt b { font: 800 1.2rem/1.05 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.fav-txt small { color: var(--muted); font-size: var(--fs-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-rm { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.fav-rm:hover { color: var(--danger); border-color: var(--danger); }

/* ---------- goals ---------- */
.prog-overview { display: grid; grid-template-columns: repeat(3, minmax(0, auto)) minmax(0, 1fr); gap: 10px; margin-bottom: var(--s-5); }
.po-stat { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--border); background: var(--surface); }
.po-stat b { display: block; font-size: var(--fs-ui); }
.po-stat small { color: var(--muted); font-size: var(--fs-caption); }
.po-n { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border: 1px solid var(--brass-a25); border-radius: 50%; font: 800 1.8rem/1 var(--font-display); color: var(--brass-hi); }
.po-chart { padding: 14px 18px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.po-chart .label { margin: 0 0 8px; }
.wchart { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; height: 92px; }
.wbar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.wbar i { display: block; width: 100%; height: max(2px, calc(var(--h) * .72)); background: linear-gradient(180deg, var(--brass-hi), var(--brass)); transition: height .8s var(--ease-out); }
.wbar small { color: var(--muted); font: 400 .58rem/1 var(--font-mono); white-space: nowrap; }
@media (max-width: 1199px) { .prog-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); } .po-chart { grid-column: 1 / -1; } }
@media (max-width: 639px) { .prog-overview { grid-template-columns: 1fr; } .wbar small { font-size: .5rem; } .wbar:nth-child(odd) small { visibility: hidden; } }
.goal-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: var(--s-4); }
.goal-card { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--border); background: var(--surface); scroll-margin-top: 90px; }
.goal-card.is-done { border-color: rgba(95, 168, 138, .45); background: linear-gradient(160deg, rgba(95, 168, 138, .08), transparent 50%), var(--surface); }
.gc-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.gc-hero { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; border: 1px solid var(--brass-a25); background: var(--surface-2); }
.gc-title h3 { font-size: 1.45rem; text-transform: uppercase; overflow-wrap: anywhere; }
.gc-title small { color: var(--muted); font-size: var(--fs-caption); }
.gc-pct { text-align: right; }
.gc-pct b { display: block; font: 800 2rem/1 var(--font-display); color: var(--brass-hi); }
.goal-card.is-done .gc-pct b { color: var(--patina); }
.gc-pct small { color: var(--muted); font: 400 .7rem/1.3 var(--font-mono); }
.gc-spark { margin: 4px 0 6px; }
.spark { width: 100%; height: 46px; }
.sp-target { stroke: var(--patina); stroke-dasharray: 3 4; stroke-width: 1; opacity: .7; }
.sp-line { fill: none; stroke: var(--brass); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sp-dot { fill: var(--bg); stroke: var(--brass-hi); stroke-width: 1.5; }
.gc-body { display: grid; gap: 14px; margin-top: 10px; }
.gc-ms .label, .gc-log .label { margin: 0 0 8px; }
.gc-ms ul, .gc-log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gc-log li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 32px; gap: 10px; align-items: center; padding: 4px 0 4px 10px; border-left: 2px solid var(--border); font-size: var(--fs-small); }
.gc-log li b { font-family: var(--font-mono); color: var(--brass-hi); }
.gc-log li span { color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-log time { color: var(--muted); font: 400 var(--fs-caption)/1 var(--font-mono); }
.goal-card .rc-actions { margin-top: 16px; }
.goal-card .rc-actions .btn:first-child { margin-right: 0; }
.goal-card .rc-actions .btn + .btn { margin-right: auto; }
@media (max-width: 479px) { .gc-head { grid-template-columns: 44px minmax(0, 1fr); } .gc-hero { width: 44px; height: 44px; } .gc-pct { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 10px; } .gc-log li { grid-template-columns: auto minmax(0, 1fr) 32px; } .gc-log time { display: none; } }

/* ---------- build editor ---------- */
.be-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--s-4); }
.be-top .bc-hero { width: 100%; }
.be-top .link-btn { justify-self: start; }
.be-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: var(--s-2) 0 var(--s-4); padding: 12px 14px; border: 1px solid var(--border); background: var(--ink-deep); font-size: var(--fs-small); color: var(--fg-2); }
.be-sum b { font: 700 1.1rem/1 var(--font-mono); color: var(--brass-hi); }
.be-sum .catbar { flex: 1 1 160px; }
.be-sum .catlegend { flex: 1 1 100%; margin: 0; }
.be-phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.be-phase { min-width: 0; padding: 12px; border: 1px solid var(--border); background: var(--ink-deep); }
.be-phase h3 { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 1.15rem; text-transform: uppercase; color: var(--brass-hi); }
.be-phase:nth-child(2) h3 { color: var(--fg); } .be-phase:nth-child(3) h3 { color: var(--violet); } .be-phase:nth-child(4) h3 { color: var(--patina); }
.be-phase h3 .muted { font: 500 var(--fs-small)/1 var(--font-mono); }
.be-phase ol { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 5px; counter-reset: be; }
.be-phase li { --c: var(--brass); counter-increment: be; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 6px; border: 1px solid var(--border); border-left: 3px solid var(--c); background: var(--surface); }
.be-img { width: 34px; height: 34px; object-fit: contain; }
.be-main b { display: block; font-size: var(--fs-caption); font-weight: 600; line-height: 1.2; }
.be-main b::before { content: counter(be) ". "; color: var(--muted); font-family: var(--font-mono); }
.be-main small { color: var(--muted); font: 400 .66rem/1 var(--font-mono); }
.be-ctl { grid-column: 1 / -1; display: flex; gap: 3px; align-items: center; }
.be-ctl .sel { flex: 1; min-width: 0; }
.be-ctl .icon-btn { height: 30px; min-width: 30px; }
@media (max-width: 1023px) { .be-phases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .be-top { grid-template-columns: 1fr; } .be-phases { grid-template-columns: 1fr; } }

/* ---------- settings ---------- */
.set-nav { position: sticky; top: 64px; z-index: 5; display: flex; gap: 4px; margin: 0 0 var(--s-5); padding: 8px 0; overflow-x: auto; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--border); }
.set-nav a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid transparent; color: var(--fg-2); font-size: var(--fs-small); white-space: nowrap; }
.set-nav a:hover { color: var(--fg); border-color: var(--border); }
.set-nav svg { width: 16px; height: 16px; color: var(--brass); }
.set-card { margin-bottom: var(--s-5); padding: clamp(18px, 3vw, 28px); border: 1px solid var(--border); background: var(--surface); scroll-margin-top: 130px; }
.set-card.danger { border-color: rgba(226, 92, 75, .4); background: linear-gradient(160deg, rgba(226, 92, 75, .06), transparent 50%), var(--surface); }
.set-head { margin-bottom: var(--s-5); }
.set-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.8rem; text-transform: uppercase; margin-bottom: 6px; }
.set-head h2 svg { width: 22px; height: 22px; color: var(--brass); }
.set-card.danger h2 svg { color: var(--danger); }
.set-head p { margin: 0; color: var(--fg-2); font-size: var(--fs-small); max-width: 70ch; }
.set-card h3 { font: 500 var(--fs-caption)/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin: var(--s-4) 0 var(--s-3); }
.set-card form > h3:first-child { margin-top: 0; }
.set-sub { margin-top: var(--s-6) !important; }
.set-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.set-split form { padding: 18px; border: 1px solid var(--border); background: var(--ink-deep); }
.set-split .form-actions { margin-top: var(--s-2); }
.set-split p.small { margin: 10px 0 0; }
@media (max-width: 899px) { .set-split { grid-template-columns: 1fr; } }
.prof-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.prof-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); }
@media (max-width: 719px) { .prof-row { grid-template-columns: 1fr; } .prof-fields { grid-template-columns: 1fr; } }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--fg-2); cursor: pointer; }
.avatar-pick .acct-av-xl { width: 96px; height: 96px; transition: transform .4s var(--ease-out); }
.avatar-pick:hover .acct-av-xl { transform: scale(1.05) rotate(-3deg); }
.ap-edit { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-caption)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.ap-edit svg { width: 13px; height: 13px; }
.avatar-pick:hover .ap-edit { color: var(--brass); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; margin: var(--s-2) 0 0; border: 1px solid var(--border); background: var(--border); }
.kv > div { padding: 12px 14px; background: var(--ink-deep); min-width: 0; }
.kv dt { font: 500 .64rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 4px 0 0; font-size: var(--fs-small); overflow-wrap: anywhere; }
.sess-list { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: 6px; }
.sess-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); background: var(--ink-deep); font-size: var(--fs-small); }
.sess-list li > span:first-child { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--brass); }
.sess-list svg { width: 17px; height: 17px; }
.sess-list small { display: block; color: var(--muted); font-size: var(--fs-caption); margin-top: 2px; }
.set-card .switch { border-bottom: 1px solid var(--line); padding: 12px 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .slk-modal[open], .slk-modal.closing, .toast, .acct-sheet-panel, .saved-banner { animation: none !important; transition: none !important; }
  .tool-card-link, .stat-card, .fav-card, .tb-slot, .hp-tile { transition: none; transform: none !important; }
}

/* header fit with the Tools menu item (narrow desktops) */
@media (min-width: 1080px) and (max-width: 1279px) {
  .header-inner { gap: var(--s-3); }
  .nav-link { padding: 0 8px; }
  .nav-link::after { left: 8px; right: 8px; }
  .acct-btn { padding: 0 4px; border-radius: 50%; width: 40px; justify-content: center; }
  .acct-btn .acct-txt { display: none; }
}
/* right-most menus open toward the left so they never run past the viewport */
.nav-item:nth-last-child(-n+2) .mega { left: auto; right: -12px; transform: translate(0, 8px); }
.nav-item:nth-last-child(-n+2) .mega[data-open="true"] { transform: translate(0, 0); }
.nav-link { white-space: nowrap; }

/* static build without the account server: hide every save / sign-in / favorite control */
[data-accounts="off"] .fav-btn, [data-accounts="off"] .mu-fav, [data-accounts="off"] [data-save],
[data-accounts="off"] [data-tobuild], [data-accounts="off"] [data-import], [data-accounts="off"] .acct-btn,
[data-accounts="off"] .drawer-acct { display: none !important; }
[data-accounts="off"] .item-card .item-card-body h3 { padding-right: 0; }

/* WordPress admin bar (only shown to logged-in editors) */
.admin-bar .site-header, .admin-bar.is-home .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header, .admin-bar.is-home .site-header { top: 46px; } }
@media (max-width: 600px) { #wpadminbar { position: fixed !important; } }
