/* Wiki-specific layout and content styles. Shared platform styling is in platform.css. */
:root {
    --wiki-sidebar-width: 260px;
    --wiki-content-max: 1256px;
    --wiki-article-max: 900px;
    --wiki-line: rgba(126, 143, 170, 0.34);
    --wiki-line-strong: rgba(159, 178, 210, 0.52);
    --wiki-panel: rgba(8, 11, 16, 0.72);
}

body.lot-data-page {
    --market-bg: #020304;
    isolation: isolate;
    overflow-x: hidden;
    background: var(--market-bg);
}

.wiki-layout > lot-footer > footer {
    position: relative;
    z-index: 2;
}

.wiki-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wiki-layout::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: var(--lot-nav-height) 0 0;
    background: linear-gradient(180deg, rgba(2, 3, 4, 0.16) 0%, rgba(2, 3, 4, 0.3) 58%, rgba(0, 0, 0, 0.62) 100%);
    pointer-events: none;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: var(--lot-radius);
    background: transparent;
    color: var(--lot-text-muted);
    cursor: pointer;
}

.menu-toggle:hover {
    color: #fff;
    background: transparent;
}

.menu-toggle:focus-visible {
    outline: none;
    color: #fff;
    background: transparent;
    box-shadow: none;
}

.menu-toggle svg {
    width: 22px;
    height: 22px;
}

.sidebar-backdrop { display: none; }

.wiki-body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--wiki-sidebar-width) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    flex: 1;
    width: min(calc(100% - 40px), var(--wiki-content-max));
    margin: 20px auto 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
}

.site-sidebar {
    --lot-texture-base: rgba(6, 9, 14, 0.72);
    position: sticky;
    top: calc(var(--lot-nav-height) + 18px);
    align-self: start;
    padding: 0.85rem 0;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 16px 34px rgba(0, 0, 0, 0.28);
}

@media (min-width: 768px) {
    .site-sidebar {
        max-height: calc(100vh - var(--lot-nav-height) - 36px);
        max-height: calc(100dvh - var(--lot-nav-height) - 36px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

.sidebar-section {
    margin: 0;
    padding: 0.35rem 0;
}

.sidebar-section + .sidebar-section {
    border-top: 1px solid rgba(126, 143, 170, 0.16);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem 0.35rem;
    color: #aab6c8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.sidebar-title::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: var(--lot-gold);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.32);
}

.sidebar-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--lot-text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-nav a:hover {
    border-color: rgba(251, 191, 36, 0.28);
    background: rgba(251, 191, 36, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-nav a.active {
    border-color: rgba(251, 191, 36, 0.52);
    background: var(--lot-active);
    color: var(--lot-gold);
}

.sidebar-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.site-main {
    container-type: inline-size;
    container-name: wiki-main;
    min-width: 0;
    padding: 0 0 3rem;
}

article,
.regular-page {
    max-width: var(--wiki-article-max);
}

.list-page {
    max-width: none;
}

article::after {
    content: "";
    display: table;
    clear: both;
}

.site-main h1,
.site-main h2,
.site-main h3,
.site-main h4 {
    text-align: left;
}

.site-main h1 {
    margin: 0 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--lot-border);
}

.site-main h2 {
    margin: 2.6rem 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--lot-border);
}

.site-main h3 {
    margin: 1.8rem 0 0.7rem;
    font-size: 1.15rem;
}

.site-main p,
.site-main li {
    color: var(--lot-text-muted);
}

.site-main p {
    margin: 0.85rem 0;
}

.site-main ul,
.site-main ol {
    margin: 0.9rem 0 1.2rem;
}

.page-title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0 0 1.25rem !important;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.65rem);
    font-weight: 600;
    line-height: 1.08;
    border-bottom: 0 !important;
}

.page-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -13px;
    width: min(220px, 46%);
    height: 2px;
    background: linear-gradient(90deg, var(--lot-gold), transparent);
}

/* NPC sprites are cropped to the figure, so most aren't square: fit them in the tile without stretching. */
.title-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    padding: 5px;
    border: 1px solid #324055;
    border-radius: 8px;
    background: #111824;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.welcome {
    --lot-texture-base: rgba(8, 11, 16, 0.72);
    position: relative;
    margin-bottom: 1rem;
    padding: 2.1rem 1.35rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 6px;
    text-align: left;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 16px 34px rgba(0, 0, 0, 0.28);
}

.welcome::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lot-gold), transparent);
}

.welcome h1 {
    margin: 0 0 0.85rem !important;
    padding: 0;
    border: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.85rem);
    line-height: 1.08;
    text-align: left;
}

.welcome p {
    max-width: 760px;
    margin: 0;
    color: #d6dde9;
    font-size: 1.05rem;
    text-align: left;
}

.welcome p a {
    color: var(--lot-gold);
}

/* One-sentence summary under an item, NPC or shop title: what it is, in plain words. */
.page-lead {
    max-width: 760px;
    margin: 1.75rem 0 1.25rem !important;
    color: #d6dde9 !important;
    font-size: 1.05rem;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.index-section {
    --lot-texture-base: rgba(8, 11, 16, 0.7);
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 1rem;
    border: 1px solid var(--wiki-line);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 12px 24px rgba(0, 0, 0, 0.22);
}

.index-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
    padding: 0 0 0.65rem;
    border: 0;
    border-bottom: 1px solid rgba(126, 143, 170, 0.2);
    background: transparent;
    color: #fff;
    font-size: 1rem;
}

.index-section h3::before,
.list-page h1::before,
.wiki-panel h3::before,
.notes h3::before {
    content: "";
    width: 3px;
    height: 18px;
    border-radius: 999px;
    background: var(--lot-gold);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.32);
}

.index-section ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.index-section li {
    margin: 0;
}

.index-section li a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 50px;
    padding: 0.58rem 2rem 0.58rem 0.68rem;
    border: 1px solid rgba(126, 143, 170, 0.24);
    border-radius: 5px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
        rgba(5, 8, 13, 0.34);
    color: #d9e1ed;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.index-section li a::after {
    content: ">";
    position: absolute;
    right: 0.75rem;
    color: rgba(251, 191, 36, 0.62);
    font-weight: 700;
    opacity: 0.78;
    transform: translateX(-2px);
    transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.index-section li a:hover {
    border-color: rgba(251, 191, 36, 0.42);
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.035)),
        rgba(8, 11, 16, 0.54);
    color: #fff;
    transform: translateX(2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 8px 18px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.index-section li a:hover::after {
    color: var(--lot-gold);
    opacity: 1;
    transform: translateX(0);
}

.index-section li a span,
.quick-tips li {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.index-section strong,
.quick-tips strong {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.index-section small,
.quick-tips small {
    color: #aab4c4;
    font-size: 0.75rem;
    line-height: 1.25;
}

.index-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    image-rendering: pixelated;
}

.quick-tips {
    display: grid;
    gap: 6px;
}

.quick-tips li {
    margin: 0;
    min-height: 50px;
    padding: 0.6rem 0.65rem;
    border: 1px solid rgba(126, 143, 170, 0.18);
    border-radius: 4px;
    background: rgba(3, 5, 8, 0.36);
}

.more-link {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--lot-border);
    color: var(--lot-text-muted);
    font-size: 0.85rem;
}

.list-page h1 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding-bottom: 0;
    border: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.65rem);
}

.list-page > p {
    margin-bottom: 1.25rem;
    color: var(--lot-text-faint);
}

.tool-page.list-page > h1,
.recipe-browser.list-page > h1 {
    margin-bottom: 3.7rem;
}

.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 1rem;
}

.grid-card {
    --lot-texture-base: rgba(8, 11, 16, 0.7);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 6px;
    color: var(--lot-text-muted);
    text-align: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 10px 22px rgba(0, 0, 0, 0.2);
}

.grid-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 0.75rem;
    border: 1px solid #324055;
    border-radius: 10px;
    background: #111824;
}

.grid-card-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    transition: transform 0.18s ease;
}

.grid-card:hover .grid-card-icon img {
    transform: scale(1.12);
}

.grid-card:hover {
    border-color: rgba(251, 191, 36, 0.66);
}

.grid-card-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.grid-card-type {
    margin-top: 0.25rem;
    color: var(--lot-text-faint);
    font-size: 0.75rem;
}

.infobox {
    --lot-texture-base: rgba(8, 11, 16, 0.72);
    float: right;
    width: 300px;
    margin: 0 0 1.25rem 1.5rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 16px 34px rgba(0, 0, 0, 0.28);
}

/* The item or monster on a softly lit pedestal, its pixel art scaled by a whole number so it stays crisp. */
.infobox-header {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--lot-border);
    background:
        radial-gradient(ellipse 60% 55% at 50% 42%, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0) 70%),
        rgba(0, 0, 0, 0.25);
    text-align: center;
}

.infobox-header h3 {
    margin: 0.65rem 0 0;
    color: var(--lot-gold);
    font-size: 1.15rem;
    text-align: center;
}

/* NPC sprites take their size from the page (npc_sprite_size in the builder): a whole multiple of the sprite. */
.infobox-image {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
    image-rendering: pixelated;
}

