:root {
    color-scheme: light dark;
    --overlay-bg: rgba(15, 18, 24, 0.42);
    --card-bg: rgba(255, 255, 255, 0.96);
    --card-border: rgba(0, 0, 0, 0.12);
    --accent: #3bb5ff;
    --accent-dark: #0c6bbf;
    --text-color: #1f2a37;
    --muted-text: #6b7280;
    --hud-bg: rgba(12, 19, 28, 0.55);
    --hud-border: rgba(255, 255, 255, 0.08);
    --chat-bg: rgba(255, 255, 255, 0.9);
    --chat-scroll: rgba(15, 18, 24, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Noto Sans KR', 'Pretendard', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f172a;
    color: var(--text-color);
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

body * {
    -webkit-user-select: none;
    user-select: none;
}

input,
textarea,
button,
select,
option,
[contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}

canvas {
    display: block;
    background: #1f2937;
}

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

.overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 120;
}

.overlay__card {
    width: min(420px, 90vw);
    padding: 2.5rem 2.75rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--card-border);
    text-align: center;
}

.overlay__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.overlay__description {
    margin: 0 0 1.5rem;
    color: var(--muted-text);
    font-size: 0.95rem;
}

.overlay__profile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.overlay__profile dl {
    margin: 0;
}

.overlay__profile dt {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted-text);
}

.overlay__profile dd {
    margin: 0.25rem 0 0;
    font-weight: 600;
    color: var(--text-color);
}

.overlay__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overlay__form label {
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
}

.overlay__form input {
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    font-size: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.overlay__form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 181, 255, 0.2);
}

.overlay__form button {
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #7ad7ff);
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overlay__form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(59, 181, 255, 0.35);
}

.overlay__error {
    min-height: 1.25rem;
    font-size: 0.85rem;
    color: #ef4444;
    margin: 0;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


.hud {
    position: fixed;
    inset: 0.75rem 1.5rem auto 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    pointer-events: none;
    z-index: 80;
}

.hud__topbar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    pointer-events: none;
}

.hud__topbar-left {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    pointer-events: auto;
    flex-wrap: wrap;
}

.hud__topbar-right {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    pointer-events: auto;
    position: relative;
}

.transform-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 23rem;
    max-height: 22rem;
    padding: 0.75rem;
    background: rgba(12, 19, 28, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(14px);
    color: #f8fafc;
    z-index: 95;
    display: none;
}

.transform-menu[aria-hidden="false"] {
    display: block;
}

.transform-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.transform-menu__title {
    font-size: 1rem;
    font-weight: 600;
}

.transform-menu__close {
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.transform-menu__close:hover,
.transform-menu__close:focus {
    background: rgba(56, 189, 248, 0.18);
    color: #bae6fd;
    outline: none;
}

.transform-menu__close:focus-visible {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4);
}

.transform-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 16.5rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    align-content: flex-start;
}

.transform-menu__option {
    width: 100%;
    height: 100%;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.55);
    color: inherit;
    padding: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.transform-menu__option:hover,
.transform-menu__option:focus {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(56, 189, 248, 0.18);
    outline: none;
}

.transform-menu__option:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 181, 255, 0.45);
}

.transform-menu__option--active {
    border-color: rgba(96, 165, 250, 0.8);
    background: rgba(59, 130, 246, 0.28);
}

.transform-menu__option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.transform-menu__thumbnail {
    flex: none;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background-color: rgba(30, 41, 59, 0.8);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.transform-menu__thumbnail--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.55);
}

.transform-menu__thumbnail-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    image-rendering: pixelated;
}

.transform-menu__thumbnail-loader {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.45rem;
    background: rgba(148, 163, 184, 0.2);
    animation: transform-thumbnail-pulse 1.2s ease-in-out infinite;
}

@keyframes transform-thumbnail-pulse {
    0%,
    100% {
        opacity: 0.55;
    }
    50% {
        opacity: 0.9;
    }
}

.transform-menu__name {
    font-weight: 500;
    font-size: 0.8rem;
    line-height: 1.2;
    width: 100%;
}

.transform-menu__empty {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
}

