/* Carry Pack page */
.page-pack { --accent: #b48cff; --leather: #c98a4b; --iron: #d8dde6; --gold: #ffd35c; --diamond: #4ee6e0; --netherite: #8a8391; background:
  radial-gradient(1100px 600px at 85% -10%, rgba(180,140,255,.08), transparent 60%),
  radial-gradient(900px 600px at -10% 45%, rgba(201,138,75,.07), transparent 60%), #09080b; }
.page-pack .grad { background: linear-gradient(92deg, #e8c290, #c98a4b 40%, #b48cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-pack .stat b { text-shadow: 0 0 24px rgba(180,140,255,.45); }
.page-pack .hero .shade { background:
  linear-gradient(90deg, rgba(9,8,11,.9) 0%, rgba(9,8,11,.5) 40%, rgba(9,8,11,0) 70%),
  linear-gradient(0deg, #09080b 0%, rgba(9,8,11,0) 35%); }

/* ---------- Pack builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
@media (max-width: 980px) { .builder { grid-template-columns: 1fr; } }
.viewer { padding: 0; overflow: hidden; position: sticky; top: 84px; }
@media (max-width: 980px) { .viewer { position: relative; top: 0; } }
.viewer canvas { display: block; width: 100%; aspect-ratio: 1.1; cursor: grab; touch-action: pan-y; background:
  linear-gradient(rgba(180,140,255,.05) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(180,140,255,.05) 1px, transparent 1px) 0 0 / 24px 24px, #0c0b10; }
.viewer .ctl { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { flex: 1; min-width: 80px; padding: 9px 8px; background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--muted); font: 600 13px var(--font-display); letter-spacing: .06em; cursor: pointer; transition: all .2s; }
.seg button[aria-pressed="true"] { color: #09080b; background: var(--sc, var(--accent)); border-color: var(--sc, var(--accent)); }
.viewer .caption { font-size: 13px; color: var(--muted); }
.viewer .caption b { color: var(--text); }

.slotsum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slotsum div { padding: 10px; background: rgba(0,0,0,.3); border: 1px solid var(--line); text-align: center; }
.slotsum b { display: block; font: 700 24px var(--font-display); color: var(--text); }
.slotsum span { font: 9px var(--font-pixel); letter-spacing: .08em; color: var(--muted); }
.storage { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; padding: 10px; background: #0c0b10; border: 1px solid var(--line); }
@media (max-width: 520px) { .storage { grid-template-columns: repeat(12, 1fr); } }
.storage i { aspect-ratio: 1; background: #1f1c26; box-shadow: inset 1px 1px 0 #0a090d; transition: background .3s; }
.storage i.on { background: #4a3c5e; }
.storage i.pop { animation: pop .4s ease-out; }
@keyframes pop { from { background: var(--accent); } }

.aug-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.aug-slot { width: 58px; height: 58px; display: grid; place-items: center; background: #8b8b8b; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff; cursor: pointer; position: relative; }
.aug-slot img { width: 42px; height: 42px; image-rendering: pixelated; }
.aug-slot.locked { background: #3a3a3a; box-shadow: inset 3px 3px 0 #1c1c1c, inset -3px -3px 0 #555; cursor: not-allowed; }
.aug-slot.locked::after { content: "🔒"; font-size: 16px; opacity: .6; }
.aug-slot .x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; display: grid; place-items: center; background: #ff4d5e; color: #fff; font: 700 11px var(--font-display); }

.aug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.aug { --tc: var(--accent); display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 10px; text-align: left; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s, opacity .2s; }
.aug:hover { border-color: var(--tc); transform: translateY(-2px); }
.aug[aria-pressed="true"] { border-color: var(--tc); box-shadow: inset 0 0 0 1px var(--tc); }
.aug img { width: 38px; height: 38px; image-rendering: pixelated; }
.aug b { display: block; font: 600 13px/1.2 var(--font-display); }
.aug small { font: 8px var(--font-pixel); letter-spacing: .06em; color: var(--tc); }
.aug.dim { opacity: .45; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters button { padding: 7px 12px; background: transparent; border: 1px solid var(--line); color: var(--muted); font: 500 12px var(--font-display); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.filters button[aria-pressed="true"] { color: #09080b; background: var(--fc, var(--accent)); border-color: var(--fc, var(--accent)); }
.detail { padding: 16px 18px; display: grid; gap: 8px; min-height: 150px; }
.detail h4 { margin: 0; font: 700 20px var(--font-display); }
.detail p { margin: 0; font-size: 14px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font: 9px var(--font-pixel); letter-spacing: .08em; padding: 4px 7px; border: 1px solid currentColor; }
.active-list { display: grid; gap: 4px; font-size: 13px; }
.active-list div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; background: rgba(0,0,0,.3); }
.active-list .on { color: #8dffb0; } .active-list .off { color: var(--muted); } .active-list .inert { color: #ff9aa4; }
.mods-toggle { display: flex; flex-wrap: wrap; gap: 6px; }
.mods-toggle label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; background: rgba(0,0,0,.3); border: 1px solid var(--line); font-size: 12px; cursor: pointer; }
.mods-toggle input { accent-color: var(--accent); }

/* ---------- Matrix ---------- */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
.matrix th, .matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix th { font: 9px var(--font-pixel); letter-spacing: .1em; font-weight: 400; color: var(--muted); }
.matrix td img { display: inline-block; width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; image-rendering: pixelated; }
.matrix .req { color: var(--accent); font-weight: 700; }
.matrix .opt { color: #8dffb0; }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.rule { padding: 18px; display: grid; gap: 8px; align-content: start; }
.rule .ic { font: 700 22px var(--font-display); color: var(--leather); }
.rule h3 { font-size: 17px; }
.rule p { margin: 0; font-size: 13px; color: var(--muted); }