/* Item icons are 32px: three times that. */
.infobox-image--item {
    width: 96px;
    height: 96px;
}

/* "New to Legends of Taria?" at the end of every wiki page (base.html), over the world map. */
.wiki-play {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    clear: both;
    margin-top: 2.5rem;
    padding: 1.4rem 1.6rem;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: var(--lot-radius-lg);
    box-shadow: var(--lot-shadow-soft);
}

.wiki-play::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 4, 6, 0.94) 0%, rgba(3, 4, 6, 0.82) 55%, rgba(3, 4, 6, 0.5) 100%),
        url("/background.webp") center / cover no-repeat;
}

.wiki-play-text {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 0.25rem;
}

.wiki-play-text strong {
    color: #fff;
    font-size: 1.15rem;
}

.wiki-play-text span {
    color: var(--lot-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.wiki-play-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.wiki-play .play-now-main {
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
}

.wiki-play-browser {
    color: var(--lot-text-muted);
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wiki-fact-list {
    margin: 0;
}

.wiki-fact-row {
    display: grid;
    grid-template-columns: minmax(82px, 40%) minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
}

.wiki-fact-row + .wiki-fact-row {
    border-top: 1px solid rgba(126, 143, 170, 0.18);
}

.wiki-fact-row dt {
    color: var(--lot-text-faint);
    font-size: 0.75rem;
    font-weight: 700;
}

.wiki-fact-row dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--lot-text-muted);
    font-weight: 600;
}

.notes-content {
    --lot-texture-base: rgba(8, 11, 16, 0.7);
    margin-right: 320px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--wiki-line);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 12px 24px rgba(0, 0, 0, 0.2);
}

.wiki-panel {
    --lot-texture-base: rgba(8, 11, 16, 0.7);
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 12px 24px rgba(0, 0, 0, 0.2);
}

.wiki-panel h3,
.notes h3 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0;
    color: #fff;
}

.wiki-panel h1 {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.wiki-panel h1 > img:first-child {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.wiki-panel h2 {
    margin: 1.55rem 0 0.75rem;
}

.wiki-panel h2:first-child,
.wiki-panel p:first-child {
    margin-top: 0;
}

.wiki-panel p:last-child,
.notes-content p:last-child {
    margin-bottom: 0;
}

.notes-content h2:first-child,
.notes-content h3:first-child {
    margin-top: 0;
}

.requirements-list {
    margin: 0;
    padding-left: 1rem;
}

code {
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--lot-border);
    border-radius: var(--lot-radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--lot-gold);
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.85em;
}

pre {
    margin: 1rem 0;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--lot-border);
    border-radius: var(--lot-radius);
    background: rgba(0, 0, 0, 0.35);
}

pre code {
    padding: 0;
    border: 0;
    background: none;
}

blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--lot-gold);
    border-radius: 0 var(--lot-radius) var(--lot-radius) 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--lot-text-muted);
}

.item-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
}

.icon-large {
    width: 64px;
    height: 64px;
}

.list-icon {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.item-link,
.npc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.1em 0.35em;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: var(--lot-radius-sm);
    background: rgba(251, 191, 36, 0.1);
    color: var(--lot-gold);
    text-decoration: none;
    white-space: nowrap;
}

.item-link:hover,
.npc-link:hover {
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(251, 191, 36, 0.16);
    color: #fff;
    text-decoration: none;
}

.site-main p .item-link {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

.inline-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    vertical-align: middle;
}