@media (max-width: 720px) {
    .transform-menu {
        position: fixed;
        top: auto;
        right: 1rem;
        left: 1rem;
        bottom: 1.5rem;
        width: auto;
        max-height: calc(100vh - 6rem);
    }
}

.hud__control-button {
    min-width: 2.9rem;
    min-height: 3.2rem;
    padding: 0.4rem 0.35rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(12, 19, 28, 0.7);
    color: #e2e8f0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hud__control-button--auto {
    width: auto;
    min-width: 3.25rem;
    padding: 0 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hud__control-button--auto .hud__control-icon {
    font-size: 0.85rem;
}

.hud__control-button--auto.is-active {
    background: rgba(34, 197, 94, 0.9);
    border-color: rgba(22, 163, 74, 0.9);
    color: #052e16;
}

.hud__control-button--auto.is-active:hover,
.hud__control-button--auto.is-active:focus {
    background: rgba(34, 197, 94, 0.9);
    border-color: rgba(22, 163, 74, 0.9);
}

.hud__control-button:hover,
.hud__control-button:focus {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.45);
    outline: none;
}

.hud__control-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 181, 255, 0.35);
}

.hud__control-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
}

.hud__control-caption {
    display: block;
    font-size: 0.65rem;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: #cbd5e1;
    text-transform: none;
}

.hud__topbar-center {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}

.hud__currency {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    pointer-events: auto;
    box-shadow: 0 10px 22px rgba(8, 11, 20, 0.28);
}

.hud__currency-icon {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff8d6 0%, #ffe082 45%, #f6ad55 100%);
    border: 1px solid rgba(251, 191, 36, 0.8);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7), 0 2px 4px rgba(8, 11, 20, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.hud__currency-icon::after {
    content: 'G';
    font-size: 0.65rem;
    font-weight: 700;
    color: #7c2d12;
}

.hud__currency-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.hud__player {
    padding: 0.6rem 0.95rem;
    background: var(--hud-bg);
    color: #f9fafb;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid var(--hud-border);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 200px;
    max-width: min(420px, 45vw);
    align-items: center;
    text-align: center;
}

.player-info__primary {
    font-size: 0.88rem;
    font-weight: 600;
    text-align: inherit;
}

.player-info__bonus {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.8);
    font-weight: 500;
}

.hud__chat {
    align-self: flex-end;
    margin-left: auto;
    width: min(360px, 88vw);
    background: var(--hud-bg);
    border-radius: 18px;
    border: 1px solid var(--hud-border);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    overflow: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hud__chat--closed {
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.6rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    gap: 1rem;
}

.chat-header__title {
    font-size: 1rem;
    font-weight: 700;
    color: #f9fafb;
}

.chat-body {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    transition: max-height 0.25s ease;
}

.hud__chat--closed .chat-body {
    display: none;
}

.chat-close {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.3);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.chat-close:hover,
.chat-close:focus-visible {
    background: rgba(59, 181, 255, 0.3);
    border-color: rgba(59, 181, 255, 0.6);
    transform: translateY(-1px);
    outline: none;
}

.chat-log {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 260px;
}

.chat-log::-webkit-scrollbar {
    width: 6px;
}

.chat-log::-webkit-scrollbar-thumb {
    background: var(--chat-scroll);
    border-radius: 999px;
}

.transform-menu__list,
.trade-inventory,
.inventory__grid,
.inventory__detail-content,
.shop__list,
.shop__detail-content,
.chat-log,
.content-modal__viewport,
.content-modal__thumbs,
.content-modal__article {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) rgba(15, 23, 42, 0.15);
}

.transform-menu__list::-webkit-scrollbar,
.trade-inventory::-webkit-scrollbar,
.inventory__grid::-webkit-scrollbar,
.inventory__detail-content::-webkit-scrollbar,
.shop__list::-webkit-scrollbar,
.shop__detail-content::-webkit-scrollbar,
.content-modal__viewport::-webkit-scrollbar,
.content-modal__thumbs::-webkit-scrollbar,
.content-modal__article::-webkit-scrollbar {
    width: 8px;
}

