:root {
    --amp-cyan: #00d9ff;
    --amp-panel: rgba(3, 14, 32, 0.96);
    --amp-basic: #3bdcff;
    --amp-premier: #a66cff;
    --amp-elite: #ffbd36;
    --amp-ultimate: #ff4c58;
}

.amp-feature-entry[hidden] { display: none !important; }
.amp-inventory-panel { width: 100%; max-width: 100%; min-width: 0; min-height: 20rem; padding-bottom: 5rem; overflow-x: hidden; }
.amp-empty { grid-column: 1 / -1; padding: 3rem 1rem; text-align: center; color: #9fb9cc; }
.amp-signal-panel { margin: 0 0 1rem; padding: 1rem; border: 1px solid rgba(0,217,255,.65); border-radius: .7rem; color: #dffaff; background: linear-gradient(145deg, rgba(2,28,52,.96), rgba(0,9,24,.96)); }
.amp-signal-heading { display: grid; gap: .35rem; margin-bottom: .8rem; }
.amp-signal-heading h2, .amp-signal-panel > h2 { margin: 0; color: var(--amp-cyan); font: 700 1.05rem Orbitron, sans-serif; }
.amp-signal-heading p, .amp-signal-panel > p { max-width: 68rem; margin: 0; color: #a9c8d8; font-size: .82rem; line-height: 1.45; }
.amp-signal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .55rem; }
.amp-signal-row { display: grid; grid-template-columns: 1fr auto; gap: .35rem .65rem; align-items: center; padding: .65rem; border: 1px solid rgba(76,139,255,.5); border-radius: .45rem; background: rgba(2,15,34,.9); }
.amp-signal-row h3 { margin: 0; color: #f3fbff; font-size: .8rem; }
.amp-signal-row strong { color: #75f2ff; font-family: Orbitron, sans-serif; font-size: .78rem; }
.amp-signal-row progress { grid-column: 1 / -1; width: 100%; height: .6rem; accent-color: #00d9ff; }
.amp-signal-row span { grid-column: 1 / -1; color: #b8d3df; font-size: .72rem; }
.amp-signal-error { border-color: #ff6d77; }
.amp-signal-error p { color: #ffd7da; }
.amp-signal-locked { grid-column: 1 / -1; margin: 0; color: #9fb9cc; }
.amp-filter-drawer { min-width: 0; }
.amp-filter-drawer > summary { display: none; min-height: 44px; color: var(--amp-cyan); cursor: pointer; padding: .7rem; border: 1px solid rgba(0,217,255,.45); border-radius: .5rem; background: #07182b; }
.amp-toolbar {
    display: grid; grid-template-columns: minmax(7rem, .8fr) minmax(16rem, 1.6fr) minmax(12rem, 1.3fr) minmax(10rem, 1fr) auto;
    gap: .55rem; align-items: end; padding: .7rem; margin-bottom: .75rem;
    border: 1px solid rgba(0,217,255,.45); border-radius: .7rem; background: rgba(0,10,28,.85);
}
.amp-toolbar label, .amp-range-filter { min-width: 0; display: grid; gap: .3rem; color: #b9dceb; font-size: .8rem; }
.amp-toolbar select {
    width: 100%; min-height: 44px; margin-top: .3rem; color: #eafcff; border: 1px solid #167d9d;
    border-radius: .35rem; background: #07182b; padding: .35rem .55rem;
}
.amp-rarity-filter { min-width: 0; display: grid; grid-template-columns: repeat(4, max-content); gap: .35rem; align-items: end; justify-content: start; border: 0; padding: 0; margin: 0; }
.amp-rarity-filter legend { grid-column: 1 / -1; width: 100%; margin-bottom: -.05rem; color: #b9dceb; font-size: .78rem; }
.amp-rarity-chip.pf-chip { width: auto; min-width: 3.6rem; min-height: 38px; display: inline-grid; place-items: center; margin: 0; padding: .35rem .55rem; border-radius: 999px; color: #8ba5b5; border: 1px solid rgba(139,165,181,.38); background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.1), rgba(5,18,34,.92) 58%); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.amp-rarity-chip.pf-chip.active { transform: none; color: var(--amp-cyan); border-color: currentColor; background: rgba(0,217,255,.16); box-shadow: inset 0 0 .8rem rgba(0,217,255,.18), 0 0 .6rem rgba(0,217,255,.35); }
.amp-rarity-chip.basic.active { color: var(--amp-basic); }
.amp-rarity-chip.premier.active { color: var(--amp-premier); background: rgba(166,108,255,.16); box-shadow: inset 0 0 .8rem rgba(166,108,255,.2), 0 0 .6rem rgba(166,108,255,.35); }
.amp-rarity-chip.elite.active { color: var(--amp-elite); background: rgba(255,189,54,.16); box-shadow: inset 0 0 .8rem rgba(255,189,54,.2), 0 0 .6rem rgba(255,189,54,.35); }
.amp-rarity-chip.ultimate.active { color: var(--amp-ultimate); background: rgba(255,76,88,.16); box-shadow: inset 0 0 .8rem rgba(255,76,88,.2), 0 0 .6rem rgba(255,76,88,.35); }
.amp-rarity-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.amp-range-inputs { position: relative; height: 2.25rem; }
.amp-range-inputs input { position: absolute; inset: .25rem 0 auto; width: 100%; accent-color: var(--amp-cyan); pointer-events: none; }
.amp-range-inputs input::-webkit-slider-thumb { pointer-events: auto; }
.amp-range-inputs input::-moz-range-thumb { pointer-events: auto; }
.amp-filter-actions { display: flex; gap: .4rem; align-items: end; }
.amp-filter-actions button { width: auto; min-width: 4rem; min-height: 44px; margin: 0; padding: .35rem .55rem; color: #eafcff; border: 1px solid #167d9d; border-radius: .35rem; background: #07182b; }
.amp-filter-actions .amp-apply, .amp-card-actions .amp-engrave, .amp-dialog footer .amp-engrave { border-color: #35ff9d; color: #35ff9d; }
.amp-results-count { color: #80a8bd; text-align: right; margin: 0 .25rem .5rem; font-size: .8rem; }
.amp-card-grid { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .85rem; align-items: stretch; }
.amp-card {
    position: relative; min-width: 0; display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); gap: .85rem; min-height: 14rem;
    padding: 1rem; overflow: visible; border: 1px solid var(--amp-cyan); border-radius: .65rem;
    background: linear-gradient(145deg, rgba(4,24,46,.98), rgba(0,5,18,.98)); box-shadow: inset 0 0 1.5rem rgba(0,217,255,.07);
}
.amp-card.amp-rarity-premier, .amp-installed-slot.amp-rarity-premier { border-color: var(--amp-premier); }
.amp-card.amp-rarity-elite, .amp-installed-slot.amp-rarity-elite { border-color: var(--amp-elite); }
.amp-card.amp-rarity-ultimate, .amp-installed-slot.amp-rarity-ultimate { border-color: var(--amp-ultimate); }
.amp-card.amp-selected { outline: 2px solid #36ff91; outline-offset: 2px; }
.amp-select { position: absolute; z-index: 2; right: .35rem; top: .35rem; width: 44px; height: 44px; padding: 0; border: 0; color: transparent; background: transparent; font-size: 0; cursor: pointer; }
.amp-select::before { content: ''; display: grid; place-items: center; width: 22px; height: 22px; margin: 11px; border: 2px solid #55b9cd; border-radius: .3rem; color: #03130b; background: #061b2c; box-shadow: 0 0 .45rem rgba(0,217,255,.22); font-size: .85rem; font-weight: 900; }
.amp-select[aria-pressed="true"]::before { content: '\2713'; border-color: #36ff91; background: #36ff91; box-shadow: 0 0 .55rem rgba(54,255,145,.5); }
.amp-select:focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-radius: .35rem; }
.amp-art-wrap { min-width: 0; display: grid; place-items: center; align-self: stretch; padding: .45rem; border: 1px solid rgba(0,217,255,.16); border-radius: .5rem; background: rgba(0,4,15,.7); }
.amp-art { width: 100%; max-width: 7rem; max-height: 8.5rem; object-fit: contain; }
.amp-art-fallback { color: var(--amp-cyan); font-family: Orbitron, sans-serif; font-size: .65rem; text-align: center; }
.amp-card-copy { min-width: 0; display: grid; grid-template-rows: auto auto auto 1fr; gap: .55rem; }
.amp-item-identity { min-width: 0; padding-right: 2.25rem; padding-bottom: .45rem; border-bottom: 1px solid rgba(0,217,255,.18); }
.amp-card h3 { margin: .15rem 0 0; color: #f6fbff; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.amp-rarity-label { color: var(--amp-cyan); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.amp-rarity-premier .amp-rarity-label { color: var(--amp-premier); }
.amp-rarity-elite .amp-rarity-label { color: var(--amp-elite); }
.amp-rarity-ultimate .amp-rarity-label { color: var(--amp-ultimate); }
.amp-roll { color: #fff; font-family: Orbitron, sans-serif; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.amp-sale-value { align-self: start; display: block; min-height: 2.8rem; padding: .45rem .55rem; color: #a9c6d5; border: 1px solid rgba(129,167,190,.18); border-radius: .35rem; background: rgba(0,8,20,.6); line-height: 1.35; overflow-wrap: anywhere; }
.amp-card-actions { align-self: end; display: grid; grid-template-columns: 1fr; gap: .5rem; margin-top: .1rem; }
.amp-card-actions button { width: 100%; min-width: 0; min-height: 44px; padding: .45rem; border: 1px solid #2388ab; border-radius: .35rem; color: #d9f8ff; background: #07172a; font-weight: 700; }
.amp-card-actions button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.amp-card small { color: #84a3b2; }
.amp-sale-bar {
    position: sticky; bottom: 0; display: none; align-items: center; justify-content: center; flex-wrap: wrap; gap: .8rem;
    z-index: 5; padding: .7rem; margin-top: 1rem; border: 1px solid #35ff9d; border-radius: .55rem; background: rgba(0,16,25,.97);
}
.amp-sale-bar.visible { display: flex; }
.amp-sale-bar button { min-height: 2.5rem; padding: .4rem .9rem; }
.amp-sale-bar .amp-clear { color: #d9f8ff; border: 1px solid #258dad; border-radius: .4rem; background: #07182b; font-weight: 700; }
.amp-sale-bar .amp-clear:hover, .amp-sale-bar .amp-clear:focus-visible { color: #fff; border-color: var(--amp-cyan); background: #0b2940; box-shadow: 0 0 .55rem rgba(0,217,255,.3); }
.amp-sale-bar .amp-sell { color: #07130b; border: 0; background: #35ff9d; font-weight: 700; }
.amp-filter-actions .amp-select-all { color: #07130b; border-color: #35ff9d; background: #35ff9d; font-weight: 800; }

.amp-dialog-overlay { position: fixed; inset: 0; z-index: 12000; box-sizing: border-box; display: grid; place-items: center; padding: 1rem; background: rgba(0,0,10,.82); }
.amp-dialog { box-sizing: border-box; width: min(52rem, calc(100vw - 2rem)); height: min(calc(100vh - 2rem), 60rem); height: min(calc(100dvh - 2rem), 60rem); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; overflow: hidden; color: #eaf9ff; border: 1px solid var(--amp-cyan); border-radius: .75rem; background: var(--amp-panel); box-shadow: 0 0 2rem rgba(0,217,255,.3); }
.amp-dialog header, .amp-dialog footer { flex: 0 0 auto; position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .8rem 1rem; border-bottom: 1px solid rgba(0,217,255,.25); background: var(--amp-panel); }
.amp-dialog footer { justify-content: flex-end; border-top: 1px solid rgba(0,217,255,.25); border-bottom: 0; }
.amp-dialog footer[hidden] { display: none !important; }
.amp-dialog header h2 { margin: 0; font: 700 1.1rem Orbitron, sans-serif; }
.amp-dialog header button { min-width: 2.5rem; min-height: 2.5rem; color: #fff; border: 1px solid #e75c66; border-radius: 50%; background: #42131c; font-size: 1.3rem; }
.amp-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 1rem; }
.amp-dialog footer button { min-height: 2.6rem; padding: .5rem 1rem; color: #fff; border: 1px solid #258dad; border-radius: .4rem; background: #07182b; }
.amp-detail { display: grid; grid-template-columns: 7rem 1fr; gap: .35rem 1rem; align-items: center; }
.amp-detail img { grid-row: 1 / span 6; width: 7rem; max-height: 8rem; object-fit: contain; }
.amp-detail h3, .amp-detail p { margin: 0; }
.amp-detail dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .7rem; margin: .4rem 0 0; }
.amp-detail dd { margin: 0; color: #fff; }
.amp-target-label { display: grid; gap: .35rem; margin: 1rem 0; color: #9fd7ea; }
.amp-target-label select { min-height: 2.8rem; color: #fff; border: 1px solid #258dad; border-radius: .4rem; background: #07182b; padding: .4rem; }
.amp-install-preview { padding: .8rem; border: 1px solid rgba(53,255,157,.5); border-radius: .5rem; background: rgba(4,40,32,.35); }
.amp-install-preview.ineligible { border-color: #ff6d77; background: rgba(70,8,15,.35); }
.amp-install-preview h3 { margin: 0 0 .5rem; }
.amp-preview-stats { display: grid; gap: .2rem; margin-top: .4rem; }
.amp-replacement-warning, .amp-ineligible-reason { margin-top: .65rem; padding: .6rem; color: #fff2c6; border: 1px solid #ffad32; border-radius: .35rem; background: rgba(91,48,0,.45); }
.amp-ineligible-reason { color: #ffd7da; border-color: #ff6570; background: rgba(82,9,17,.45); }
.amp-no-effective-improvement { margin-top: .65rem; padding: .6rem; color: #ffd7da; border: 1px solid #ff6570; border-radius: .35rem; background: rgba(82,9,17,.45); font-weight: 700; }
.amp-picker-layout { min-height: 0; display: flex; flex-direction: column; gap: .7rem; }
.amp-picker-agent { flex: 0 0 auto; margin: 0; color: #b9dceb; }
.amp-picker-slot-status { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.amp-picker-slot-status span { padding: .55rem .7rem; color: #c8e8f2; border: 1px solid rgba(0,217,255,.3); border-radius: .4rem; background: rgba(0,18,38,.72); }
.amp-picker-grid { min-height: 8rem; max-height: min(43vh, 25rem); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1rem; padding: .15rem .3rem .3rem .15rem; }
.amp-picker-family { display: grid; gap: .5rem; }
.amp-picker-family > header { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: 0 .15rem; }
.amp-picker-family h3 { margin: 0; color: #62eaff; font: 700 .86rem Orbitron, sans-serif; }
.amp-picker-family > header small { color: #9bb8ca; text-align: right; }
.amp-picker-family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); grid-auto-rows: minmax(7.25rem, auto); align-items: stretch; gap: .65rem; }
.amp-picker-item { min-width: 0; min-height: 6.5rem; height: auto; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: .65rem; align-items: center; align-self: stretch; padding: .6rem; text-align: left; color: #eafcff; border: 1px solid var(--amp-cyan); border-radius: .5rem; background: #07182b; overflow: hidden; }
.amp-picker-item img { width: 4rem; height: 4rem; object-fit: contain; }
.amp-picker-item span, .amp-picker-item small { min-width: 0; display: block; overflow-wrap: anywhere; }
.amp-picker-item small { margin-top: .25rem; color: #9fd7ea; font-size: .72rem; line-height: 1.2; }
.amp-picker-item .amp-picker-roll { color: #e8fbff; font-family: Arial, Helvetica, sans-serif; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .035em; text-rendering: geometricPrecision; }
.amp-picker-item .amp-picker-slot-action { color: #67ffb0; font-size: .66rem; line-height: 1.25; }
.amp-picker-item.selected { outline: 2px solid #35ff9d; outline-offset: 2px; box-shadow: 0 0 .7rem rgba(53,255,157,.35); }
.amp-picker-item[aria-selected="true"] { border-color: #35ff9d; background: linear-gradient(145deg, rgba(7,47,48,.98), rgba(3,18,32,.98)); }
.amp-picker-item.unaffordable { border-color: #637685; }
.amp-picker-need { color: #ffbd72 !important; font-size: .68rem; }
.amp-picker-item:focus-visible, .amp-agent-engrave:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.amp-picker-empty { grid-column: 1 / -1; padding: 1.2rem; text-align: center; color: #b9dceb; border: 1px dashed #258dad; border-radius: .5rem; }
.amp-picker-summary { position: sticky; z-index: 1; bottom: 0; flex: 0 0 auto; max-height: 32vh; overflow-y: auto; padding: .7rem; border: 1px solid rgba(0,217,255,.45); border-radius: .5rem; background: rgba(0,8,24,.98); box-shadow: 0 -.45rem 1rem rgba(0,0,12,.7); }
.amp-picker-summary .amp-install-preview { padding: .55rem; }
.amp-picker-summary .amp-preview-empty { margin: 0; color: #b9dceb; }
.amp-picker-token { color: #67ffb0; }
.amp-cost-preview { display: grid; grid-template-columns: 1fr auto; gap: .35rem .8rem; margin-top: .65rem; padding-top: .65rem; border-top: 1px solid rgba(0,217,255,.25); }
.amp-cost-preview em { grid-column: 1 / -1; color: #ff9da5; }
.amp-payment-choice { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: .25rem 0; padding: .6rem; border: 1px solid rgba(0,217,255,.3); border-radius: .45rem; }
.amp-payment-choice legend { padding: 0 .35rem; color: #b9dceb; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.amp-payment-choice label { display: flex; gap: .45rem; align-items: center; padding: .55rem; border: 1px solid rgba(120,160,190,.35); border-radius: .4rem; cursor: pointer; }
.amp-payment-choice label.selected { border-color: #35ff9d; background: rgba(53,255,157,.08); }
.amp-payment-choice label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.amp-payment-choice span { display: flex; flex-direction: column; gap: .12rem; }
.amp-payment-choice small { color: #9bb8ca; }
.amp-buy-tokens { grid-column: 1 / -1; min-height: 2.65rem; padding: .55rem .8rem; color: #07130b; border: 1px solid #ffd45c; border-radius: .4rem; background: linear-gradient(135deg, #ffd45c, #35ff9d); font-family: Orbitron, sans-serif; font-weight: 800; cursor: pointer; }
.amp-buy-tokens:hover, .amp-buy-tokens:focus-visible { filter: brightness(1.12); box-shadow: 0 0 .75rem rgba(53,255,157,.45); }
.merch-card.amp-merchant-target { animation: ampMerchantTarget 2.4s ease-out; }
@keyframes ampMerchantTarget { 0%, 35% { outline: 3px solid #35ff9d; outline-offset: 4px; box-shadow: 0 0 1.5rem rgba(53,255,157,.85); } 100% { outline-color: transparent; box-shadow: none; } }

@media (min-width: 781px) {
    .amp-dialog-body:has(.amp-picker-layout) { overflow: hidden; }
    .amp-picker-layout { height: 100%; }
    .amp-picker-grid { flex: 1 1 auto; max-height: none; }
    .amp-picker-summary { max-height: none; overflow: visible; }
}
.amp-agent-engrave {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 50px;
    color: #fff4bf !important;
    border: 1px solid #e9b83f !important;
    border-radius: .28rem;
    background:
        linear-gradient(135deg, transparent 0 9px, rgba(5,15,32,.98) 9px) padding-box,
        linear-gradient(110deg, #5c3b08 0%, #ffd86a 28%, #08d9ff 52%, #ffd86a 76%, #5c3b08 100%) border-box !important;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        inset 0 0 0 1px rgba(0,217,255,.24),
        inset 0 -12px 22px rgba(0,0,0,.5),
        0 0 .55rem rgba(255,190,62,.24),
        0 4px 10px rgba(0,0,0,.42);
    clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
    transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}
.amp-agent-engrave::before {
    content: '✦';
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-right: .5rem;
    color: #ffd65c;
    font-size: 1rem;
    line-height: 1;
    text-shadow: 0 0 .45rem rgba(255,211,76,.95);
}
.amp-agent-engrave::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 3px;
    border: 1px solid rgba(0,217,255,.32);
    clip-path: inherit;
    pointer-events: none;
}
.amp-agent-engrave span { position: relative; z-index: 1; }
.amp-agent-engrave:hover {
    filter: brightness(1.16);
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(0,217,255,.38), inset 0 -12px 22px rgba(0,0,0,.42), 0 0 .8rem rgba(255,190,62,.42), 0 5px 12px rgba(0,0,0,.48);
}
.amp-agent-engrave:active { transform: translateY(1px); filter: brightness(.96); }
.sd-agent-level-bar.amp-agent-card-actions { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .45rem; align-items: center; margin-top: .25rem; }
.amp-agent-card-installed { min-width: 0; color: #758d9e; font-size: .54rem; font-weight: 700; letter-spacing: .025em; line-height: 1.2; text-align: right; text-transform: uppercase; overflow-wrap: anywhere; }
.amp-agent-card-installed.is-installed { color: #8deaff; text-shadow: 0 0 .35rem rgba(49,223,255,.35); }
.amp-cache-panel { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:.7rem 0; padding:.8rem 1rem; border:1px solid #b98cff; border-radius:.55rem; background:linear-gradient(120deg,rgba(57,20,91,.8),rgba(5,31,49,.9)); box-shadow:0 0 1rem rgba(147,85,255,.18); }
.amp-cache-panel div { display:grid; gap:.15rem; } .amp-cache-panel strong { color:#fff; font-family:Orbitron,sans-serif; } .amp-cache-panel span { color:#c9b9df; font-size:.75rem; }
.amp-cache-panel button { padding:.55rem 1rem; color:#07131b; border:0; border-radius:.35rem; background:linear-gradient(135deg,#f5cd55,#56f2b2); font:800 .68rem Orbitron,sans-serif; cursor:pointer; }
.merch-odds { margin:.55rem 0; padding:.45rem .55rem; color:#a9c5d5; border:1px solid rgba(82,232,255,.25); border-radius:.4rem; background:rgba(3,19,35,.55); font-size:.72rem; line-height:1.45; }
.merch-odds summary { color:#65eaff; cursor:pointer; font-weight:700; }.merch-odds p { margin:.45rem 0 0; }
.amp-cache-reveal { min-width:min(72vw,52rem); }.amp-cache-reveal>p { color:#b9d9e6; text-align:center; }.amp-cache-reveal>div { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.55rem; }
.amp-cache-reveal-card { display:grid; justify-items:center; gap:.3rem; padding:.7rem .35rem; opacity:0; transform:translateY(18px) scale(.92); border:1px solid #557; border-radius:.5rem; background:#071425; animation:ampCacheReveal .42s ease forwards; animation-delay:calc(var(--reveal-index) * .22s); }
.amp-cache-reveal-card img { width:4.5rem; height:4.5rem; object-fit:contain; }.amp-cache-reveal-card span,.amp-cache-reveal-card em { font:700 .55rem Orbitron,sans-serif; }.amp-cache-reveal-card strong { font-size:.68rem; text-align:center; }.amp-cache-reveal-card b { color:#6ff5ff; font-family:Arial,sans-serif; }.amp-cache-reveal-card em { color:#ffd85d; font-style:normal; text-align:center; }
@keyframes ampCacheReveal { to { opacity:1; transform:none; } }
.agd-bonus-detail { display: block; margin-top: .16rem; color: #8fb3c2; font-family: Arial, sans-serif; font-size: .58rem; font-weight: 500; letter-spacing: .01em; line-height: 1.25; white-space: nowrap; }
.amp-agent-card-button {
    position: absolute;
    top: auto !important;
    right: 7px;
    bottom: 6px;
    width: calc(50% - 10px);
    min-height: 0;
    margin: 0;
    padding: 2px 9px;
    color: #fff4c2 !important;
    border: 1.5px solid #e2b53f !important;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(54,40,12,.96), rgba(8,13,27,.98)) !important;
    font-family: 'Orbitron', sans-serif;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .055em;
    line-height: 1.4;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255,220,104,.13), 0 0 .45rem rgba(226,181,63,.25);
}
.amp-agent-card-button:hover { color: #fff !important; border-color: #ffe174 !important; filter: brightness(1.16); box-shadow: inset 0 0 0 1px rgba(255,220,104,.22), 0 0 .65rem rgba(226,181,63,.45); }
.amp-agent-card-button:active { transform: scale(1.04); filter: brightness(.96); }
.amp-agent-card-button.is-installed {
    color: #dcfaff !important;
    border-color: #31dfff !important;
    background: linear-gradient(180deg, rgba(22,36,75,.98), rgba(8,12,38,.98)) !important;
    box-shadow: inset 0 0 0 1px rgba(151,108,255,.22), 0 0 .5rem rgba(49,223,255,.35);
}
.amp-agent-card-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sd-agent-slot.sd-agent-card-actions,
.sd-agent-slot.amp-agent-card-decorated { min-height: 116px; padding-bottom: 34px; }
.sd-agent-slot.sd-agent-card-actions::after,
.sd-agent-slot.amp-agent-card-decorated::after { content: ''; position: absolute; right: 7px; bottom: 31px; left: 7px; border-top: 1px solid rgba(86,151,178,.2); }
.sd-agent-info-btn.sd-agent-upgrade-btn { top: auto !important; right: 7px; bottom: 6px; width: calc(50% - 10px); min-height: 0; margin: 0; padding: 3px 8px; border-radius: 5px; font-size: .54rem; line-height: 1.4; text-transform: uppercase; }
.sd-agent-change-btn { position: absolute; z-index: 3; bottom: 6px; left: 7px; width: calc(50% - 10px); min-height: 0; margin: 0; padding: 3px 8px; color: #bcecff; border: 1px solid #258dad; border-radius: 5px; background: rgba(5,24,43,.96); font-family: Orbitron, sans-serif; font-size: .54rem; font-weight: 700; line-height: 1.4; text-transform: uppercase; cursor: pointer; }
.sd-agent-change-btn:hover, .sd-agent-change-btn:focus-visible { color: #fff; border-color: var(--amp-cyan); box-shadow: 0 0 .5rem rgba(0,217,255,.35); }
.amp-agent-slots { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid rgba(0,217,255,.3); }
.amp-agent-slots h3 { margin: 0 0 .5rem; color: var(--amp-cyan); font-size: .95rem; }
.amp-installed-slot { display: flex; justify-content: space-between; gap: .7rem; margin: .35rem 0; padding: .45rem .6rem; border: 1px solid #2787a5; border-radius: .35rem; }
.amp-installed-slot.empty strong { color: #8295a1; font-weight: 400; }
.amp-agent-slots button { width: 100%; min-height: 2.5rem; margin-top: .4rem; color: var(--amp-cyan); border: 1px solid var(--amp-cyan); border-radius: .35rem; background: #07182b; }
.amp-farm-card { min-width: 9rem; }
.amp-farm-card img { width: 4rem; height: 4rem; object-fit: contain; }
.amp-farm-card strong { color: #fff; font-size: .75rem; }
.amp-signal-progress { margin: .8rem 0; padding: .7rem; border: 1px solid var(--amp-cyan); border-radius: .45rem; color: #dffaff; background: rgba(0,27,45,.75); }
.amp-signal-progress > div { height: .45rem; margin: .4rem 0; overflow: hidden; border-radius: 1rem; background: #11273a; }
.amp-signal-progress i { display: block; height: 100%; background: linear-gradient(90deg, #00b8ff, #7d6cff); }

/* Versioned Agent Amplifier feature introduction and Help replay. */
.amp-intro-overlay {
    position: fixed; inset: 0; z-index: 14000; display: grid; place-items: center; padding: 1rem;
    color: #eafaff; background: radial-gradient(circle at 50% 20%, rgba(18,73,112,.38), transparent 42%), rgba(0,4,13,.94);
    backdrop-filter: blur(7px);
}
.amp-intro-shell {
    --amp-intro-accent: #52e8ff;
    position: relative; width: min(58rem, 96vw); min-height: min(39rem, 92vh); max-height: 92vh;
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
    border: 1px solid rgba(82,232,255,.7); border-radius: 1rem;
    background: linear-gradient(155deg, rgba(8,28,54,.99), rgba(1,7,21,.99) 58%, rgba(15,8,35,.99));
    box-shadow: inset 0 0 4rem rgba(55,190,255,.08), 0 0 0 1px rgba(255,255,255,.04), 0 1.5rem 5rem rgba(0,0,0,.72), 0 0 2rem rgba(31,202,255,.22);
}
.amp-intro-shell::before, .amp-intro-shell::after {
    content: ''; position: absolute; z-index: 0; pointer-events: none;
}
.amp-intro-shell::before { inset: 0; opacity: .13; background-image: linear-gradient(rgba(82,232,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(82,232,255,.18) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000, transparent 70%); }
.amp-intro-shell::after { width: 14rem; height: 14rem; right: -5rem; top: -6rem; border: 1px solid rgba(166,108,255,.45); border-radius: 50%; box-shadow: 0 0 4rem rgba(166,108,255,.28); }
.amp-intro-scanline { position: absolute; z-index: 1; inset: 0 0 auto; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(82,232,255,.85), transparent); animation: amp-intro-scan 5.5s linear infinite; }
@keyframes amp-intro-scan { from { transform: translateY(0); opacity: .2; } 45% { opacity: .65; } to { transform: translateY(38rem); opacity: 0; } }
.amp-intro-close { position: absolute; z-index: 5; top: .8rem; right: .8rem; width: 2.65rem; height: 2.65rem; display: grid; place-items: center; padding: 0; color: #b8d8e7; border: 1px solid rgba(135,190,216,.4); border-radius: 50%; background: rgba(3,13,28,.82); font-size: 1.45rem; cursor: pointer; }
.amp-intro-close:hover { color: #fff; border-color: #ff7d87; background: rgba(72,16,27,.85); }
.amp-intro-header { position: relative; z-index: 2; padding: 2.4rem 4.5rem 1rem 2.6rem; border-bottom: 1px solid rgba(82,232,255,.13); }
.amp-intro-eyebrow { display: block; margin-bottom: .5rem; color: #73f1ff; font: 800 .72rem Orbitron, sans-serif; letter-spacing: .22em; }
.amp-intro-header h2 { margin: 0; color: #fff; font: 800 clamp(1.65rem, 4vw, 2.7rem) Orbitron, sans-serif; letter-spacing: .035em; text-shadow: 0 0 1.1rem rgba(82,232,255,.4); }
.amp-intro-header p { max-width: 46rem; margin: .65rem 0 0; color: #a9c9d9; font-size: .98rem; line-height: 1.5; }
.amp-intro-body { position: relative; z-index: 2; min-height: 0; overflow-y: auto; padding: 1.5rem 2.6rem 1.8rem; overscroll-behavior: contain; }
.amp-intro-hero-art { min-height: 16rem; display: flex; align-items: center; justify-content: center; gap: clamp(.4rem, 3vw, 2rem); overflow: hidden; }
.amp-intro-hero-art img { width: min(34%, 14rem); aspect-ratio: 1; object-fit: cover; border-radius: 1rem; filter: saturate(1.1) contrast(1.08); box-shadow: 0 0 2.2rem rgba(45,205,255,.18); }
.amp-intro-energy { color: #fff2a0; font: 800 2rem Orbitron, sans-serif; text-shadow: 0 0 1rem #ffd65c; }
.amp-intro-callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem 1.2rem; padding: 1rem 1.2rem; border: 1px solid rgba(82,232,255,.35); border-radius: .75rem; background: linear-gradient(90deg, rgba(16,63,86,.68), rgba(8,22,43,.72)); }
.amp-intro-callout strong { color: #fff; font: 700 .85rem Orbitron, sans-serif; }
.amp-intro-callout span { color: #b9d7e5; line-height: 1.45; }
.amp-intro-route { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: .8rem; align-items: center; margin: .5rem 0 1.5rem; }
.amp-intro-route > div { min-height: 10rem; display: grid; align-content: center; gap: .45rem; padding: 1rem; text-align: center; border: 1px solid rgba(82,232,255,.28); border-radius: .75rem; background: rgba(4,21,41,.82); }
.amp-intro-route-icon { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; justify-self: center; color: #03121d; border-radius: 50%; background: #63ecff; font: 800 .7rem Orbitron, sans-serif; box-shadow: 0 0 1rem rgba(82,232,255,.55); }
.amp-intro-route strong { color: #fff; font-family: Orbitron, sans-serif; }
.amp-intro-route small { color: #9ebdcd; line-height: 1.4; }
.amp-intro-route-arrow { color: #65eaff; font-size: 2rem; }
.amp-intro-signal { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; padding: 1rem 1.2rem; border: 1px solid rgba(255,190,65,.42); border-radius: .75rem; background: linear-gradient(110deg, rgba(71,40,8,.56), rgba(22,16,33,.72)); }
.amp-intro-signal-ring { width: 5.4rem; height: 5.4rem; display: grid; place-content: center; text-align: center; border: 3px solid #ffc85a; border-radius: 50%; box-shadow: inset 0 0 1rem rgba(255,190,65,.2), 0 0 1rem rgba(255,190,65,.25); }
.amp-intro-signal-ring span { color: #fff2bf; font: 800 1.3rem Orbitron, sans-serif; }
.amp-intro-signal-ring small { color: #d8b76d; font-size: .48rem; letter-spacing: .14em; }
.amp-intro-signal p { margin: 0; color: #cbd8df; line-height: 1.5; }
.amp-intro-signal strong { color: #ffe19a; }
.amp-intro-family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.amp-intro-family { min-width: 0; display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem; border: 1px solid rgba(82,232,255,.35); border-radius: .8rem; background: rgba(4,19,39,.84); }
.amp-intro-family-protocol { border-color: rgba(166,108,255,.48); background: rgba(24,13,49,.75); }
.amp-intro-family img { width: 7rem; height: 7rem; object-fit: cover; border-radius: .6rem; }
.amp-intro-family span { color: #64eaff; font: 800 .64rem Orbitron, sans-serif; letter-spacing: .12em; }
.amp-intro-family-protocol span { color: #c49cff; }
.amp-intro-family h3 { margin: .4rem 0; color: #fff; font-size: 1rem; line-height: 1.3; }
.amp-intro-family p { margin: 0; color: #a9c5d3; font-size: .84rem; line-height: 1.45; }
.amp-intro-family small { display: block; margin-top: .55rem; color: #e6f8ff; font-weight: 700; }
.amp-intro-rarities { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1rem; }
.amp-intro-rarities span { padding: .62rem; text-align: center; border: 1px solid currentColor; border-radius: .4rem; background: rgba(3,11,25,.75); font: 700 .66rem Orbitron, sans-serif; letter-spacing: .06em; }
.amp-intro-rarities .basic { color: var(--amp-basic); } .amp-intro-rarities .premier { color: var(--amp-premier); } .amp-intro-rarities .elite { color: var(--amp-elite); } .amp-intro-rarities .ultimate { color: var(--amp-ultimate); }
.amp-intro-tier-rule { display: grid; grid-template-columns: minmax(11rem, .75fr) 1.6fr; gap: .8rem; margin-top: .8rem; padding: .8rem 1rem; border: 1px solid rgba(255,213,79,.48); border-radius: .65rem; background: linear-gradient(100deg,rgba(83,56,8,.58),rgba(8,27,44,.76)); line-height: 1.45; }
.amp-intro-tier-rule strong { color: #ffe383; font-family: Orbitron, sans-serif; }
.amp-intro-tier-rule span { color: #d9e6ec; }
.amp-intro-cache { display:grid; grid-template-columns:minmax(14rem,.8fr) 1.3fr; gap:1.2rem; align-items:center; padding:1.1rem; border:1px solid rgba(186,126,255,.48); border-radius:.8rem; background:linear-gradient(120deg,rgba(48,17,78,.8),rgba(5,30,49,.88)); }
.amp-intro-cache-art { display:flex; align-items:center; justify-content:center; gap:.35rem; }.amp-intro-cache-art img { width:min(8rem,34%); aspect-ratio:1; object-fit:cover; border-radius:.65rem; box-shadow:0 0 1.4rem rgba(151,84,255,.25); }.amp-intro-cache-art span { color:#ffe783; font:800 1.4rem Orbitron,sans-serif; text-shadow:0 0 .8rem rgba(255,210,72,.7); }
.amp-intro-cache-copy>span { color:#c79cff; font:800 .65rem Orbitron,sans-serif; letter-spacing:.12em; }.amp-intro-cache-copy h3 { margin:.45rem 0; color:#fff; font:800 1rem Orbitron,sans-serif; line-height:1.35; }.amp-intro-cache-copy p { margin:0; color:#b5cbd7; line-height:1.5; }
.amp-intro-cache-guarantees { display:grid; grid-template-columns:repeat(3,1fr); gap:.7rem; margin-top:.8rem; }.amp-intro-cache-guarantees div { display:grid; gap:.3rem; padding:.8rem; border:1px solid rgba(82,232,255,.27); border-radius:.65rem; background:rgba(4,19,39,.78); }.amp-intro-cache-guarantees strong { color:#6ff3ff; font:700 .72rem Orbitron,sans-serif; }.amp-intro-cache-guarantees span { color:#aac4d1; font-size:.78rem; line-height:1.4; }
.amp-intro-steps { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.amp-intro-steps li { display: grid; grid-template-columns: 2.7rem 1fr; gap: .9rem; align-items: center; padding: .85rem 1rem; border: 1px solid rgba(82,232,255,.25); border-radius: .7rem; background: rgba(5,22,42,.8); }
.amp-intro-steps li > span { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; color: #03131d; border-radius: .45rem; background: #61eaff; font: 800 .8rem Orbitron, sans-serif; }
.amp-intro-steps strong { color: #fff; font-family: Orbitron, sans-serif; font-size: .8rem; }
.amp-intro-steps p { margin: .28rem 0 0; color: #a8c5d4; font-size: .83rem; line-height: 1.4; }
.amp-intro-warning { margin-top: .8rem; padding: .8rem 1rem; color: #f5d7c0; border: 1px solid rgba(255,111,96,.5); border-radius: .65rem; background: rgba(74,17,22,.58); line-height: 1.45; }
.amp-intro-token { display: grid; grid-template-columns: minmax(10rem, .7fr) 1.6fr; gap: .8rem; margin-top: .8rem; padding: .8rem 1rem; color: #c9f9e0; border: 1px solid rgba(53,255,157,.45); border-radius: .65rem; background: rgba(9,64,48,.42); line-height: 1.45; }
.amp-intro-token strong { color: #67ffb0; font-family: Orbitron, sans-serif; }
.amp-intro-warning strong { color: #ff9c8e; }
.amp-intro-replay { margin: .75rem 0 0; color: #92afbd; text-align: center; font-size: .78rem; }
.amp-intro-footer { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(7rem, 1fr) auto minmax(7rem, 1fr); gap: 1rem; align-items: center; padding: 1rem 2.6rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid rgba(82,232,255,.18); background: rgba(1,8,20,.92); }
.amp-intro-nav { min-height: 2.75rem; padding: .65rem 1rem; color: #dffaff; border: 1px solid rgba(82,232,255,.55); border-radius: .45rem; background: rgba(8,35,57,.9); font: 700 .72rem Orbitron, sans-serif; cursor: pointer; }
.amp-intro-nav:disabled { visibility: hidden; }
.amp-intro-next { justify-self: end; color: #04131a; border-color: #70efff; background: linear-gradient(135deg, #8bf4ff, #3fc8f0); box-shadow: 0 0 1rem rgba(82,232,255,.3); }
.amp-intro-prev { justify-self: start; }
.amp-intro-progress { display: flex; gap: .45rem; }
.amp-intro-progress span { width: .52rem; height: .52rem; border: 1px solid #557488; border-radius: 50%; background: #13273a; }
.amp-intro-progress span.active { border-color: #7cf1ff; background: #7cf1ff; box-shadow: 0 0 .65rem rgba(82,232,255,.8); }
.amp-intro-progress span.complete { border-color: #55baca; background: #267184; }
.amp-intro-close:focus-visible, .amp-intro-nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .amp-intro-scanline { animation: none; display: none; } .amp-cache-reveal-card { animation:none; opacity:1; transform:none; } }

@media (min-width: 901px) and (max-width: 1250px) {
    .amp-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
}

@media (min-width: 781px) {
    .amp-toolbar { max-height: 7.5rem; }
}

@media (min-width: 521px) and (max-width: 900px) {
    .amp-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
}

@media (max-width: 780px) {
    .amp-cache-reveal { min-width:0; }
    .amp-cache-reveal>div { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .amp-inventory-panel { padding-bottom: 7rem; }
    .amp-filter-drawer > summary { display: block; }
    .amp-filter-drawer[open] > summary { margin-bottom: .5rem; }
    .amp-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem; }
    .amp-family-control { grid-column: 1; grid-row: 1; }
    .amp-sort-control { grid-column: 2; grid-row: 1; }
    .amp-rarity-filter { grid-column: 1 / -1; grid-row: 2; }
    .amp-range-filter { grid-column: 1; grid-row: 3; }
    .amp-filter-actions { grid-column: 2; grid-row: 3; justify-self: stretch; }
    .amp-filter-actions button { flex: 1 1 0; }
    .amp-sale-bar { position: fixed; left: .5rem; right: .5rem; bottom: max(.5rem, env(safe-area-inset-bottom)); }
    .amp-dialog-overlay { align-items: end; padding: 0; }
    .amp-dialog { width: 100%; max-height: 94vh; border-radius: 1rem 1rem 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .amp-detail { grid-template-columns: 5rem 1fr; }
    .amp-detail img { width: 5rem; height: 5rem; }
    .amp-installed-slot { flex-direction: column; }
    .amp-intro-overlay { align-items: end; padding: 0; }
    .amp-intro-shell { width: 100%; min-height: 0; height: min(94vh, 50rem); max-height: 94vh; border-radius: 1rem 1rem 0 0; }
    .amp-intro-header { padding: 1.7rem 3.8rem .85rem 1.2rem; }
    .amp-intro-header p { font-size: .88rem; }
    .amp-intro-body { padding: 1rem 1.2rem 1.3rem; }
    .amp-intro-hero-art { min-height: 12rem; }
    .amp-intro-hero-art img { width: min(40%, 10rem); }
    .amp-intro-callout { grid-template-columns: 1fr; }
    .amp-payment-choice, .amp-intro-token, .amp-intro-tier-rule { grid-template-columns: 1fr; }
    .amp-intro-route { grid-template-columns: 1fr; gap: .5rem; }
    .amp-intro-route > div { min-height: 0; grid-template-columns: auto auto 1fr; text-align: left; align-items: center; }
    .amp-intro-route-icon { grid-row: 1 / span 2; }
    .amp-intro-route-arrow { display: none; }
    .amp-intro-family-grid { grid-template-columns: 1fr; }
    .amp-intro-cache { grid-template-columns:1fr; }.amp-intro-cache-art { max-height:8rem; }.amp-intro-cache-guarantees { grid-template-columns:1fr; }
    .amp-intro-family { grid-template-columns: 5rem minmax(0, 1fr); }
    .amp-intro-family img { width: 5rem; height: 5rem; }
    .amp-intro-footer { padding: .8rem 1.2rem max(.8rem, env(safe-area-inset-bottom)); gap: .55rem; }
    .amp-intro-nav { min-width: 0; padding: .55rem .7rem; font-size: .62rem; }
}

@media (max-width: 520px) {
    .amp-signal-grid, .amp-card-grid { grid-template-columns: minmax(0, 1fr); }
    .amp-card { grid-template-columns: 5.75rem minmax(0, 1fr); min-height: 14.5rem; padding: .8rem; }
    .amp-art { max-width: 5.5rem; max-height: 7rem; }
    .amp-card-actions { grid-template-columns: 1fr; }
    .amp-intro-signal { grid-template-columns: 1fr; text-align: center; }
    .amp-intro-signal-ring { justify-self: center; }
    .amp-intro-rarities { grid-template-columns: 1fr 1fr; }
}
