/* ==========================================================================
   Kirk+ — cases, inventory, market, trades, notifications (on top of beta.css)
   ========================================================================== */

:root {
    --r-common: #b6bdc9;
    --r-rare: #8cc8ff;
    --r-epic: #c4a5ff;
    --r-legendary: #f3c06b;
    --r-mythic: #ff7b9c;
    --ruby: #ff4d6d;
}
.kp-r-common    { --rc: var(--r-common); }
.kp-r-rare      { --rc: var(--r-rare); }
.kp-r-epic      { --rc: var(--r-epic); }
.kp-r-legendary { --rc: var(--r-legendary); }
.kp-r-mythic    { --rc: var(--r-mythic); }

/* ── Kirk+ bar ───────────────────────────────────────────────────────────── */
.kp-bar {
    position: sticky; top: 60px; z-index: 45;
    background: rgba(11, 12, 16, .84);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--line);
}
.kp-bar-inner { display: flex; align-items: center; gap: 14px; height: 56px; }
.kp-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.kp-tabs::-webkit-scrollbar { display: none; }
.kp-tabs a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--pill); color: var(--muted); font-size: 14px; text-decoration: none; white-space: nowrap; transition: background var(--fast) ease, color var(--fast) ease; }
.kp-tabs a:hover { color: #fff; background: rgba(255,255,255,.05); }
.kp-tabs a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.09); }
.kp-tabs .kp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.kp-bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
/* Phones: tabs get their own row so Market and Trades aren't hidden off-screen. */
@media (max-width: 560px) {
    .kp-bar-inner { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
    .kp-tabs { order: 2; width: 100%; }
    .kp-tabs a { padding: 0 11px; }
}
.kp-balance { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--line-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.kp-balance.bump { animation: kp-bump .5s var(--ease-out); }
@keyframes kp-bump { 30% { transform: scale(1.08); border-color: rgba(127,220,164,.6); } }
.ruby { color: var(--ruby); }

/* ── Bell ────────────────────────────────────────────────────────────────── */
.kp-bell-wrap { position: relative; }
.kp-bell { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--soft); display: grid; place-items: center; transition: background var(--fast) ease, color var(--fast) ease; }
.kp-bell:hover, .kp-bell[aria-expanded="true"] { color: #fff; background: rgba(255,255,255,.1); }
.kp-bell svg { width: 17px; height: 17px; }
.kp-bell.ring svg { animation: kp-ring .9s ease; transform-origin: 50% 10%; }
@keyframes kp-ring { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.kp-badge { position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--page); font-variant-numeric: tabular-nums; }
.kp-notes { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); max-height: min(520px, 70vh); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0,0,0,.6); overflow: hidden; animation: rise-in .22s var(--ease-out) both; z-index: 60; }
@media (max-width: 520px) { .kp-notes { position: fixed; left: 16px; right: 16px; top: 124px; width: auto; } }
.kp-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.kp-notes-head h3 { font-size: 15px; }
.kp-notes-head .row { --gap: 4px; }
.kp-link-btn { border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 4px 6px; border-radius: 6px; }
.kp-link-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.kp-notes-list { overflow-y: auto; }
.kp-note { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--fast) ease; }
.kp-note:last-child { border-bottom: 0; }
.kp-note:hover { background: rgba(255,255,255,.03); }
.kp-note.unread { background: rgba(229,56,59,.05); }
.kp-note.unread::before { content: ""; position: absolute; left: 6px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.kp-note-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; background: var(--surface-3); }
.kp-note-title { font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.35; }
.kp-note-body { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.kp-note-time { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.kp-note-actions { display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity var(--fast) ease; }
.kp-note:hover .kp-note-actions, .kp-note:focus-within .kp-note-actions { opacity: 1; }
@media (hover: none) { .kp-note-actions { opacity: 1; } }
.kp-icon-btn { width: 26px; height: 26px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.kp-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.kp-icon-btn svg { width: 14px; height: 14px; }

/* ── Views ───────────────────────────────────────────────────────────────── */
.kp-view-head { padding: clamp(36px, 6vw, 64px) 0 clamp(20px, 3vw, 28px); display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.kp-view-head .lede { margin-top: 10px; }
.kp-view-head .eyebrow { margin-bottom: 8px; }
.kp-view-body { padding-bottom: clamp(56px, 8vw, 96px); }
.kp-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.kp-toolbar .control { width: auto; min-width: 180px; height: 38px; }
.kp-signin { text-align: center; padding: 48px 24px; }
.kp-signin h3 { color: #fff; }
.kp-signin p { color: var(--muted); margin: 6px 0 18px; }

/* ── Thing cards (cosmetics, crates, listings) ───────────────────────────── */
.kp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.kp-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: border-color var(--fast) ease, transform .25s var(--ease-out), box-shadow .25s ease; }
.kp-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 16px 36px -22px rgba(0,0,0,.9); }
.kp-art { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: radial-gradient(90% 80% at 50% 100%, color-mix(in srgb, var(--rc, #888) 22%, transparent), transparent 70%), var(--surface-2); border-bottom: 2px solid color-mix(in srgb, var(--rc, #888) 55%, transparent); }
.kp-art img { width: 58%; height: 58%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.45)); }
.kp-glyph { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc, #888) 14%, var(--surface-3)); color: var(--rc, var(--soft)); font-size: 22px; font-weight: 700; border: 1px solid color-mix(in srgb, var(--rc, #888) 30%, transparent); }
.kp-art .kp-corner { position: absolute; top: 10px; left: 10px; }
.kp-art .kp-corner-r { position: absolute; top: 10px; right: 10px; }
.kp-card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.kp-card-body h3 { font-size: 15.5px; }
.kp-sub { color: var(--muted); font-size: 12.5px; }
.kp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.kp-card-foot .row { --gap: 6px; }
.kp-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.kp-amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kp-card-foot.kp-stack { flex-direction: column; align-items: stretch; }
.kp-card-foot.kp-stack .row { justify-content: space-between; }
.kp-rarity { color: var(--rc, var(--soft)); border-color: color-mix(in srgb, var(--rc, #888) 35%, transparent); background: color-mix(in srgb, var(--rc, #888) 10%, transparent); }
.kp-count { position: absolute; bottom: 10px; right: 10px; height: 24px; padding: 0 9px; border-radius: var(--pill); background: rgba(11,12,16,.8); border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; }

/* ── Crates ──────────────────────────────────────────────────────────────── */
.kp-crates { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.kp-crate { --accent: #e5383b; }
.kp-crate .kp-art { aspect-ratio: 16 / 10; background: radial-gradient(70% 70% at 50% 60%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%), var(--surface-2); border-bottom-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.kp-crate-svg { width: 46%; height: auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); transition: transform .5s var(--ease-out); }
.kp-crate:hover .kp-crate-svg { transform: translateY(-4px) rotate(-2deg) scale(1.03); }
.kp-crate .kp-art::after { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 20%, color-mix(in srgb, var(--accent) 18%, transparent) 25%, transparent 30% 70%, color-mix(in srgb, var(--accent) 18%, transparent) 75%, transparent 80%); animation: kp-spin 14s linear infinite; pointer-events: none; }
@keyframes kp-spin { to { transform: rotate(360deg); } }
.kp-crate .kp-card-body { gap: 6px; padding: 16px 18px 18px; }
.kp-crate h3 { font-size: 18px; }
.kp-crate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.kp-odds summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.kp-odds summary::-webkit-details-marker { display: none; }
.kp-odds summary::after { content: "▾"; font-size: 11px; transition: transform .2s ease; }
.kp-odds[open] summary::after { transform: rotate(180deg); }
.kp-odds-list { margin-top: 10px; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
.kp-odds-row { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.kp-odds-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.kp-odds-row span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Opening overlay ─────────────────────────────────────────────────────── */
.kp-open { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: radial-gradient(120% 90% at 50% 40%, rgba(20,8,12,.92), rgba(5,6,9,.97)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: kp-fade .25s ease both; }
@keyframes kp-fade { from { opacity: 0; } }
.kp-open-inner { width: min(980px, 100%); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.kp-open-title { text-align: center; }
.kp-open-title h2 { font-size: clamp(22px, 3vw, 28px); }
.kp-open-title p { color: var(--muted); margin-top: 4px; }
.kp-reel-window { position: relative; width: 100%; height: 190px; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); border: 1px solid var(--line-strong); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.kp-reel { position: absolute; top: 15px; left: 0; display: flex; gap: 10px; will-change: transform; }
.kp-reel-tile { flex: none; width: 150px; height: 160px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(90% 70% at 50% 100%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%), var(--surface-2); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); border-bottom: 4px solid var(--rc); padding: 10px; text-align: center; }
.kp-reel-tile img { width: 72px; height: 72px; object-fit: contain; }
.kp-reel-tile .kp-glyph { width: 64px; height: 64px; }
.kp-reel-tile > span:last-child { font-size: 12.5px; font-weight: 600; line-height: 1.25; max-height: 2.5em; overflow: hidden; }
.kp-reel-tile.win { box-shadow: 0 0 0 2px var(--rc), 0 0 36px color-mix(in srgb, var(--rc) 70%, transparent); }
.kp-marker { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%); background: linear-gradient(180deg, #fff, var(--brand) 50%, #fff); box-shadow: 0 0 18px rgba(229,56,59,.9); z-index: 2; border-radius: 2px; }
.kp-marker::before, .kp-marker::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 9px solid transparent; }
.kp-marker::before { top: 0; border-top-color: #fff; }
.kp-marker::after { bottom: 0; border-bottom-color: #fff; }

.kp-reveal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.kp-reveal-stage { position: relative; width: 260px; height: 260px; display: grid; place-items: center; }
.kp-rays { position: absolute; inset: -60px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 32%, transparent) 0 8deg, transparent 8deg 22deg); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 68%); mask-image: radial-gradient(circle, #000 20%, transparent 68%); animation: kp-spin 18s linear infinite, kp-fade .6s ease both; }
.kp-halo { position: absolute; inset: 20px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 55%, transparent), transparent 65%); filter: blur(10px); animation: kp-pulse 2.4s ease-in-out infinite; }
@keyframes kp-pulse { 50% { transform: scale(1.12); opacity: .75; } }
.kp-reveal-card { position: relative; width: 190px; height: 190px; border-radius: 26px; display: grid; place-items: center; background: radial-gradient(90% 80% at 50% 100%, color-mix(in srgb, var(--rc) 35%, transparent), transparent 70%), var(--surface-2); border: 2px solid var(--rc); box-shadow: 0 0 60px color-mix(in srgb, var(--rc) 55%, transparent), inset 0 0 30px color-mix(in srgb, var(--rc) 20%, transparent); animation: kp-pop .7s cubic-bezier(.2,1.4,.4,1) both; }
.kp-reveal-card img { width: 66%; height: 66%; object-fit: contain; }
.kp-reveal-card .kp-glyph { width: 96px; height: 96px; font-size: 40px; }
@keyframes kp-pop { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.kp-reveal h2 { font-size: clamp(24px, 3.4vw, 34px); animation: rise-in .6s .15s var(--ease-out) both; }
.kp-reveal .kp-reveal-meta { animation: rise-in .6s .25s var(--ease-out) both; }
.kp-reveal .row { justify-content: center; animation: rise-in .6s .35s var(--ease-out) both; }
.kp-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 201; }
.kp-skip { position: absolute; top: 18px; right: 18px; }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.kp-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(5,6,9,.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: kp-fade .18s ease both; }
.kp-modal-card { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 24px; animation: rise-in .28s var(--ease-out) both; }
.kp-modal-card.wide { max-width: 860px; }
.kp-modal-card h2 { font-size: 20px; padding-right: 32px; }
.kp-modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.kp-modal-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.kp-thing-head { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.kp-thing-head .kp-art { width: 84px; height: 84px; aspect-ratio: auto; border-radius: 14px; border: 1px solid var(--line); border-bottom: 2px solid color-mix(in srgb, var(--rc, #888) 55%, transparent); flex: none; }
.kp-thing-head .kp-art img { width: 70%; height: 70%; }
.kp-thing-head .kp-glyph { width: 44px; height: 44px; font-size: 18px; }
.kp-value { font-size: 40px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kp-facts { display: grid; grid-template-columns: 1fr auto; gap: 9px 14px; font-size: 14px; margin-top: 14px; }
.kp-facts dt { color: var(--muted); }
.kp-facts dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.kp-form { display: grid; gap: 14px; margin-top: 8px; }
.kp-dur { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kp-dur button { height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--soft); font-weight: 600; }
.kp-dur button[aria-pressed="true"] { color: #fff; border-color: rgba(229,56,59,.7); background: rgba(229,56,59,.1); }
.kp-ruby-input { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.kp-ruby-input:focus-within { border-color: rgba(229,56,59,.7); box-shadow: 0 0 0 3px rgba(229,56,59,.18); }
.kp-ruby-input input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 15px; font-variant-numeric: tabular-nums; }
.kp-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); cursor: pointer; }
.kp-check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ── Market ──────────────────────────────────────────────────────────────── */
.kp-bidline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kp-bidline .lbl { color: var(--faint); font-size: 12px; }
.kp-bidline .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.kp-timer { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px; }
.kp-timer.soon { color: var(--warning); }
.kp-timer svg { width: 13px; height: 13px; }
.kp-bids { margin-top: 14px; display: grid; gap: 6px; max-height: 180px; overflow-y: auto; }
.kp-bid-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--soft); padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }

/* ── Trades ──────────────────────────────────────────────────────────────── */
.kp-trade-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 760px) { .kp-trade-tools { grid-template-columns: 1fr; } }
.kp-trade-tools .card h3 { margin-bottom: 4px; }
.kp-trade-tools .card p { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.kp-trade-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 720px) { .kp-trade-sides { grid-template-columns: 1fr; } }
.kp-side { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.kp-side.mine { border-color: rgba(229,56,59,.3); }
.kp-side-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kp-side-head h3 { font-size: 15px; }
.kp-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.kp-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 12px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--rc, #888) 35%, var(--line)); border-bottom: 3px solid var(--rc, #888); text-align: center; font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.kp-chip img { width: 40px; height: 40px; object-fit: contain; }
.kp-chip .kp-glyph { width: 40px; height: 40px; font-size: 15px; border-radius: 11px; }
.kp-chip .kp-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 13px; line-height: 1; display: grid; place-items: center; }
.kp-side-rubies { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 600; }
.kp-trade-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.kp-trade-status.go { border-color: rgba(127,220,164,.35); background: var(--success-bg); color: var(--success); }
.kp-trade-status.wait { border-color: rgba(243,192,107,.3); background: var(--warning-bg); color: var(--warning); }
.kp-trade-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.kp-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; margin-top: 12px; }
.kp-pick { cursor: pointer; }
.kp-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kp-pick .kp-chip { transition: border-color var(--fast) ease, background var(--fast) ease; }
.kp-pick-n { display: flex; flex-direction: column; gap: 6px; cursor: default; }
.kp-stepper { display: grid; grid-template-columns: 28px 1fr 28px; gap: 4px; }
.kp-stepper button { height: 28px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: #fff; font-weight: 700; }
.kp-stepper input { width: 100%; min-width: 0; height: 28px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: #fff; text-align: center; font-variant-numeric: tabular-nums; }
.kp-pick input:checked + .kp-chip { background: color-mix(in srgb, var(--rc, #888) 16%, var(--surface)); box-shadow: 0 0 0 2px var(--rc, #fff); }
.kp-pick input:focus-visible + .kp-chip { outline: 2px solid #fff; outline-offset: 2px; }

.kp-empty-art { font-size: 34px; margin-bottom: 8px; }
.kp-spin-inline { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: #fff; animation: spin .7s linear infinite; vertical-align: -2px; }

@media (prefers-reduced-motion: reduce) {
    .kp-crate .kp-art::after, .kp-rays, .kp-halo { animation: none; }
    .kp-reveal-card, .kp-bell.ring svg, .kp-balance.bump { animation: none; }
}
