/* V19: letzte Korrekturen für Kleidung, Werkzeuge und ACP-Titel. */

.acp-v17[hidden],
.acp-v17-page-state[hidden] {
    display: none !important;
}

.acp-v17-content {
    overflow: hidden;
    padding: 0;
}

.acp-v17-page-state {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding: 13px 15px 18px;
}

.inventory-v16-side-content > header {
    height: 43px;
    min-height: 43px;
    max-height: 43px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.inventory-v16-side-content:not(.wealth) {
    grid-template-rows: 43px minmax(0, 1fr) !important;
}

.inventory-v16-side-content.wealth {
    grid-template-rows: 43px auto auto minmax(0, 1fr) auto;
}

.inventory-v16-side-content.wealth > .inventory-v16-currencies {
    padding-top: 8px;
}

.inventory-v16-keys strong {
    font-size: 13px;
}

/* Belegte Kleidungsbilder dürfen den Slot weder füllen noch abschneiden. */
.inventory-v16-clothing-grid > button > span {
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    padding: 4px !important;
}

.inventory-v16-clothing-grid > button.filled > span > img {
    width: auto !important;
    height: auto !important;
    max-width: 70% !important;
    max-height: 70% !important;
    object-fit: contain !important;
    object-position: center !important;
    opacity: .82 !important;
    filter: grayscale(.28) sepia(.18) contrast(.92) drop-shadow(0 2px 3px rgba(0, 0, 0, .72)) !important;
}

.inventory-v16-clothing-grid > button.filled:hover > span > img {
    opacity: .96 !important;
    filter: grayscale(.08) sepia(.12) contrast(1) drop-shadow(0 2px 4px rgba(0, 0, 0, .78)) !important;
}

/* Leere Platzhalter bleiben sichtbar, aber bewusst ausgegraut. */

.inventory-v16-app {
    align-items: center;
    padding: 0 12px;
}

.inventory-transfer-target {
    position: fixed;
    inset: 0;
    z-index: 11950;
    pointer-events: auto;
}
.inventory-transfer-target-hint {
    position: fixed;
    left: 50%;
    bottom: 6vh;
    display: grid;
    gap: 4px;
    min-width: 340px;
    padding: 12px 18px;
    border: 1px solid rgba(192, 154, 93, .7);
    background: rgba(14, 12, 10, .97);
    color: #eee9e1;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}
.inventory-transfer-target-hint span,
.inventory-transfer-target-hint small {
    color: #a99a85;
    font-size: 9px;
}
.inventory-transfer-target-ghost {
    position: fixed;
    z-index: 12000;
    display: grid;
    grid-template-columns: 64px minmax(110px, auto);
    align-items: center;
    gap: 10px;
    min-width: 196px;
    min-height: 76px;
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(192, 154, 93, .74);
    background: rgba(14, 12, 10, .96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .76);
    color: #e4d9ca;
    text-align: left;
    transform: translate(12px, 12px);
    pointer-events: none;
}
.inventory-transfer-target-visual {
    display: grid;
    place-items: center;
    width: 64px;
    height: 58px;
    border-right: 1px solid rgba(192, 154, 93, .22);
}
.inventory-transfer-target-ghost img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .88));
}
.inventory-transfer-target-ghost i {
    color: #c09a5d;
    font-size: 34px;
    font-style: normal;
}
.inventory-transfer-target-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.inventory-transfer-target-copy strong,
.inventory-transfer-target-copy small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inventory-transfer-target-copy strong {
    color: #eee4d6;
    font: 700 12px/1.2 Georgia, serif;
}
.inventory-transfer-target-copy small {
    color: #c09a5d;
    font: 700 10px/1.2 'Segoe UI', sans-serif;
}

.inventory-v16-currencies article {
    grid-template-columns: 45px minmax(0, 1fr);
}
.inventory-v16-currencies article > img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.inventory-v16-currencies article > span {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}
.inventory-v16-currencies article strong {
    text-align: right;
}
.inventory-v16-currencies article { cursor: grab; }
.inventory-v16-currencies article.dragging { opacity: .55; cursor: grabbing; }
.inventory-v16-currency-drag-ghost {
    position: fixed;
    z-index: 10050;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    pointer-events: none;
    transform: translate(-50%, -50%);
}
.inventory-v16-currency-drag-ghost img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .88));
}

