/* RiftExile theme layer: aged gold, ember and stone. Component ideas inspired by Uiverse.io community elements (MIT),
   rewritten from scratch for this palette. Everything here is CSS only: transforms and opacity for motion, no images,
   and all motion stops for people who ask for reduced motion. */
@font-face { font-family: "Cinzel"; src: url("/assets/fonts/cinzel.woff") format("woff"); font-weight: 400 900; font-display: swap; }

/* ---- the room: warm black with a faint ember glow from above and a vignette ---------------------------------------- */
body {
  background:
    radial-gradient(1200px 520px at 50% -180px, rgba(224, 130, 62, .10), transparent 70%),
    radial-gradient(900px 600px at 50% 120%, rgba(142, 42, 32, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
::selection { background: rgba(201, 163, 91, .35); color: #fff7e6; }
a { color: #d9b46a; }
a:hover { color: #f0cd85; }

/* ---- type: carved serif for headings ------------------------------------------------------------------------------- */
h1, h2, .panel-title, .brand span, .feature h3, .card h3, .section-head h2 {
  font-family: var(--display); letter-spacing: .02em;
}
h1 { font-weight: 700; color: #f1e4c4; text-shadow: 0 2px 18px rgba(224, 130, 62, .18); }
h2 { font-weight: 600; color: #ead9b3; }
.panel-title { color: #a8916a; letter-spacing: .14em; }
.hero h1 { letter-spacing: .01em; }
.hero h1 em { background: linear-gradient(100deg, #f3d595 0%, #c9a35b 45%, #e0823e 100%); -webkit-background-clip: text; background-clip: text; }

/* ---- header: gilded rule along the bottom, animated underline on the links ----------------------------------------- */
.top { border-bottom: 1px solid #3a2d1f; box-shadow: 0 1px 0 rgba(201, 163, 91, .08), 0 10px 30px rgba(0, 0, 0, .35); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(201, 163, 91, .55) 30%, rgba(224, 130, 62, .7) 50%, rgba(201, 163, 91, .55) 70%, transparent); }
.brand span { font-weight: 700; font-size: 19px; color: #ead9b3; }
.brand b { color: #e0a94f; font-weight: 700; }
.nav > a { position: relative; transition: color .2s; }
.nav > a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #c9a35b, #e0823e); transition: left .25s ease, right .25s ease; }
.nav > a:hover { background: transparent; color: #f1e4c4; }
.nav > a:hover::after, .nav > a.on::after { left: 11px; right: 11px; }
.nav > a.on { background: transparent; color: #f1e4c4; }
@media (max-width: 880px) { .nav > a::after { bottom: 6px; } .nav > a:hover::after, .nav > a.on::after { left: 12px; right: auto; width: 26px; } }

/* ---- buttons: gilded primary with a light sweep; stone secondary that warms on hover -------------------------------- */
.btn { position: relative; overflow: hidden; background: linear-gradient(180deg, #221b14, #18130e); border-color: #3f3226; color: #eadcbf;
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .05), 0 1px 2px rgba(0, 0, 0, .4); transition: border-color .2s, box-shadow .2s, transform .1s, color .2s; }
.btn:hover { background: linear-gradient(180deg, #2a2118, #1c160f); border-color: #6b5435; color: #f6e7c8; box-shadow: inset 0 1px 0 rgba(255, 230, 180, .07), 0 0 0 1px rgba(201, 163, 91, .12), 0 4px 18px rgba(224, 130, 62, .12); }
.btn:active { transform: translateY(1px); }
.btn.primary { color: #1a1208; border-color: #b8893f; text-shadow: 0 1px 0 rgba(255, 240, 200, .35);
  background: linear-gradient(180deg, #ecc983 0%, #c9a35b 48%, #a77c35 100%);
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, .55), inset 0 -2px 0 rgba(90, 58, 20, .35), 0 2px 10px rgba(201, 163, 91, .18); }
.btn.primary:hover { background: linear-gradient(180deg, #f4d697 0%, #d4ae66 48%, #b0843b 100%); border-color: #d6a957; color: #120c05;
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, .6), inset 0 -2px 0 rgba(90, 58, 20, .35), 0 4px 22px rgba(224, 160, 70, .32); }
.btn.primary::before, .btn.sm.primary::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 252, 235, .55), transparent); transform: skewX(-20deg); transition: left .55s ease; }
.btn.primary:hover::before { left: 120%; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(201, 163, 91, .06); border-color: transparent; color: #eadcbf; box-shadow: none; }
.btn.danger { background: transparent; color: #e8775f; border-color: rgba(217, 88, 63, .45); }
.btn.danger:hover { background: rgba(217, 88, 63, .1); box-shadow: 0 0 18px rgba(217, 88, 63, .18); }
.btn.provider { justify-content: flex-start; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- cards and panels: carved stone with a gilt edge; linked cards get a slowly turning gold rim on hover ---------- */
.card, .list, .table-wrap, .empty {
  background: linear-gradient(180deg, rgba(255, 236, 200, .025), transparent 40%), var(--panel);
  border-color: #33291f; box-shadow: inset 0 1px 0 rgba(255, 230, 180, .04), 0 8px 24px rgba(0, 0, 0, .25);
}
.empty { background: transparent; border-color: #3e3225; box-shadow: none; }
.card.link { position: relative; isolation: isolate; }
@property --rx-rim { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.card.link::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1; opacity: 0; pointer-events: none;
  background: conic-gradient(from var(--rx-rim), rgba(201, 163, 91, .15), #e0b062, rgba(224, 130, 62, .9), rgba(201, 163, 91, .15) 40%, rgba(201, 163, 91, .15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .3s; }
.card.link:hover { border-color: transparent; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 26px rgba(224, 130, 62, .08); }
.card.link:hover::before { opacity: 1; animation: rx-rim 3s linear infinite; }
@keyframes rx-rim { to { --rx-rim: 360deg; } }
.feature .ico-tile { color: #e0b062; border-color: #4a3a28; background: radial-gradient(circle at 50% 30%, #3a2c1d, #1b150f 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .05), 0 0 16px rgba(224, 130, 62, .12); }

/* ---- small parts -------------------------------------------------------------------------------------------------- */
.pill { background: #1b150f; border-color: #3a2e22; color: #b9a98f; }
.pill.rift { color: #e0b062; border-color: rgba(201, 163, 91, .45); background: rgba(201, 163, 91, .07); }
.pill.ember { color: #f09a5a; border-color: rgba(224, 130, 62, .45); background: rgba(224, 130, 62, .07); }
.pill.violet { color: #c6a6ea; border-color: rgba(176, 138, 216, .4); background: rgba(176, 138, 216, .07); }
.note { background: rgba(201, 163, 91, .06); border-color: rgba(201, 163, 91, .28); }
.note.warn { background: rgba(217, 164, 65, .07); border-color: rgba(217, 164, 65, .35); }
.note.err { background: rgba(217, 88, 63, .08); border-color: rgba(217, 88, 63, .4); }
.toast { background: linear-gradient(180deg, #241c14, #1a140e); border-color: #4a3a28; }
.toast.ok { border-color: rgba(143, 192, 106, .5); } .toast.err { border-color: rgba(217, 88, 63, .55); }
th { background: #130f0b; color: #8f7e66; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(201, 163, 91, .045); }
.seg { background: #120e0a; border-color: #33291f; }
.seg button.on { background: linear-gradient(180deg, #2c2218, #211a12); color: #f1e4c4; box-shadow: inset 0 0 0 1px rgba(201, 163, 91, .25); }
hr { border-top-color: #2d241b; }

/* inputs: sunken stone, a warm glow on focus */
input, select, textarea { background: #0f0c09; border-color: #362b20; color: var(--text); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: #6f6253; }
input:hover, select:hover, textarea:hover { border-color: #4a3b2b; }
input:focus, select:focus, textarea:focus { border-color: #b8893f; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35), 0 0 0 3px rgba(201, 163, 91, .14), 0 0 18px rgba(224, 130, 62, .12); }
:focus-visible { outline-color: #d9b46a; }

/* checkboxes: a small gilded square with a drawn tick */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; min-height: 0; padding: 0; flex: none; margin: 2px 0 0;
  border: 1px solid #5a4733; border-radius: 4px; background: #0f0c09; display: inline-grid; place-items: center; cursor: pointer; }
input[type="checkbox"]::after { content: ""; width: 9px; height: 5px; border: solid #1a1208; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .15s ease; margin-top: -2px; }
input[type="checkbox"]:checked { background: linear-gradient(180deg, #ecc983, #b8893f); border-color: #d6a957; box-shadow: 0 0 10px rgba(224, 160, 70, .3); }
input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }

/* the PoE 1 / PoE 2 switch: gold instead of teal */
.game-switch { background: #120e0a; border-color: #33291f; }
.game-switch button.on { color: #1a1208; background: linear-gradient(180deg, #ecc983, #b8893f); }
.game-switch button.on::after { background: #e0823e; box-shadow: 0 0 10px #e0823e, 0 0 20px rgba(224, 130, 62, .5); }

/* page headers get a small engraved rule under them */
.page-head { position: relative; padding-bottom: 14px; }
.page-head::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(260px, 60%); height: 1px;
  background: linear-gradient(90deg, rgba(201, 163, 91, .6), rgba(224, 130, 62, .35), transparent); }

/* footer */
.foot { background: linear-gradient(180deg, #0e0b08, #0a0806); border-top-color: #2d241b; }
.foot strong { font-family: var(--display); color: #e0b062; letter-spacing: .03em; }

/* loading shimmer and the Patch Day edge in the new colours */
.skel i { background: linear-gradient(90deg, #17120d 0%, #2a2117 40%, #17120d 80%); background-size: 300% 100%; }
.pd-build.hit::before { background: conic-gradient(from var(--rx-spin), transparent 0 50%, #e0823e 72%, #ffd59a 78%, #e0823e 84%, transparent 100%); }
.pd-line mark { background: rgba(224, 130, 62, .25); }
.pw-rules li.ok { color: var(--good); }

/* scrollbars */
* { scrollbar-color: #4a3b2b #0f0c09; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f0c09; }
::-webkit-scrollbar-thumb { background: #3e3225; border-radius: 10px; border: 2px solid #0f0c09; }
::-webkit-scrollbar-thumb:hover { background: #5a4733; }

@media (prefers-reduced-motion: reduce) {
  .btn.primary::before, .nav > a::after, .card.link::before { transition: none; animation: none; }
  .card.link:hover { transform: none; }
}

/* ---- home dashboard -------------------------------------------------------------------------------------------- */
.dash { padding-top: 18px; }
.timers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 22px; }
.timer { position: relative; background: linear-gradient(180deg, #19140f, #110d0a); border: 1px solid #3a2e22; border-radius: 10px; padding: 12px 16px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .05), 0 6px 18px rgba(0, 0, 0, .35); min-height: 112px; }
.timer::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(224, 170, 90, .55), transparent); }
.timer.skel-box { background: linear-gradient(90deg, #15110d 0%, #221b14 40%, #15110d 80%); background-size: 300% 100%; animation: rx-skel 1.3s ease-in-out infinite; }
.empty-timer { display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.tm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.tm-title { font-family: var(--display); font-weight: 700; font-size: 18px; color: #e0a94f; letter-spacing: .01em; }
a.tm-title:hover { color: #f3c870; text-decoration: none; }
.tm-ver { font-family: var(--display); color: #e0a94f; font-weight: 700; }
.tm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; text-align: center; }
.tm-when { font-variant-numeric: tabular-nums; color: #eadcbf; font-size: 15px; }
.tm-what { color: var(--muted); font-size: 13.5px; }
.tm-left { font-variant-numeric: tabular-nums; font-size: 15.5px; color: #eadcbf; font-weight: 600; }
.tm-left.soon { color: #f0c262; } .tm-left.live { color: #8fc06a; } .tm-left.late { color: #e8775f; }
.tm-note { position: absolute; right: 12px; bottom: 6px; font-size: 11px; color: var(--faint); font-style: italic; }
.timer.unconfirmed { border-style: dashed; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }
.box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.box-title { font-family: var(--display); font-size: 17px; margin: 0; color: #ead9b3; letter-spacing: .04em; }
h2.box-title { font-size: 20px; }
.box-sub { font-size: 12.5px; color: var(--faint); }
.dash-side { display: flex; flex-direction: column; gap: 14px; }
.side-box { background: linear-gradient(180deg, rgba(255, 236, 200, .025), transparent 40%), var(--panel); border: 1px solid #33291f; border-radius: 10px; padding: 14px 16px; }
.btn.block { width: 100%; }

/* news feed: date block, title, tag */
.feed { border: 1px solid #33291f; border-radius: 10px; background: var(--panel); overflow: hidden; }
.feed-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #261f17; color: var(--text); transition: background .15s; }
.feed-row:last-child { border-bottom: 0; }
.feed-row:hover { background: rgba(201, 163, 91, .05); text-decoration: none; color: #fff3da; }
.feed-date { display: flex; flex-direction: column; align-items: center; font-size: 11px; text-transform: uppercase; color: #a8916a; letter-spacing: .06em; line-height: 1.1; }
.feed-date b { font-family: var(--display); font-size: 19px; color: #e0a94f; }
.feed-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.feed-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feed-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--faint); }
.feed-out { color: var(--faint); }
.tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; border-radius: 4px; border: 1px solid #3a2e22; color: #b9a98f; }
.tag-patch { color: #f09a5a; border-color: rgba(224, 130, 62, .45); }
.tag-summary { color: #e0b062; border-color: rgba(201, 163, 91, .45); }

/* economy box */
.div-price { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0; padding: 8px 10px; border-radius: 8px; background: #0f0c09; border: 1px solid #2d241b; }
.div-price b { font-family: var(--display); color: #f0c262; font-size: 18px; }
.movers { display: flex; flex-direction: column; gap: 2px; }
.mover { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 5px 4px; border-radius: 6px; color: var(--text); font-size: 13.5px; }
.mover:hover { background: rgba(201, 163, 91, .06); text-decoration: none; }
.mv-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mv-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.mv-ch { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 54px; text-align: right; }
.patch-name { font-weight: 600; margin-top: 6px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-link { font-size: 13px; padding: 5px 10px; border-radius: 6px; border: 1px solid #3a2e22; color: #d6c39e; background: #120e0a; transition: border-color .15s, color .15s; }
.quick-link:hover { border-color: #8a6a32; color: #f6e7c8; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .timer.skel-box { animation: none; } }

/* ---- economy: categories on the left, the price table on the right ------------------------------------------------ */
.page.eco { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.eco-side { position: sticky; top: calc(var(--top-h) + 14px); display: flex; flex-direction: column; gap: 14px; }
.eco-league { display: flex; flex-direction: column; gap: 4px; }
.eco-group { display: flex; flex-direction: column; gap: 1px; }
.eco-gname { font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #a8916a; margin: 0 0 4px 8px; }
.eco-cat { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; color: #cbbb9b; font-size: 14px; border-left: 2px solid transparent; }
.eco-cat:hover { background: rgba(201, 163, 91, .06); color: #f1e4c4; text-decoration: none; }
.eco-cat.on { background: linear-gradient(90deg, rgba(201, 163, 91, .14), transparent); border-left-color: #e0a94f; color: #f6e7c8; }
.eco-n { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.eco-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.eco-head h1 { margin: 0 0 2px; }
.eco-search { width: 260px; max-width: 100%; }
.eco-table td { padding-top: 7px; padding-bottom: 7px; }
.eco-table .item-cell img { width: 32px; height: 32px; }
.noicon { width: 32px; height: 32px; display: inline-block; }
.eco-val { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.eco-val b { font-variant-numeric: tabular-nums; color: #f1e4c4; }
.eco-val img.cur { width: 18px; height: 18px; }
.eco-div { margin-left: 6px; font-size: 12px; color: #a8916a; }
.spark-cell { white-space: nowrap; }
.spark-cell > * { vertical-align: middle; }
.spark-cell > span { margin-left: 8px; }
.spark-cell { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.spark-cell .spark { display: inline-block; }
.x-unused { font-size: 12.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .page.eco { grid-template-columns: 1fr; }
  .eco-side { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .eco-league { width: 100%; }
  .eco-group { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .eco-gname { display: none; }
  .eco-cat { border: 1px solid #3a2e22; border-left-width: 1px; }
  .eco-n { margin-left: 6px; }
  .eco-table th:nth-child(4), .eco-table td:nth-child(4), .eco-table th:nth-child(5), .eco-table td:nth-child(5) { display: none; }
}

/* ---- build page ------------------------------------------------------------------------------------------------------ */
.bp { max-width: 1320px; }
.bp .card h2 { margin: 0; font-size: 18px; }
.caps { text-transform: uppercase; letter-spacing: .12em; }
.bp-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: start; margin: 6px 0 22px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(224, 130, 62, .07), transparent 60%), var(--panel); }
.bp-badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 700 22px var(--display); color: #f1e4c4;
  background: radial-gradient(circle at 35% 30%, #4a3520, #1b130c 70%); border: 2px solid #8a6a32; box-shadow: 0 0 0 4px rgba(201, 163, 91, .08), 0 6px 22px rgba(0, 0, 0, .5); }
.bp-eyebrow { color: var(--ember); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.bp-title h1 { margin: 2px 0 2px; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.15; overflow-wrap: anywhere; }
.bp-sub { font-size: 17px; color: #e7d6b2; }
.bp-blood { color: #c58cff; }
.bp-meta { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bp-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; min-width: 0; }
.pob-code { width: min(380px, 100%); }
.pob-row { display: flex; gap: 6px; margin-top: 4px; }
.pob-row input { flex: 1; min-width: 0; font: 12px var(--mono); background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; color: var(--muted); padding: 7px 9px; }
@media (max-width: 760px) {
  .bp-head { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
  .bp-badge { width: 48px; height: 48px; font-size: 17px; }
  .bp-actions { grid-column: 1 / -1; align-items: stretch; }
  .pob-code { width: 100%; }
}
.bp-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
@media (max-width: 960px) { .bp-top { grid-template-columns: 1fr; } }
.bp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.seg.sm button { padding: 4px 12px; font-size: 12.5px; }

/* paper doll */
.doll-wrap { display: flex; justify-content: center; }
.doll { --cell: clamp(30px, 9.6vw, 50px); display: grid; grid-template-columns: repeat(8, var(--cell)); grid-auto-rows: var(--cell); gap: 6px; }
.slot { position: relative; display: grid; place-items: center; padding: 4px; border-radius: 6px; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .035), transparent 70%), #0d0b09;
  border: 1px solid #2c241b; box-shadow: inset 0 0 18px rgba(0, 0, 0, .6); transition: border-color .15s, transform .15s; }
.slot:hover, .slot:focus-visible { border-color: #8a6a32; outline: none; transform: translateY(-1px); }
.slot img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6)); }
.slot.empty { cursor: default; opacity: .45; }
.slot.r-unique, .slot.r-relic { border-color: #5c3d1e; background: radial-gradient(circle at 50% 40%, rgba(175, 96, 37, .16), transparent 70%), #0d0b09; }
.slot.r-rare { border-color: #4f4520; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 119, .07), transparent 70%), #0d0b09; }
.slot.r-magic { border-color: #26304d; background: radial-gradient(circle at 50% 40%, rgba(136, 136, 255, .1), transparent 70%), #0d0b09; }
.noart { font-size: 11px; color: var(--faint); }
.flasks { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.slot.flask { width: clamp(34px, 9vw, 50px); height: calc(clamp(34px, 9vw, 50px) * 2); }
.jewel-group { margin-top: 16px; }
.jewel-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.jewel-cell { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jewel-cell span { font-size: 11px; color: var(--muted); max-width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.jewel { width: 48px; height: 48px; }

/* item tooltip: our own frame, the game's colour language for rarity and mod kinds */
.item-tip { position: fixed; z-index: 90; pointer-events: none; }
.item-tip.hide { display: none; }
.it { background: #0a0806; border: 1px solid #4a3a28; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .7); font-size: 13.5px; text-align: center; }
.it-head { padding: 9px 12px; border-bottom: 1px solid #3a2d1f; font-family: var(--display); }
.it-name { font-size: 16px; font-weight: 700; }
.it-base { font-size: 14px; }
.it-head.r-unique, .it-head.r-relic { color: #e0904a; background: linear-gradient(180deg, rgba(175, 96, 37, .25), transparent); }
.it-head.r-relic { color: #82d98b; }
.it-head.r-rare { color: #f4e07a; background: linear-gradient(180deg, rgba(255, 255, 119, .12), transparent); }
.it-head.r-magic { color: #9a9cff; background: linear-gradient(180deg, rgba(136, 136, 255, .14), transparent); }
.it-head.r-normal, .it-head.r-gem { color: #ddd; }
.it-sec { padding: 7px 12px; border-top: 1px solid rgba(201, 163, 91, .14); }
.it-sec:first-of-type { border-top: 0; }
.it-prop { color: #9b9184; }
.it-prop b { color: #eee; font-weight: 500; }
.it-mod { color: #8f9bff; line-height: 1.45; }
.it-mod.enchant { color: #b8daf2; }
.it-mod.k-crafted { color: #b4b4ff; }
.it-mod.k-fractured { color: #a29162; }
.it-mod.k-crucible { color: #f2a057; }
.it-flags { display: flex; flex-direction: column; gap: 2px; color: #c8b26f; }
.it-flags .corrupt { color: #d20000; font-weight: 600; }
.sockets { letter-spacing: .06em; }

/* stats */
.bp-stats h2 { margin-bottom: 10px !important; }
.st-group { padding: 10px 0; border-top: 1px solid var(--line); }
.st-group:first-of-type { border-top: 0; }
.st-group > .caps { margin-bottom: 6px; color: #a8916a; }
.st-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; }
.st-row > span { color: var(--muted); }
.st-row > b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.str, .fire { color: #e2654a; } .dex, .light { color: #e6c84a; } .int, .cold { color: #6aa3e8; } .chaos { color: #c45fd6; }
.dex { color: #7cc05a; }
b.life { color: #e2654a; } b.es { color: #8fd0f0; } b.mana { color: #6aa3e8; }
.res { white-space: nowrap; }
.main-skill { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #3a2d1f; border-radius: 10px; background: var(--bg2); }
.main-skill img { border-radius: 6px; }
.ms-body { flex: 1; min-width: 0; }
.ms-name { font-weight: 600; }
.ms-sub { font-size: 12px; color: var(--muted); }
.ms-dps { text-align: right; }
.ms-dps b { display: block; font: 700 18px var(--font); color: #f3d595; border-bottom: 2px solid var(--ember); padding-bottom: 2px; }
.ms-dps span { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }

/* tree */
.bp-tree { margin-bottom: 18px; }
.bt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .bt-grid { grid-template-columns: 1fr; } }
.bt-wrap { position: relative; }
.bt-wrap.loading { height: 420px; border-radius: 10px; background: #050505; }
.bt-stage { position: relative; height: clamp(360px, 62vw, 680px); border-radius: 10px; overflow: hidden; background: #050505; border: 1px solid #2c241b; touch-action: pan-y; }
.bt-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.dragging canvas { cursor: grabbing; }
.bt-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.bt-tools .btn { background: rgba(14, 11, 8, .88); backdrop-filter: blur(4px); }
.bt-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: rgba(14, 11, 8, .9); border: 1px solid var(--line2); color: var(--muted);
  font-size: 12.5px; padding: 5px 12px; border-radius: 99px; pointer-events: none; }
.bt-hint.hide, .bt-tip.hide { display: none; }
.bt-tip { position: absolute; z-index: 3; width: 270px; background: rgba(8, 6, 5, .96); border: 1px solid #4a3a28; border-radius: 9px; padding: 8px 11px; pointer-events: none;
  font-size: 12.5px; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
.bt-tip-name { font-weight: 700; color: #ead9b3; }
.bt-tip-name.k-notable { color: #f3d595; } .bt-tip-name.k-keystone { color: #e0904a; } .bt-tip-name.k-jewel { color: #8fd0f0; }
.bt-tip-sub { font-size: 11.5px; color: var(--faint); }
.bt-tip ul, .bt-node ul { margin: 4px 0 0; padding: 0; list-style: none; color: #9da7ff; }
.bt-wrap.full { position: fixed; inset: 0; z-index: 80; background: #050505; padding: 0; }
.bt-wrap.full .bt-stage { height: 100%; border-radius: 0; border: 0; touch-action: none; }
body.noscroll { overflow: hidden; }
.bt-side { display: flex; flex-direction: column; gap: 10px; max-height: clamp(360px, 62vw, 680px); overflow: auto; }
@media (max-width: 1000px) { .bt-side { max-height: none; } }
.bt-side details { border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); padding: 0 12px; }
.bt-side summary { cursor: pointer; padding: 10px 0; font: 600 13px var(--display); letter-spacing: .08em; color: #d8c49c; text-transform: uppercase; display: flex; justify-content: space-between; }
.bt-side summary .n { font-family: var(--font); color: var(--faint); }
.bt-node { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.bt-node-name { font-weight: 600; }
.bt-node-name.k-keystone { color: #e0904a; } .bt-node-name.k-notable { color: #f3d595; }

/* skills */
.bp-skills { margin-bottom: 18px; }
.bp-skills h2 { margin-bottom: 8px !important; }
.sk-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.sk-row:first-of-type { border-top: 0; }
.sk-item { display: grid; place-items: center; min-height: 60px; text-align: center; }
.sk-item img { max-width: 64px; max-height: 110px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6)); }
.sk-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.sk-group { position: relative; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg2); padding: 6px 10px; }
.sk-group.main { border-color: #8a6a32; box-shadow: 0 0 0 1px rgba(201, 163, 91, .25), 0 0 24px rgba(224, 130, 62, .08); }
.sk-group.off { opacity: .55; }
.sk-main { position: absolute; top: -9px; right: 10px; background: var(--ember); color: #1b100a; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 1px 7px; border-radius: 99px; }
.gem { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 13.5px; }
.gem.active .gem-name { font-weight: 600; color: #f0e5cf; }
.gem.support .gem-name { color: var(--muted); }
.gem.off { opacity: .45; text-decoration: line-through; }
.gem-lvl { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.gem-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); justify-self: center; }
@media (max-width: 560px) { .sk-row { grid-template-columns: 1fr; } .sk-item { justify-content: start; min-height: 0; } .sk-item img { max-height: 56px; } .sk-groups { grid-template-columns: 1fr; } }