.transform-menu__list::-webkit-scrollbar-track,
.trade-inventory::-webkit-scrollbar-track,
.inventory__grid::-webkit-scrollbar-track,
.inventory__detail-content::-webkit-scrollbar-track,
.shop__list::-webkit-scrollbar-track,
.shop__detail-content::-webkit-scrollbar-track,
.content-modal__viewport::-webkit-scrollbar-track,
.content-modal__thumbs::-webkit-scrollbar-track,
.content-modal__article::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.25);
    border-radius: 999px;
}

.transform-menu__list::-webkit-scrollbar-thumb,
.trade-inventory::-webkit-scrollbar-thumb,
.inventory__grid::-webkit-scrollbar-thumb,
.inventory__detail-content::-webkit-scrollbar-thumb,
.shop__list::-webkit-scrollbar-thumb,
.shop__detail-content::-webkit-scrollbar-thumb,
.content-modal__viewport::-webkit-scrollbar-thumb,
.content-modal__thumbs::-webkit-scrollbar-thumb,
.content-modal__article::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.55), rgba(59, 130, 246, 0.65));
    border-radius: 999px;
}

.chat-log__entry {
    font-size: 0.9rem;
    line-height: 1.35;
    color: #f3f4f6;
    background: rgba(15, 23, 42, 0.38);
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
}

.chat-log__entry--self {
    align-self: flex-end;
    background: rgba(59, 181, 255, 0.45);
}

.chat-log__entry--system {
    align-self: center;
    background: rgba(15, 23, 42, 0.55);
    font-weight: 600;
    color: #bfdbfe;
}

.chat-log__time {
    margin-right: 0.35rem;
    color: rgba(148, 163, 184, 0.95);
    font-size: 0.75rem;
}

.chat-log__author {
    margin-right: 0.5rem;
    font-weight: 700;
}

.chat-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
}

.chat-form input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.25);
    color: #f9fafb;
}

.chat-form input:focus {
    outline: none;
    border-color: rgba(122, 215, 255, 0.75);
    box-shadow: 0 0 0 2px rgba(59, 181, 255, 0.25);
}

.chat-form button {
    padding: 0.55rem 1.1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.chat-form button:hover {
    opacity: 0.92;
}


.inventory {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 25;
}

.inventory.is-open {
    opacity: 1;
}

.inventory__dialog {
    position: relative;
    width: min(720px, 90vw);
    max-height: 78vh;
    padding: 1.2rem 1.35rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(8, 11, 20, 0.45);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #f8fafc;
    pointer-events: none;
}

.inventory.is-open .inventory__dialog {
    pointer-events: auto;
}

.inventory:not(.is-open) .inventory__dialog {
    pointer-events: none;
}

.inventory__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.inventory__header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.inventory__header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.inventory__hint {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.7);
}

.inventory__close {
    appearance: none;
    border: none;
    background: rgba(30, 41, 59, 0.6);
    color: #f8fafc;
    font-size: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.inventory__close:hover,
.inventory__close:focus {
    background: rgba(59, 130, 246, 0.35);
    outline: none;
    transform: scale(1.05);
}

.inventory__body {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
    gap: 1.05rem;
    min-height: 360px;
}

.inventory__primary {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.inventory__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    grid-auto-rows: minmax(68px, auto);
    gap: 0.5rem;
    overflow-y: auto;
    padding-right: 0.35rem;
    max-height: clamp(240px, 48vh, 340px);
    flex: 1 1 auto;
    min-height: 0;
}

.inventory__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.82);
    color: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.inventory__item.is-trade-locked {
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25);
    opacity: 0.55;
    cursor: not-allowed;
}

.inventory__item:hover,
.inventory__item:focus {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
    outline: none;
}

.inventory__item.is-selected {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.inventory__item.is-equipped {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(134, 239, 172, 0.6);
}


.inventory__slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.45);
    color: rgba(148, 163, 184, 0.55);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.inventory__slot::after {
    content: '';
    width: 58%;
    height: 58%;
    border-radius: 10px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    background: rgba(30, 41, 59, 0.55);
}