.inventory-v16-document-drag-ghost {
    position: fixed;
    z-index: 12000;
    display: grid;
    grid-template-rows: 64px auto;
    place-items: center;
    width: 100px;
    padding: 7px;
    border: 1px solid rgba(192, 154, 93, .68);
    background: rgba(14, 12, 10, .94);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .76);
    color: #e4d9ca;
    font: 700 9px/1.2 Georgia, serif;
    text-align: center;
    transform: translate(10px, 10px);
    pointer-events: none;
}

.inventory-v16-document-drag-ghost img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.inventory-v16-document-toggle {
    display: flex !important;
    grid-template-columns: none !important;
    justify-content: space-between;
    min-height: 32px !important;
    padding: 7px 9px !important;
    border-top: 0 !important;
    background: rgba(20, 18, 14, .82) !important;
    color: #a28a67 !important;
    font: 700 8px/1 Georgia, serif;
    letter-spacing: .1em;
}
.inventory-v16-document-toggle small {
    color: #776b5d;
}
.inventory-v16-documents > section.empty {
    opacity: .46;
}

.inventory-v16-document-context p {
    max-width: 220px;
    margin: 0;
    padding: 8px 10px;
    color: #cdbda9;
    font-size: 10px;
}

.inventory-v16-document-context button.danger {
    color: #d46f64;
}

.inventory-v16-document-viewer footer {
    grid-template-columns: 1fr;
}
.inventory-v16-currencies article input {
    min-width: 0;
    width: 100%;
    height: auto;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: #d8c9b4;
    font: 500 14px Georgia, serif;
    text-align: right;
    appearance: textfield;
}
.inventory-v16-currencies article input:focus {
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: #eee0cc;
}
.inventory-v16-currencies article input::-webkit-inner-spin-button,
.inventory-v16-currencies article input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}
.inventory-v16-clothing-grid > button:not(.filled) > span {
    opacity: .25 !important;
    filter: grayscale(1) sepia(.1) contrast(.82) !important;
}

/* Der Werkzeugplatz belegt zwei Slots, das Motiv selbst bleibt kompakt und mittig. */
.inventory-v16-equipment-grid > button.wide {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    align-items: stretch !important;
}

.inventory-v16-equipment-grid > button.wide > span {
    display: grid !important;
    place-items: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 4px 18% 1px !important;
}

.inventory-v16-equipment-grid > button.wide > span > img {
    width: auto !important;
    height: auto !important;
    max-width: 68% !important;
    max-height: 72% !important;
    object-fit: contain !important;
    object-position: center !important;
    opacity: .66 !important;
    filter: grayscale(.35) sepia(.2) contrast(.88) drop-shadow(0 2px 3px rgba(0, 0, 0, .7)) !important;
}

.inventory-v16-equipment-grid > button.wide.filled > span > img {
    opacity: .9 !important;
    filter: sepia(.12) contrast(.98) drop-shadow(0 2px 4px rgba(0, 0, 0, .78)) !important;
}

.inventory-v16-equipment-grid > button > b {
    width: 28px;
    height: 22px;
    padding: 0 2px;
    border-radius: 12px;
    font-size: 8px;
    line-height: 20px;
    white-space: nowrap;
}

.inventory-v16-equipment-grid > button.wide > small {
    align-self: end !important;
    padding: 0 2px 2px !important;
}

/* ACP-Titel: keine rechte Infobox und kein Schließen-X. */
.acp-v17-title-box {
    grid-template-columns: 92px minmax(0, 1fr) !important;
}

.acp-v17-title-info,
.acp-v17-close {
    display: none !important;
}

.acp-v17-title-copy {
    padding-right: 24px !important;
}