.recipe-card-grid {
    container-type: inline-size;
    margin: 1.2rem 0 1.5rem;
    padding: 1rem;
    border: 1px solid var(--wiki-line);
    border-radius: 8px;
    background: rgba(5, 8, 12, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.recipe-card-grid__heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(126, 143, 170, 0.28);
}

.recipe-card-grid__heading > span {
    width: 3px;
    height: 1.25rem;
    border-radius: 999px;
    background: var(--lot-gold);
}

.recipe-card-grid__heading h2 {
    margin: 0;
}

.recipe-card {
    position: relative;
    display: grid;
    grid-template-columns: 40px auto minmax(0, 1fr);
    grid-template-areas:
        ". name name"
        ". level meta"
        "ingredients ingredients ingredients"
        "effect effect effect";
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(126, 143, 170, 0.28);
    background: rgba(0, 0, 0, 0.16);
}

.recipe-card:last-child {
    border-bottom: 0;
}

.recipe-card__header,
.recipe-card__result {
    display: contents;
}

.recipe-card__ingredients {
    grid-area: ingredients;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.recipe-card .item-link,
.recipe-card .item-link:hover {
    padding: 0;
    border: 0;
    background: transparent;
    white-space: normal;
}

.recipe-card .item-link:hover {
    color: #fff;
}

.recipe-card__result .item-link {
    grid-area: name;
    align-self: center;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
}

.recipe-card__result .inline-icon {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.recipe-card__ingredients .inline-icon {
    width: 18px;
    height: 18px;
}

.recipe-card__plus {
    color: var(--lot-text-faint);
    font-weight: 600;
}

.recipe-card__level {
    grid-area: level;
    align-self: center;
    flex: 0 0 auto;
    padding: 0.15rem 0.45rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.1);
    color: var(--lot-gold);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
}

.recipe-card .recipe-card__effect {
    grid-area: effect;
    min-width: 0;
    margin: 0;
    color: #d7deea;
    line-height: 1.45;
}

.recipe-card__stats {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    margin: 0;
    color: var(--lot-text-faint);
    font-size: 0.8rem;
    white-space: nowrap;
}

.recipe-card__stat {
    display: flex;
    align-items: center;
}

.recipe-card__stat + .recipe-card__stat::before {
    content: "·";
    margin-right: 0.35rem;
    color: var(--lot-text-faint);
}

.recipe-card__stats dt {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.recipe-card__stats dd {
    margin: 0;
    color: var(--lot-text-muted);
}

.recipe-card__stat--xp dd {
    color: #78c8e3;
    font-weight: 600;
}

@container (min-width: 570px) {
    .recipe-card {
        grid-template-columns: 40px auto minmax(180px, 1.15fr) minmax(245px, 1fr);
        grid-template-areas:
            ". level name ingredients"
            ". level name meta"
            "effect effect effect effect";
        align-items: start;
        gap: 0.18rem 0.55rem;
    }

    .recipe-card__result .item-link,
    .recipe-card__level {
        align-self: center;
    }

    .recipe-card__result .item-link {
        font-size: 0.875rem;
    }

    .recipe-card__result .inline-icon {
        top: calc(0.75rem + 24px);
    }

    .recipe-card__ingredients {
        flex-wrap: nowrap;
        gap: 0.25rem;
        font-size: 0.8125rem;
    }

    .recipe-card__ingredients .item-link {
        white-space: nowrap;
    }

    .recipe-card__ingredients .inline-icon {
        width: 16px;
        height: 16px;
    }

    .recipe-card__ingredients,
    .recipe-card__stats {
        padding-left: 0.6rem;
        border-left: 1px solid rgba(126, 143, 170, 0.28);
    }

    .recipe-card__effect {
        padding-left: calc(40px + 0.55rem);
    }

}

.skill-gear-list {
    container-type: inline-size;
    margin: 1.2rem 0 1.5rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 8px;
    background: rgba(5, 8, 12, 0.78);
}

.skill-gear-list__header {
    display: none;
}

.skill-gear-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "level"
        "item"
        "bonus"
        "sources";
    align-items: center;
    gap: 0.35rem 0.15rem;
    min-width: 0;
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid rgba(126, 143, 170, 0.24);
    background: rgba(0, 0, 0, 0.16);
}

.skill-gear-row:last-child {
    border-bottom: 0;
}

.skill-gear-row__level {
    grid-area: level;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    padding: 0.12rem 0.35rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.1);
    color: var(--lot-gold);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.skill-gear-row__item {
    grid-area: item;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.45rem;
    min-width: 0;
}

.skill-gear-row__item .item-link,
.skill-gear-row__item .item-link:hover {
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 600;
    font-size: clamp(0.825rem, calc(0.125rem + 3.89cqi), 1rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
    white-space: normal;
}

.skill-gear-row__item .item-link:hover {
    color: #fff;
}

.skill-gear-row__item .inline-icon {
    width: 27px;
    height: 27px;
    image-rendering: pixelated;
}

.skill-gear-row__quantity {
    color: #b8c8dc;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.skill-gear-row__bonus {
    grid-area: bonus;
    display: flex;
    align-items: center;
    justify-self: end;
    color: #78c8e3;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.skill-gear-row__bonus-value {
    margin-left: 0.2rem;
}

.skill-gear-row__skill-icon {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    object-fit: contain;
    image-rendering: pixelated;
}

.skill-gear-row__bonus--split {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.1rem;
}

.skill-gear-row__bonus--split > span {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.skill-gear-list--resources .skill-gear-row__bonus--split,
.skill-gear-list--recipes .skill-gear-row__bonus--split {
    flex-wrap: nowrap;
}

.skill-gear-row__bonus--split span:last-child {
    color: #b8c8dc;
}

.skill-gear-row__bonus--split .skill-gear-row__stat--penalty {
    color: #e49a9a;
}

.skill-gear-row__secondary-requirement {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--lot-text-faint);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.skill-gear-row__secondary-requirement .skill-gear-row__skill-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
}

.skill-gear-row__sources {
    grid-area: sources;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    min-width: 0;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(126, 143, 170, 0.18);
    color: var(--lot-text-faint);
    font-size: 0.8rem;
}

.skill-gear-row__source-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem 0.45rem;
    min-width: 0;
    line-height: 1.35;
}

.skill-gear-row__source-line > span:not(.skill-gear-row__source-label) {
    color: #c3ccda;
}

.skill-gear-row__sources .skill-gear-row__ingredients {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.skill-gear-row__ingredients .item-link,
.skill-gear-row__ingredients .item-link:hover {
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 600;
    overflow-wrap: anywhere;
    white-space: normal;
}

.skill-gear-row__ingredients .inline-icon {
    width: 18px;
    height: 18px;
}

.skill-gear-row__ingredient {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    white-space: nowrap;
}

.skill-gear-row__healing {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: #ef8f8f !important;
    font-weight: 600;
    white-space: nowrap;
}

.skill-gear-row__yield {
    display: inline-flex;
    align-items: center;
    color: #9fd49b !important;
    font-weight: 600;
    white-space: nowrap;
}

.skill-gear-row__source-label {
    color: var(--lot-text-faint);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.skill-gear-row__sources a {
    min-width: 0;
    color: #b8c8dc;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.skill-gear-row__sources .skill-gear-row__source-action {
    color: var(--lot-gold);
    font-weight: 600;
}

.skill-gear-row__source-line a + a::before {
    content: "·";
    margin-right: 0.45rem;
    color: var(--lot-text-faint);
}

.skill-gear-row__sources a:hover {
    color: #fff;
    text-decoration: underline;
}

.skill-gear-row__unavailable {
    color: var(--lot-text-faint);
    font-style: italic;
}

[id^="fletching-"],
[id^="smithing-"],
[id^="cooking-"],
[id^="farming-"],
[id^="firemaking-"],
.wiki-data-row[id^="item-"] {
    scroll-margin-top: 5rem;
}

.skill-gear-row:is([id^="fletching-"], [id^="smithing-"], [id^="cooking-"], [id^="farming-"], [id^="firemaking-"]):target,
.wiki-data-row:target {
    background: rgba(251, 191, 36, 0.1);
    box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.7);
}

@container (min-width: 180px) {
    .skill-gear-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "level item bonus"
            "sources sources sources";
    }

    .skill-gear-row__bonus {
        justify-self: start;
    }
}

@container (max-width: 359px) {
    .skill-gear-list--supplies .skill-gear-row {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "level item"
            "bonus bonus"
            "sources sources";
    }

    .skill-gear-list--supplies .skill-gear-row__bonus {
        justify-self: start;
    }
}

@container (min-width: 360px) {
    .skill-gear-row {
        gap: 0.35rem 0.55rem;
        padding: 0.6rem 0.75rem;
    }

    .skill-gear-row__level {
        padding: 0.15rem 0.45rem;
        font-size: 0.78rem;
    }

    .skill-gear-row__item .inline-icon {
        width: 32px;
        height: 32px;
    }

    .skill-gear-row__bonus {
        justify-self: start;
        font-size: 0.82rem;
    }

    .skill-gear-row__skill-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .skill-gear-row__bonus--split {
        gap: 0.2rem 0.55rem;
    }

    .skill-gear-row__sources {
        padding-top: 0;
        border-top: 0;
    }

    .skill-gear-row__source-line {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        gap: 0.2rem 0.45rem;
    }

    .skill-gear-row__source-line:has(> .skill-gear-row__source-label) {
        display: flex;
    }

}

@container (min-width: 440px) {
    .skill-gear-list--resources .skill-gear-row__bonus,
    .skill-gear-list--recipes .skill-gear-row__bonus {
        font-size: 1rem;
    }
}

@container (min-width: 600px) {
    .skill-gear-list__header,
    .skill-gear-row {
        display: grid;
        grid-template-columns: 54px minmax(190px, 1.2fr) 76px minmax(160px, 1fr);
        align-items: center;
        gap: 0.6rem;
    }

    .skill-gear-list__header {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid rgba(126, 143, 170, 0.28);
        color: #aeb8c8;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .skill-gear-row {
        grid-template-areas: "level item bonus sources";
        min-height: 58px;
        padding-block: 0.55rem;
    }

    .skill-gear-row__bonus-value {
        margin-left: 0.2rem;
    }

    .skill-gear-row__sources {
        padding: 0;
        border: 0;
    }

    .skill-gear-row__source-line {
        font-size: 0.75rem;
    }

    .skill-gear-list--armor .skill-gear-list__header,
    .skill-gear-row--armor {
        grid-template-columns: 54px minmax(190px, 1.2fr) 104px minmax(150px, 0.8fr);
    }

    .skill-gear-list--defense .skill-gear-list__header,
    .skill-gear-list--defense .skill-gear-row {
        grid-template-columns: 54px minmax(172px, 1.1fr) 144px minmax(140px, 0.8fr);
    }

    .skill-gear-list--resources .skill-gear-list__header,
    .skill-gear-list--resources .skill-gear-row,
    .skill-gear-list--wide-metrics .skill-gear-list__header,
    .skill-gear-list--wide-metrics .skill-gear-row {
        grid-template-columns: 54px minmax(140px, 1fr) 144px minmax(160px, 1fr);
    }

    .skill-gear-list--recipes .skill-gear-list__header,
    .skill-gear-list--recipes .skill-gear-row {
        grid-template-columns: 54px minmax(180px, 1fr) 136px minmax(130px, 1fr);
    }

    .skill-gear-list--cooking .skill-gear-list__header,
    .skill-gear-list--cooking .skill-gear-row {
        grid-template-columns: 54px minmax(140px, 1fr) 136px minmax(170px, 1fr);
    }

    .skill-gear-list--farming .skill-gear-list__header,
    .skill-gear-list--farming .skill-gear-row {
        grid-template-columns: 54px minmax(160px, 1.1fr) 136px minmax(155px, 1fr);
    }

    .skill-gear-list--fletching .skill-gear-list__header,
    .skill-gear-list--fletching .skill-gear-row {
        grid-template-columns: 54px minmax(165px, 1.05fr) 136px minmax(155px, 0.95fr);
    }

    .skill-gear-list--supplies .skill-gear-list__header,
    .skill-gear-list--supplies .skill-gear-row {
        grid-template-columns: 54px minmax(220px, 1.25fr) minmax(115px, 0.65fr) minmax(140px, 0.75fr);
    }

    .skill-gear-row__bonus--split {
        justify-content: flex-start;
    }
}

.skill-gear-list--supplies .skill-gear-row__bonus {
    color: #c3ccda;
    justify-self: start;
    white-space: normal;
}

.skill-gear-list--fletching .skill-gear-row__ingredients {
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

.skill-gear-list--fletching .skill-gear-row__ingredient {
    max-width: 100%;
    min-width: 0;
}

.skill-gear-list--fletching .skill-gear-row__ingredient .item-link {
    min-width: 0;
    white-space: normal;
}

@container (min-width: 360px) {
    .skill-gear-list--fletching .skill-gear-row__ingredient .item-link {
        white-space: nowrap;
    }
}

@container (min-width: 600px) {
    .skill-gear-list--fletching .skill-gear-row__ingredient .item-link {
        white-space: normal;
    }
}

/* Interactive tools and generated shop directory */
.tool-page,
.shop-page {
    max-width: none;
}

.page-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-heading-row h1,
.page-heading-row h3,
.page-heading-row p {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.optional-label {
    color: var(--lot-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.optional-label {
    margin-left: 0.3rem;
    color: var(--lot-text-muted);
    letter-spacing: 0;
}

.tool-panel,
.shop-summary {
    --lot-texture-base: rgba(7, 11, 17, 0.83);
    margin-bottom: 1rem;
    padding: clamp(1rem, 2.5vw, 1.6rem);
    border: 1px solid var(--wiki-line);
    border-radius: 7px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 16px 35px rgba(0, 0, 0, 0.22);
}

.tool-note {
    color: var(--lot-text-muted);
}

.character-lookup-panel {
    padding: 0.85rem 1rem;
}

.character-lookup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-bottom: 0.55rem;
}

.character-lookup-header h3 {
    margin: 0;
}

.character-lookup-panel .inline-form {
    gap: 0.65rem;
}

.character-lookup-panel .tool-status {
    margin-top: 0.45rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.78rem;
}

.tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.62rem 1rem;
    border: 1px solid rgba(251, 191, 36, 0.52);
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.22), rgba(180, 122, 18, 0.2));
    color: #fff;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
}

.tool-button:hover {
    border-color: var(--lot-gold);
    background: rgba(251, 191, 36, 0.26);
    color: #fff;
    text-decoration: none;
}

.tool-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.tool-button-secondary {
    border-color: var(--wiki-line-strong);
    background: rgba(255, 255, 255, 0.06);
}

.subtle-link,
.text-button {
    border: 0;
    background: none;
    color: var(--lot-gold);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.danger-text {
    color: #fca5a5;
}

.inline-form,
.form-grid {
    display: flex;
    align-items: end;
    gap: 0.85rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.form-grid label,
.inline-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    color: #dbe3ee;
    font-size: 0.84rem;
    font-weight: 600;
}

.form-grid input,
.form-grid select,
.inline-form input,
.inline-form select {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.72rem;
    border: 1px solid var(--wiki-line-strong);
    border-radius: 5px;
    outline: none;
    background: rgba(1, 3, 6, 0.78);
    color: #fff;
    font: inherit;
}

.form-grid input:focus,
.form-grid select:focus,
.inline-form input:focus,
.inline-form select:focus {
    border-color: var(--lot-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.inline-form .grow,
.form-grid .wide-field {
    flex: 1;
    grid-column: span 2;
}

.inline-form .check-field,
.form-grid .check-field {
    flex-direction: row;
    align-items: center;
    min-height: 42px;
    font-weight: 400;
}

.inline-form .check-field input,
.form-grid .check-field input {
    width: 18px;
    min-height: 18px;
}

.tool-status,
.tool-error {
    margin-top: 0.8rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--wiki-line);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--lot-text-muted);
    font-size: 0.86rem;
}

.tool-status:empty { display: none; }

.tool-status.is-error,
.tool-error {
    border-color: rgba(248, 113, 113, 0.42);
    color: #fecaca;
}

.linked-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.skill-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skill-choice {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    min-height: 44px;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(126, 143, 170, 0.28);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--lot-text-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.skill-choice:hover {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fff;
}

.skill-choice[aria-pressed="true"] {
    border-color: rgba(251, 191, 36, 0.72);
    background: rgba(251, 191, 36, 0.14);
    color: #fff;
    box-shadow: inset 3px 0 var(--lot-gold);
}

.skill-choice img {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    object-fit: contain;
    image-rendering: pixelated;
}

.skill-choice span {
    min-width: 0;
}

.calculator-inputs,
.result-stat-grid.calculator-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.result-stat {
    padding: 0.9rem;
    border: 1px solid rgba(126, 143, 170, 0.24);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.24);
}

.result-stat small,
.result-stat strong {
    display: block;
}

.result-stat small {
    margin-bottom: 0.25rem;
    color: var(--lot-text-muted);
}

.result-stat strong {
    color: #fff;
    font-size: 1.25rem;
}

.progress-track {
    height: 9px;
    margin-top: 0.9rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b77913, var(--lot-gold));
    transition: width 0.18s ease;
}

.training-methods {
    margin-top: 0.75rem;
    overflow-x: auto;
}

.training-table {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(126, 143, 170, 0.24);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.2);
}

.training-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 100px 110px;
    align-items: center;
    gap: 0.75rem;
    min-height: 54px;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid rgba(126, 143, 170, 0.18);
}

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

