/* Shop lists, shop details, NPC cards, and item tooltips. */

.shop-browser {
    display: grid;
    grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
    align-items: start;
    width: 100%;
    min-width: 0;
    gap: 18px;
}

.shop-browser-list,
.shop-browser-detail {
    min-width: 0;
    max-width: 100%;
}

.shop-browser-list {
    position: sticky;
    top: 18px;
    display: flex;
    max-height: calc(100vh - 36px);
    min-height: 390px;
    flex-direction: column;
    overflow: visible;
}

.shop-search-form {
    position: relative;
    z-index: 90;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #8f6a47;
}

.shop-search-form .search-autocomplete-menu {
    width: 100%;
    max-height: min(360px, calc(100vh - 180px));
}

.shop-search-form input {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
}

.shop-search-form a {
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
}

.shop-list,
.shop-list-empty {
    min-height: 0;
}

.shop-list {
    overflow: auto;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-gutter: stable;
}

.shop-list-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(143, 106, 71, 0.55);
    transition: background 140ms ease, box-shadow 140ms ease;
}

.shop-list-row:last-child {
    border-bottom: 0;
}

.shop-list-row.is-active {
    box-shadow: inset 3px 0 0 #88283a;
}

.shop-list-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
}

.shop-list-icon img[src*="/mob_icon.php"] {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.shop-list-main {
    min-width: 0;
}

.shop-list-main strong,
.shop-list-main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-list-main strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.shop-list-main small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.2;
}

.shop-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border: 1px solid #5d3210;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
}

.shop-count-pill {
    min-width: 32px;
    padding: 0 7px;
}

.shop-list-empty {
    display: grid;
    gap: 4px;
    padding: 18px 16px;
    color: var(--muted);
}

.shop-list-empty strong {
    color: var(--ink);
}

.shop-browser-detail {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 480px;
    overflow-x: clip;
    padding: 18px;
}

.shop-browser-detail > .catalog-separator {
    margin-top: 2px;
    margin-bottom: 2px;
}

.shop-empty-detail {
    display: grid;
    place-content: center;
    min-height: 420px;
    text-align: center;
}

.shop-empty-detail h2 {
    margin: 8px 0;
    font-size: 1.5rem;
}

.shop-empty-detail p {
    margin: 0;
    color: var(--muted);
}

.shop-title-link {
    color: inherit;
    overflow-wrap: anywhere;
}

.shop-title-link:hover {
    color: var(--accent-strong);
}

.shop-category-list {
    display: grid;
    min-width: 0;
}

.shop-category-panel {
    min-width: 0;
}

.shop-category-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    /* Reserved so the open-state divider doesn't add 1px and nudge the row. */
    border-bottom: 1px solid transparent;
    -webkit-user-select: none;
    user-select: none;
}

/* The header and tiles are click targets — don't let a double-click smear a
   text/image selection across them. Tooltip text stays copyable. */
.shop-item-tile {
    -webkit-user-select: none;
    user-select: none;
}

.shop-item-tile img {
    -webkit-user-drag: none;
}

.shop-tooltip {
    -webkit-user-select: text;
    user-select: text;
}

.shop-category-summary::-webkit-details-marker {
    display: none;
}

.shop-category-summary::after {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #5d3210;
    border-radius: 999px;
    content: "+";
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
}

.shop-category-panel[open] .shop-category-summary::after {
    content: "\2212";
}