.inventory__badge {
    position: absolute;
    right: 0.35rem;
    bottom: 0.3rem;
    font-size: 0.62rem;
    color: #bbf7d0;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.9);
    z-index: 2;
}

.inventory__upgrade {
    position: absolute;
    top: 0.35rem;
    left: 0.4rem;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    color: #bfdbfe;
    font-size: 0.68rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(8, 11, 20, 0.75);
    z-index: 2;
}

.inventory__quantity {
    position: absolute;
    top: 0.3rem;
    right: 0.4rem;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.inventory__item-icon {
    position: absolute;
    inset: 0.35rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
    overflow: hidden;
    z-index: 0;
}

.inventory__item-icon.is-empty {
    background: rgba(15, 23, 42, 0.55);
    border: 1px dashed rgba(148, 163, 184, 0.28);
}

.inventory__item-sprite {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    transform-origin: center;
}

.inventory__detail {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 1.1rem 1.25rem 1.2rem;
    min-height: 0;
    max-height: clamp(320px, 68vh, 440px);
    overflow: hidden;
}

.inventory__detail-content-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inventory__detail-empty {
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.95rem;
}

.inventory__detail-content {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 0.35rem 0.35rem 0;
}

.inventory__detail-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.inventory__detail-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.inventory__detail-slot {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.9);
}

.inventory__detail-description {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.82);
    white-space: pre-line;
    line-height: 1.5;
}

.inventory__detail-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.inventory__detail-section h4 {
    margin: 0;
    font-size: 0.8rem;
    color: #93c5fd;
}

.inventory__detail-canvas {
    width: 132px;
    height: 132px;
    align-self: center;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.45);
}


.inventory__actions {
    margin-top: 0.85rem;
}

.inventory__detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.4);
}

.inventory__detail-actions[hidden] {
    display: none;
}

.inventory__detail-level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.45rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.4);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.48), rgba(37, 99, 235, 0.3));
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.18);
    flex: 1 1 200px;
}

.inventory__level-button {
    padding: 0.4rem 0.75rem;
    border-radius: 9px;
    border: 1px solid rgba(125, 211, 252, 0.7);
    background: rgba(30, 64, 175, 0.62);
    color: #e0f2fe;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    min-width: 0;
}

.inventory__level-button:hover,
.inventory__level-button:focus {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.85);
    box-shadow: 0 10px 22px rgba(30, 64, 175, 0.45);
    outline: none;
}

.inventory__level-label {
    font-weight: 700;
    font-size: 0.82rem;
    color: #d6e4ff;
}

.inventory__equip-button {
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #38bdf8, #60a5fa);
    color: #0f172a;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-width: 0;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.32);
}

.inventory__equip-button:hover,
.inventory__equip-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.45);
    outline: none;
}

.inventory__consumable-info {
    margin: 0;
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.9rem;
}

.inventory__stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.78rem;
}

.inventory__stats--muted {
    color: rgba(226, 232, 240, 0.7);
}

.inventory__stats li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.inventory__shop-info {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.78);
}

.inventory__shop-info--error {
    color: #fca5a5;
}

.inventory__shop-info--success {
    color: #bbf7d0;
}

.inventory__title-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.inventory__count {
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.75);
    letter-spacing: 0.02em;
}

.shop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 26;
}

.shop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.shop__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
}

.shop__dialog {
    position: relative;
    width: min(960px, 94vw);
    max-height: 80vh;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    box-shadow: 0 24px 56px rgba(8, 11, 20, 0.5);
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #f8fafc;
    overflow: hidden;
}

.shop__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.shop__header-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.shop__header-text h2 {
    margin: 0;
    font-size: 1.2rem;
}

.shop__money {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.75);
}

.shop__close {
    border: none;
    background: rgba(15, 23, 42, 0.7);
    color: rgba(226, 232, 240, 0.7);
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.shop__close:hover,
.shop__close:focus {
    background: rgba(59, 130, 246, 0.2);
    color: #e0f2fe;
    outline: none;
}


.shop__body {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
    gap: 1rem;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}

.shop__primary {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 0;
}

.shop__summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.shop__summary .shop__money {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
    white-space: nowrap;
}

.shop__summary .shop__tabs {
    flex: 1 1 auto;
}

.shop__tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.28);
    align-self: stretch;
    width: 100%;
}