.acp-v17-title-status {
    position: absolute !important;
    top: 50%;
    right: 34px;
    max-width: 43%;
    margin: 0 !important;
    padding: 10px 16px !important;
    border: 1px solid rgba(87, 49, 25, .5) !important;
    background: rgba(43, 57, 29, .92) !important;
    color: #e7d8b6 !important;
    text-align: center;
    transform: translateY(-50%);
}

.rh-notice-stack.top-right {
    right: 1.5vw;
    left: auto;
    width: min(420px, 38vw);
    transform: none;
    justify-items: end;
}

.inventory-v16-unified-raster {
    min-height: 0;
    overflow-y: auto;
    padding-right: 0;
    scrollbar-width: thin;
    scrollbar-color: #8d4a3d #11100d;
}
.inventory-v16-main,
.inventory-v16-storage {
    grid-template-rows: 43px 48px auto auto auto minmax(0, 1fr);
}
.inventory-v16-storage-spacer {
    height: 48px;
}
.inventory-v16-storage.storage-horse.equipment-view {
    grid-template-rows: 43px minmax(0, 1fr);
}
.inventory-v16-storage.storage-robbery {
    grid-template-rows: 43px 48px auto minmax(0, 1fr);
}
.inventory-v16-robbery-currencies {
    display: flex;
    margin-left: auto;
    gap: 4px;
}
.inventory-v16-robbery-currencies button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 2px;
    border: 0;
    border-bottom: 1px solid rgba(150, 61, 49, .7);
    background: transparent;
}
.inventory-v16-robbery-currencies img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.inventory-v16-horse-equipment {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 6px;
    min-height: 0;
    padding: 7px;
    overflow: hidden;
}
.inventory-v16-horse-equipment > p {
    margin: 0;
    color: #706759;
    font-size: 7px;
    letter-spacing: .055em;
    text-align: center;
}
.inventory-v16-horse-slot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 5px;
    min-height: 0;
    overflow: hidden;
    scrollbar-width: thin;
    scrollbar-color: #754033 #11100d;
}
.inventory-v16-horse-slot-grid button {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    place-items: center;
    gap: 4px;
    width: 100%;
    min-height: 84px;
    padding: 6px;
    overflow: hidden;
    border: 1px solid rgba(126, 91, 47, .34);
    background: radial-gradient(circle at center, rgba(111, 85, 54, .12), rgba(5, 5, 4, .15));
    color: #b6a78e;
    text-align: center;
}
.inventory-v16-horse-slot-grid button.horseshoes {
    grid-column: auto;
    grid-template-columns: none;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 84px;
    padding: 6px;
}
.inventory-v16-horse-slot-grid button:hover {
    border-color: rgba(145, 61, 47, .78);
    background: radial-gradient(circle at center, rgba(102, 28, 22, .3), rgba(5, 5, 4, .15));
}
.inventory-v16-horse-slot-grid button > span {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 0;
}
.inventory-v16-horse-slot-grid button > span img {
    width: 72px;
    height: 58px;
    object-fit: contain;
}
.inventory-v16-horse-slot-grid button > span .inventory-v16-icon {
    width: 28px;
    height: 28px;
    color: #554c40;
}
.inventory-v16-horse-slot-grid button.filled > span .inventory-v16-icon {
    color: #a99575;
}
.inventory-v16-horse-slot-grid button.empty {
    border-color: rgba(82, 78, 71, .42);
    background: radial-gradient(circle at center, rgba(86, 83, 76, .1), rgba(5, 5, 4, .3));
    filter: grayscale(1);
}
.inventory-v16-horse-slot-grid button.empty > span {
    opacity: .28;
}
.inventory-v16-horse-slot-grid button strong,
.inventory-v16-horse-slot-grid button small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inventory-v16-horse-slot-grid button strong {
    color: #c0b19a;
    font-size: 9px;
}
.inventory-v16-horse-slot-grid button small {
    color: #86765f;
    font-size: 7px;
    letter-spacing: .07em;
}