.shop-category-title {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.shop-category-title strong,
.shop-category-title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-category-title strong {
    font-size: 1rem;
    line-height: 1.2;
}

.shop-category-title small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.shop-category-count {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.shop-category-body {
    min-width: 0;
}

.shop-category-empty {
    margin: 0;
}

.shop-item-grid {
    --wiki-item-cell-size: 32px;

    display: grid;
    grid-template-columns: repeat(auto-fill, 32px);
    align-items: start;
    justify-content: start;
    min-width: 0;
    gap: 2px;
}

.shop-item-tile {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    border: 0;
    border-radius: 3px;
}

.shop-item-tile.is-current-item {
    border-color: #88283a;
    box-shadow: inset 0 0 0 2px rgba(136, 40, 58, 0.28);
}

.shop-stack {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 16px;
    padding: 0 3px;
    border-radius: 999px;
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1.35;
    text-align: center;
}

.shop-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    --tooltip-arrow-left: 18px;
    z-index: 40;
    display: grid;
    justify-items: center;
    width: 250px;
    gap: 4px;
    padding: 10px;
    color: var(--ink);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    visibility: hidden;
}

.shop-tooltip::before {
    position: absolute;
    top: -6px;
    left: var(--tooltip-arrow-left);
    width: 10px;
    height: 10px;
    border-top: 1px solid #88283a;
    border-left: 1px solid #88283a;
    background: #fff8df;
    content: "";
    transform: rotate(45deg);
}

.shop-item-tile.is-tooltip-above .shop-tooltip,
.crafting-item-tile.is-tooltip-above .shop-tooltip,
.chest-drop-tile.is-tooltip-above .shop-tooltip,
.map-drop-tile.is-tooltip-above .shop-tooltip,
.mob-drop-tile.is-tooltip-above .shop-tooltip,
.wiki-entity-link--item.is-tooltip-above .shop-tooltip {
    top: auto;
    bottom: calc(100% + 10px);
    transform: translateY(4px);
}

.shop-item-tile.is-tooltip-above .shop-tooltip::before,
.crafting-item-tile.is-tooltip-above .shop-tooltip::before,
.chest-drop-tile.is-tooltip-above .shop-tooltip::before,
.map-drop-tile.is-tooltip-above .shop-tooltip::before,
.mob-drop-tile.is-tooltip-above .shop-tooltip::before,
.wiki-entity-link--item.is-tooltip-above .shop-tooltip::before {
    top: auto;
    bottom: -6px;
    border-top: 0;
    border-right: 1px solid #88283a;
    border-bottom: 1px solid #88283a;
    border-left: 0;
}

.shop-item-tile:hover .shop-tooltip,
.shop-item-tile:focus-visible .shop-tooltip,
.shop-item-tile:focus-within .shop-tooltip,
.crafting-item-tile:hover .shop-tooltip,
.crafting-item-tile:focus-visible .shop-tooltip,
.crafting-item-tile:focus-within .shop-tooltip,
.chest-drop-tile:hover .shop-tooltip,
.chest-drop-tile:focus-visible .shop-tooltip,
.chest-drop-tile:focus-within .shop-tooltip,
.map-drop-tile:hover .shop-tooltip,
.map-drop-tile:focus-visible .shop-tooltip,
.map-drop-tile:focus-within .shop-tooltip,
.mob-drop-tile:hover .shop-tooltip,
.mob-drop-tile:focus-visible .shop-tooltip,
.mob-drop-tile:focus-within .shop-tooltip,
.wiki-entity-link--item:hover .shop-tooltip,
.wiki-entity-link--item:focus-visible .shop-tooltip,
.wiki-entity-link--item:focus-within .shop-tooltip {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.shop-tooltip strong,
.crafting-item-tile .shop-tooltip strong,
.mob-drop-tile .shop-tooltip strong,
.wiki-entity-link--item .shop-tooltip strong {
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.25;
}

.shop-tooltip-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    gap: 6px;
}

.shop-tooltip-title strong {
    min-width: 0;
}

.shop-tooltip-count {
    flex: 0 0 auto;
    padding: 1px 6px;
    border: 1px solid rgba(143, 106, 71, 0.5);
    border-radius: 999px;
    background: rgba(143, 106, 71, 0.14);
    color: #5f4b3d;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.35;
}

.shop-tooltip small,
.shop-tooltip span,
.shop-tooltip em {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.shop-tooltip em {
    display: -webkit-box;
    overflow: hidden;
    font-style: normal;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.shop-tooltip .shop-tooltip-separator {
    display: block;
    width: 100%;
    height: 1px;
    min-height: 0;
    margin: 3px 0;
    padding: 0;
    background: var(--line);
}

.shop-tooltip-source-list {
    display: grid;
    justify-items: start;
    width: 100%;
    gap: 2px;
    text-align: left;
}

.shop-tooltip-price-list {
    display: grid;
    width: 100%;
    gap: 4px;
}

.shop-tooltip-price-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    justify-items: start;
    width: 100%;
    gap: 4px;
    padding: 5px 7px;
    border-radius: 6px;
    background: rgba(93, 50, 16, 0.08);
    text-align: left;
}

.shop-tooltip-price-row strong,
.shop-tooltip-price-row span {
    color: #4b4034;
    font-size: 0.78rem;
    line-height: 1.2;
}

.shop-tooltip-price-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-tooltip-price-row span {
    font-weight: 900;
    white-space: nowrap;
}

/* Shared shop item and tooltip surfaces. */

.shop-list-empty {
    border-color: var(--panel-border);
    border-radius: 2px 2px 16px 2px;
    background:
        linear-gradient(180deg, rgba(255, 252, 231, 0.82), rgba(238, 230, 197, 0.9)),
        var(--paper);
    box-shadow: var(--shadow), var(--inset-shadow);
}

.shop-list-main strong {
    color: #2c180a;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 900;
    text-shadow: 1px 1px 0 #fff3c8;
}

.shop-search-form {
    border-color: #6f241b;
    background:
        linear-gradient(180deg, rgba(255, 244, 196, 0.54), rgba(226, 201, 132, 0.62)),
        #e7d59e;
}

.shop-tooltip {
    border: 1px solid #6f241b;
    border-radius: 2px 2px 12px 2px;
    background: #fff9df;
    box-shadow: 5px 7px 13px rgba(21, 9, 2, 0.42);
}

.shop-item-tile,
.shop-list-icon img {
    border-color: #8b6040;
    background: #fff9df;
    box-shadow: inset 0 0 8px rgba(112, 68, 27, 0.16);
}

.shop-list-row:hover,
.shop-list-row.is-active {
    background:
        linear-gradient(90deg, rgba(205, 163, 65, 0.32), transparent 80%),
        #f8edbf;
}

.shop-count-pill,
.shop-stack,
.mob-npc-shop-head span {
    border-color: #3a1209;
    background: linear-gradient(180deg, #8b6040, #3a1209);
    color: #fff4cf;
}

.shop-item-grid,
.item-shop-grid {
    background: rgba(255, 249, 223, 0.52);
}

/* Map/Mob-aligned shop browser and detail pages. */

.shop-profile {
    display: grid;
    min-width: 0;
    gap: 10px;
}

.shop-back-link {
    width: fit-content;
}

.shop-browser-card.map-wiki-card,
.shop-profile-card.map-wiki-card {
    display: grid;
    gap: 0;
    border: 2px solid #7a1a13;
    border-radius: 18px 18px 0 0;
    background: #fbfade;
    box-shadow: 7px 9px 15px rgba(19, 13, 6, 0.36);
}

.shop-browser-card.map-wiki-card {
    overflow: visible;
}

.shop-browser-card > .shop-profile-title {
    border-radius: 15px 15px 0 0;
}

.shop-profile-title.map-wiki-titlebar {
    min-height: 44px;
    justify-content: flex-start;
    padding: 5px 18px;
    border-bottom: 0;
    background: #2f1d1f;
    color: #f2e4b5;
}

.shop-profile-title.map-wiki-titlebar h1 {
    min-width: 0;
    overflow-wrap: anywhere;
    color: inherit;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.18rem, 1.55vw, 1.55rem);
    line-height: 1.1;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.shop-profile .shop-browser {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    align-items: start;
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 18px 12px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.shop-profile .shop-browser-list,
.shop-profile .shop-browser-detail,
.shop-profile .shop-profile-panel,
.shop-profile .shop-stat-stack,
.shop-profile .shop-browser-inventory,
.shop-profile .shop-selected-overview {
    min-width: 0;
    border: 2px dashed #9e332d;
    border-radius: 0;
    background: rgba(255, 255, 232, 0.54);
    box-shadow: none;
}

.shop-profile .shop-browser-list {
    position: sticky;
    top: 86px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    max-height: calc(100vh - 104px);
    min-height: 420px;
    padding: 8px 8px 0;
    overflow: visible;
}

.shop-profile .shop-browser-list > h2,
.shop-profile .shop-browser-inventory > h2,
.shop-profile .shop-profile-panel > h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(230px, 70%);
    min-height: 44px;
    margin: 0 auto 8px;
    padding: 6px 14px;
    border: 1px solid #f0d9a2;
    border-radius: 12px;
    background: #2f1d1f;
    color: #f0d9a2;
    font-family: Tahoma, Arial, sans-serif;
    font-size: clamp(1rem, 1.1vw, 1.18rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 2px 3px 7px rgba(20, 8, 2, 0.36);
}

.shop-profile .shop-search-form {
    z-index: 90;
    gap: 7px;
    padding: 0 0 8px;
    border-bottom: 1px solid rgba(158, 51, 45, 0.34);
    background: transparent;
}

.shop-profile .shop-search-form input {
    min-height: 38px;
    padding: 0 11px;
    border-color: rgba(94, 54, 29, 0.52);
    background: #fffced;
}

.shop-profile .shop-list {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.shop-profile .shop-list-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 52px;
    padding: 6px 7px;
    border-bottom-color: rgba(158, 51, 45, 0.22);
}

.shop-profile .shop-list-row:hover,
.shop-profile .shop-list-row:focus-visible,
.shop-profile .shop-list-row.is-active {
    background:
        linear-gradient(90deg, rgba(205, 163, 65, 0.32), transparent 80%),
        #f8edbf;
    color: #5f130f;
    text-decoration: none;
}

.shop-profile .shop-list-icon {
    width: 38px;
    height: 38px;
}

.shop-profile .shop-list-icon img[src*="/mob_icon.php"] {
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
    object-fit: contain;
}

.shop-profile .shop-count-pill {
    min-width: 30px;
    min-height: 24px;
    padding: 0 7px;
    border: 1px solid #3a1209;
    background: linear-gradient(180deg, #8b6040, #3a1209);
    color: #fff4cf;
}

.shop-profile .shop-browser-detail {
    display: grid;
    align-content: start;
    gap: 18px;
    min-height: 480px;
    padding: 0 4px 4px;
    overflow: visible;
    border: 0;
    background: transparent;
}

.shop-profile .shop-empty-detail {
    min-height: 420px;
    border: 2px dashed #9e332d;
    background: rgba(255, 255, 232, 0.54);
}

.shop-profile .shop-selected-overview {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
}

.shop-selected-art {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 1px solid rgba(94, 54, 29, 0.42);
    background: rgba(255, 248, 206, 0.85);
    box-shadow: inset 0 0 8px rgba(112, 68, 27, 0.16);
}

.shop-selected-art img {
    filter: drop-shadow(3px 4px 4px rgba(0, 0, 0, 0.32));
}

.shop-selected-art img[src*="/mob_icon.php"] {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.shop-selected-art--item-icon img {
    image-rendering: pixelated;
}

.shop-selected-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.shop-selected-copy h2 {
    margin: 0;
    color: #21170e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.05;
}

.shop-selected-copy p {
    margin: 0;
    color: #5f4b3d;
    font-size: 0.85rem;
}

.shop-selected-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: #5f4b3d;
    font-size: 0.78rem;
    font-weight: 800;
}

.shop-selected-facts strong {
    color: #64100d;
}

.shop-selected-facts > span {
    display: inline-flex;
    gap: 4px;
}

.shop-detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 7px 14px;
    border: 1px solid #f0d9a2;
    border-radius: 10px;
    background: #2f1d1f;
    color: #f0d9a2;
    font-size: 0.82rem;
    font-weight: 900;
    text-align: center;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 2px 3px 7px rgba(20, 8, 2, 0.36);
}

.shop-detail-button:hover,
.shop-detail-button:focus-visible {
    background: #3a2528;
    color: #fff7d7;
    text-decoration: none;
}

.shop-profile .shop-browser-inventory {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 10px 12px 12px;
}

.shop-profile-top {
    display: grid;
    grid-template-columns: minmax(210px, 0.78fr) minmax(170px, 0.52fr) minmax(380px, 1.4fr);
    align-items: stretch;
    min-width: 0;
    gap: 12px;
    padding: 18px 12px 4px;
}

.shop-profile .shop-profile-panel {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0;
    padding: 8px 9px;
}

.shop-profile .shop-image-panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.shop-profile-art {
    display: grid;
    place-items: center;
    min-height: 288px;
    padding: 10px;
}

.shop-profile-art img {
    width: min(84%, 230px);
    object-fit: contain;
    filter: drop-shadow(6px 8px 7px rgba(0, 0, 0, 0.42));
}

.shop-profile-art img[src*="/mob_icon.php"] {
    max-height: 270px;
}

.shop-profile-art--item-icon img {
    width: auto;
    image-rendering: pixelated;
}

.shop-profile-name {
    display: block;
    padding: 6px 8px 4px;
    color: #21170e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    text-align: center;
}

.shop-profile .shop-stat-stack {
    display: grid;
    align-content: center;
    gap: 12px;
    min-height: 350px;
    padding: 14px 12px;
}

.shop-stat-card {
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 0;
    text-align: center;
}

.shop-stat-card strong {
    width: min(150px, 100%);
    padding: 6px 10px;
    border: 1px solid #f0d9a2;
    border-radius: 8px;
    background: #2f1d1f;
    color: #f0d9a2;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 2px 3px 7px rgba(20, 8, 2, 0.36);
}

.shop-stat-card span {
    max-width: 100%;
    color: #12110c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    font-weight: 700;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.shop-stat-card:first-child span {
    color: #21170e;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 900;
}

.shop-profile .shop-locations-panel {
    grid-template-rows: auto minmax(0, 1fr);
}

.shop-location-list {
    display: grid;
    align-content: start;
    min-height: 0;
    height: 288px;
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.shop-profile .shop-location-card {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    padding: 8px 6px;
    border: 0;
    border-bottom: 1px solid rgba(158, 51, 45, 0.24);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: background 140ms ease, color 140ms ease;
}

.shop-profile .shop-location-card:hover,
.shop-profile .shop-location-card:focus-visible {
    border-color: rgba(158, 51, 45, 0.24);
    background: rgba(58, 40, 109, 0.09);
    color: #5f130f;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

.shop-location-bullet {
    width: 9px;
    height: 9px;
    margin-top: 4px;
    border: 1px solid #7d321d;
    border-radius: 999px;
    background: radial-gradient(circle, #ffe189 0 28%, #8c2115 32% 58%, #5d3210 62%);
}

.shop-location-copy,
.shop-location-copy strong,
.shop-location-copy small {
    display: block;
    min-width: 0;
}

.shop-location-copy strong {
    color: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.1;
}

.shop-location-copy small {
    margin-top: 2px;
    color: #5f4b3d;
    font-size: 0.68rem;
    line-height: 1.25;
}

.shop-coordinate-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.shop-coordinate-list em {
    padding: 1px 5px;
    border: 1px solid rgba(125, 50, 29, 0.24);
    border-radius: 3px;
    background: #fff8cc;
    color: #4b1713;
    font-size: 0.64rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.3;
}

.shop-profile-empty {
    align-self: center;
    display: grid;
    gap: 6px;
    padding: 18px;
    color: #5f4b3d;
    text-align: center;
}

.shop-profile-empty strong {
    color: #21170e;
    font-family: Georgia, "Times New Roman", serif;
}

.shop-profile-empty p {
    margin: 0;
}

.shop-profile .shop-inventory-panel {
    margin: 10px 12px 14px;
    padding: 10px 14px 14px;
}

.shop-panel-meta {
    justify-self: center;
    margin: -2px 0 4px;
    color: #5f4b3d;
    font-size: 0.78rem;
    font-weight: 900;
}

.shop-profile .shop-category-list {
    gap: 10px;
}

.shop-profile .shop-category-panel {
    overflow: visible;
    border: 1px solid rgba(94, 54, 29, 0.48);
    border-radius: 0;
    background: rgba(255, 249, 223, 0.68);
    box-shadow: none;
}

.shop-profile .shop-category-summary {
    min-height: 48px;
    padding: 8px 10px 8px 14px;
    border: 0;
    border-radius: 0;
    background: #2f1d1f;
    color: #f0d9a2;
    box-shadow: 2px 3px 7px rgba(20, 8, 2, 0.22);
}

.shop-profile .shop-category-panel[open] .shop-category-summary {
    border-bottom: 1px solid #9e332d;
}

.shop-profile .shop-category-title {
    border: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
}

.shop-profile .shop-category-title strong {
    color: #f0d9a2;
    font-family: Tahoma, Arial, sans-serif;
    text-shadow: 1px 1px 2px #000;
}

.shop-profile .shop-category-count {
    margin-left: auto;
    color: #f7df9c;
}

.shop-profile .shop-category-summary::after {
    border-color: #f0d9a2;
    background: rgba(255, 249, 223, 0.1);
    color: #f0d9a2;
}

.shop-profile .shop-category-body {
    padding: 12px;
    background: rgba(255, 255, 232, 0.42);
}

.shop-profile .shop-item-grid {
    background: transparent;
}

@media (max-width: 1200px) {
    .shop-profile .shop-browser {
        grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
    }

    .shop-profile-top {
        grid-template-columns: minmax(210px, 1fr) minmax(170px, 0.72fr);
    }

    .shop-locations-panel {
        grid-column: 1 / -1;
    }

    .shop-location-list {
        height: 260px;
    }
}

@media (max-width: 860px) {
    .shop-profile .shop-browser {
        grid-template-columns: 1fr;
    }

    .shop-profile .shop-browser-list {
        position: static;
        max-height: min(42vh, 320px);
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .shop-profile-title.map-wiki-titlebar {
        min-height: 40px;
        padding: 5px 12px;
    }

    .shop-profile .shop-browser {
        gap: 16px;
        padding: 16px 10px 12px;
    }

    .shop-profile .shop-browser-detail {
        min-height: 360px;
    }

    .shop-profile .shop-selected-overview {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
        padding: 10px;
    }

    .shop-selected-art {
        width: 70px;
        height: 70px;
    }

    .shop-selected-art img[src*="/mob_icon.php"] {
        width: 60px;
        height: 60px;
    }

    .shop-detail-button {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .shop-profile-top {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 10px 4px;
    }

    .shop-locations-panel {
        grid-column: auto;
    }

    .shop-profile .shop-stat-stack {
        min-height: 0;
        padding: 18px 12px;
    }

    .shop-profile-art {
        min-height: 230px;
    }

    .shop-profile-art img[src*="/mob_icon.php"] {
        max-height: 220px;
    }

    .shop-profile .shop-inventory-panel {
        margin-right: 10px;
        margin-left: 10px;
    }

    .shop-profile .shop-browser-list > h2,
    .shop-profile .shop-browser-inventory > h2,
    .shop-profile .shop-profile-panel > h2 {
        width: min(230px, 82%);
        min-height: 42px;
    }
}

@media (max-width: 520px) {
    .shop-profile .shop-selected-overview {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .shop-selected-copy {
        justify-items: center;
    }

    .shop-selected-facts {
        justify-content: center;
    }

    .shop-profile .shop-category-summary {
        align-items: flex-start;
    }

    .shop-profile .shop-category-title strong {
        white-space: normal;
    }
}