.shop__tab {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: transparent;
    color: rgba(226, 232, 240, 0.7);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
}

.shop__tab:hover,
.shop__tab:focus {
    background: rgba(59, 130, 246, 0.18);
    color: #e2e8f0;
    outline: none;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.shop__tab.is-active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(30, 64, 175, 0.28));
    color: #f8fafc;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.55);
}

.shop__tab:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    background: transparent;
    color: rgba(148, 163, 184, 0.6);
    box-shadow: none;
}

.shop__section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    min-height: 0;
    flex: 1 1 auto;
}

.shop__section--buy,
.shop__section--sell {
    display: none;
}

.shop--mode-buy .shop__section--buy,
.shop--mode-sell .shop__section--sell {
    display: flex;
}

.shop__section[hidden] {
    display: none !important;
}

.shop__section-title {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.82);
}

.shop__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    overflow-y: auto;
    min-height: 0;
}

.shop__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.shop__item:hover,
.shop__item:focus {
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(30, 64, 175, 0.2);
    outline: none;
}

.shop__item.is-selected {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}

.shop__item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.shop__item-icon {
    position: relative;
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.28);
    overflow: hidden;
}

.shop__item-icon.is-empty {
    background: rgba(30, 41, 59, 0.6);
}

.shop__item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1 1 auto;
    min-width: 0;
}

.shop__item-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
}

.shop__item-price {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.8);
    display: block;
    white-space: nowrap;
}

.shop__item-desc {
    font-size: 0.78rem;
    color: rgba(203, 213, 225, 0.8);
    line-height: 1.35;
}

.shop__item-sprite {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    transform-origin: center;
}

.shop__item-quantity {
    position: absolute;
    right: 6px;
    bottom: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.95);
    text-shadow: 0 1px 2px rgba(8, 11, 20, 0.65);
    pointer-events: none;
}

.shop__placeholder {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.6);
    color: rgba(203, 213, 225, 0.75);
    font-size: 0.85rem;
}

.shop__detail {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.95rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.25);
    min-height: 0;
}

.shop__detail-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}

.shop__detail-sprite {
    position: relative;
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.28);
    overflow: hidden;
}

.shop__detail-sprite.is-empty {
    background: rgba(30, 41, 59, 0.55);
}

.shop__detail-sprite-image {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    transform-origin: center;
}

.sprite-image--empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.7);
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
}

.shop__detail-empty {
    margin: 0;
    color: rgba(226, 232, 240, 0.65);
    font-size: 0.9rem;
}

.shop__detail-content {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.shop__detail-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.shop__detail-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.shop__detail-type {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.85);
}

.shop__detail-description {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.82);
}

.shop__stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.85);
}

.shop__detail-prices {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.shop__price-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.shop__detail-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.shop__quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: rgba(226, 232, 240, 0.92);
    flex: 0 0 auto;
}

.shop__quantity-button {
    min-width: 32px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: rgba(30, 64, 175, 0.45);
    color: #f8fafc;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease;
}

.shop__quantity-button:hover,
.shop__quantity-button:focus {
    background: rgba(59, 130, 246, 0.65);
    outline: none;
    transform: translateY(-1px);
}

.shop__quantity-button:disabled {
    background: rgba(71, 85, 105, 0.55);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.shop__quantity-value {
    min-width: 2.2rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.95);
}

.shop__action-button {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 0.65rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(96, 165, 250, 0.75));
    color: #f8fafc;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.shop__action-button:hover,
.shop__action-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(56, 189, 248, 0.3);
    outline: none;
}

.shop__action-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.35);
    opacity: 0.7;
    box-shadow: none;
}

.shop__action-button--danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(248, 113, 113, 0.8));
}

.shop__status {
    min-height: 1.2rem;
    font-size: 0.85rem;
    color: #cbd5f5;
}

.shop__status--error {
    color: #fca5a5;
}

.shop__status--success {
    color: #bbf7d0;
}

