/* Horadric Cube v2 (switch cube_v2): reference page + game-look cube window (horadric-cube-v2.js).
   Window geometry in game units of the 716 × 916 window stone (explorer views/Cube.jsx), scaled by --u. */
@font-face { font-family: 'D4 Exocet'; src: url(/assets/fonts/d4-exocet-medium.woff2) format('woff2'); font-weight: 400; font-display: swap; }

.hc2-page, .hc2-db {
    --hc2-gold: #c4a24e;
    --hc2-gold-2: #e3d4ae;
    --hc2-text: #c8bca5;
    --hc2-muted: #8d8272;
    --hc2-panel: #13151a;
    --hc2-line: #2a2a35;
    --hc2-head: 'D4 Exocet', var(--font-heading, serif);
}
.hc2-page {
    max-width: var(--max-width, 1280px);
    margin: 0 auto;
    padding: 0 0 3rem;
    color: var(--text-primary, #e0ddd5);
}

/* ---- game text colours + inline font icons ({icon:…} in game texts) ---- */
.hc2-page .gt-icon-img, .hc2-db .gt-icon-img, .hc2-modal .gt-icon-img { display: inline-block; height: 1.35em; width: auto; vertical-align: -0.3em; margin: 0 0.1em; }
.hc2-page .gt-c_unique, .hc2-db .gt-c_unique { color: var(--rarity-unique, #d1a781); }
.hc2-page .gt-c_legendary, .hc2-db .gt-c_legendary { color: var(--rarity-legendary, #d98c3c); }
.hc2-page .gt-c_mythic, .hc2-db .gt-c_mythic { color: var(--rarity-mythic, #c0a1d8); }
.hc2-page .gt-c_rare, .hc2-db .gt-c_rare { color: var(--rarity-rare, #f1f25c); }
.hc2-page .gt-c_magic, .hc2-db .gt-c_magic { color: var(--rarity-magic, #6d6ed9); }
.hc2-page .gt-c_set, .hc2-db .gt-c_set { color: var(--rarity-set, #00ff00); }
.hc2-page .gt-c_white, .hc2-db .gt-c_white { color: #e9e9e9; }
.hc2-page .gt-c_important, .hc2-db .gt-c_important { color: #efebe3; }
.hc2-page .gt-c_highlight, .hc2-db .gt-c_highlight { color: #d8742a; }
.hc2-page .gt-c_number, .hc2-db .gt-c_number { color: #d9a962; }
.hc2-page .gt-c_chaos, .hc2-db .gt-c_chaos { color: #40a68e; }
.hc2-page .gt-c_red, .hc2-db .gt-c_red { color: #e05050; }
.hc2-page .gt-c_green, .hc2-db .gt-c_green { color: #4fbf5a; }
.hc2-page .gt-c_gray, .hc2-db .gt-c_gray { color: #9d968a; }
.hc2-q-normal { --q: var(--rarity-common, #d4d4d4); }
.hc2-q-magic { --q: var(--rarity-magic, #6d6ed9); }
.hc2-q-rare { --q: var(--rarity-rare, #f1f25c); }
.hc2-q-legendary { --q: var(--rarity-legendary, #d98c3c); }
.hc2-q-unique { --q: var(--rarity-unique, #d1a781); }
.hc2-q-set { --q: var(--rarity-set, #00ff00); }
.hc2-q-mythic { --q: var(--rarity-mythic, #c0a1d8); }
span.hc2-q-normal, span.hc2-q-magic, span.hc2-q-rare, span.hc2-q-legendary, span.hc2-q-unique, span.hc2-q-set, span.hc2-q-mythic { color: var(--q); }

/* ---- breadcrumbs + hero (guide layout) ---- */
.hc2-crumbs { margin: -1.5rem 0 0.5rem; padding: 0.25rem 0 0; font-size: 0.85rem; }
.hc2-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0; margin: 0; }
.hc2-crumbs li { display: flex; align-items: center; gap: 0.25rem; color: var(--text-muted, #7a7870); }
.hc2-crumbs li:not(:last-child)::after { content: '\203A'; margin-left: 0.25rem; }
.hc2-crumbs a { color: var(--text-dimmed, #7a7870); text-decoration: none; }
.hc2-crumbs a:hover { color: var(--hc2-gold); text-decoration: underline; }
.hc2-crumbs li:last-child a { color: var(--text-primary, #e0ddd5); pointer-events: none; }

.hc2-hero { position: relative; min-height: 280px; display: flex; align-items: flex-end; border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); }
.hc2-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hc2-hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 15, 0.1) 0%, rgba(10, 10, 15, 0.55) 55%, rgba(10, 10, 15, 0.94) 100%); }
.hc2-hero__content { position: relative; z-index: 1; padding: 3.5rem 1.75rem 1.4rem; display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; }
.hc2-hero__icon { grid-row: span 2; width: 64px; height: 64px; filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.9)); }
.hc2-hero__title { font-family: var(--font-heading); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.15; margin: 0; color: var(--hc2-gold); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.hc2-hero__stand { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--text-secondary, #b0aea6); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }

/* ---- lead + key facts ---- */
.hc2-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.hc2-lead { font-size: 1.06rem; line-height: 1.7; margin: 0 0 1rem; color: var(--text-primary, #e0ddd5); }
.hc2-lead strong { color: var(--hc2-gold-2); }
.hc2-lore { margin: 0; padding: 0.4rem 0 0.4rem 1rem; border-left: 3px solid #6a5536; font-style: italic; color: #a99f8c; }
.hc2-intro__facts { background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 8px; padding: 1rem 1.15rem; }
.hc2-facts__title { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-secondary, #b0aea6); margin: 0 0 0.7rem; }
.hc2-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.9rem; line-height: 1.5; }
.hc2-facts li { padding-left: 1rem; position: relative; }
.hc2-facts li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--hc2-gold); }
.hc2-facts strong { color: var(--hc2-gold-2); }

/* ---- simulator section ---- */
.hc2-sim { margin: 0 0 2.5rem; scroll-margin-top: calc(var(--header-height, 64px) + 12px); }
.hc2-sim__head h2 { font-family: var(--font-heading); color: var(--hc2-gold); margin: 0 0 0.35rem; }
.hc2-sim__head p { margin: 0 0 1rem; color: var(--text-secondary, #b0aea6); max-width: 900px; }
.hc2-app { min-height: 420px; }
.hc2-loading, .hc2-note { padding: 2rem; text-align: center; color: var(--hc2-muted); background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 8px; }

.hc2-cube {
    --u: clamp(0.5px, calc((100vh - 190px) / 916), 0.85px);
    display: grid;
    grid-template-columns: 300px calc(716 * var(--u)) minmax(0, 1fr);
    grid-template-areas: "book win side" "inv inv inv";
    gap: 12px;
    align-items: start;
    font-family: var(--font-body);
}
.hc2-cube.is-book-closed { grid-template-columns: calc(716 * var(--u)) minmax(0, 1fr); grid-template-areas: "win side" "inv inv"; }
.hc2-cube.is-book-closed .hc2-book { display: none; }
.hc2-book { grid-area: book; }
.hc2-col { grid-area: win; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hc2-side { grid-area: side; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hc2-inv { grid-area: inv; min-width: 0; }

/* the window stone */
.hc2-window { position: relative; width: calc(716 * var(--u)); height: calc(916 * var(--u)); flex: none; user-select: none; background: #080706 var(--hc2-bg) center / 100% 100% no-repeat; box-shadow: 0 0 calc(24 * var(--u)) #000; border-radius: 4px; }
.hc2-window__heated { position: absolute; left: calc(188 * var(--u)); top: calc(167 * var(--u)); width: calc(340 * var(--u)); height: calc(401 * var(--u)); opacity: 0.55; mix-blend-mode: screen; pointer-events: none; }
.hc2-window__frame { position: absolute; left: calc(160.5 * var(--u)); top: calc(141 * var(--u)); width: calc(395 * var(--u)); height: calc(453 * var(--u)); pointer-events: none; filter: drop-shadow(0 0 calc(10 * var(--u)) rgba(255, 170, 60, 0.55)); }
.hc2-window__help { position: absolute; left: calc(18 * var(--u)); top: calc(18 * var(--u)); width: 30px; height: 30px; border-radius: 50%; border: 2px solid #8a6d3b; background: #15110c; color: #e9cf8a; font-family: var(--hc2-head); font-size: 17px; line-height: 1; cursor: pointer; z-index: 2; }
.hc2-window__help:hover { border-color: #e9cf8a; }
.hc2-prompt { position: absolute; left: calc(60 * var(--u)); right: calc(60 * var(--u)); top: calc(40 * var(--u)); height: calc(72 * var(--u)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; color: #b8ad99; line-height: 1.2; }
.hc2-prompt__name { font-family: var(--hc2-head); color: var(--hc2-gold-2); font-size: max(13px, calc(22 * var(--u))); letter-spacing: 0.02em; }
.hc2-prompt__details { font-size: max(11px, calc(16 * var(--u))); color: #a99f8c; max-height: calc(44 * var(--u)); overflow: hidden; }
.hc2-prompt__details.is-warn { color: #e05050; }
.hc2-grid { position: absolute; left: calc(195 * var(--u)); top: calc(176 * var(--u)); width: calc(320 * var(--u)); display: grid; grid-template-columns: repeat(4, calc(80 * var(--u))); grid-auto-rows: calc(125 * var(--u)); }
.hc2-slot { position: relative; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.hc2-slot.is-unit, .hc2-slot.is-wallet { cursor: pointer; }
.hc2-slot__bg { position: absolute; width: calc(70 * var(--u)); height: calc(102 * var(--u)); opacity: 0.9; pointer-events: none; }
.hc2-slot__icon { position: relative; max-width: calc(66 * var(--u)); max-height: calc(98 * var(--u)); object-fit: contain; filter: drop-shadow(0 0 3px #000); pointer-events: none; }
.hc2-slot.is-unit::after { content: ''; position: absolute; left: calc(5 * var(--u)); top: calc(11 * var(--u)); width: calc(70 * var(--u)); height: calc(102 * var(--u)); box-sizing: border-box; border: 1.5px solid var(--q, #6d6454); pointer-events: none; }
.hc2-slot.is-unit:hover::after { box-shadow: 0 0 8px var(--q, #c9a45c); }
.hc2-slot.is-modified::after { box-shadow: 0 0 12px #f0a53a; }
.hc2-slot.is-wallet .hc2-slot__icon { max-width: calc(52 * var(--u)); max-height: calc(78 * var(--u)); }
.hc2-slot.is-ghost { opacity: 0.4; filter: grayscale(0.8); }
.hc2-slot.is-ghost::after { content: ''; position: absolute; inset: calc(12 * var(--u)) calc(6 * var(--u)); border: 1.5px dashed #b04a3a; pointer-events: none; }
.hc2-slot__qty { position: absolute; right: calc(8 * var(--u)); bottom: calc(14 * var(--u)); font-family: var(--hc2-head); font-size: max(11px, calc(18 * var(--u))); color: #eee; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.hc2-slot__anc { position: absolute; left: calc(9 * var(--u)); top: calc(14 * var(--u)); font-size: max(9px, calc(13 * var(--u))); color: #e05050; text-shadow: 0 0 3px #000; }
.hc2-slot__q { position: absolute; font-family: var(--hc2-head); font-size: calc(46 * var(--u)); color: #e9cf8a; text-shadow: 0 0 6px #000; }
.hc2-secondary { position: absolute; left: 0; right: 0; top: calc(612 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(10 * var(--u)); }
.hc2-btn { min-width: calc(170 * var(--u)); min-height: 30px; padding: 0 14px; border: 1.5px solid #6a5536; border-radius: 3px; background: linear-gradient(#2a2119, #15110c); color: #d8c9a3; font-family: var(--hc2-head); font-size: max(12px, calc(18 * var(--u))); cursor: pointer; }
.hc2-btn:hover:not(:disabled) { border-color: #c9a45c; color: #fff; }
.hc2-btn:disabled { opacity: 0.45; cursor: default; }
.hc2-btn--fill { border-color: #8a3a2a; }
.hc2-btn--primary { border-color: #8a6d3b; color: #f1e3c3; }
.hc2-transmute { position: absolute; left: calc(186.5 * var(--u)); top: calc(731 * var(--u)); width: calc(343 * var(--u)); height: calc(96 * var(--u)); border: 0; padding: 0; cursor: pointer; background: var(--t-on) center / 100% 100% no-repeat; color: #f1e3c3; font-family: var(--hc2-head); font-size: max(14px, calc(28 * var(--u))); letter-spacing: 0.04em; text-shadow: 0 0 6px #000, 0 0 2px #000; }
.hc2-transmute:hover:not(:disabled) { background-image: var(--t-hover); }
.hc2-transmute:active:not(:disabled) { background-image: var(--t-down); }
.hc2-transmute.is-off { background-image: var(--t-off); color: #8d877d; cursor: default; }
.hc2-bookbtn { position: absolute; right: calc(32 * var(--u)); bottom: calc(33 * var(--u)); width: calc(80 * var(--u)); height: calc(80 * var(--u)); min-width: 40px; min-height: 40px; border: 0; padding: 0; cursor: pointer; background: var(--r-on) center / 100% 100% no-repeat; display: flex; align-items: center; justify-content: center; }
.hc2-bookbtn:hover { background-image: var(--r-hover); }
.hc2-bookbtn img { width: 58%; height: 58%; }
.hc2-summary { position: absolute; left: calc(60 * var(--u)); right: calc(60 * var(--u)); top: calc(572 * var(--u)); padding: calc(6 * var(--u)) calc(20 * var(--u)) calc(8 * var(--u)); text-align: center; display: flex; flex-direction: column; align-items: center; gap: calc(4 * var(--u)); background: radial-gradient(ellipse at center, #000000eb 40%, #0009 75%, #0000); }
.hc2-summary__title { font-family: var(--hc2-head); color: var(--hc2-gold-2); font-size: max(13px, calc(22 * var(--u))); }
.hc2-summary__divider { display: block; width: 90%; height: calc(9 * var(--u)); }
.hc2-summary__text { color: var(--hc2-text); font-size: max(11px, calc(16 * var(--u))); line-height: 1.3; max-height: calc(64 * var(--u)); overflow: hidden; }
.hc2-alts { background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 6px; padding: 10px 12px; font-size: 0.85rem; color: var(--hc2-text); }
.hc2-alts p { margin: 0 0 6px; }
.hc2-alts__list { display: flex; flex-wrap: wrap; gap: 4px; }
.hc2-alts__list button { display: flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid #3a2f22; border-radius: 3px; background: #15110c; color: var(--hc2-text); cursor: pointer; font: inherit; }
.hc2-alts__list button.is-active { border-color: var(--hc2-gold); color: var(--hc2-gold-2); }
.hc2-alts__list img { width: 20px; height: 20px; object-fit: contain; }

/* recipe book (flyout) */
.hc2-book { height: calc(916 * var(--u)); display: flex; flex-direction: column; background: #0a0806f7; border: 1px solid #3a2f22; box-shadow: 0 0 16px #000; min-width: 0; }
.hc2-book__head { height: 52px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--hc2-flyout, none) center / 100% 100% no-repeat, #120e0a; font-family: var(--hc2-head); font-size: 20px; color: var(--hc2-gold-2); letter-spacing: 0.06em; text-transform: uppercase; }
.hc2-book__search { padding: 8px 10px 4px; }
.hc2-book__search input, .hc2-inv__tools input[type="search"] { width: 100%; box-sizing: border-box; padding: 6px 9px; background: #0d0b09; border: 1px solid #3a2f22; border-radius: 3px; color: var(--hc2-text); font: inherit; font-size: 0.85rem; }
.hc2-book__search input:focus, .hc2-inv__tools input:focus { outline: none; border-color: #8a6d3b; }
.hc2-book__list { position: relative; flex: 1; overflow-y: auto; padding: 4px 8px 10px; scrollbar-width: thin; }
.hc2-book__empty { color: var(--hc2-muted); font-size: 0.85rem; padding: 8px; }
.hc2-head, .hc2-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; text-align: left; cursor: pointer; font-family: var(--font-body); }
.hc2-head { min-height: 42px; margin-top: 4px; padding: 0 8px 0 calc(8px + var(--d) * 12px); background: linear-gradient(90deg, #231b12, #120e0a); border-left: 3px solid #6a5536; color: var(--hc2-gold-2); font-size: 0.9rem; }
.hc2-head.is-sub { min-height: 34px; font-size: 0.84rem; background: #16110c; border-left-color: #4a3a22; }
.hc2-head.is-sel { border-left-color: #f0a53a; background: linear-gradient(90deg, #3a2a16, #15100b); }
.hc2-head.is-hidden .hc2-head__name { font-style: italic; }
.hc2-head img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.hc2-head__name { flex: 1; min-width: 0; }
.hc2-head__count { color: #7d7262; font-size: 0.75rem; }
.hc2-head__caret { color: var(--hc2-muted); font-size: 0.75rem; width: 10px; }
.hc2-row { min-height: 44px; padding: 3px 6px 3px calc(10px + var(--d) * 12px); background: transparent; color: var(--hc2-text); font-size: 0.84rem; border-bottom: 1px solid #1d1711; }
.hc2-row:hover { background: #1b150f; }
.hc2-row.is-sel { background: #2a1f13; color: #fff; }
.hc2-row.is-match { box-shadow: inset 3px 0 0 #f0a53a; }
.hc2-row__icon { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #3a2a18, #120e0a 70%); border-radius: 50%; overflow: hidden; }
.hc2-row__icon img { width: 100%; height: 100%; object-fit: contain; }
.hc2-row__name { flex: 1; min-width: 0; }
/* contents in the cube: recipes they can still become stay lit, the rest steps back (as the game's recipe list does) */
.hc2-head.is-dim, .hc2-row.is-dim { opacity: 0.38; }
.hc2-head.is-dim:hover, .hc2-row.is-dim:hover, .hc2-head.is-dim.is-sel, .hc2-row.is-dim.is-sel { opacity: 0.8; }
.hc2-head.is-usable { border-left-color: #c0392b; background: linear-gradient(90deg, #3a1512, #120e0a); }
.hc2-head.is-usable .hc2-head__count { color: #e9cf8a; }
.hc2-row.is-usable { box-shadow: inset 3px 0 0 #c0392b; }
/* sections of the game's recipe list */
.hc2-sec { display: flex; align-items: center; gap: 8px; min-height: 34px; margin-top: 10px; padding: 0 10px; background: linear-gradient(#2b2925, #1a1917); border: 1px solid #3c3932; border-bottom-color: #0c0b0a; color: #e8e2d4; font-family: var(--hc2-head); font-size: 15px; letter-spacing: 0.02em; }
.hc2-sec:first-child { margin-top: 0; }
.hc2-sec.is-dim { opacity: 0.5; }
.hc2-sec__caret { color: #8d877a; font-size: 0.7rem; }
.hc2-row--top { min-height: 42px; margin-top: 4px; padding-left: 8px; background: linear-gradient(90deg, #231b12, #120e0a); border-left: 3px solid #6a5536; border-bottom: 0; color: var(--hc2-gold-2); font-size: 0.9rem; }
.hc2-row--top .hc2-row__icon { width: 28px; height: 28px; background: none; border-radius: 0; }
.hc2-row--top.is-sel { border-left-color: #f0a53a; background: linear-gradient(90deg, #3a2a16, #15100b); }
.hc2-row--top.is-usable { border-left-color: #c0392b; background: linear-gradient(90deg, #3a1512, #120e0a); box-shadow: none; }
/* hover card of a recipe list entry: name, description, "Required Materials" */
.hc2-rtt { min-width: 300px; max-width: 340px; }
.hc2-rtt__title { padding: 4px 6px 2px; text-align: center; font-family: 'D4 Exocet', var(--font-heading, serif); font-size: 19px; color: #f3ecdc; }
.hc2-rtt__desc { padding: 6px 6px 10px; color: #b9b3a6; font-size: 13.5px; line-height: 1.45; }
.hc2-rtt__bar { margin: 2px 0 4px; padding: 3px 8px; text-align: center; background: linear-gradient(#4a4841, #33322d); color: #f0ebe0; font-family: 'D4 Exocet', var(--font-heading, serif); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.hc2-rtt__row { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-top: 3px; padding: 3px 8px; background: #0d0c0b; border: 1px solid #23211d; color: #d9d3c5; font-size: 13.5px; line-height: 1.3; }
.hc2-rtt__row img, .hc2-rtt__row i { width: 34px; height: 34px; flex: none; object-fit: contain; }
.hc2-rtt__name { flex: 1; min-width: 0; }
.hc2-rtt__qty { color: #f0b23e; font-family: 'D4 Exocet', var(--font-heading, serif); font-size: 14px; }
.hc2-badge { display: inline-block; margin-left: 4px; padding: 0 5px; border: 1px solid #5a4a30; border-radius: 3px; font-size: 0.68rem; line-height: 16px; color: #b09a6a; white-space: nowrap; vertical-align: middle; font-family: var(--font-body); font-weight: 400; text-transform: none; letter-spacing: 0; }
.hc2-badge--anc { border-color: #7a3030; color: #e08a8a; }

/* detail + inventory panels */
.hc2-detail, .hc2-inv { background: linear-gradient(#15110d, #0d0a08); border: 1px solid #3a2f22; border-radius: 4px; padding: 12px 14px; box-shadow: inset 0 0 24px #0009; font-size: 0.88rem; color: var(--hc2-text); line-height: 1.5; }
.hc2-detail h3 { margin: 0 0 6px; font-size: 1rem; color: var(--hc2-gold-2); font-family: var(--font-body); }
.hc2-detail p { margin: 6px 0; }
.hc2-secret { color: #e9cf8a; }
.hc2-ready { color: #7fd07f; font-weight: 600; }
.hc2-warn { color: #e07a50; }
.hc2-ok { color: #7fd07f; }
.hc2-muted { color: var(--hc2-muted); }
.hc2-ings { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 8px 0; }
.hc2-ings__host { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hc2-result { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.hc2-odds { border-collapse: collapse; margin: 6px 0; font-size: 0.84rem; }
.hc2-odds td { padding: 2px 10px 2px 0; vertical-align: top; }
.hc2-odds td:first-child { color: #d9a962; white-space: nowrap; }
.hc2-link { margin-top: 8px; padding: 0; border: 0; background: none; color: #b09a6a; font: inherit; font-size: 0.8rem; text-decoration: underline dotted; cursor: pointer; }
.hc2-link:hover { color: var(--hc2-gold-2); }
.hc2-inv__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.hc2-inv__title { margin: 0; font-family: var(--hc2-head); font-size: 18px; font-weight: 400; color: var(--hc2-gold-2); letter-spacing: 0.06em; text-transform: uppercase; }
.hc2-inv__note { margin: 0 0 8px; }
.hc2-inv__sub { margin: 10px 0 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hc2-muted); }
.hc2-inv__sub:first-child { margin-top: 0; }
.hc2-inv__tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.hc2-inv__tabs button { padding: 4px 10px; border: 1px solid #3a2f22; border-radius: 3px; background: #15110c; color: var(--hc2-text); font: inherit; font-size: 0.82rem; cursor: pointer; }
.hc2-inv__tabs button[aria-selected="true"] { border-color: var(--hc2-gold); color: var(--hc2-gold-2); }
.hc2-inv__tools { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.hc2-inv__tools label { white-space: nowrap; font-size: 0.8rem; display: flex; gap: 4px; align-items: center; }
.hc2-inv__list { max-height: 520px; overflow-y: auto; scrollbar-width: thin; }
.hc2-inv__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 4px 10px; }
.hc2-inv__list details > summary { cursor: pointer; margin: 6px 0 2px; color: var(--hc2-gold-2); }
.hc2-inv__item { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid #1f1913; border-radius: 3px; background: #0d0b09; color: inherit; text-align: left; cursor: pointer; font: inherit; font-size: 0.84rem; }
.hc2-inv__item:hover { background: #1c1611; border-color: #5a4a30; }
.hc2-inv__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc2-inv__item .hc2-badge { flex: none; }
.hc2-inv__item img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.hc2-inv__item span:nth-of-type(1) { flex: 1; min-width: 0; }
.hc2-inv__base { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.hc2-inv__base label { display: flex; gap: 6px; align-items: center; font-size: 0.84rem; }
.hc2-inv__base select { min-width: 180px; padding: 4px 6px; background: #0d0b09; border: 1px solid #3a2f22; color: var(--hc2-text); font: inherit; }
.hc2-inv__base .hc2-btn { font-size: 14px; min-height: 34px; }

/* tutorial modal */
.hc2-modal { position: fixed; inset: 0; z-index: 1000; background: #000000b3; display: flex; align-items: center; justify-content: center; padding: 16px; }
.hc2-modal__box { width: min(520px, 100%); padding: 18px; background: #0c0a08; border: 1px solid #5a4a30; box-shadow: 0 0 30px #000; text-align: center; color: var(--hc2-text, #c8bca5); }
.hc2-modal__box img { width: min(400px, 100%); height: auto; }
.hc2-modal__title { font-family: 'D4 Exocet', serif; font-size: 22px; color: #e3d4ae; margin-bottom: 10px; }
.hc2-modal__text { margin: 10px 0; }
.hc2-modal__text .gt-c_highlight { color: #d8742a; }
.hc2-modal__nav { display: flex; gap: 10px; justify-content: center; align-items: center; }
.hc2-modal__nav button { padding: 4px 12px; border: 1px solid #5a4a30; background: #15110c; color: #e3d4ae; cursor: pointer; font: inherit; }
.hc2-modal__nav button:disabled { opacity: 0.4; cursor: default; }

/* ---- chips (ingredients, results) ---- */
.hc2-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; margin: 2px 6px 2px 0; border: 1px solid #2c2419; border-radius: 4px; background: #110e0b; color: var(--q, var(--hc2-text)); text-decoration: none; font-size: 0.86rem; line-height: 1.3; vertical-align: middle; }
a.hc2-chip:hover { border-color: #6a5536; background: #1b150f; }
.hc2-chip img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.hc2-chip__qty { color: #e9e3d6; font-weight: 600; }
.hc2-chip__note { color: var(--hc2-muted); font-size: 0.75rem; }
.hc2-chip--desc { color: var(--hc2-text); }
.hc2-chip.is-missing { border-color: #8a3a2a; box-shadow: inset 0 0 0 1px #8a3a2a55; }
/* "any item of this kind": the game art of the base type as a small inventory tile in the rarity colour (white = Common) */
.hc2-chip--type img { width: 22px; height: 32px; padding: 1px 4px; box-sizing: content-box; border: 1px solid var(--q); border-radius: 2px;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--q) 24%, #0b0907) 0%, #0b0907 78%); }
.hc2-chip--desc.hc2-chip--type .hc2-chip__name { color: var(--q); }
.hc2-chip--desc.hc2-chip--type .hc2-muted { color: var(--hc2-muted); }
.hc2-inv__baseprev { display: inline-flex; padding: 3px 8px; border: 1px solid var(--q); border-radius: 3px;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--q) 24%, #0b0907) 0%, #0b0907 78%); }
.hc2-inv__baseprev img { width: 40px; height: 60px; object-fit: contain; }

/* ---- content + sidebar ---- */
.hc2-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.hc2-content { min-width: 0; }
.hc2-section { margin-bottom: 2.5rem; scroll-margin-top: calc(var(--header-height, 64px) + 12px); }
.hc2-section h2 { font-family: var(--font-heading); color: var(--hc2-gold); font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 0 0 0.6rem; }
.hc2-section h3 { color: var(--hc2-gold-2); font-size: 1.02rem; margin: 1.2rem 0 0.5rem; }
.hc2-section p { line-height: 1.7; }
.hc2-steps { padding-left: 1.3rem; line-height: 1.7; }
.hc2-steps li { margin-bottom: 0.4rem; }
.hc2-gametext { background: #0d0b09; border: 1px solid #2c2419; border-radius: 4px; padding: 0.6rem 0.9rem; color: var(--hc2-text); font-size: 0.92rem; }
.hc2-howto { list-style: none; counter-reset: hc2; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.hc2-howto li { counter-increment: hc2; position: relative; padding: 0.9rem 1rem 0.9rem 3.2rem; background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 8px; }
.hc2-howto li::before { content: counter(hc2); position: absolute; left: 0.9rem; top: 0.85rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #2a1f13; border: 1px solid #6a5536; color: var(--hc2-gold-2); font-weight: 700; font-size: 0.85rem; }
.hc2-howto h3 { margin: 0 0 0.3rem; font-size: 0.98rem; }
.hc2-howto p { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary, #b0aea6); }
.hc2-tutorial { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.hc2-tutorial__page { margin: 0; background: #0c0a08; border: 1px solid #2c2419; border-radius: 6px; overflow: hidden; }
.hc2-tutorial__page img { width: 100%; height: auto; display: block; aspect-ratio: 1; }
.hc2-tutorial__page figcaption { padding: 0.55rem 0.7rem; font-size: 0.82rem; line-height: 1.45; color: var(--hc2-text); }
.hc2-table-wrap { overflow-x: auto; border: 1px solid var(--hc2-line); border-radius: 8px; background: var(--hc2-panel); }
.hc2-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.hc2-table th { text-align: left; padding: 0.55rem 0.75rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dimmed, #7a7870); border-bottom: 1px solid var(--hc2-line); background: #0f1014; }
.hc2-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #1d1f26; vertical-align: middle; }
.hc2-table tbody tr:last-child td { border-bottom: 0; }
.hc2-table tbody tr:hover td { background: #171920; }
.hc2-num { text-align: right; white-space: nowrap; }
.hc2-cat__link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--hc2-gold-2); text-decoration: none; font-weight: 600; }
.hc2-cat__link:hover span { text-decoration: underline; }
.hc2-cat__link img { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; background: radial-gradient(circle, #3a2a18, #120e0a 70%); }
.hc2-cat__desc { color: var(--text-secondary, #b0aea6); min-width: 220px; }
.hc2-chips { min-width: 180px; }
.hc2-chain { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
.hc2-arrow { color: #8a6d3b; margin: 0 6px 0 0; font-weight: 700; }
.hc2-rw { display: flex; align-items: center; gap: 0.6rem; min-width: 190px; }
.hc2-rw img { width: 40px; height: 40px; object-fit: contain; }
.hc2-rw__name { display: block; color: var(--rarity-unique, #d1a781); font-weight: 700; text-decoration: none; }
a.hc2-rw__name:hover { text-decoration: underline; }
.hc2-rw__open { font-size: 0.75rem; color: #b09a6a; text-decoration: underline dotted; }
.hc2-more { color: var(--text-secondary, #b0aea6); }
.hc2-more a, .hc2-section p a { color: var(--hc2-gold); }
.hc2-tf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.9rem; }
.hc2-tf { background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 8px; padding: 0.9rem 1rem; }
.hc2-tf h3 { margin: 0 0 0.5rem; }
.hc2-tf h3 a { color: var(--hc2-gold-2); text-decoration: none; }
.hc2-tf h3 a:hover { text-decoration: underline; }
.hc2-tf .hc2-table { margin: 0.5rem 0; }
.hc2-tf__unmod { margin: 0.4rem 0 0; color: #e07a50; font-weight: 600; font-size: 0.88rem; }
.hc2-tf__unmod.is-safe { color: #7fd07f; }
.hc2-tips { padding-left: 1.2rem; line-height: 1.7; }
.hc2-tips li { margin-bottom: 0.45rem; }
.hc2-tips strong { color: var(--hc2-gold-2); }
.hc2-faq { display: flex; flex-direction: column; gap: 0.5rem; }
.hc2-faq__item { background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 8px; padding: 0 1rem; }
.hc2-faq__item summary { cursor: pointer; padding: 0.8rem 0; font-weight: 600; color: var(--hc2-gold-2); }
.hc2-faq__item p { margin: 0 0 0.9rem; color: var(--text-secondary, #b0aea6); }
.hc2-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.5rem; list-style: none; padding: 0; }
.hc2-links a { display: block; padding: 0.6rem 0.8rem; background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 6px; color: var(--text-primary, #e0ddd5); text-decoration: none; font-size: 0.9rem; }
.hc2-links a:hover { border-color: #6a5536; color: var(--hc2-gold-2); }

.hc2-sidebar { position: sticky; top: calc(var(--header-height, 64px) + 1rem); align-self: start; min-width: 0; max-height: calc(100vh - var(--header-height, 64px) - 2rem); overflow-y: auto; scrollbar-width: thin; }
.hc2-side-card { background: rgba(10, 10, 15, 0.55); border: 1px solid rgba(196, 162, 78, 0.18); border-radius: 8px; padding: 1rem 1.15rem 1.15rem; margin-bottom: 1rem; }
.hc2-side-card__title { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-secondary, #b0aea6); padding-bottom: 0.6rem; margin: 0 0 0.8rem; border-bottom: 1px solid var(--border-color, #252830); }
.hc2-toc nav { display: flex; flex-direction: column; gap: 0.15rem; }
.hc2-toc nav a { color: var(--text-dimmed, #7a7870); text-decoration: none; font-size: 0.82rem; padding: 0.2rem 0; transition: color 0.15s; }
.hc2-toc nav a:hover { color: var(--text-primary, #e0ddd5); }
.hc2-toc nav a.is-active { color: var(--red-bright, #d40b06); font-weight: 600; }
.hc2-info__actions { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.hc2-like, .hc2-share { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.7rem; border: 1px solid var(--hc2-line); border-radius: 6px; background: #0f1014; color: var(--text-primary, #e0ddd5); font: inherit; font-size: 0.82rem; cursor: pointer; }
.hc2-like[data-liked="1"] { color: #e05050; border-color: #6a2a2a; }
.hc2-like:hover, .hc2-share:hover { border-color: #6a5536; }
.hc2-info__views { margin-left: auto; font-size: 0.78rem; color: var(--text-dimmed, #7a7870); }
.hc2-info__row { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.82rem; padding: 0.25rem 0; color: var(--text-dimmed, #7a7870); }
.hc2-info__row span:last-child, .hc2-info__author { color: var(--text-primary, #e0ddd5); font-weight: 600; }
.hc2-info__author { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.hc2-info__author img { border-radius: 50%; }
.hc2-side-facts { margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.hc2-side-facts dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dimmed, #7a7870); }
.hc2-side-facts dd { margin: 0.1rem 0 0; font-size: 0.88rem; color: var(--text-primary, #e0ddd5); font-weight: 600; }

/* ---- responsive ---- */
@media (max-width: 1239px) {
    .hc2-cube { grid-template-columns: 280px calc(716 * var(--u)); grid-template-areas: "book win" "side side" "inv inv"; }
    .hc2-cube.is-book-closed { grid-template-columns: calc(716 * var(--u)) minmax(0, 1fr); grid-template-areas: "win side" "inv inv"; }
}
@media (max-width: 1023px) {
    .hc2-layout { grid-template-columns: minmax(0, 1fr); }
    .hc2-sidebar { position: static; max-height: none; overflow: visible; }
    .hc2-intro { grid-template-columns: minmax(0, 1fr); }
    .hc2-tutorial { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
    .hc2-cube, .hc2-cube.is-book-closed { --u: min(0.85px, calc((100vw - 32px) / 716)); grid-template-columns: minmax(0, 1fr); grid-template-areas: "win" "book" "side" "inv"; }
    .hc2-inv__grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .hc2-book { height: auto; max-height: 60vh; }
    .hc2-howto { grid-template-columns: minmax(0, 1fr); }
    .hc2-window__help { width: 26px; height: 26px; font-size: 15px; }
}
@media (max-width: 768px) {
    .hc2-crumbs { margin-top: -12px; }
    .hc2-hero { min-height: 220px; }
    .hc2-hero__content { padding: 2.5rem 1rem 1rem; }
    .hc2-hero__icon { width: 44px; height: 44px; }
}
@media (max-width: 560px) {
    .hc2-tutorial { grid-template-columns: minmax(0, 1fr); }
    .hc2-table { font-size: 0.82rem; }
    .hc2-table th, .hc2-table td { padding: 0.45rem 0.5rem; }
    .hc2-cat__desc { min-width: 160px; }
}

/* ---- database pages (/database/horadric-cube, db-cube-usage partial) ---- */
.hc2-db__groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.hc2-db__groups--compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hc2-db__group { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--hc2-panel); border: 1px solid var(--hc2-line); border-radius: 6px; text-decoration: none; color: var(--text-primary, #e0ddd5); }
.hc2-db__group:hover { border-color: #6a5536; }
.hc2-db__group-icon { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #3a2a18, #120e0a 70%); border-radius: 50%; overflow: hidden; }
.hc2-db__group-icon img { width: 100%; height: 100%; object-fit: contain; }
.hc2-db__group-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc2-db__group-name { font-weight: 600; color: var(--hc2-gold-2); }
.hc2-db__group-meta { font-size: 0.78rem; color: var(--hc2-muted); }
.hc2-db__group-desc { font-size: 0.82rem; color: var(--text-secondary, #b0aea6); line-height: 1.45; }
.hc2-db__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.hc2-db__tile { display: flex; gap: 10px; align-items: center; padding: 6px 10px; background: #0d0b09; border: 1px solid #1f1913; border-radius: 4px; text-decoration: none; }
.hc2-db__tile:hover { border-color: #5a4a30; background: #1c1611; }
.hc2-db__tile img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.hc2-db__tile-name { display: block; color: var(--q, var(--text-primary, #e0ddd5)); font-weight: 600; font-size: 0.88rem; }
.hc2-db__tile-meta { display: block; font-size: 0.76rem; color: var(--hc2-muted); }
.hc2-db__head-icon { flex: none; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #3a2a18, #120e0a 70%); border: 1px solid #3a2f22; border-radius: 8px; }
.hc2-db__head-icon img { max-width: 64px; max-height: 64px; object-fit: contain; }
.hc2-db__desc { line-height: 1.65; }
.hc2-db__h1-parent { font-size: 0.6em; color: var(--hc2-muted); font-weight: 400; }
.hc2-db__flavor { font-style: italic; color: #a99f8c; }
.hc2-db__cta { margin: 1rem 0; }
.hc2-db__rtitle { min-width: 200px; }
.hc2-db__rt { display: flex; align-items: center; gap: 8px; }
.hc2-db__rtitle img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.hc2-db__rtitle a { color: var(--hc2-gold-2); text-decoration: none; }
.hc2-db__rtitle a:hover { text-decoration: underline; }
.hc2-db .hc2-table-wrap + .db-section__subtitle, .hc2-db .db-section__subtitle { margin-top: 1rem; }
.hc2-db .hc2-secret { color: #e9cf8a; }
.hc2-db .hc2-muted { color: var(--hc2-muted); }
.hc2-rtt .gt-c_rare { color: #eaec0a; } .hc2-rtt .gt-c_magic { color: #7b7cf5; } .hc2-rtt .gt-c_set { color: #2ef30d; } .hc2-rtt .gt-c_chaos { color: #2fc08d; }
.hc2-rtt .gt-c_important, .hc2-rtt .gt-c_highlight, .hc2-rtt .gt-c_white, .hc2-rtt .gt-c_number { color: #f3ecdc; }
/* materials table: where a material comes from (client wording) */
.hc2-src { font-size: 0.86rem; line-height: 1.45; min-width: 220px; }
.hc2-src ul { margin: 0; padding-left: 16px; }
.hc2-src li { margin: 0; }
.hc2-src img { vertical-align: -0.2em; }
.hc2-secret-links { margin-top: 6px; display: flex; gap: 10px; font-size: 0.8rem; }
.hc2-table--secrets td { vertical-align: top; }
