.amu-webshop {
    --shop-text: #f7f0e1;
    --shop-muted: #c7bcaa;
    --shop-gold: #f3c677;
    --shop-border: #5b4b35;
    color: var(--shop-text);
    margin: 1.5rem auto;
    max-width: 68rem;
}

.amu-webshop-header,
.amu-webshop-empty,
.amu-webshop-card {
    background: #1b1818;
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    padding: 15px;
}

.amu-webshop-header {
    background: linear-gradient(115deg, #352619, #1b1818 74%);
}

.amu-webshop-brand {
    color: var(--shop-gold);
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.amu-webshop h1,
.amu-webshop h2 {
    color: var(--shop-text);
    line-height: 1.2;
    margin: 0.4em 0;
}

.amu-webshop h1 { font-size: 2.1em; }
.amu-webshop h2 { font-size: 1.3em; }
.amu-webshop p { color: var(--shop-muted); }
.amu-webshop-empty p { margin-bottom: 0; }

.amu-webshop-status {
    background: #2d2419;
    border: 1px solid var(--shop-border);
    border-radius: 999px;
    color: var(--shop-gold);
    display: inline-block;
    padding: 0.3em 0.8em;
}

.amu-webshop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 12px 0;
}

.amu-webshop-tabs a {
    background: #211d1c;
    border: 1px solid var(--shop-border);
    border-radius: 8px;
    color: var(--shop-text);
    padding: 0.55em 0.8em;
    text-decoration: none;
}

.amu-webshop-tabs a[aria-current="page"] {
    background: var(--shop-gold);
    border-color: var(--shop-gold);
    color: #201407;
}

.amu-webshop-tabs a:focus-visible,
.amu-webshop summary:focus-visible {
    outline: 2px solid var(--shop-gold);
    outline-offset: 3px;
}

.amu-webshop-tabs span {
    font-size: 0.9em;
    margin-left: 0.2em;
}

.amu-webshop-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.amu-webshop-grid[data-shop-zone="vip"] {
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
    max-width: 660px;
    margin-inline: auto;
}
.amu-webshop-grid[data-shop-zone="apocalipsis"] {
    max-width: 770px;
    margin-inline: auto;
}
.amu-webshop-card[data-shop-type="kit"] { container-type: inline-size; }
.amu-webshop-grid[data-shop-zone="vip"] .amu-webshop-card { padding: 12px; }
.amu-webshop-card[data-shop-type="vip"] h2 { margin-top: 9px; }
.amu-webshop-vip-art {
    display: grid;
    place-items: center;
    min-height: 145px;
    border: 1px solid #af834c6e;
    border-radius: 8px;
    background: radial-gradient(ellipse, #8b683951, #10192979 68%);
}
.amu-webshop-vip-art img { width: 109px; height: 109px; object-fit: contain; }
.amu-webshop .amu-webshop-vip-description { margin: 0 0 10px; font-size: 13px; }
.amu-webshop-grid[data-shop-zone="extras"] {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr));
}
.amu-webshop-grid[data-shop-zone="extras"] .amu-webshop-card {
    padding: clamp(10px, 1vw, 15px);
}
.amu-webshop-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}
.amu-webshop-card h2 {
    margin: 0 0 8px;
    font-size: clamp(14px, 1.18vw, 17px);
    overflow-wrap: normal;
    text-wrap: balance;
}
.amu-webshop-card .amu-webshop-checkout { margin: auto 0 0; }
.amu-webshop-card .amu-webshop-kit-parts,
.amu-webshop-card .amu-webshop-cover { margin-bottom: 9px; }
.amu-webshop-price-unavailable { color: var(--shop-muted); font-size: 12px; }