/* Slotname oben mittig, Gegenstandsname unten mittig. */
.inventory-v16-clothing-grid > button > small,
.inventory-v16-equipment-grid > button > small {
    position: absolute !important;
    top: 7px !important;
    right: 7px !important;
    bottom: auto !important;
    left: 7px !important;
    z-index: 8 !important;
    color: #ad9362 !important;
    font: 700 10px/1.1 Georgia, serif !important;
    text-align: center !important;
}
.inventory-v16-clothing-grid > button > strong,
.inventory-v16-equipment-grid > button > strong {
    position: absolute !important;
    right: 7px !important;
    bottom: 7px !important;
    left: 7px !important;
    z-index: 8 !important;
    color: #eee9e1 !important;
    font: 700 10px/1.1 Georgia, serif !important;
    text-align: center !important;
}

/* Breite Ausrüstungsplätze verwenden dieselbe feste Beschriftungsposition
   und Typografie wie alle normalen Plätze. */
.inventory-v16-equipment-grid > button.wide > small {
    position: absolute !important;
    top: 7px !important;
    right: 7px !important;
    bottom: auto !important;
    left: 7px !important;
    align-self: auto !important;
    padding: 0 !important;
    font: 700 10px/1.1 Georgia, serif !important;
    text-align: center !important;
}
.inventory-v16-equipment-grid > button.wide > strong {
    position: absolute !important;
    top: auto !important;
    right: 7px !important;
    bottom: 7px !important;
    left: 7px !important;
    padding: 0 !important;
    font: 700 10px/1.1 Georgia, serif !important;
    text-align: center !important;
}

/* Slot- und Kleidungsname behalten unabhängig vom Belegungszustand dieselbe
   Typografie. Ältere Zustandsregeln dürfen aktive Kleidung nicht verkleinern. */
.inventory-v16-clothing-grid > button.filled > small,
.inventory-v16-clothing-grid > button:not(.filled) > small,
.inventory-v16-clothing-grid > button.filled > strong,
.inventory-v16-clothing-grid > button:not(.filled) > strong {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
}
.inventory-v16-horse-wait {
    padding: 18px 8px;
    color: #766d62;
    text-align: center;
}
.inventory-v16-unified-raster > .inventory-v16-raster {
    overflow: visible;
    padding-right: 0;
    scrollbar-gutter: auto;
}
.inventory-v16-quick-row,
.inventory-v16-buffer-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0 0 4px;
}
.inventory-v16-quick-slot .inventory-v16-slot-number {
    position: absolute;
    top: 4px;
    right: 5px;
    bottom: auto;
    left: auto;
    z-index: 4;
    display: block;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #c0b5a6;
    font: 600 9px/1 'Arial Narrow', sans-serif;
}
.inventory-v16-quick-slot > strong {
    top: 5px;
    right: 22px;
    bottom: auto;
    left: 6px;
    overflow: hidden;
    color: #e4d9ca;
    font-size: 7px;
    font-weight: 600;
    line-height: 1.08;
    text-align: left;
    text-overflow: ellipsis;
    white-space: normal;
}
.inventory-v16-quick-slot .inventory-v16-item-image {
    inset: 28% 12% 14%;
}

.inventory-v16-drag-ghost {
    overflow: visible !important;
    border-color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    opacity: .96 !important;
    transform: translate(-50%, -50%) scale(1.03);
}
.inventory-v16-drag-ghost::before,
.inventory-v16-drag-ghost::after {
    display: none !important;
}
.inventory-v16-drag-ghost .inventory-v16-quantity {
    display: none;
}
.inventory-v16-drag-ghost * {
    pointer-events: none !important;
}

.inventory-v16-source-switch {
    display: flex;
    margin-left: auto;
    gap: 3px;
}
.inventory-v16-source-switch button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(82, 71, 58, .62);
    background: transparent;
    color: #81796f;
}
.inventory-v16-source-switch button .inventory-v16-icon {
    width: 16px;
    height: 16px;
}
.inventory-v16-source-switch button.selected {
    border-bottom-color: #963d31;
    background: transparent;
    color: #e2d7c8;
}

.acp-crafting-page .acp-v17-detail-panel { overflow: auto; }