.training-head {
    min-height: 38px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--lot-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.training-head > :nth-child(3),
.training-head > :nth-child(4),
.training-number {
    text-align: right;
}

.training-row.is-locked {
    background: rgba(0, 0, 0, 0.16);
    color: var(--lot-text-muted);
}

.training-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 30px;
    padding: 0.2rem 0.4rem;
    border: 1px solid rgba(74, 222, 128, 0.55);
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
    font-weight: 700;
}

.is-locked .training-level {
    border-color: rgba(248, 113, 113, 0.58);
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}

.training-action {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

a.training-action:hover { text-decoration: none; }

.training-action img {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    object-fit: contain;
    image-rendering: pixelated;
}

.training-action span,
.training-action strong,
.training-action small {
    display: block;
    min-width: 0;
}

.training-action strong { color: #fff; }

.training-action small {
    margin-top: 0.1rem;
    color: var(--lot-text-muted);
    font-size: 0.75rem;
}

.training-number {
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.clear-tool-data {
    flex: 0 0 auto;
    margin: 0;
    font-size: 0.8rem;
}

.recipe-browser {
    max-width: none;
}

.recipe-skill-picker {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.recipe-skill-panel {
    padding: 0.85rem 1rem;
}

.recipe-results-panel {
    padding: 1rem;
}

.recipe-skill-picker .skill-choice small {
    margin-left: auto;
    color: var(--lot-text-muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.recipe-skill-picker .skill-choice[aria-pressed="true"] small {
    color: var(--lot-gold);
}

.recipe-browser-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.recipe-browser-heading h3 {
    margin: 0;
}

.recipe-browser-heading #recipe-list-count {
    display: block;
    margin-top: 0.1rem;
    color: var(--lot-text-muted);
    font-size: 0.78rem;
}

.recipe-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr));
    align-items: start;
    gap: 0.5rem;
}

.recipe-entry {
    max-width: none;
    overflow: hidden;
    border: 1px solid rgba(126, 143, 170, 0.25);
    border-radius: 6px;
    background: rgba(4, 7, 11, 0.74);
}

.recipe-entry.is-open {
    border-color: rgba(251, 191, 36, 0.52);
}

.recipe-list > .empty-result,
.recipe-details-tray {
    grid-column: 1 / -1;
}

.recipe-toggle {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 9px;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 48px;
    padding: 0.35rem 0.4rem;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.recipe-toggle:hover,
.recipe-toggle[aria-expanded="true"] {
    background: rgba(251, 191, 36, 0.075);
}

.recipe-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    image-rendering: pixelated;
}

.recipe-copy,
.recipe-copy strong {
    display: block;
    min-width: 0;
}

.recipe-copy strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipe-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.1rem;
}

.recipe-preview-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.05rem 0.3rem;
    border: 1px solid rgba(126, 143, 170, 0.3);
    border-radius: 999px;
    background: rgba(126, 143, 170, 0.07);
    color: var(--lot-text-muted);
    font-size: 0.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    white-space: nowrap;
}

.recipe-level-badge {
    border-color: rgba(251, 191, 36, 0.32);
    background: rgba(251, 191, 36, 0.08);
    color: var(--lot-gold);
}

.recipe-chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--lot-text-muted);
    border-bottom: 2px solid var(--lot-text-muted);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.15s ease;
}

.recipe-toggle[aria-expanded="true"] .recipe-chevron {
    border-color: var(--lot-gold);
    transform: rotate(225deg) translate(-1px, -1px);
}

.recipe-details {
    padding: 0.9rem 1rem 1rem;
    border: 1px solid rgba(126, 143, 170, 0.25);
    border-radius: 6px;
    background: rgba(4, 7, 11, 0.86);
}

.recipe-facts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.recipe-fact {
    min-width: 0;
    padding-right: 0.75rem;
    border-right: 1px solid rgba(126, 143, 170, 0.2);
}

.recipe-fact:last-child {
    border-right: 0;
}

.recipe-fact small,
.recipe-fact strong {
    display: block;
}

.recipe-fact small {
    color: var(--lot-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.recipe-fact strong {
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 0.82rem;
}

.recipe-fact a {
    color: inherit;
}

.recipe-station-links {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
}

.recipe-station-map-link {
    color: var(--lot-gold) !important;
}

.recipe-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.85rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(126, 143, 170, 0.18);
    border-bottom: 1px solid rgba(126, 143, 170, 0.18);
}

.recipe-quantity label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--lot-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.recipe-quantity input {
    width: 88px;
    min-height: 36px;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--wiki-line-strong);
    border-radius: 5px;
    outline: none;
    background: rgba(1, 3, 6, 0.78);
    color: #fff;
    font: inherit;
    font-variant-numeric: tabular-nums;
}

.recipe-quantity input:focus {
    border-color: var(--lot-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.recipe-total {
    color: #fff;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.recipe-details h4 {
    margin: 0.8rem 0 0.35rem;
}

.recipe-ingredients {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.35rem 0.75rem;
}

.recipe-ingredient {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.035);
    color: inherit;
    text-decoration: none;
}

.recipe-ingredient:hover {
    background: rgba(251, 191, 36, 0.08);
    text-decoration: none;
}

.recipe-ingredient img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    image-rendering: pixelated;
}