.amu-webshop summary { cursor: pointer; }
.amu-webshop-wallet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 7px; }
.amu-webshop-wallet > div { padding: 7px 9px; background: #171411; border: 1px solid #675337; border-radius: 8px; }
.amu-webshop-wallet > .amu-webshop-wallet-gp { border-color: #a3824c; background: #211b13; }
.amu-webshop-wallet dt { color: var(--shop-muted); font-size: .78em; }
.amu-webshop-wallet dt span { color: var(--shop-gold); font-weight: 700; white-space: nowrap; }
.amu-webshop-wallet dd { margin: .25rem 0 0; color: var(--shop-text); font-size: 1.18em; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.amu-webshop .amu-webshop-demo-note { margin: .6em 0 0; font-size: .9em; }
.amu-webshop-demo-note strong { color: var(--shop-gold); margin-inline-start: .28em; white-space: nowrap; }

.amu-webshop-race,
.amu-webshop-confirm,
.amu-webshop-feedback {
    background: #221b17;
    border: 1px solid var(--shop-border);
    border-radius: 9px;
    margin-bottom: 9px;
    padding: 8px 12px;
}

.amu-webshop-race {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.amu-webshop-race select {
    background: #161311;
    border: 1px solid var(--shop-border);
    border-radius: 6px;
    color: var(--shop-text);
    padding: 0.5rem 0.65rem;
}

.amu-webshop-confirm {
    background: #332518;
    border-color: var(--shop-gold);
}

.amu-webshop-feedback { color: #ccebbd; }
.amu-webshop-error { color: #ffd1ca; background: #391f1c; border-color: #98554c; }

.amu-webshop-button {
    background: var(--shop-gold);
    border: 1px solid var(--shop-gold);
    border-radius: 6px;
    color: #25190d;
    cursor: pointer;
    font-weight: 700;
    padding: 0.5rem 0.8rem;
}

.amu-webshop-button-alt {
    background: #27201b;
    border-color: var(--shop-border);
    color: var(--shop-text);
}

.amu-webshop-checkout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 9px 0;
    padding: 7px 10px;
    border: 1px solid var(--shop-border);
    border-radius: 8px;
    background: #161311;
}
.amu-webshop-checkout > div { display: grid; gap: .2rem; }
.amu-webshop-checkout > div > span { color: var(--shop-muted); font-size: .78em; }
.amu-webshop-checkout strong { color: var(--shop-gold); font-size: 1.1em; }
.amu-webshop .amu-webshop-checkout form { margin: 0; }
.amu-webshop-grid[data-shop-zone="apocalipsis"] .amu-webshop-checkout {
    margin: 10px 0 0;
    text-align: start;
}
.amu-webshop-checkout .amu-webshop-button { padding: 7px 10px; }
.amu-webshop-button-buy { background: #347552; border-color: #599473; color: #fff; }
.amu-webshop-button-buy:hover { background: #3c845f; }
.amu-webshop-button-short:disabled { background: #6a302a; border-color: #b56b5d; color: #ffe1d9; cursor: not-allowed; opacity: 1; font-size: .85em; }
.amu-webshop-short-details { flex-basis: 100%; color: #ffb3a6; font-size: .85em; }
.amu-webshop .amu-webshop-gp-contact { margin: 4px 0 0; color: #f3dfd5; font-size: .9em; }
.amu-webshop .amu-webshop-gp-help { margin: 8px 0 0; padding: 8px 10px; border: 1px solid #98554c; border-radius: 8px; background: #391f1c; }
.amu-webshop .amu-webshop-gremory { padding: 7px 10px; margin: 0 0 9px; border: 1px solid var(--shop-border); border-radius: 7px; background: #241b12; }
.amu-webshop-gremory kbd { padding: 0 4px; color: var(--shop-gold); font-weight: bold; }
.amu-webshop-gp-contact a { white-space: nowrap; text-decoration: underline; }
.amu-webshop-dialog {
    width: min(calc(100vw - 2rem), 28rem);
    box-sizing: border-box;
    border: 1px solid #a5844e;
    border-radius: 12px;
    padding: 1.35rem;
    color: var(--shop-text);
    background: radial-gradient(ellipse at top, #38291c, #211912 73%);
    box-shadow: 0 18px 60px #000a;
}
.amu-webshop-dialog:not([open]) { display: none; }
.amu-webshop-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.amu-webshop .amu-webshop-dialog-product { font-weight: 600; }
.amu-webshop .amu-webshop-dialog-price { color: var(--shop-gold); font-size: 1.25em; font-weight: 700; }
.amu-webshop .amu-webshop-dialog-delivery { color: var(--shop-muted); font-size: .85em; }
.amu-webshop-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; margin-top: 1rem; }

.amu-webshop-button:focus-visible,
.amu-webshop-race select:focus-visible {
    outline: 2px solid var(--shop-gold);
    outline-offset: 3px;
}

.amu-webshop-card form { margin-top: 0.7rem; }
.amu-webshop-card li { color: var(--shop-text); }
.amu-webshop-link { color: var(--shop-gold); font-weight: 700; }
.amu-webshop-cover, .amu-webshop-cover-pending {
    margin: .7rem 0;
    padding: .5rem;
    border: 1px solid var(--shop-border);
    border-radius: 8px;
    background: radial-gradient(#463421,#1b1713 72%);
}
.amu-webshop-cover > img { display: block; width: 100%; max-height: 235px; object-fit: contain; }
.amu-webshop-kit-parts { display: grid; gap: 6px; }
.amu-webshop-kit-part { margin: 0; padding: 6px 7px; border: 1px solid var(--shop-border); border-radius: 8px; }
.amu-webshop-card .amu-webshop-pieces { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 6px 9px; margin: 0; padding: 0; list-style: none; }
.amu-webshop-kit-part[data-kit-part="equipment"] {
    width: min(100%, 480px);
    margin-inline: auto;
    box-sizing: border-box;
    padding: clamp(5px, 1.3vw, 10px);
    background: radial-gradient(ellipse at center, #61503540, #080b10a8 80%);
}
.amu-webshop-kit-part[data-kit-part="equipment"] .amu-webshop-pieces {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: .8fr 1.35fr .8fr;
    gap: clamp(3px, .8vw, 8px);
    align-items: stretch;
    aspect-ratio: 1.25;
}
.amu-webshop-piece[data-equipment-slot] {
    grid-row: var(--slot-row);
    grid-column: var(--slot-columns);
    min-height: 0;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    padding: 2px;
    position: relative;
    box-sizing: border-box;
    border-color: var(--shop-border);
    background: radial-gradient(ellipse at center, #5e482749, #070a0dc7);
    box-shadow: inset 0 0 0 1px #b798542b;
}
.amu-webshop-piece[data-equipment-slot="helm"]       { --slot-row: 1; --slot-columns: 5 / 9; }
.amu-webshop-piece[data-equipment-slot="necklace"]   { --slot-row: 1; --slot-columns: 3 / 5; align-self: end; aspect-ratio: 1; }
.amu-webshop-piece[data-equipment-slot="wings"]      { --slot-row: 1; --slot-columns: 9 / 13; }
.amu-webshop-piece[data-equipment-slot="hand-left"]  { --slot-row: 2; --slot-columns: 1 / 5; }
.amu-webshop-piece[data-equipment-slot="armor"]      { --slot-row: 2; --slot-columns: 5 / 9; }
.amu-webshop-piece[data-equipment-slot="hand-right"] { --slot-row: 2; --slot-columns: 9 / 13; }
.amu-webshop-piece[data-equipment-slot="gloves"]     { --slot-row: 3; --slot-columns: 1 / 4; }
.amu-webshop-piece[data-equipment-slot="ring-left"]  { --slot-row: 3; --slot-columns: 4 / 6; align-self: end; aspect-ratio: 1; }
.amu-webshop-piece[data-equipment-slot="pants"]      { --slot-row: 3; --slot-columns: 6 / 8; }
.amu-webshop-piece[data-equipment-slot="ring-right"] { --slot-row: 3; --slot-columns: 8 / 10; align-self: end; aspect-ratio: 1; }
.amu-webshop-piece[data-equipment-slot="boots"]      { --slot-row: 3; --slot-columns: 10 / 13; }
.amu-webshop-piece[data-equipment-slot] .amu-webshop-piece-art {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
}
.amu-webshop-piece[data-equipment-slot] .amu-webshop-piece-reference {
    position: absolute;
    inset: auto 1px 0;
    text-align: center;
    background: #10141de8;
    font-size: .63rem;
}
.amu-webshop-kit-part[data-kit-part="content"] { padding: 4px; }
.amu-webshop-kit-part[data-kit-part="content"] .amu-webshop-pieces { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 3px; }
.amu-webshop-kit-part[data-kit-part="content"] .amu-webshop-piece-art {
    width: 100%;
    height: clamp(97px, 11vw, 148px);
    border: 0;
    box-sizing: border-box;
}
.amu-webshop-kit-part[data-kit-part="content"] .amu-webshop-pieces:has(> :nth-child(2)) .amu-webshop-piece-art { height: 76px; }
.amu-webshop-kit-part:is([data-kit-part="extras"], [data-kit-part="mounts"]) {
    width: min(100%, 480px);
    margin-inline: auto;
    box-sizing: border-box;
}
.amu-webshop-kit-part:is([data-kit-part="extras"], [data-kit-part="mounts"]) .amu-webshop-piece {
    flex: 1 1 76px;
    max-width: 136px;
}
.amu-webshop-kit-part:is([data-kit-part="extras"], [data-kit-part="mounts"]) .amu-webshop-piece-art {
    width: 100%;
    height: clamp(65px, 8vw, 100px);
    box-sizing: border-box;
}
@container (min-width: 590px) {
    .amu-webshop-card[data-shop-type="kit"] .amu-webshop-kit-parts {
        grid-template-columns: minmax(0, 1fr) minmax(0, .49fr);
        grid-template-rows: auto 1fr;
        align-items: start;
    }
    .amu-webshop-kit-part[data-kit-part="equipment"] { grid-area: 1 / 1 / 3 / 2; }
    .amu-webshop-kit-part[data-kit-part="extras"] { grid-area: 1 / 2; }
    .amu-webshop-kit-part[data-kit-part="mounts"] { grid-area: 2 / 2; }
}
.amu-webshop-piece { display: grid; align-content: start; justify-items: center; gap: 3px; padding: 3px 4px; min-width: 0; max-width: 100%; border: 1px solid transparent; border-radius: 5px; }
.amu-webshop-piece[data-shop-piece] { cursor: help; }
.amu-webshop-piece[data-shop-piece]:is(:hover, :focus-visible) { background: #2d2118; border-color: #a5844e; outline: none; }
.amu-webshop-piece-art {
    --amu-item-cell: 23px;
    width: calc(var(--amu-item-cols) * var(--amu-item-cell));
    height: calc(var(--amu-item-rows) * var(--amu-item-cell));
    background-color: #13100c;
    background-image: linear-gradient(to right,#57442d 1px,transparent 1px),linear-gradient(to bottom,#57442d 1px,transparent 1px);
    background-size: var(--amu-item-cell) var(--amu-item-cell);
    border-right: 1px solid #57442d;
    border-bottom: 1px solid #57442d;
    box-sizing: content-box;
}
.amu-webshop-piece img { display: block; width: 100%; height: 100%; object-fit: contain; }
.amu-webshop-piece-art-premium {
    background: #100d0c;
    border-color: #755535;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px #755535;
    overflow: hidden;
}
.amu-webshop-piece-name { font-size: 11px; line-height: 1.2; overflow-wrap: break-word; text-align: center; }
.amu-webshop-piece-name-compact {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.amu-webshop-piece-missing { align-self: center; color: var(--shop-muted); font-size: .7rem; }
.amu-webshop-piece-type { color: var(--shop-gold); font-size: .75em; }
.amu-webshop-piece-reference { color: var(--shop-muted); font-size: .72em; }
.amu-webshop-contents-title { font-size: .95em; color: var(--shop-gold); margin: 2px 0 4px; }
.amu-webshop-extras-note { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 10px; border: 1px solid var(--shop-border); border-radius: 8px; background: #221b17; font-size: .9em; }
.amu-webshop-extras-note p { margin: 0; }
.amu-webshop-extras-note strong { color: var(--shop-gold); }
.amu-webshop-extras-note ul { margin: 4px 0 0; padding-inline-start: 18px; }

.amu-webshop-item-tooltip {
    position: fixed;
    z-index: 2147482200;
    width: max-content;
    max-width: min(320px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    box-sizing: border-box;
    overflow: auto;
    padding: 9px 12px;
    border: 1px solid #916e3d;
    border-radius: 7px;
    background: #0d0a08f7;
    color: var(--shop-text);
    box-shadow: 0 8px 30px #000b;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    pointer-events: none;
}
.amu-webshop-item-tooltip[hidden] { display: none; }
.amu-webshop-item-tooltip strong { color: #4ff6a4; font-size: 1.08em; }
.amu-webshop-item-tooltip ul { margin: 5px 0; padding: 0; list-style: none; }
.amu-webshop-item-tooltip .amu-webshop-tip-blue { color: #a0c7fa; }
.amu-webshop-item-tooltip .amu-webshop-tip-green { color: #99ed9e; }
.amu-webshop-item-tooltip .amu-webshop-tip-purple { color: #ddadff; }
.amu-webshop-item-tooltip .amu-webshop-tip-bonus { color: #ffcc70; font-weight: 700; }
.amu-webshop-item-tooltip small { display: block; color: var(--shop-muted); font-size: 11px; }

@media (max-width: 420px) {
    .amu-webshop-grid[data-shop-zone="extras"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .amu-webshop-card[data-shop-type="jewelry"] { grid-column: 1 / -1; }
    .amu-webshop-card .amu-webshop-checkout { padding: 5px 6px; }
}
@media (max-width: 340px) {
    .amu-webshop-grid[data-shop-zone="extras"] { grid-template-columns: minmax(0, 1fr); }
}