@media (max-width: 980px) {
    .shop__body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }
    .shop__primary,
    .shop__detail {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .shop__body {
        display: flex;
        flex-direction: column;
    }
    .shop__primary {
        gap: 0.65rem;
    }
    .shop__section,
    .shop__detail {
        max-height: none;
    }
}

@media (max-width: 1100px) {
    .inventory__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .inventory__grid {
        max-height: clamp(240px, 50vh, 360px);
    }

    .inventory__detail {
        max-height: clamp(260px, 62vh, 380px);
    }
}

@media (max-width: 800px) {
    .inventory__dialog {
        padding: 1.1rem;
    }

    .inventory__grid {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    }
}




.content-prompt {
    position: fixed;
    inset: 0;
    z-index: 2200;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    --content-prompt-left: 50%;
    --content-prompt-top: 50%;
    --content-prompt-translate-y: calc(-50% - 18%);
}

.content-prompt[aria-hidden="true"] {
    opacity: 0;
    transform: translateY(8px);
}

.content-prompt__dialog {
    position: absolute;
    left: var(--content-prompt-left, 50%);
    top: var(--content-prompt-top, 50%);
    transform: translate(-50%, var(--content-prompt-translate-y, -18%));
    background: rgba(15, 23, 42, 0.38);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 16px 16px 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    min-width: 280px;
    margin-top: 0;
}

.content-prompt[aria-hidden="false"] .content-prompt__dialog {
    pointer-events: auto;
}

.content-prompt--anchored {
    --content-prompt-translate-y: 12px;
}

.content-prompt__message {
    margin: 6px 0 14px;
    font-weight: 700;
    font-size: 14px;
    color: #e2e8f0;
    padding: 6px 4px;
}

.content-prompt__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.content-prompt__button {
    background: #1f2937;
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: 700;
    flex: 1;
    min-width: 48px;
    font-size: 12px;
}

.content-prompt__button--primary {
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    border-color: transparent;
    color: #0b1020;
}

.content-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 2300;
    transition: opacity 0.25s ease;
}

.content-modal[aria-hidden="true"] {
    opacity: 0;
    pointer-events: none;
}

.content-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 15, 30, 0.7);
}

.content-modal__dialog {
    position: relative;
    background: #0b1221;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    padding: 16px;
    width: min(1100px, 92vw);
    height: min(86vh, 940px);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    z-index: 1;
    outline: none;
}

.content-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.content-modal__title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.content-modal__title {
    margin: 0;
    font-size: 20px;
    color: #e5e7eb;
}

.content-modal__meta {
    margin: 0;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.7);
}

.content-modal__close {
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #111827;
    color: #e5e7eb;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.content-modal__body {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}

.content-modal__gallery {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 320px;
    height: 100%;
}

.content-modal__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 10px;
    width: 100%;
    flex: 1;
    min-height: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.content-modal__image-strip {
    display: flex;
    gap: 0;
    padding: 0;
    min-height: 280px;
    height: 100%;
    min-width: 100%;
}

.content-modal__image-frame,
.content-modal__frame {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    background: #0b1020;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 280px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.content-modal__image-frame img,
.content-modal__frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
    display: block;
}

.content-modal__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.content-modal__nav {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

.content-modal__counter {
    font-weight: 700;
    color: #e2e8f0;
}

.content-modal__article {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 12px;
    overflow-y: auto;
    height: 100%;
    min-height: 320px;
    color: #e2e8f0;
    line-height: 1.6;
}

.content-modal__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
}

.content-modal__thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    background: #0b1020;
    cursor: pointer;
}

.content-modal__thumb.is-active {
    border-color: #22d3ee;
}

.content-modal__thumb img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.content-modal__empty {
    text-align: center;
    color: rgba(226, 232, 240, 0.8);
    margin: 0;
}

.content-modal__empty--gallery {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 200px;
}

.content-modal__loading {
    margin: 0;
    color: #e2e8f0;
}

@media (max-width: 960px) {
    .content-modal__body {
        grid-template-columns: 1fr;
    }
}

body.content-modal-open {
    overflow: hidden;
}