.recipe-ingredient span {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipe-ingredient strong {
    color: var(--lot-gold);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.recipe-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 0.75rem;
    color: var(--lot-text-muted);
    font-size: 0.78rem;
}

.recipe-footer a {
    color: var(--lot-gold);
}

.result-pill {
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    color: var(--lot-gold);
    font-size: 0.8rem;
}

.wiki-data-list {
    container-type: inline-size;
    margin: 1.2rem 0 1.5rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 8px;
    background: rgba(5, 8, 12, 0.78);
}

.wiki-panel > .wiki-data-list:last-child {
    margin-bottom: 0;
}

.wiki-data-list__header {
    display: none;
    column-gap: 0.65rem;
    padding: 0.62rem 0.75rem;
    border-bottom: 1px solid rgba(126, 143, 170, 0.28);
    color: #aab6c8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wiki-data-heading--end {
    text-align: right;
}

.wiki-data-row {
    display: grid;
    align-items: center;
    gap: 0.35rem 0.65rem;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    background: rgba(0, 0, 0, 0.16);
}

.wiki-data-row + .wiki-data-row {
    border-top: 1px solid rgba(126, 143, 170, 0.22);
}

.wiki-data-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.wiki-data-label {
    margin-bottom: 0.08rem;
    color: var(--lot-text-faint);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wiki-data-cell a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.wiki-data-cell--item .item-link,
.wiki-data-cell--item .item-link:hover,
.wiki-data-cell--source .item-link,
.wiki-data-cell--source .item-link:hover {
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 600;
    white-space: normal;
}

.wiki-data-cell--item .inline-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    image-rendering: pixelated;
}

.wiki-data-cell--source .inline-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.wiki-data-cell--price strong,
.wiki-data-cell--healing strong {
    font-variant-numeric: tabular-nums;
}

.wiki-data-cell--healing strong {
    color: #ef8f8f;
}

.wiki-data-cell--stock .wiki-stock-restock {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.22rem;
    color: #72d99b;
    font-weight: 600;
}

.wiki-stock-restock > span {
    color: #86efac;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.wiki-data-list--sold-by .wiki-data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "shop shop"
        "owner price"
        "location location";
}

.wiki-data-list--sold-by .wiki-data-cell--shop { grid-area: shop; }
.wiki-data-list--sold-by .wiki-data-cell--owner { grid-area: owner; }
.wiki-data-list--sold-by .wiki-data-cell--price { grid-area: price; text-align: right; }
.wiki-data-list--sold-by .wiki-data-cell--location { grid-area: location; text-align: right; }

.wiki-data-list--drops .wiki-data-row {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
        "item item"
        "type price";
}

.wiki-data-list--drops .wiki-data-cell--item { grid-area: item; }
.wiki-data-list--drops .wiki-data-cell--type { grid-area: type; }
.wiki-data-list--drops .wiki-data-cell--price { grid-area: price; }

.wiki-data-list--drops .wiki-data-cell--price {
    text-align: right;
}

.wiki-data-list--stock .wiki-data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "item item"
        "price stock";
}

.wiki-data-list--stock .wiki-data-cell--item { grid-area: item; }
.wiki-data-list--stock .wiki-data-cell--price { grid-area: price; text-align: right; }
.wiki-data-list--stock .wiki-data-cell--stock { grid-area: stock; text-align: right; }

.wiki-data-list--food .wiki-data-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "level item healing"
        "source source source";
}

.wiki-data-list--food .wiki-data-cell--level { grid-area: level; }
.wiki-data-list--food .wiki-data-cell--item { grid-area: item; }
.wiki-data-list--food .wiki-data-cell--healing { grid-area: healing; text-align: right; }
.wiki-data-list--food .wiki-data-cell--source {
    grid-area: source;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(126, 143, 170, 0.16);
}

.wiki-data-list--food .wiki-data-cell--source .wiki-data-label {
    margin: 0;
}

@container (min-width: 220px) {
    .wiki-data-list--drops .wiki-data-row {
        grid-template-columns: minmax(0, 1fr) minmax(72px, 0.55fr) max-content;
        grid-template-areas: "item type price";
    }

    .wiki-data-list--stock .wiki-data-row {
        grid-template-areas:
            "item price"
            "item stock";
    }
}

@container (min-width: 240px) {
    .wiki-data-list--sold-by .wiki-data-row {
        grid-template-areas:
            "shop price"
            "owner location";
    }
}

@container (min-width: 400px) {
    .wiki-data-list--drops .wiki-data-list__header,
    .wiki-data-list--drops .wiki-data-row {
        display: grid;
        grid-template-columns: minmax(160px, 1fr) minmax(90px, 0.5fr) minmax(88px, 0.55fr);
    }

    .wiki-data-list--drops .wiki-data-label {
        display: none;
    }
}

@container (min-width: 430px) {
    .wiki-data-list--stock .wiki-data-list__header,
    .wiki-data-list--stock .wiki-data-row {
        display: grid;
        grid-template-columns: minmax(180px, 1fr) minmax(100px, 0.5fr) minmax(92px, 0.42fr);
        grid-template-areas: "item price stock";
    }

    .wiki-data-list--stock .wiki-data-label {
        display: none;
    }
}

@container (min-width: 500px) {
    .wiki-data-list--food .wiki-data-list__header,
    .wiki-data-list--food .wiki-data-row {
        display: grid;
        grid-template-columns: 54px minmax(145px, 1fr) 78px minmax(140px, 0.85fr);
        grid-template-areas: "level item healing source";
    }

    .wiki-data-list--food .wiki-data-cell--source {
        padding-top: 0;
        border-top: 0;
    }

    .wiki-data-list--food .wiki-data-label {
        display: none;
    }
}

@container (min-width: 540px) {
    .wiki-data-list--sold-by .wiki-data-list__header,
    .wiki-data-list--sold-by .wiki-data-row {
        display: grid;
        grid-template-columns: minmax(140px, 1.05fr) minmax(115px, 0.85fr) minmax(100px, 0.65fr) minmax(110px, 0.58fr);
        grid-template-areas: "shop owner price location";
    }

    .wiki-data-list--sold-by .wiki-data-label {
        display: none;
    }
}

.keybind-list {
    margin: 0.9rem 0 1.2rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 8px;
    background: rgba(5, 8, 12, 0.78);
}

.keybind-row {
    display: grid;
    grid-template-columns: minmax(52px, max-content) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.58rem 0.7rem;
}

.keybind-row + .keybind-row {
    border-top: 1px solid rgba(126, 143, 170, 0.2);
}