.acp-system-form { align-content: start; }
.acp-system-fields { display: grid; gap: 9px; }
.acp-system-group {
    display: grid;
    gap: 9px;
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(113, 91, 61, .42);
    background: rgba(20, 18, 14, .45);
}
.acp-system-group > legend {
    padding: 0 6px;
    color: #b99a6b;
    font: 700 10px Georgia, serif;
    text-transform: uppercase;
}
.acp-system-array { display: grid; gap: 7px; }
.acp-system-array details {
    padding: 8px;
    border: 1px solid rgba(113, 91, 61, .3);
    background: rgba(5, 6, 5, .42);
}
.acp-system-array summary {
    cursor: pointer;
    color: #c4a675;
    font: 700 10px Georgia, serif;
}
.acp-system-array details[open] summary { margin-bottom: 9px; }
.acp-system-array details > button { width: 100%; margin-top: 8px; }
.acp-system-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 8px;
    border: 1px solid rgba(113, 91, 61, .3);
}
.acp-system-check input {
    width: 18px;
    height: 18px;
    min-height: 0;
    accent-color: #8d2a21;
}
.acp-system-empty { color: #806845; font-style: italic; }
.acp-v17-inline-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; }
.acp-v17-inline-tabs button { min-height: 30px; border: 1px solid rgba(124, 91, 55, .45); background: rgba(18, 15, 11, .72); color: #a99d8d; }
.acp-v17-inline-tabs button.active { border-color: #9d493b; color: #eee3d2; }
.acp-v17-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; }
.acp-v17-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 7px; min-height: 27px; }
.acp-v17-check input { width: 15px !important; height: 15px; margin: 0; }
.acp-v17-selection-box { margin: 7px 0; padding: 8px; border: 1px solid rgba(122, 91, 57, .4); background: rgba(10, 9, 7, .45); }
.acp-v17-selection-box > header { display: flex; align-items: center; justify-content: space-between; }
.acp-v17-selection-box > div { display: flex; align-items: center; gap: 6px; }
.acp-v17-selection-box > div > .acp-v17-check { flex: 1; }
.acp-crafting-node-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.acp-crafting-node-list button { min-height: 28px; }
.acp-crafting-node-list button.selected { border-color: #9d493b; color: #eee3d2; }

/* RedM/CEF rendert native Select-Menüs auf einer eigenen Oberfläche, die als
   Pixelblock zurückbleiben kann. ACP-Auswahlen bleiben deshalb vollständig im DOM. */
.acp-v17 .acp-select {
    position: relative;
    z-index: 6;
    width: 100%;
}

.acp-v17 .acp-select-value {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 1px;
    min-height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.acp-v17-selection-box > div > .acp-select {
    flex: 1;
    width: auto;
    min-width: 0;
}

.acp-v17-list-panel > header .acp-v17-list-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: min(430px, 64%);
}

.acp-v17-list-panel > header .acp-v17-list-tools > input {
    min-width: 120px;
    flex: 1;
}

.acp-v17-list-panel > header .acp-v17-list-tools > .acp-select {
    width: 155px;
    flex: 0 0 155px;
}

.acp-v17-list-panel > header .acp-v17-list-tools > button {
    flex: 0 0 auto;
}

.acp-v17-list-panel button .acp-v17-log-summary {
    width: 100%;
}

.acp-v17-list-panel button .acp-v17-log-heading {
    display: flex;
    align-items: baseline;
    gap: 9px;
    width: 100%;
}

.acp-v17-list-panel button .acp-v17-log-heading strong {
    min-width: 0;
    color: #c8aa78;
    font: 700 12px Georgia, serif;
}

.acp-v17-list-panel button .acp-v17-log-heading strong:last-child {
    overflow: hidden;
    color: #b69058;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acp-v17 .acp-select.open {
    z-index: 80;
}

.acp-v17 .acp-select-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 35px;
    padding: 7px 10px;
    border: 1px solid rgba(122, 91, 57, .52);
    background: rgba(11, 10, 8, .82);
    color: #d2b887;
    font: inherit;
    text-align: left;
}

.acp-v17 .acp-select-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acp-v17 .acp-select-trigger i {
    width: 0;
    height: 0;
    justify-self: center;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    border-top: 6px solid #b99662;
    transition: transform 120ms ease;
}

.acp-v17 .acp-select.open .acp-select-trigger i {
    transform: rotate(180deg);
}

.acp-v17 .acp-select-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 3px);
    right: 0;
    left: 0;
    display: grid;
    max-height: 230px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid rgba(139, 95, 49, .82);
    background: #0b0a08;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .78), inset 0 0 0 2px #17120d;
}

.acp-v17 .acp-select-menu button {
    min-height: 32px;
    padding: 7px 9px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    color: #b7a078;
    font: inherit;
    text-align: left;
}

.acp-v17 .acp-select-search {
    position: sticky;
    z-index: 2;
    top: 0;
    width: 100%;
    min-height: 34px;
    margin-bottom: 4px;
    padding: 7px 9px;
    border: 1px solid rgba(139, 95, 49, .72);
    background: #15110d;
    color: #ead2a5;
    outline: none;
}

.acp-v17 .acp-select-search:focus {
    border-color: #a44332;
}

.acp-v17 .acp-select-empty {
    padding: 10px 8px;
    color: #78684f;
    text-align: center;
}

.acp-v17 .acp-select-menu button.focused,
.acp-v17 .acp-select-menu button.selected,
.acp-v17 .acp-select-menu button:hover {
    border-color: rgba(139, 65, 47, .78);
    background: #41140f;
    color: #ead2a5;
}

.acp-v17 .acp-select.disabled .acp-select-trigger {
    border-color: rgba(91, 73, 50, .38);
    color: #6f6657;
    cursor: default;
}

.acp-v17 .acp-select.disabled .acp-select-trigger i {
    border-top-color: #65563f;
}

.acp-select-menu-portal {
    display: grid;
    max-height: 230px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid rgba(139, 95, 49, .82);
    background: #0b0a08;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .78), inset 0 0 0 2px #17120d;
    font: 11px/1.2 "Segoe UI", Arial, sans-serif;
}
.acp-select-menu-portal button {
    min-height: 32px;
    padding: 7px 9px;
    border: 1px solid transparent;
    background: transparent;
    color: #b7a078;
    text-align: left;
}
.acp-select-menu-portal button.focused,
.acp-select-menu-portal button.selected,
.acp-select-menu-portal button:hover {
    border-color: rgba(139, 65, 47, .78);
    background: #41140f;
    color: #ead2a5;
}
.acp-select-menu-portal .acp-select-search {
    position: sticky;
    z-index: 2;
    top: 0;
    min-height: 34px;
    margin-bottom: 4px;
    padding: 7px 9px;
    border: 1px solid rgba(139, 95, 49, .72);
    background: #15110d;
    color: #ead2a5;
}
.acp-v17-identifier {
    display: block;
    overflow-wrap: anywhere;
}

.inventory-v16-window[hidden] {
    display: none !important;
}

.inventory-v16-shop {
    grid-template-rows: 43px 18px auto minmax(0, 1fr);
}

.inventory-v16-shop .source-shop {
    grid-auto-rows: max-content;
}

.inventory-v16-shop-item {
    min-height: 0;
    aspect-ratio: 1;
}

.inventory-v16-shop-item > .inventory-v16-quantity {
    top: auto;
    right: 4px;
    bottom: 4px;
}

.inventory-v16-shop-item .inventory-v16-item-image {
    inset: 28% 12% 22%;
}