.keybind-row kbd {
    justify-self: stretch;
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 5px;
    background: rgba(251, 191, 36, 0.09);
    color: var(--lot-gold);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.keybind-row span {
    min-width: 0;
    color: #d7deea;
    overflow-wrap: anywhere;
}

.xp-level-grid {
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 1px;
    margin: 1.2rem 0 1.5rem;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 8px;
    background: rgba(126, 143, 170, 0.22);
}

.xp-level-entry {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.52rem 0.6rem;
    background: rgba(5, 8, 12, 0.94);
    font-variant-numeric: tabular-nums;
}

.xp-level-entry span {
    color: var(--lot-gold);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.xp-level-entry strong {
    min-width: 0;
    color: #78c8e3;
    font-size: clamp(0.68rem, calc(0.54rem + 0.45cqi), 0.82rem);
    white-space: nowrap;
}

.equipment-card-grid,
.equipment-results {
    display: grid;
    gap: 1rem;
}

.equipment-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

@container wiki-main (max-width: 680px) {
    .infobox {
        float: none;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 1.25rem;
    }
}

.equipment-card {
    --lot-texture-base: rgba(7, 11, 17, 0.82);
    padding: 1rem;
    border: 1px solid var(--wiki-line);
    border-radius: 7px;
}

.equipment-title,
.shop-owner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.equipment-title img {
    width: 52px;
    height: 52px;
    image-rendering: pixelated;
}

.equipment-title strong,
.equipment-title small,
.shop-owner strong,
.shop-owner small {
    display: block;
}

.equipment-title small,
.shop-owner small,
.equipment-requirements small {
    color: var(--lot-text-muted);
}

.equipment-requirements {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(126, 143, 170, 0.2);
}

.equipment-requirements strong,
.equipment-requirements small {
    display: block;
}

.comparison-stat-list {
    container-type: inline-size;
    overflow: hidden;
    border: 1px solid var(--wiki-line);
    border-radius: 7px;
    background: rgba(5, 8, 12, 0.78);
}

.comparison-stat-header {
    display: none;
    gap: 0.55rem;
    padding: 0.62rem 0.75rem;
    border-bottom: 1px solid rgba(126, 143, 170, 0.28);
    color: #aab6c8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comparison-stat-row {
    display: grid;
    gap: 0.55rem;
    padding: 0.68rem 0.75rem;
}

.comparison-stat-row + .comparison-stat-row {
    border-top: 1px solid rgba(126, 143, 170, 0.2);
}

.comparison-stat-name {
    color: var(--lot-gold);
    font-size: 0.75rem;
}

.comparison-stat-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    gap: 0.55rem;
    min-width: 0;
}

.comparison-stat-cell {
    min-width: 0;
}

.comparison-stat-cell strong,
.comparison-stat-cell small {
    display: block;
}

.comparison-stat-cell strong {
    color: #d7deea;
    font-variant-numeric: tabular-nums;
}

.comparison-stat-item {
    overflow: hidden;
    color: var(--lot-text-faint);
    font-size: 0.62rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comparison-stat-cell .stat-delta {
    color: var(--lot-text-muted);
    font-size: 0.7rem;
}

@container (min-width: 460px) {
    .comparison-stat-list[data-count="2"] .comparison-stat-header,
    .comparison-stat-list[data-count="2"] .comparison-stat-row {
        display: grid;
        grid-template-columns: minmax(105px, 0.6fr) repeat(2, minmax(120px, 1fr));
    }

    .comparison-stat-list[data-count="2"] .comparison-stat-name {
        grid-column: auto;
    }

    .comparison-stat-list[data-count="2"] .comparison-stat-values {
        display: contents;
    }

    .comparison-stat-list[data-count="2"] .comparison-stat-item {
        display: none;
    }
}

@container (min-width: 650px) {
    .comparison-stat-list[data-count="3"] .comparison-stat-header,
    .comparison-stat-list[data-count="3"] .comparison-stat-row {
        display: grid;
        grid-template-columns: minmax(105px, 0.55fr) repeat(3, minmax(120px, 1fr));
    }

    .comparison-stat-list[data-count="3"] .comparison-stat-name {
        grid-column: auto;
    }

    .comparison-stat-list[data-count="3"] .comparison-stat-values {
        display: contents;
    }

    .comparison-stat-list[data-count="3"] .comparison-stat-item {
        display: none;
    }
}

.stat-delta.positive { color: #86efac; }
.stat-delta.negative { color: #fca5a5; }

.shop-summary {
    display: grid;
    grid-template-columns: minmax(190px, 0.4fr) 1fr;
    align-items: center;
    gap: 1.2rem;
}

/* The shopkeeper at a whole multiple of its sprite's size (npc_sprite_size), on the same soft glow as the infobox art. */
.shop-owner img {
    flex: none;
    image-rendering: pixelated;
    background: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(251, 191, 36, 0.16), rgba(251, 191, 36, 0) 70%);
}

.shop-summary p {
    margin: 0;
    color: var(--lot-text-muted);
}

.currency-gems { color: #93c5fd; }
.currency-tokens-or-gems { color: #67e8f9; }
.currency-gold { color: var(--lot-gold); }

.linked-record {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(126, 143, 170, 0.2);
}

.linked-record:last-child { border-bottom: 0; }
.linked-record small { display: block; color: var(--lot-text-muted); }

.map-toolbar {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: end;
    gap: 1rem;
    padding: 0.9rem;
    margin: 1rem 0 0;
    overflow: visible;
    isolation: isolate;
}

.map-toolbar form { flex: 1; }

.map-search-results {
    position: absolute;
    z-index: 60;
    top: auto;
    bottom: calc(100% + 0.35rem);
    left: 0.9rem;
    right: 0.9rem;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--wiki-line-strong);
    border-radius: 5px;
    background: rgba(3, 5, 8, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.map-search-results button,
.map-search-results p {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 0;
    border-bottom: 1px solid rgba(126, 143, 170, 0.18);
    background: transparent;
    color: #fff;
    font: inherit;
    text-align: left;
}

.map-search-results button { cursor: pointer; }
.map-search-results button:hover { background: rgba(251, 191, 36, 0.1); }
.map-search-results strong,
.map-search-results small { display: block; }
.map-search-results small { color: var(--lot-text-muted); }

.map-shell {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid var(--wiki-line-strong);
    border-radius: 7px;
    background: #030508;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

.map-viewport {
    position: relative;
    height: clamp(620px, calc(100vh - 230px), 900px);
    min-height: 0;
    overflow: hidden;
    outline: none;
    background: #030508;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.map-viewport:focus-visible { box-shadow: inset 0 0 0 2px var(--lot-gold); }
.map-viewport.is-dragging { cursor: grabbing; }
.map-viewport canvas,
.map-markers { position: absolute; inset: 0; }
.map-viewport canvas { pointer-events: none; }
.map-markers { pointer-events: none; }

.map-marker {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(251, 191, 36, 0.72);
    border-radius: 50%;
    background: rgba(12, 15, 21, 0.94);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    cursor: pointer;
    transform-origin: 50% 100%;
}

.map-marker[hidden] { display: none; }

.map-marker::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 1px solid rgba(251, 191, 36, 0.72);
    border-bottom: 1px solid rgba(251, 191, 36, 0.72);
    background: rgba(12, 15, 21, 0.94);
    transform: translateX(-50%) rotate(45deg);
}

.map-marker img {
    position: relative;
    z-index: 1;
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
    image-rendering: pixelated;
}

.map-marker-resource-icons {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-marker-resource-icons img {
    width: 24px;
    height: 24px;
}

.map-marker-resource-icons img + img { margin-left: -9px; }
.map-marker-resource-icons.is-single img { width: 36px; height: 36px; margin-left: 0; }

.map-marker:hover,
.map-marker.selected {
    z-index: 4;
    border-color: #fff1a8;
    background: rgba(112, 73, 9, 0.96);
    transform-origin: 50% 100%;
}

.map-marker-station {
    border-color: rgba(103, 232, 249, 0.78);
    background: rgba(7, 25, 34, 0.96);
}

.map-marker-station::after {
    border-color: rgba(103, 232, 249, 0.78);
    background: rgba(7, 25, 34, 0.96);
}

.map-marker-station:hover,
.map-marker-station.selected {
    border-color: #cffafe;
    background: rgba(14, 116, 144, 0.96);
}

.map-marker-station:hover::after,
.map-marker-station.selected::after {
    border-color: #cffafe;
    background: rgba(14, 116, 144, 0.96);
}

.map-marker-npc {
    border-color: rgba(196, 181, 253, 0.78);
    background: rgba(29, 20, 52, 0.96);
}

.map-marker-npc::after {
    border-color: rgba(196, 181, 253, 0.78);
    background: rgba(29, 20, 52, 0.96);
}

.map-marker-npc:hover,
.map-marker-npc.selected {
    border-color: #ede9fe;
    background: rgba(91, 33, 182, 0.96);
}

.map-marker-npc:hover::after,
.map-marker-npc.selected::after {
    border-color: #ede9fe;
    background: rgba(91, 33, 182, 0.96);
}

.map-marker-fishing {
    border-color: rgba(125, 211, 252, 0.8);
    background: rgba(7, 35, 53, 0.96);
}

.map-marker-fishing::after {
    border-color: rgba(125, 211, 252, 0.8);
    background: rgba(7, 35, 53, 0.96);
}

.map-marker-fishing:hover,
.map-marker-fishing.selected {
    border-color: #e0f2fe;
    background: rgba(3, 105, 161, 0.96);
}

.map-marker-fishing:hover::after,
.map-marker-fishing.selected::after {
    border-color: #e0f2fe;
    background: rgba(3, 105, 161, 0.96);
}

.map-marker-mining {
    border-color: rgba(203, 213, 225, 0.78);
    background: rgba(30, 32, 38, 0.96);
}

.map-marker-mining::after {
    border-color: rgba(203, 213, 225, 0.78);
    background: rgba(30, 32, 38, 0.96);
}

.map-marker-mining:hover,
.map-marker-mining.selected {
    border-color: #fef3c7;
    background: rgba(120, 53, 15, 0.96);
}

.map-marker-mining:hover::after,
.map-marker-mining.selected::after {
    border-color: #fef3c7;
    background: rgba(120, 53, 15, 0.96);
}

.map-marker-woodcutting {
    isolation: isolate;
    border-color: rgba(134, 239, 172, 0.8);
    background: rgba(8, 39, 24, 0.96);
}

.map-marker-woodcutting::after {
    border-color: rgba(134, 239, 172, 0.8);
    background: rgba(8, 39, 24, 0.96);
}

.map-marker-woodcutting:hover,
.map-marker-woodcutting.selected {
    border-color: #dcfce7;
    background: rgba(21, 128, 61, 0.96);
}

.map-marker-woodcutting:hover::after,
.map-marker-woodcutting.selected::after {
    border-color: #dcfce7;
    background: rgba(21, 128, 61, 0.96);
}

.map-marker-cluster {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
}

.map-marker-cluster::after { display: none; }

.map-marker-count {
    position: absolute;
    z-index: 2;
    right: -6px;
    bottom: -5px;
    min-width: 23px;
    padding: 0.12rem 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 999px;
    background: #05070a;
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.map-loading {
    position: absolute;
    z-index: 5;
    inset: 50% auto auto 50%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--wiki-line);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.86);
    color: var(--lot-text-muted);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.map-loading.is-error { color: #fecaca; }

.map-layers-control {
    position: absolute;
    z-index: 12;
    top: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: min(290px, calc(100% - 1.5rem));
    pointer-events: none;
}

.map-layers-control[hidden],
.map-layers-panel[hidden] { display: none; }

.map-layers-toggle,
.map-layer-collapse,
.map-layer-visibility,
.map-layer-entry {
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.map-layers-toggle {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--wiki-line-strong);
    border-radius: 5px;
    background: rgba(7, 10, 15, 0.94);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    font-size: 0.82rem;
    font-weight: 700;
    pointer-events: auto;
}

.map-layers-toggle:hover,
.map-layers-toggle[aria-expanded="true"] {
    border-color: rgba(251, 191, 36, 0.72);
    background: rgba(48, 34, 10, 0.96);
}

.map-layers-panel {
    flex: 0 1 auto;
    width: 100%;
    min-height: 0;
    margin-top: 0.4rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--wiki-line-strong);
    border-radius: 6px;
    background: rgba(7, 10, 15, 0.97);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.map-layer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.4rem 0.55rem 0.4rem 0.35rem;
    border-bottom: 1px solid rgba(126, 143, 170, 0.24);
}

.map-layer-collapse > span,
.map-layer-heading strong,
.map-layer-heading small,
.map-layer-entry span,
.map-layer-entry strong,
.map-layer-entry small {
    display: block;
}

.map-layer-heading small,
.map-layer-entry small {
    color: var(--lot-text-muted);
    font-size: 0.7rem;
}

.map-layer-heading small { margin-top: 0.05rem; }

.map-layer-collapse {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    padding: 0.25rem 0.35rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    text-align: left;
}

.map-layer-copy {
    flex: 1;
    min-width: 0;
}

.map-layer-key {
    --map-key-border: rgba(251, 191, 36, 0.72);
    --map-key-background: rgba(12, 15, 21, 0.94);
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0 0.55rem 3px 0.1rem;
    border: 1px solid var(--map-key-border);
    border-radius: 50%;
    background: var(--map-key-background);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.map-layer-key::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-right: 1px solid var(--map-key-border);
    border-bottom: 1px solid var(--map-key-border);
    background: var(--map-key-background);
    transform: translateX(-50%) rotate(45deg);
}

.map-layer-key-station {
    --map-key-border: rgba(103, 232, 249, 0.78);
    --map-key-background: rgba(7, 25, 34, 0.96);
}

.map-layer-key-npc {
    --map-key-border: rgba(196, 181, 253, 0.78);
    --map-key-background: rgba(29, 20, 52, 0.96);
}

.map-layer-key-fishing {
    --map-key-border: rgba(125, 211, 252, 0.8);
    --map-key-background: rgba(7, 35, 53, 0.96);
}

.map-layer-key-mining {
    --map-key-border: rgba(203, 213, 225, 0.78);
    --map-key-background: rgba(30, 32, 38, 0.96);
}

.map-layer-key-woodcutting {
    --map-key-border: rgba(134, 239, 172, 0.8);
    --map-key-background: rgba(8, 39, 24, 0.96);
}

.map-layer-collapse::after {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-left: 0.65rem;
    border-right: 2px solid var(--lot-text-muted);
    border-bottom: 2px solid var(--lot-text-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.map-layer-collapse[aria-expanded="false"]::after {
    transform: rotate(-45deg);
}

.map-layer-collapse:hover,
.map-layer-collapse:focus-visible {
    background: rgba(251, 191, 36, 0.07);
    outline: none;
}

.map-layer-collapse:hover strong,
.map-layer-collapse:focus-visible strong,
.map-layer-collapse:hover::after,
.map-layer-collapse:focus-visible::after {
    color: var(--lot-gold);
    border-color: var(--lot-gold);
}

.map-layer-legend-notes {
    display: grid;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem 0.65rem;
    border-top: 1px solid rgba(126, 143, 170, 0.24);
    color: var(--lot-text-muted);
    font-size: 0.68rem;
    line-height: 1.25;
}

.map-layer-legend-notes > span {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.map-layer-cluster-key {
    position: relative;
    display: inline-grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    box-sizing: border-box;
    font-style: normal;
}

.map-layer-cluster-key {
    border: 1px solid rgba(196, 181, 253, 0.72);
    border-radius: 50%;
    background: rgba(29, 20, 52, 0.96);
}

.map-layer-cluster-key::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(196, 181, 253, 0.86);
}

.map-layer-cluster-key::after {
    content: "3";
    position: absolute;
    right: -6px;
    bottom: -4px;
    min-width: 15px;
    padding: 0.05rem 0.18rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: #05070a;
    color: #fff;
    font-size: 0.53rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.map-layer-entries[hidden] { display: none; }

.map-layer-visibility {
    min-width: 48px;
    padding: 0.3rem 0.45rem;
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 4px;
    background: rgba(251, 191, 36, 0.08);
    color: var(--lot-gold);
    font-size: 0.7rem;
    font-weight: 700;
}

.map-layer-visibility.is-hidden {
    border-color: var(--wiki-line);
    background: rgba(126, 143, 170, 0.06);
    color: var(--lot-text-muted);
}

.map-layer-entry {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 0;
    border-bottom: 1px solid rgba(126, 143, 170, 0.15);
    background: transparent;
    text-align: left;
}

.map-layer-entry:last-child { border-bottom: 0; }
.map-layer-entry:hover { background: rgba(251, 191, 36, 0.09); }

.map-layer-entry.selected {
    background: rgba(251, 191, 36, 0.16);
    box-shadow: inset 3px 0 0 var(--lot-gold);
}

.map-layer-entry.selected strong { color: var(--lot-gold); }

.map-layer-filter { opacity: 0.68; }

.map-layer-filter.is-active {
    opacity: 1;
    background: rgba(251, 191, 36, 0.07);
    box-shadow: inset 2px 0 0 rgba(251, 191, 36, 0.52);
}

.map-layer-filter.current {
    opacity: 1;
    background: rgba(251, 191, 36, 0.18);
    box-shadow: inset 3px 0 0 var(--lot-gold);
}

.map-layer-filter.current strong { color: var(--lot-gold); }

.map-layer-entry img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

.map-layer-entry strong {
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-selection {
    position: absolute;
    z-index: 20;
    top: 1rem;
    right: 1rem;
    width: min(340px, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    padding: 1rem;
    overflow-y: auto;
    border: 1px solid var(--wiki-line-strong);
    border-radius: 7px;
    background: rgba(7, 10, 15, 0.97);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.map-selection[hidden] { display: none; }

.map-selection-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 1;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--wiki-line);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.map-selection-close:hover { background: rgba(251, 191, 36, 0.14); }

.map-selection-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 2.2rem;
}

.map-selection-heading > img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    image-rendering: pixelated;
}

.map-selection-heading h3,
.map-selection-heading small { margin: 0; display: block; }
.map-selection-heading small { color: var(--lot-text-muted); }

.map-selection-action {
    margin-top: 1rem;
}

.map-patch-resources {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.map-patch-resource {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(126, 143, 170, 0.18);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.025);
}

.map-patch-resource.selected {
    border-color: rgba(134, 239, 172, 0.48);
    background: rgba(34, 197, 94, 0.1);
}

.map-patch-resource img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

.map-patch-resource strong,
.map-patch-resource small { display: block; }
.map-patch-resource small { color: var(--lot-text-muted); font-size: 0.72rem; }

.map-stock-preview {
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.map-stock-preview li { border-bottom: 1px solid rgba(126, 143, 170, 0.18); }
.map-stock-preview a { display: flex; gap: 0.6rem; padding: 0.55rem 0; color: inherit; text-decoration: none; }
.map-stock-preview img { width: 30px; height: 30px; image-rendering: pixelated; }
.map-stock-preview strong,
.map-stock-preview small { display: block; }
.map-stock-preview small { color: var(--lot-text-muted); }
body.world-map-page .wiki-body {
    width: calc(100% - 32px);
    max-width: none;
}

.empty-result {
    padding: 0.9rem;
    border: 1px dashed var(--wiki-line);
    border-radius: 5px;
    color: var(--lot-text-muted);
}

@media (max-width: 1024px) {
    :root {
        --wiki-sidebar-width: 220px;
    }

    .site-main {
        padding: 1.5rem 2rem 2rem;
    }
}

@media (max-width: 767px) {
    /* The sidebar menu button takes the logo's place in the shared header. */
    .nav-logo { display: none; }

    .menu-toggle {
        display: flex;
        grid-column: 1;
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
    }

    .wiki-body {
        display: block;
    }

    .site-sidebar {
        --lot-texture-base: rgba(5, 8, 12, 0.98);
        position: fixed;
        z-index: 1001;
        top: var(--lot-nav-height);
        bottom: 0;
        left: 0;
        display: block;
        width: min(360px, calc(100vw - 2rem));
        height: calc(100vh - var(--lot-nav-height));
        height: calc(100dvh - var(--lot-nav-height));
        padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        border-top: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0 8px 8px 0;
        background-color: #05080c;
        box-shadow: 18px 0 42px rgba(0, 0, 0, 0.62);
        overscroll-behavior: contain;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.2s ease, opacity 0.2s ease, visibility 0s linear 0.2s;
        pointer-events: none;
        -webkit-overflow-scrolling: touch;
    }

    .site-sidebar .sidebar-section {
        padding: 0.45rem 0;
    }

    .site-sidebar .sidebar-title {
        padding: 0.7rem 1.1rem 0.45rem;
        font-size: 0.78rem;
    }

    .site-sidebar .sidebar-nav a {
        gap: 0.65rem;
        margin: 0.1rem 0.7rem;
        padding: 0.7rem 0.8rem;
        font-size: 0.98rem;
        line-height: 1.3;
    }

    .site-sidebar .sidebar-icon {
        width: 24px;
        height: 24px;
    }

    .site-sidebar.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        transition-delay: 0s;
        pointer-events: auto;
    }

    .sidebar-backdrop:not([hidden]) {
        position: fixed;
        z-index: 1000;
        inset: var(--lot-nav-height) 0 0;
        display: block;
        width: 100%;
        padding: 0;
        border: 0;
        background: rgba(0, 0, 0, 0.66);
        backdrop-filter: blur(2px);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .site-main {
        padding: 1.25rem;
    }

    .infobox {
        float: none;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 1.25rem;
    }

    .notes-content {
        margin-right: 0;
    }

    .map-selection {
        top: auto;
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-height: min(70%, 520px);
    }

    .map-shell:has(.map-layers-panel:not([hidden])):has(.map-selection:not([hidden])) .map-layers-control {
        bottom: calc(50% + 0.25rem);
    }

    .map-shell:has(.map-layers-panel:not([hidden])):has(.map-selection:not([hidden])) .map-selection {
        max-height: calc(50% - 1.5rem);
    }

}

@media (max-width: 640px) {
    .menu-toggle {
        width: 30px;
    }

    .site-main {
        padding: 1rem;
    }

    .page-title {
        flex-wrap: wrap;
        font-size: 1.45rem;
    }

    .title-icon {
        width: 40px;
        height: 40px;
    }

    .index-grid {
        grid-template-columns: 1fr;
    }

    .grid-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.65rem;
    }

    .grid-card {
        min-height: 132px;
        padding: 0.75rem;
    }

    .grid-card-icon {
        width: 48px;
        height: 48px;
    }

    .result-stat-grid,
    .form-grid,
    .shop-summary {
        grid-template-columns: 1fr;
    }

    .form-grid .wide-field {
        grid-column: auto;
    }

    .inline-form,
    .map-toolbar,
    .page-heading-row,
    .linked-record {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-form .check-field {
        flex-direction: row;
    }

    .skill-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recipe-details {
        padding: 0.75rem;
    }

    .recipe-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recipe-fact,
    .recipe-fact:last-child {
        padding: 0 0 0.45rem;
        border-right: 0;
        border-bottom: 1px solid rgba(126, 143, 170, 0.18);
    }

    .recipe-quantity {
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }

    .recipe-quantity label {
        justify-content: space-between;
    }

    .recipe-total {
        text-align: left;
    }

    .recipe-ingredients {
        grid-template-columns: 1fr;
    }

    .skill-choice {
        gap: 0.4rem;
        padding: 0.5rem;
        font-size: 0.78rem;
    }

    .result-stat-grid.calculator-summary {
        grid-template-columns: 1fr;
    }

    .calculator-section-heading {
        flex-direction: row;
        align-items: center;
    }

    .training-head {
        position: absolute;
        width: 1px;
        height: 1px;
        min-height: 0;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .training-row:not(.training-head) {
        grid-template-areas:
            "level action action"
            ". xp count";
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 0.4rem;
        padding: 0.65rem 0.6rem;
        font-size: 0.78rem;
    }

    .training-level-cell { grid-area: level; align-self: start; }
    .training-action-cell { grid-area: action; }
    .training-xp { grid-area: xp; }
    .training-count { grid-area: count; }
    .training-level {
        min-width: 34px;
        min-height: 28px;
        padding: 0.15rem 0.3rem;
    }

    .training-action { gap: 0.4rem; }
    .training-action img { width: 28px; height: 28px; }
    .training-action small { display: none; }
    .training-number { color: var(--lot-text-muted); font-size: 0.72rem; }
    .training-xp::before { content: "XP "; }
    .training-count::before { content: "Actions "; }

    .map-viewport {
        height: max(460px, calc(100vh - 280px));
    }
}

@media (max-width: 340px) {
    .skill-picker { grid-template-columns: 1fr; }
    .training-table { min-width: 320px; }
}

@media print {
    lot-background,
    lot-header,
    lot-footer,
    .site-sidebar,
    .menu-toggle,
    .sidebar-backdrop {
        display: none !important;
    }

    .wiki-body {
        display: block;
        border: 0;
        background: #fff;
    }

    .site-main {
        padding: 0;
        color: #000;
    }

    .site-main h1,
    .site-main h2,
    .site-main h3,
    .site-main p,
    .site-main li {
        color: #000;
    }
}

.quest-list { display: grid; gap: 1rem; }
.quest-card { padding: 1rem 1.25rem; scroll-margin-top: 5rem; }
.quest-card:target { border-color: #fff1a8; }
.quest-card-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.quest-card-header h3 { margin: 0; }
.quest-card-header .title-icon { width: 28px; height: 28px; image-rendering: pixelated; }
.quest-points { margin-left: auto; color: #48bdff; font-weight: 700; font-size: 0.85rem; }
.quest-card-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.quest-card-columns h4 { margin: 0 0 0.35rem; color: #fff3d4; }
.quest-card-columns ul { margin: 0; padding-left: 1.1rem; }

.map-marker-has-quest,
.map-marker-npc.map-marker-has-quest {
    border-color: rgba(251, 191, 36, 0.95);
    background: rgba(88, 56, 4, 0.96);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3), 0 5px 14px rgba(0, 0, 0, 0.55);
}

.map-marker-has-quest::after {
    border-color: rgba(251, 191, 36, 0.95);
    background: rgba(88, 56, 4, 0.96);
}

.map-marker-has-quest:hover,
.map-marker-has-quest.selected {
    border-color: #fff1a8;
    background: rgba(146, 96, 10, 0.98);
}

.map-marker-has-quest:hover::after,
.map-marker-has-quest.selected::after {
    border-color: #fff1a8;
    background: rgba(146, 96, 10, 0.98);
}

.map-marker .map-marker-quest-badge {
    position: absolute;
    z-index: 2;
    top: -9px;
    right: -9px;
    width: 20px;
    height: 20px;
    padding: 1px;
    border: 1px solid rgba(251, 191, 36, 0.95);
    border-radius: 50%;
    background: #05070a;
}

.map-quest-links { display: grid; gap: 0.4rem; margin: 0.6rem 0; }
.map-quest-link { display: grid; gap: 0.1rem; padding: 0.45rem 0.6rem; border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 6px; background: rgba(88, 56, 4, 0.35); text-decoration: none; }
.map-quest-link:hover { border-color: #fff1a8; }
.map-quest-link small { color: #d9c89e; }

.map-marker .map-marker-shop-badge {
    position: absolute;
    z-index: 2;
    top: -9px;
    left: -9px;
    display: block;
    width: 20px;
    height: 20px;
    padding: 1px;
    border: 1px solid rgba(251, 191, 36, 0.95);
    border-radius: 50%;
    background: #05070a;
}
.map-shop-section { margin: 0.6rem 0; }
.map-shop-section h4 { margin: 0.1rem 0 0.4rem; color: #fff3d4; }

.map-marker-dungeon {
    border-color: rgba(248, 113, 113, 0.85);
    background: rgba(48, 12, 14, 0.96);
}

.map-marker-dungeon::after {
    border-color: rgba(248, 113, 113, 0.85);
    background: rgba(48, 12, 14, 0.96);
}

.map-marker-dungeon:hover,
.map-marker-dungeon.selected {
    border-color: #fecaca;
    background: rgba(127, 29, 29, 0.96);
}

.map-marker-dungeon:hover::after,
.map-marker-dungeon.selected::after {
    border-color: #fecaca;
    background: rgba(127, 29, 29, 0.96);
}

.map-requirements { margin: 0.5rem 0; }
.map-requirements p { margin: 0.1rem 0 0; }

.map-marker-foraging {
    border-color: rgba(134, 239, 172, 0.8);
    background: rgba(8, 36, 20, 0.96);
}

.map-marker-foraging::after {
    border-color: rgba(134, 239, 172, 0.8);
    background: rgba(8, 36, 20, 0.96);
}

.map-marker-foraging:hover,
.map-marker-foraging.selected {
    border-color: #dcfce7;
    background: rgba(21, 128, 61, 0.96);
}

.map-marker-foraging:hover::after,
.map-marker-foraging.selected::after {
    border-color: #dcfce7;
    background: rgba(21, 128, 61, 0.96);
}

.map-marker-bank { border-color: rgba(125, 211, 252, 0.8); background: rgba(8, 28, 44, 0.96); }
.map-marker-bank::after { border-color: rgba(125, 211, 252, 0.8); background: rgba(8, 28, 44, 0.96); }
.map-marker-bank:hover,
.map-marker-bank.selected { border-color: #e0f2fe; background: rgba(3, 105, 161, 0.96); }
.map-marker-bank:hover::after,
.map-marker-bank.selected::after { border-color: #e0f2fe; background: rgba(3, 105, 161, 0.96); }

.map-marker-market { border-color: rgba(253, 186, 116, 0.85); background: rgba(48, 24, 6, 0.96); }
.map-marker-market::after { border-color: rgba(253, 186, 116, 0.85); background: rgba(48, 24, 6, 0.96); }
.map-marker-market:hover,
.map-marker-market.selected { border-color: #ffedd5; background: rgba(194, 65, 12, 0.96); }
.map-marker-market:hover::after,
.map-marker-market.selected::after { border-color: #ffedd5; background: rgba(194, 65, 12, 0.96); }

.map-layer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.map-layer-entry .map-layer-icon img { width: 32px; height: 32px; image-rendering: auto; }