.inventory-v16-shop-item > .inventory-v16-shop-price {
    position: absolute;
    right: 34px;
    bottom: 5px;
    left: 5px;
    display: block;
    overflow: hidden;
    color: #8f8170;
    line-height: 1.05;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-v16-shop-item > .inventory-v16-shop-price b {
    color: #d5b06f;
    font-size: 10px;
    font-weight: 700;
}

/* Einheitliche Checkboxzeilen im gesamten ACP. Text und Kontrolle bleiben
   innerhalb derselben sichtbaren Zeile und können nicht gegeneinander verrutschen. */
.acp-v17 label.check,
.acp-v17 label.acp-v17-check {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 18px !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(104, 80, 51, .48);
    background: rgba(13, 11, 8, .62);
    color: #bca477;
    cursor: pointer;
}

.acp-v17 label.check:hover,
.acp-v17 label.acp-v17-check:hover {
    border-color: rgba(145, 99, 54, .72);
    background: rgba(28, 20, 13, .72);
}

.acp-v17 label.check > span,
.acp-v17 label.acp-v17-check > span {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    min-width: 0;
    gap: 2px;
    line-height: 1.25;
}

.acp-v17 label.check > input[type="checkbox"],
.acp-v17 label.acp-v17-check > input[type="checkbox"] {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    margin: 0 !important;
    padding: 0 !important;
    appearance: none;
    border: 1px solid #84683e;
    border-radius: 2px;
    outline: none;
    background: #090a08;
    box-shadow: inset 0 0 0 2px #15120d;
    cursor: pointer;
}

.acp-v17 label.check > input[type="checkbox"]:checked,
.acp-v17 label.acp-v17-check > input[type="checkbox"]:checked {
    border-color: #bd624a;
    background-color: #76251c;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.3 6.4 12 13 4.5' fill='none' stroke='%23f3d7a4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    box-shadow: inset 0 0 0 1px rgba(255, 214, 153, .12), 0 0 8px rgba(151, 52, 37, .3);
}

.acp-v17 label.check > input[type="checkbox"]:focus-visible,
.acp-v17 label.acp-v17-check > input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(214, 163, 91, .72);
    outline-offset: 2px;
}

.acp-v17 label.check > input[type="checkbox"]:disabled,
.acp-v17 label.acp-v17-check > input[type="checkbox"]:disabled {
    opacity: .42;
    cursor: default;
}

.acp-v17 label.check:has(input:disabled),
.acp-v17 label.acp-v17-check:has(input:disabled) {
    cursor: default;
}

.acp-shop-detail {
    display: grid;
    align-content: start;
    gap: 12px;
}

.acp-shop-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.acp-shop-settings > header p {
    margin: 4px 0 0;
    color: #7f6c4f;
    font-size: 9px;
}

.acp-shop-settings > header > b {
    align-self: start;
    padding: 5px 7px;
    border: 1px solid rgba(135, 94, 50, .5);
    color: #a88958;
    font-size: 8px;
}

.acp-shop-hint {
    margin: 0;
    padding: 9px 10px;
    border-left: 2px solid #8d3b2d;
    background: rgba(74, 27, 20, .24);
    color: #9f8967;
    font-size: 9px;
    line-height: 1.45;
}

.acp-shop-offers {
    display: grid;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 95, 49, .46);
}

.acp-shop-offers > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.acp-shop-offers > header h2 {
    margin: 2px 0 0;
}

.acp-shop-offer-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    max-height: 210px;
    overflow-y: auto;
}

.acp-shop-offer-list > button {
    display: flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid rgba(87, 67, 44, .66);
    background: rgba(12, 10, 8, .74);
    color: #b7a078;
    text-align: left;
}

.acp-shop-offer-list > button.selected {
    border-color: rgba(164, 67, 50, .9);
    background: #32130f;
}

.acp-shop-offer-list span {
    display: grid;
    min-width: 0;
}

.acp-shop-offer-list strong,
.acp-shop-offer-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acp-shop-offer-list b {
    color: #9b6d43;
    font-size: 8px;
}

/* Itemmotive werden anhand ihrer sichtbaren Pixel normalisiert und unabhängig
   von Titel, Menge oder Preis exakt auf die Mitte ihrer quadratischen Box gesetzt. */
.inventory-v16-item .inventory-v16-item-image,
.inventory-v16-quick-slot .inventory-v16-item-image,
.inventory-v16-shop-item .inventory-v16-item-image {
    inset: 0;
    padding: 15%;
    overflow: hidden;
    pointer-events: none;
}

.inventory-v16-item-image .inventory-v16-centered-slot-image {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: auto;
    object-fit: contain;
    object-position: center center;
    transform: none;
    mix-blend-mode: normal;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .74));
}
