:root {
    --bg: #0e0f13;
    --panel: #181a21;
    --panel-2: #20232c;
    --text: #e8eaf0;
    --muted: #8a91a3;
    --line: #2a2e3a;
    --accent: #ff5a5f;
    --senkuro-red: #ff5a5f;
    --good: #38d878;
}

.stack-form {
    display: grid;
    gap: 10px;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}

.stack-form label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.stack-form input {
    width: 100%;
}

.stack-form button {
    width: 100%;
    min-height: 44px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    font-size: 15px;
}

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 8%, rgba(47, 214, 154, .08), transparent 30%),
        radial-gradient(circle at 45% 35%, rgba(80, 119, 255, .07), transparent 28%),
        #090c15;
}

.auth-page::before,
.auth-page::after {
    display: none;
}

.auth-shell {
    min-height: 100vh;
    width: min(100% - 28px, 420px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 32px 0;
}

.auth-card {
    width: 100%;
    padding: 30px 28px 28px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(24, 27, 38, .94), rgba(16, 18, 28, .96));
    box-shadow:
        0 28px 70px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .04);
}

.auth-logo {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 29px;
    font-weight: 900;
    background: linear-gradient(135deg, #835cf6, #16b9d8);
    box-shadow: 0 12px 32px rgba(23, 177, 216, .25);
}

.auth-card h1 {
    margin: 0;
    color: #f4f6fb;
    font-size: 20px;
    line-height: 1.2;
    text-align: center;
    letter-spacing: .02em;
}

.auth-subtitle {
    margin: 8px 0 20px;
    color: #8e98ad;
    font-size: 13px;
    text-align: center;
}

.auth-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin-bottom: 14px;
    border: 0;
    border-radius: 0;
    background: none;
    overflow: visible;
}

.auth-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    box-shadow: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
}

.auth-tab.is-active {
    color: var(--text);
    background: rgba(56, 216, 120, .16);
    border-color: rgba(56, 216, 120, .42);
}

.auth-form {
    display: none;
    gap: 9px;
}

.auth-form.is-active {
    display: grid;
}

.auth-form label {
    margin-top: 1px;
    color: #9aa3b7;
    font-size: 12px;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .035);
    color: #f5f7fb;
    outline: none;
}

.auth-form input:focus {
    border-color: rgba(74, 163, 255, .65);
    box-shadow: 0 0 0 3px rgba(74, 163, 255, .12);
}

.auth-form button {
    width: 100%;
    min-height: 42px;
    margin-top: 2px;
    border-radius: 7px;
    background: linear-gradient(90deg, #805cf6, #16b9d8);
    box-shadow: 0 12px 28px rgba(22, 185, 216, .15);
}

.auth-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 9px;
    border: 1px solid rgba(70, 123, 255, .10);
    background: rgba(28, 43, 72, .36);
    color: #9cc7ff;
    font-size: 12px;
    line-height: 1.55;
}

.auth-back {
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    color: #8d96aa;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.auth-back:hover {
    color: #fff;
}

.product-dialog .auth-shell,
.product-modal-panel.auth-shell {
    min-height: auto;
    width: min(100%, 420px);
    padding: 0;
}

.product-dialog .auth-card,
.product-modal-panel.auth-shell .auth-card {
    box-shadow: none;
}

.verify-code {
    margin: 18px 0;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(47, 214, 154, .35);
    background: linear-gradient(135deg, rgba(46, 144, 250, .18), rgba(47, 214, 154, .14));
    color: #fff;
    font-size: clamp(28px, 7vw, 52px);
    font-weight: 1000;
    letter-spacing: .12em;
    text-align: center;
}

.verify-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 14px 0;
}

.verify-check-form {
    margin: 0;
    flex: 1;
}

.verify-check-form button {
    width: 100%;
    min-height: 44px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    font-size: 15px;
}

.verify-actions .page-btn {
    flex: 1;
    min-height: 44px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    font-size: 15px;
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at top, #14161d 0%, #0e0f13 60%) fixed,
        radial-gradient(circle at 88% 4%, rgba(255, 90, 95, .22), transparent 8rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    left: 50%;
    top: 50%;
    width: 1120px;
    max-width: 105vw;
    max-height: 105vw;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: url("/static/senkuro-bg-yinyang.svg") center / contain no-repeat;
    opacity: .025;
    filter: blur(1px);
    pointer-events: none;
    z-index: 0;
    animation: dao-yinyang-spin 120s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    top: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: url("/static/senkuro-bg-yinyang.svg") center / contain no-repeat;
    filter: drop-shadow(0 0 8px rgba(255, 90, 95, .30));
    pointer-events: none;
    z-index: 5;
    animation: dao-yinyang-mini-spin 18s linear infinite, dao-yinyang-mini-pulse 4s ease-in-out infinite;
}

@keyframes dao-yinyang-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes dao-yinyang-mini-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

@keyframes dao-yinyang-mini-pulse {
    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(255, 90, 95, .30));
    }

    50% {
        filter: drop-shadow(0 0 18px rgba(255, 90, 95, .55));
    }
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 38px;
}

.shell.is-updating {
    opacity: .72;
    pointer-events: none;
    transition: opacity .18s ease;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(24, 26, 33, .96), rgba(16, 17, 22, .94));
    box-shadow: 0 22px 70px rgba(0, 0, 0, .28);
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo {
    width: clamp(64px, 10vw, 92px);
    height: clamp(64px, 10vw, 92px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .16);
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, .035),
        0 18px 35px rgba(0, 0, 0, .35);
}

.eyebrow {
    margin: 0 0 8px;
    color: #ff5b6c;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 64px);
    line-height: .95;
}

.hero .brand h1 {
    font-size: clamp(30px, 4.6vw, 52px);
}

.subtitle {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.telegram,
.buy,
.page-btn,
button {
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #2f81f7, #37c77f);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.telegram {
    padding: 13px 17px;
    white-space: nowrap;
}

.account {
    display: grid;
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
        rgba(24, 26, 33, .78);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.account-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.account-user .account-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--text);
}

.account-user span {
    color: var(--muted);
    white-space: nowrap;
}

.account-roles {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.account-user .account-roles .role-badge {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .34);
}

.role-badge {
    --role-color: #38bdf8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 21px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--role-color) 72%, white 12%);
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
    vertical-align: middle;
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .42), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--role-color) 92%, white 8%), color-mix(in srgb, var(--role-color) 70%, black 10%));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .30),
        0 0 14px color-mix(in srgb, var(--role-color) 55%, transparent),
        0 5px 14px rgba(0, 0, 0, .22);
}

.account-actions {
    display: grid;
    align-items: center;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: none;
}

.account a {
    margin-left: 0;
}

.account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
    line-height: 1.15;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, filter .16s ease;
}

.admin-top-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}

.admin-top-nav .page-btn {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}

.account-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .22);
    filter: brightness(1.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.account-btn-wheel {
    background: linear-gradient(135deg, rgba(147, 92, 246, .95), rgba(45, 142, 255, .88));
}

.account-btn-contribute {
    background: linear-gradient(135deg, rgba(255, 184, 76, .95), rgba(52, 199, 171, .88));
}

.account-btn-course {
    background: linear-gradient(135deg, rgba(45, 142, 255, .92), rgba(122, 92, 246, .88));
}

.account-btn-admin {
    background: linear-gradient(135deg, rgba(255, 90, 95, .92), rgba(147, 92, 246, .88));
}

.account-btn-logout {
    background: rgba(255, 90, 95, .10);
    color: #ffb3b7;
    border-color: rgba(255, 90, 95, .30);
}

.muted {
    color: var(--muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 14px 0;
}

/* Passive info cards — deliberately NOT bordered so they don't read as
   clickable inputs/buttons (the promo/search fields use borders + pills). */
.stats div {
    padding: 16px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
}

.stats b {
    display: block;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.01em;
}

.stats span {
    color: var(--muted);
    font-size: 13px;
}

.search {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

/* Поиск в стиле чипов фильтров (Тип/Ранг) */
.search .search-field input {
    min-height: 46px;
    padding: 10px 18px;
    padding-right: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    font-size: 15px;
}

.search .search-field input:focus {
    border-color: rgba(56, 216, 120, .42);
    background: rgba(255, 255, 255, .06);
}

.search > button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 46px;
    /* асимметричный padding: оптическая центровка текста (Segoe UI/Inter садят текст выше центра) */
    padding: 12px 22px 8px;
    border: 1px solid rgba(56, 216, 120, .42);
    border-radius: 999px;
    background: rgba(56, 216, 120, .16);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: none;
}

.search > button[type="submit"]:hover {
    background: rgba(56, 216, 120, .24);
}

.promo-form {
    display: flex;
    gap: 10px;
    margin: 12px 0 0;
}

.promo-form input {
    max-width: 260px;
}

input,
select,
textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: rgba(24, 26, 33, .92);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}

select {
    cursor: pointer;
}

input[type="color"] {
    min-height: 52px;
    padding: 6px;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 12px;
}

button {
    padding: 0 22px;
    font-size: 15px;
}

/* Блок фильтров — одна общая карточка в стиле статистики сверху
   (.stats div): без рамки, с мягким градиентом. Группы внутри — слитно. */
.filters {
    display: grid;
    gap: 14px;
    margin: 14px 0;
    padding: 16px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
}

.filter-group {
    padding: 0;
    border: 0;
    background: none;
}

.filter-group .chips {
    margin-bottom: 0;
}

.filter-title {
    margin: 2px 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.chip.active {
    background: rgba(56, 216, 120, .16);
    color: var(--text);
    border-color: rgba(56, 216, 120, .42);
}

.grid {
    display: grid;
    /* Adaptive columns: cards keep a sane width (~190-240px) instead of stretching to
       5 huge columns on wide monitors. ~5 across on a laptop, more on 4K, never giant.
       auto-fill (not auto-fit) leaves empty tracks so a lone card doesn't blow up. */
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.card {
    position: relative;
    /* Flex column so the image sits on top and the body fills the rest of the (equal)
       card height — lets the action row pin to the bottom and line up across the row. */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(32, 35, 44, .96), rgba(18, 20, 26, .96));
    box-shadow: 0 12px 32px rgba(0, 0, 0, .20);
}

.image-wrap {
    position: relative;
    display: grid;
    place-items: center;
    /* Frame follows the portrait card art (~2:3). Height is derived from the card width,
       so the image scales with the column instead of being locked to a short fixed band. */
    flex: 0 0 auto;
    aspect-ratio: 2 / 3;
    padding: 4px 0 0;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
}

.image-wrap.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, .10), transparent),
        linear-gradient(120deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
    background-size: 220% 100%, 100% 100%;
    animation: dao-skeleton 1.1s ease-in-out infinite;
    z-index: 0;
}

@keyframes dao-skeleton {
    0% { background-position: 120% 0, 0 0; }
    100% { background-position: -120% 0, 0 0; }
}

.image-link {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.image-wrap img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    border-radius: 14px;
    opacity: 0;
    transition: opacity .22s ease;
}

/* Card art is portrait (~2:3). The frame keeps that aspect ratio (from .image-wrap) and
   the image uses object-fit: contain, so the whole card is visible — no vertical cropping
   (previously a fixed 220px "cover" band cut the portrait in half) and no side gutters,
   since the frame matches the art's proportions. The frame scales with column width. */
@media (min-width: 681px) {
    .grid .card > .image-wrap {
        padding: 0;
    }

    .grid .card > .image-wrap .image-link > img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
        object-position: center;
        border-radius: 0;
    }

    /* Shards: the fracture frame fills the same box so the crack overlay stays aligned. */
    .grid .card > .image-wrap.shard-fracture .shard-photo-frame {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .grid .card > .image-wrap.shard-fracture .shard-photo-frame > img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        border-radius: 0;
    }
}

.shard-photo-frame {
    position: relative;
    display: inline-grid;
    place-items: center;
    line-height: 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: 14px;
}

.shard-photo-frame > img {
    grid-area: 1 / 1;
}

.shard-fracture-line {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: .98;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .5));
}

.shard-fracture-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.buy-shard-frame {
    display: inline-block;
    justify-self: center;
    align-self: center;
    width: auto;
    height: auto;
    max-width: 100%;
    overflow: hidden;
    contain: layout paint;
}

.image-wrap img.is-loaded,
.image-wrap:not(.is-loading) img {
    opacity: 1;
}

.image-wrap.is-error::after {
    content: "Не удалось загрузить фото";
    position: absolute;
    inset: auto 10px 12px;
    z-index: 2;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.no-image {
    color: var(--muted);
    font-weight: 800;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px 12px 12px;
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.between {
    justify-content: space-between;
}

.badge,
.type {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.type {
    color: var(--muted);
    background: rgba(255, 255, 255, .05);
}

.removal-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(245, 158, 11, .18);
    border: 1px solid rgba(245, 158, 11, .38);
    color: #fde68a;
    font-size: 12px;
    font-weight: 900;
}

.rank-f { background: rgba(220, 226, 235, .18); }
.rank-d { background: rgba(34, 197, 94, .22); }
.rank-c { background: rgba(59, 130, 246, .22); }
.rank-b { background: rgba(168, 85, 247, .23); }
.rank-a { background: rgba(249, 115, 22, .24); }
.rank-s { background: rgba(239, 68, 68, .24); }

h3 {
    margin: 10px 0 4px;
    font-size: 15px;
    line-height: 1.25;
}

h3 a:hover {
    color: #ffb8ba;
}

.favorite-form {
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 2;
}

/* Колокольчик виден на любой обложке (лёгкая тёмная подложка + чёткая иконка),
   но компактный, чтобы не перетягивать внимание. Подсвечивается на ховере и когда карточка в вишлисте. */
.favorite-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(12, 14, 20, .55);
    color: rgba(255, 255, 255, .9);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .3);
    font-size: 16px;
    line-height: 1;
    opacity: 1;
    backdrop-filter: blur(6px);
    transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.favorite-btn:hover {
    color: #ff9a9e;
    background: rgba(255, 90, 95, .2);
    border-color: rgba(255, 90, 95, .5);
    transform: scale(1.06);
}

.favorite-btn.active {
    color: #ff7b82;
    background: rgba(255, 90, 95, .18);
    border-color: rgba(255, 90, 95, .46);
}

.favorite-btn.active:hover {
    background: rgba(255, 90, 95, .24);
}

.card {
    position: relative;
}

.card-subtitle {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
}

.card-subtitle.large {
    margin-top: -8px;
    font-size: 15px;
}

.pretty-meta {
    align-items: center;
    gap: 8px;
}

.pretty-meta .rank-dot,
.pretty-meta .type {
    min-height: 26px;
    padding: 5px 10px;
    border-radius: 999px;
}

.profile-senkuro-card .card-subtitle {
    min-height: 0;
    margin-top: 4px;
    margin-bottom: 10px;
    line-height: 1.45;
    font-size: 14px;
    letter-spacing: -.01em;
}

.profile-senkuro-card .card-body {
    gap: 6px;
}

.profile-senkuro-card h3 {
    margin-bottom: 0;
}

.meta {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 14px;
}

.actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    /* Pin to the bottom of the card body so buttons line up across the row regardless of
       how many lines the title/subtitle take. padding-top keeps a gap when content is tall. */
    margin-top: auto;
    padding-top: 10px;
}

.cart-form {
    display: grid;
    gap: 14px;
}

.cart-drawer {
    position: fixed;
    left: 50%;
    bottom: 18px;
    width: min(520px, calc(100% - 28px));
    max-height: min(44vh, 360px);
    transform: translateX(-50%) translateY(calc(100% + 34px));
    display: grid;
    gap: 9px;
    padding: 11px;
    border: 1px solid rgba(255, 90, 95, .34);
    border-radius: 20px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 90, 95, .16), transparent 20rem),
        rgba(24, 26, 33, .94);
    box-shadow: 0 18px 58px rgba(0, 0, 0, .48);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
}

.cart-drawer.cart-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cart-drawer-head b {
    display: block;
    font-size: 16px;
}

.cart-drawer-head span,
.cart-empty {
    color: var(--muted);
    font-size: 12px;
}

.cart-clear,
.cart-remove {
    min-height: 0;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    box-shadow: none;
}

.cart-clear {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 13px;
}

.cart-clear:hover,
.cart-remove:hover {
    border-color: rgba(255, 90, 95, .48);
    color: var(--text);
    background: rgba(255, 90, 95, .08);
}

.cart-list {
    display: grid;
    gap: 6px;
    overflow: auto;
    max-height: 210px;
    padding-right: 2px;
}

.cart-total {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.cart-total-bad {
    border-color: rgba(248, 113, 113, .42);
    color: #fecaca;
    background: rgba(248, 113, 113, .11);
}

.cart-row {
    display: grid;
    grid-template-columns: 1fr 66px 32px;
    gap: 7px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
}

.cart-row-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cart-row-main b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.cart-row-main span {
    color: var(--muted);
    font-size: 11px;
}

.cart-row input[type="number"] {
    min-height: 32px;
    padding: 0 8px;
    border-radius: 11px;
    text-align: center;
    font-weight: 900;
}

.cart-remove {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 11px;
    font-size: 18px;
}

.cart-submit {
    min-height: 38px;
    padding: 0 24px;
    border-radius: 14px;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(47, 129, 247, .18);
}

.add-cart-btn.added {
    background: linear-gradient(135deg, #22c55e, #37c77f);
}

.cart-shake {
    animation: cart-shake .34s ease;
}

@keyframes cart-shake {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    25% {
        transform: translateX(calc(-50% - 8px)) translateY(0);
    }

    75% {
        transform: translateX(calc(-50% + 8px)) translateY(0);
    }
}

.buy,
.link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
}

.link {
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--muted);
    font-weight: 800;
}

.empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.narrow {
    width: min(860px, calc(100% - 28px));
}

.small h1 {
    font-size: clamp(28px, 5vw, 46px);
}

.center {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(24, 26, 33, .78);
    margin-bottom: 16px;
}

.form-section-title {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .02em;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}

.buy-panel {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(420px, 1fr);
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(24, 26, 33, .88);
}

.product-panel {
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 90, 95, .16), transparent 22rem),
        rgba(24, 26, 33, .88);
}

.buy-image {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 380px;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
}

.product-panel .buy-image {
    height: clamp(440px, 52vh, 560px);
    background:
        radial-gradient(circle at center, rgba(255, 90, 95, .08), transparent 20rem),
        rgba(255, 255, 255, .045);
}

.buy-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 420px;
    object-fit: contain;
}

.product-panel .buy-image img {
    max-height: min(440px, calc(100% - 36px));
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .36));
}

.product-panel .buy-shard-frame > img {
    width: auto;
    max-width: 100%;
    height: 420px;
    max-height: min(440px, calc(100% - 36px));
}

.product-dialog {
    width: min(980px, calc(100vw - 28px));
    max-height: min(88vh, 820px);
    padding: 0;
    border: 1px solid rgba(72, 211, 173, .36);
    border-radius: 28px;
    background: rgba(17, 19, 25, .78);
    color: var(--text);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .55);
    overflow: hidden;
}

.product-dialog.is-auth-dialog {
    width: min(450px, calc(100vw - 28px));
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.product-dialog.is-auth-dialog .product-dialog-body {
    padding: 0;
}

.product-dialog::backdrop {
    background: rgba(3, 5, 10, .64);
}

.product-dialog-body {
    max-height: min(88vh, 820px);
    overflow: auto;
    padding: 18px;
}

.product-dialog-body.is-modal-loading {
    opacity: .72;
    pointer-events: none;
}

.product-dialog .product-panel {
    border: 0;
    padding: 0;
    background: transparent;
}

.product-dialog .shell {
    width: 100%;
    padding: 0;
}

.product-dialog .shell.narrow {
    width: 100%;
}

.product-dialog .hero {
    margin-top: 0;
}

.product-dialog .buy-image {
    border: 1px solid rgba(255, 255, 255, .08);
}

.product-dialog-close {
    position: absolute;
    z-index: 5;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(15, 17, 23, .82);
    color: var(--text);
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .36);
}

.product-modal-loading {
    display: grid;
    place-items: center;
    min-height: 260px;
    color: var(--muted);
    font-weight: 900;
}

body.modal-open {
    overflow: hidden;
}

.course-panel {
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 12% 0%, rgba(47, 129, 247, .16), transparent 22rem),
        radial-gradient(circle at 100% 100%, rgba(55, 199, 127, .14), transparent 24rem),
        rgba(18, 20, 27, .84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 80px rgba(0, 0, 0, .28);
}

.course-panel h1 {
    margin-bottom: 18px;
    font-size: clamp(34px, 5vw, 56px);
}

.course-text {
    white-space: pre-wrap;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 20px;
    background: rgba(5, 8, 14, .34);
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.course-editor {
    width: 100%;
    min-height: 360px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(10, 13, 20, .72);
    color: var(--text);
    resize: vertical;
    line-height: 1.55;
}

.course-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.course-block {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 22px;
    background: rgba(255, 255, 255, .045);
}

.course-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.course-block-head h3 {
    margin: 0;
    font-size: 20px;
}

.course-block-head span {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.course-types {
    display: grid;
    gap: 12px;
}

.course-type-title {
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 900;
}

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

.course-rank {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 14px;
    background: rgba(5, 8, 14, .38);
}

.course-rank span {
    color: var(--muted);
    font-weight: 800;
}

.course-rank b {
    white-space: nowrap;
}

.course-rank.disabled {
    opacity: .45;
}

.buy-info h1 {
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.05;
    margin-bottom: 18px;
}

.product-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0;
}

.product-facts > span {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
}

.product-facts b {
    color: var(--text);
}

.seller-fact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.seller-roles {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.seller-roles .role-badge {
    min-height: 20px;
    padding: 0 9px;
    font-size: 11px;
}

.chips .role-badge,
.admin-user-main .role-badge,
.account-user .role-badge {
    margin-left: 4px;
}

.account-user .role-badge {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .34);
}

.detail-favorite-form {
    margin: 8px 0 0;
}

.offers-panel {
    margin: 14px 0 4px;
}

.offers-panel h2 {
    margin: 0 0 10px;
    font-size: 16px;
}

.offer-list {
    display: grid;
    gap: 8px;
}

.offer-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
}

.offer-card:has(input:checked) {
    border-color: rgba(56, 216, 120, .55);
    background: rgba(56, 216, 120, .09);
}

.offer-card input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #38d878;
}

.offer-main {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.offer-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.offer-withdraw-btn {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 12px;
}

.detail-favorite {
    width: fit-content;
    min-height: 38px;
    padding: 0 14px;
}

.detail-favorite.active {
    color: #ffb8ba;
    border-color: rgba(255, 90, 95, .48);
    background: rgba(255, 90, 95, .12);
}

.buy-form {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.switch-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
}

.switch-line input {
    width: 18px;
    height: 18px;
}

.buy-form label {
    color: var(--muted);
    font-weight: 800;
}

.buy-form button {
    min-height: 48px;
}

.buy-form textarea {
    resize: vertical;
    min-height: 150px;
}

.error {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, .45);
    border-radius: 16px;
    background: rgba(248, 113, 113, .13);
    color: #fecaca;
    font-weight: 800;
}

.success {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid rgba(56, 216, 120, .45);
    border-radius: 16px;
    background: rgba(56, 216, 120, .13);
    color: #bbf7d0;
    font-weight: 800;
}

.warning {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid rgba(251, 191, 36, .45);
    border-radius: 16px;
    background: rgba(251, 191, 36, .12);
    color: #fde68a;
    font-weight: 800;
}

.copy-box {
    display: grid;
    gap: 10px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid rgba(47, 129, 247, .34);
    border-radius: 18px;
    background: rgba(47, 129, 247, .09);
}

.copy-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.copy-box code {
    display: block;
    overflow-wrap: anywhere;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .22);
    color: #dbeafe;
}

.full {
    grid-column: 1 / -1;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.admin-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(24, 26, 33, .82);
    font-size: 18px;
    font-weight: 900;
}

.admin-card span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.owner-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 78% 10%, rgba(154, 92, 246, .18), transparent 26%),
        radial-gradient(circle at 48% 42%, rgba(109, 63, 205, .18), transparent 34%),
        linear-gradient(135deg, #11101d 0%, #0b0d16 52%, #100b18 100%);
}

.owner-app {
    width: min(100% - 24px, 1280px);
    min-height: calc(100vh - 28px);
    margin: 14px auto;
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 16px;
    color: var(--text);
}

.owner-sidebar {
    position: sticky;
    top: 14px;
    height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 12px;
    border: 1px solid rgba(171, 126, 255, .24);
    border-radius: 22px;
    background: rgba(31, 22, 55, .72);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    backdrop-filter: blur(18px);
}

.owner-logo,
.owner-sidebar a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    color: #f4efff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 900;
}

.owner-logo {
    margin-bottom: 18px;
    background: linear-gradient(135deg, #7c4dff, #21d3c2);
    box-shadow: 0 12px 32px rgba(124, 77, 255, .32);
}

.owner-sidebar a:hover {
    background: rgba(124, 77, 255, .24);
}

.owner-main {
    display: grid;
    gap: 16px;
}

.owner-hero,
.owner-panel,
.owner-stats,
.owner-status,
.owner-action,
.owner-log {
    border: 1px solid rgba(255, 255, 255, .10);
    background:
        linear-gradient(180deg, rgba(43, 35, 74, .76), rgba(23, 24, 38, .78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    backdrop-filter: blur(18px);
}

.owner-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 170px;
    padding: 30px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(42, 32, 77, .92), rgba(23, 27, 45, .86)),
        radial-gradient(circle at 90% 22%, rgba(245, 100, 210, .16), transparent 34%);
}

.owner-hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: .95;
    letter-spacing: -.05em;
}

.owner-hero-status {
    min-width: 260px;
    display: grid;
    gap: 10px;
}

.owner-status {
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 900;
}

.owner-status.on {
    border-color: rgba(56, 216, 120, .34);
    color: #baf7d1;
}

.owner-status.off {
    border-color: rgba(255, 90, 95, .38);
    color: #ffb3b6;
}

.owner-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 24px;
}

.owner-stats div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .055);
}

.owner-stats b {
    display: block;
    font-size: 26px;
    line-height: 1;
}

.owner-stats span,
.owner-metrics span,
.owner-log span,
.owner-log small {
    color: var(--muted);
}

.owner-dashboard {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
}

.owner-wide {
    grid-column: 1 / -1;
}

.owner-panel {
    padding: 22px;
    border-radius: 24px;
}

.owner-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.owner-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.owner-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.owner-action {
    min-height: 118px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.owner-action:hover {
    transform: translateY(-2px);
    border-color: rgba(154, 92, 246, .54);
    background: linear-gradient(135deg, rgba(124, 77, 255, .22), rgba(33, 211, 194, .11));
}

.owner-action b {
    font-size: 24px;
}

.owner-action span {
    font-size: 18px;
    font-weight: 950;
}

.owner-action small {
    color: var(--muted);
    font-weight: 700;
}

.owner-metrics {
    display: grid;
    gap: 10px;
}

.owner-metrics span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .055);
}

.owner-metrics b {
    color: var(--text);
}

.owner-token-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.owner-token-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.owner-token-form button {
    grid-column: 1 / -1;
    min-height: 48px;
    border-radius: 16px;
}

.owner-logs {
    display: grid;
    gap: 10px;
}

.owner-log {
    display: grid;
    gap: 5px;
    padding: 13px;
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
}

.owner-log-bad {
    border-color: rgba(255, 90, 95, .28);
}

.owner-log-ok {
    border-color: rgba(46, 213, 115, .28);
}

.owner-log small {
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.owner-empty {
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, .12);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(24, 26, 33, .78);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

small {
    color: var(--muted);
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
}

.rank-row button {
    min-height: 40px;
    padding: 0 14px;
}

.inline-form {
    margin: 0;
}

.inline-form button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
}

.user-actions {
    min-width: 280px;
}

.user-actions .inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin: 4px 0;
}

.user-actions .inline-form input[type="hidden"] {
    display: none;
}

.user-actions .inline-form input {
    min-width: 0;
}

.user-actions .inline-form button {
    white-space: nowrap;
}

.admin-users-grid {
    display: grid;
    gap: 10px;
}

.admin-user-card {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}

.compact-user-card {
    padding: 10px 12px;
}

.admin-users-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.admin-user-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-user-main h3 {
    margin: 0;
}

.admin-user-main span {
    color: var(--muted);
    font-weight: 800;
}

.admin-user-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.admin-user-meta span {
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(0,0,0,.12);
    color: var(--text);
    overflow-wrap: anywhere;
    font-size: 13px;
}

.admin-user-meta b {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.admin-user-details {
    margin-top: 6px;
}

.admin-user-details summary {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    color: var(--muted);
    font-weight: 900;
    cursor: pointer;
    user-select: none;
}

.admin-user-details[open] summary {
    color: var(--text);
    margin-bottom: 8px;
}

.admin-user-meta small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.admin-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: start;
}

.admin-user-actions form {
    display: grid;
    gap: 6px;
    margin: 0;
}

.admin-user-actions input {
    min-width: 0;
}

.admin-user-actions button {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 13px;
    white-space: nowrap;
}

.admin-history-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.admin-history-section {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(0,0,0,.14);
}

.admin-history-section h4 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 13px;
}

.admin-history-list {
    display: grid;
    gap: 6px;
}

.admin-history-item {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 11px;
    background: rgba(255,255,255,.035);
}

.admin-history-item b,
.admin-history-item span,
.admin-history-item small,
.admin-history-item em {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-history-item b {
    font-size: 13px;
}

.admin-history-item span {
    color: var(--text);
    font-size: 12px;
}

.admin-history-item small,
.admin-history-item em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.admin-history-item em {
    color: #ffb8b8;
}

.checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    color: var(--text);
    font-weight: 800;
}

.check-card input {
    width: 18px;
    height: 18px;
    accent-color: #ff5570;
}

.admin-permissions-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.admin-permissions-form button,
.soft-danger {
    min-height: 42px;
    border-radius: 14px;
}

.inline-price-form {
    display: grid;
    grid-template-columns: minmax(100px, 180px) auto;
    gap: 8px;
    align-items: center;
}

.inline-price-form input {
    min-height: 38px;
    padding: 0 10px;
}

.inline-price-form button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
}

button.danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

button.mark-removal {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

.delete-form {
    margin: 0;
}

.delete-form button {
    width: 100%;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
}

.admin-item-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.edit-price {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .12);
    color: var(--muted);
    font-weight: 900;
}

.admin-item-actions button,
.admin-item-actions .edit-price {
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .12);
    color: var(--muted);
    box-shadow: none;
}

.admin-item-actions button:hover,
.admin-item-actions .edit-price:hover {
    background: rgba(255, 255, 255, .075);
    color: var(--text);
}

.page-btn {
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}

.page-btn.disabled {
    background: rgba(255, 255, 255, .06);
    color: #617085;
    cursor: default;
}

.wheel-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    padding: 22px;
    border: 1px solid transparent;
    border-radius: 28px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 74, 103, .16), transparent 22rem),
        radial-gradient(circle at 80% 100%, rgba(52, 199, 171, .13), transparent 22rem),
        linear-gradient(rgba(22, 25, 33, .90), rgba(22, 25, 33, .90)) padding-box,
        linear-gradient(120deg, rgba(255, 90, 95, .42), rgba(56, 216, 120, .36), rgba(47, 129, 247, .38), rgba(147, 92, 246, .34), rgba(255, 90, 95, .42)) border-box;
    background-size: auto, auto, auto, 260% 260%;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .25);
    animation: dao-wheel-shimmer 7s ease-in-out infinite;
}

@keyframes dao-wheel-shimmer {
    0% { background-position: 0 0, 0 0, 0 0, 0% 50%; }
    50% { background-position: 0 0, 0 0, 0 0, 100% 50%; }
    100% { background-position: 0 0, 0 0, 0 0, 0% 50%; }
}

.wheel-circle {
    position: relative;
    min-height: 280px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .10);
    background:
        conic-gradient(from 10deg, rgba(255, 77, 104, .35), rgba(52, 199, 171, .32), rgba(48, 145, 239, .35), rgba(255, 184, 76, .30), rgba(255, 77, 104, .35));
}

.wheel-circle::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 999px;
    border: 2px dashed rgba(255, 255, 255, .25);
    animation: dao-spin 16s linear infinite;
}

.wheel-circle span {
    position: relative;
    z-index: 1;
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(7, 10, 17, .68);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 74px;
    box-shadow: 0 0 36px rgba(52, 199, 171, .16), inset 0 0 18px rgba(255, 255, 255, .04);
}

.wheel-circle span img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, .18));
    animation: dao-wheel-icon 8s linear infinite, dao-wheel-icon-pulse 3.4s ease-in-out infinite;
}

@keyframes dao-spin {
    to { transform: rotate(360deg); }
}

@keyframes dao-wheel-icon {
    to { transform: rotate(360deg); }
}

@keyframes dao-wheel-icon-pulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .16)); }
    50% { filter: drop-shadow(0 0 22px rgba(52, 199, 171, .34)); }
}

.wheel-info {
    display: grid;
    gap: 14px;
    align-content: center;
}

.wheel-status {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
}

.wheel-ranks,
.wheel-rank-settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.wheel-rank,
.wheel-rank-setting {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
}

.wheel-rank-setting {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 150px;
    align-items: center;
    gap: 9px;
}

.wheel-weight-input {
    width: 150px;
    height: auto;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid rgba(47, 129, 247, .45);
    border-radius: 12px;
    background: rgba(8, 12, 20, .96);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.wheel-weight-input:focus {
    border-color: rgba(56, 216, 120, .80);
    box-shadow: 0 0 0 3px rgba(56, 216, 120, .14);
}

.wheel-weight-input::placeholder {
    color: rgba(255, 255, 255, .45);
}

.switch-line .wheel-weight-input {
    width: 150px;
    height: auto;
}

.wheel-rank.off {
    opacity: .45;
}

.wheel-rank b,
.wheel-rank span {
    display: block;
}

.wheel-rank span {
    color: var(--muted);
    font-size: 12px;
}

.wheel-result {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(52, 199, 171, .36);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(52, 199, 171, .14), transparent 18rem),
        rgba(52, 199, 171, .07);
}

.wheel-result-image {
    min-height: 230px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, .05);
}

.wheel-result-image img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 14px;
}

.wheel-result h2 {
    margin: 0 0 10px;
}

.inventory-form {
    display: grid;
    gap: 16px;
}

.inventory-toolbar {
    position: sticky;
    top: 10px;
    z-index: 7;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(52, 199, 171, .14), transparent 18rem),
        rgba(18, 22, 32, .92);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
}

.inventory-toolbar div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
}

.inventory-toolbar b,
.inventory-toolbar span {
    display: block;
}

.inventory-toolbar span {
    color: var(--muted);
    font-size: 12px;
}

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

.inventory-actions button {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 14px;
}

.inventory-empty-button {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
}

.inventory-toolbar > button[form="inventory-cleanup-form"] {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 184, 76, .92), rgba(255, 90, 95, .86));
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.inventory-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), transparent 45%),
        rgba(14, 26, 42, .88);
}

.inventory-card:not(.sale-card) {
    display: grid;
    grid-template-rows: auto 1fr;
}

.inventory-card.locked {
    opacity: .72;
}

.inventory-image {
    display: grid;
    place-items: center;
    height: 250px;
    background: rgba(255, 255, 255, .055);
}

.inventory-card:not(.sale-card) .inventory-image {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4.28;
    padding: 6px 6px 0;
    background: rgba(255, 255, 255, .035);
}

.inventory-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inventory-card:not(.sale-card) .inventory-image img {
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.inventory-body {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.inventory-card:not(.sale-card) .inventory-body {
    align-content: start;
    padding: 8px 10px 10px;
}

.inventory-body h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.15;
}

.sale-card .inventory-body {
    position: relative;
    z-index: 2;
    gap: 9px;
    padding: 10px;
    background: rgba(14, 18, 26, .96);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sale-card .inventory-image {
    height: auto;
    aspect-ratio: 3 / 4.35;
    padding: 8px;
    background: rgba(255, 255, 255, .035);
}

.sale-card .inventory-image img {
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.sale-price-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(96, 165, 250, .32);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, .14);
    font-size: 12px;
    font-weight: 900;
    justify-self: center;
}

.inventory-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(52, 199, 171, .40);
    border-radius: 14px;
    background: rgba(52, 199, 171, .12);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.inventory-card:not(.sale-card) .inventory-check {
    margin-top: auto;
    min-height: 34px;
    font-size: 12px;
    border-radius: 12px;
}

.inventory-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.inventory-check:has(input:checked) {
    border-color: rgba(56, 216, 120, .85);
    background: linear-gradient(135deg, rgba(47, 129, 247, .78), rgba(52, 199, 171, .86));
}

.inventory-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--muted);
    font-weight: 900;
}

.profile-list-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

.profile-mode-form[hidden] {
    display: none !important;
}

.profile-senkuro-card {
    position: relative;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-senkuro-card:has(input:focus),
.profile-senkuro-card:has(button:focus),
.profile-senkuro-card:has(a:focus) {
    cursor: default;
}

.profile-senkuro-card.selected-for-sale,
.profile-senkuro-card.selected-for-contribute {
    border-color: rgba(56, 216, 120, .95);
    box-shadow: 0 0 0 2px rgba(56, 216, 120, .26), 0 14px 34px rgba(21, 190, 115, .14);
}

.profile-selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 8;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(12, 14, 20, .72);
    color: transparent;
    font-weight: 1000;
    pointer-events: none;
    opacity: .55;
}

.profile-senkuro-card.selected-for-sale .profile-selected-badge,
.profile-senkuro-card.selected-for-contribute .profile-selected-badge {
    background: linear-gradient(135deg, #338af3, #35d087);
    color: #fff;
    opacity: 1;
    box-shadow: 0 10px 24px rgba(48, 208, 135, .22);
}

.profile-bulk-sale-form,
.profile-bulk-contribute-form {
    position: sticky;
    top: 12px;
    z-index: 20;
    margin: 12px 0 16px;
    padding: 10px;
    border: 1px solid rgba(56, 216, 120, .35);
    border-radius: 18px;
    background: rgba(15, 29, 26, .82);
    backdrop-filter: blur(14px);
}

.profile-bulk-sale-form[hidden],
.profile-bulk-contribute-form[hidden] {
    display: none !important;
}

.profile-bulk-sale-form button,
.profile-bulk-contribute-form button {
    width: 100%;
    min-height: 42px;
    border-radius: 14px;
}

.profile-list-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 6px;
}

.profile-list-inputs.single {
    grid-template-columns: 1fr;
}

.profile-list-price-badge {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    border: 1px solid rgba(47, 139, 255, .55);
    border-radius: 999px;
    background: rgba(24, 45, 82, .72);
    color: #eaf4ff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.profile-list-form input {
    min-height: 36px;
    padding: 0 9px;
    width: 100%;
}

.profile-list-form button,
.ghost-btn {
    min-height: 36px;
    border-radius: 13px;
}

.profile-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(24, 26, 33, .72);
}

.profile-mode-tabs button {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
}

.profile-mode-tabs button.active {
    border-color: rgba(56, 216, 120, .75);
    background: linear-gradient(135deg, #338af3, #35d087);
    color: #fff;
    box-shadow: 0 10px 28px rgba(47, 168, 255, .18);
}

.ghost-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 7px;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
}

.profile-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(24, 26, 33, .72);
}

.profile-tools input {
    min-height: 46px;
}

.profile-tools .chips {
    margin: 0;
    justify-content: flex-end;
}

.profile-tools .chip {
    cursor: pointer;
}

.profile-tools .chip.active {
    border-color: rgba(56, 216, 120, .75);
    background: rgba(39, 176, 105, .24);
    color: #fff;
}

.profile-contribute-panel {
    display: grid;
    grid-template-columns: minmax(220px, .75fr) minmax(260px, 1.25fr);
    gap: 16px;
    align-items: start;
    margin: 16px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 0%, rgba(89, 63, 220, .18), transparent 34%),
        rgba(24, 26, 33, .72);
}

.profile-contribute-panel h2 {
    margin: 4px 0 8px;
}

.profile-contribute-form {
    display: grid;
    gap: 12px;
}

.profile-contribute-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.profile-contribute-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-contribute-form button {
    min-height: 48px;
    border-radius: 16px;
}


@media (min-width: 681px) and (max-width: 1200px) {
    .account-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body::after {
        display: none;
    }

    .owner-app {
        width: min(100% - 14px, 680px);
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 7px auto 24px;
    }

    .owner-sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        justify-content: center;
        padding: 10px;
        border-radius: 18px;
    }

    .owner-logo,
    .owner-sidebar a {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 17px;
    }

    .owner-logo {
        margin: 0;
    }

    .owner-hero {
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        border-radius: 22px;
    }

    .owner-hero h1 {
        font-size: clamp(38px, 12vw, 58px);
    }

    .owner-hero-status {
        min-width: 0;
    }

    .owner-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 18px;
    }

    .owner-stats div {
        padding: 13px;
        border-radius: 15px;
    }

    .owner-stats b {
        font-size: 22px;
    }

    .owner-dashboard,
    .owner-actions {
        grid-template-columns: 1fr;
    }

    .owner-panel {
        padding: 16px;
        border-radius: 18px;
    }

    .owner-panel-title {
        align-items: stretch;
        flex-direction: column;
    }

    .owner-action {
        min-height: auto;
        padding: 14px;
    }

    .shell {
        width: min(100% - 12px, 1180px);
        padding-top: 8px;
        padding-bottom: 24px;
    }

    .hero {
        gap: 12px;
        padding: 18px;
        border-radius: 22px;
    }

    .brand {
        gap: 12px;
    }

    .logo {
        width: 72px;
        height: 72px;
        box-shadow:
            0 0 0 6px rgba(255, 255, 255, .035),
            0 12px 25px rgba(0, 0, 0, .32);
    }

    .hero .brand h1 {
        font-size: clamp(34px, 10vw, 50px);
    }

    .hero,
    .search,
    .promo-form {
        flex-direction: column;
        align-items: stretch;
    }

    .promo-form input {
        max-width: none;
    }

    .verify-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .verify-actions .page-btn {
        width: 100%;
        text-align: center;
    }

    .profile-tools {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .profile-contribute-panel {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .profile-contribute-row {
        grid-template-columns: 1fr;
    }

    .profile-tools .chips {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-content: stretch;
    }

    .profile-tools .chip:first-child {
        grid-column: 1 / -1;
    }

    .profile-list-inputs {
        grid-template-columns: minmax(0, 1fr) 74px;
        gap: 6px;
    }

    .brand {
        align-items: center;
    }

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

    .account {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 9px;
        padding: 10px;
        border-radius: 18px;
    }

    .account-user {
        justify-content: space-between;
        width: 100%;
        font-size: 13px;
    }

    .account-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: none;
        gap: 8px;
    }

    .account-btn {
        width: 100%;
        min-height: 42px;
        padding: 0 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .promo-form,
    .search,
    .stats {
        margin: 10px 0;
    }

    .stats div,
    .filters,
    .panel {
        border-radius: 18px;
        padding: 13px;
    }

    .admin-top-nav {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 10px 0 12px;
    }

    .admin-top-nav .page-btn {
        min-height: 42px;
        padding: 10px;
        font-size: 13px;
    }

    .center {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
        width: 100%;
    }

    .center .page-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: 44px;
        padding: 11px 12px;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .admin-user-meta,
    .admin-user-actions,
    .admin-history-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
        gap: 9px;
        margin: 12px 0;
    }

    .admin-card {
        min-height: auto;
        gap: 4px;
        padding: 13px 14px;
        border-radius: 16px;
        font-size: 15px;
    }

    .admin-card span {
        font-size: 12px;
        line-height: 1.25;
    }

    .admin-users-toolbar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .compact-user-card {
        padding: 12px;
        border-radius: 16px;
    }

    .admin-user-main {
        gap: 8px;
        align-items: flex-start;
    }

    .admin-user-main h3 {
        font-size: 14px;
    }

    .admin-user-main span {
        font-size: 12px;
    }

    .admin-user-meta span {
        min-height: auto;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .admin-user-actions form {
        grid-template-columns: 1fr;
    }

    .card {
        border-radius: 15px;
    }

    .image-wrap {
        aspect-ratio: auto;
        height: auto;
        padding: 4px 4px 0;
    }

    .image-wrap img {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 12px;
    }

    .shard-fracture-line {
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: .96;
        filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .32));
    }

    .buy-image.shard-fracture .shard-fracture-line {
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .card-body {
        padding: 8px;
    }

    .badge,
    .type {
        padding: 5px 8px;
        font-size: 11px;
    }

    h3 {
        margin: 8px 0 3px;
        font-size: 13px;
        line-height: 1.2;
    }

    .card-subtitle {
        margin-bottom: 8px;
        font-size: 11px;
    }

    .meta {
        gap: 4px;
        font-size: 12px;
    }

    .actions {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: auto;
        padding-top: 8px;
    }

    .wheel-panel,
    .wheel-result {
        grid-template-columns: 1fr;
    }

    .wheel-panel {
        gap: 12px;
        padding: 10px;
        border-radius: 18px;
    }

    .wheel-circle {
        min-height: 148px;
        border-radius: 18px;
    }

    .wheel-circle::before {
        inset: 10px;
        border-width: 1px;
    }

    .wheel-circle span {
        width: 82px;
        height: 82px;
        font-size: 38px;
    }

    .wheel-circle span img {
        width: 52px;
        height: 52px;
    }

    .wheel-info {
        gap: 10px;
    }

    .wheel-info .product-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .wheel-info .product-facts span {
        min-height: 58px;
        padding: 10px;
        font-size: 13px;
        border-radius: 14px;
    }

    .wheel-ranks,
    .wheel-rank-settings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .wheel-rank,
    .wheel-rank-setting {
        padding: 8px 10px;
        border-radius: 14px;
    }

    .wheel-rank-setting {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 8px;
        align-items: start;
    }

    .wheel-weight-input {
        grid-column: 1 / -1;
        width: 100%;
        height: auto;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 15px;
    }

    .switch-line .wheel-weight-input {
        width: 100%;
        height: auto;
    }

    .wheel-rank-setting b,
    .wheel-rank-setting span {
        display: block;
        line-height: 1.18;
    }

    .wheel-rank-setting input[type="checkbox"] {
        margin-top: 4px;
    }

    .table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
    }

    .table-wrap table {
        min-width: 520px;
        font-size: 13px;
    }

    .table-wrap th,
    .table-wrap td {
        padding: 10px 8px;
        white-space: nowrap;
    }

    .inline-price-form {
        grid-template-columns: 1fr;
        min-width: 145px;
        gap: 6px;
    }

    .inline-price-form input {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        font-size: 14px;
    }

    .inline-price-form button {
        width: 100%;
        min-height: 40px;
        padding: 0 10px;
        font-size: 12px;
    }

    .wheel-rank b {
        font-size: 14px;
    }

    .wheel-rank span {
        font-size: 11px;
    }

    .wheel-info .buy-form {
        margin-top: 2px;
    }

    .wheel-info .buy-form button {
        min-height: 46px;
        border-radius: 16px;
    }

    .cart-drawer {
        bottom: 8px;
        width: calc(100% - 18px);
        max-height: 42vh;
        padding: 9px;
        border-radius: 18px;
    }

    .cart-list {
        max-height: 190px;
        gap: 5px;
    }

    .cart-drawer-head {
        align-items: flex-start;
    }

    .cart-drawer-head b {
        font-size: 15px;
    }

    .cart-drawer-head span,
    .cart-empty {
        font-size: 12px;
    }

    .cart-row {
        grid-template-columns: 1fr 58px 30px;
        gap: 5px;
        padding: 7px;
        border-radius: 13px;
    }

    .cart-row-main b {
        font-size: 13px;
    }

    .cart-row-main span {
        font-size: 11px;
    }

    .cart-row input[type="number"],
    .cart-remove {
        height: 30px;
        min-height: 30px;
    }

    .cart-submit {
        min-height: 38px;
        font-size: 14px;
    }

    .buy,
    .link {
        min-height: 34px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 12px;
    }

    button {
        min-height: 48px;
    }

    .buy-panel {
        grid-template-columns: 1fr;
    }

    .product-panel .buy-image {
        height: auto;
        min-height: 0;
        aspect-ratio: 3 / 4.45;
    }

    .product-panel .buy-image img {
        height: auto;
        max-height: calc(100% - 18px);
    }

    .product-panel .buy-shard-frame > img {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: calc(100% - 18px);
    }

    .product-dialog {
        width: calc(100vw - 14px);
        max-height: 86vh;
        border-radius: 22px;
    }

    .product-dialog-body {
        max-height: 86vh;
        padding: 12px;
    }

    .product-dialog-close {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .product-dialog .product-panel {
        gap: 12px;
    }

    .product-facts {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .inventory-toolbar {
        top: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 9px;
        border-radius: 18px;
    }

    .inventory-toolbar button {
        grid-column: 1 / -1;
        min-height: 44px;
    }

    .inventory-actions {
        grid-column: 1 / -1;
    }

    .inventory-actions button {
        grid-column: auto;
        font-size: 12px;
        padding: 0 8px;
    }

    .inventory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .inventory-image {
        height: 190px;
    }

    .inventory-card:not(.sale-card) .inventory-image {
        height: auto;
        aspect-ratio: 3 / 4.28;
        padding: 5px 5px 0;
    }

    .sale-card .inventory-image {
        height: auto;
        aspect-ratio: 3 / 4.35;
        padding: 5px;
    }

    .inventory-body {
        padding: 9px;
        gap: 6px;
    }

    .inventory-card:not(.sale-card) .inventory-body {
        padding: 7px 7px 8px;
    }

    .inventory-body h3 {
        font-size: 13px;
    }

    .inventory-check,
    .inventory-status {
        min-height: 36px;
        font-size: 12px;
        border-radius: 12px;
    }

    .course-panel {
        padding: 16px;
        border-radius: 22px;
    }

    .course-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .course-block {
        padding: 12px;
        border-radius: 18px;
    }

    .course-block-head {
        display: block;
    }

    .course-block-head span {
        display: block;
        margin-top: 4px;
        text-align: left;
    }

.course-ranks {
    grid-template-columns: 1fr;
    gap: 7px;
}
}

.work-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.work-status-grid > div,
.work-toggle {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .035);
    border-radius: 18px;
    padding: 14px;
}

.work-status-grid b,
.work-status-grid span,
.work-toggle b,
.work-toggle small {
    display: block;
}

.work-status-grid span,
.work-toggle small {
    color: var(--muted);
    margin-top: 4px;
}

.work-form {
    display: grid;
    gap: 12px;
}

.work-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.work-toggle input {
    width: 22px;
    height: 22px;
    accent-color: #35d087;
}

.offer-withdraw-locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, .05);
    font-weight: 800;
}

@media (max-width: 720px) {
    .work-status-grid {
        grid-template-columns: 1fr;
    }

    .owner-token-form {
        grid-template-columns: 1fr;
    }
}

/* Search clear button */
.search .search-field {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.search .search-field input {
    width: 100%;
    padding-right: 48px;
}

.search .search-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 2;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .92);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.search .search-clear:hover {
    background: rgba(255, 255, 255, .18);
}

.search .search-clear[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .search .search-field input {
        padding-right: 44px;
    }

    .search .search-clear {
        right: 8px;
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 17px;
    }
}

/* Promo clear button */
.promo-form .promo-field {
    position: relative;
    display: block;
    flex: 0 1 260px;
    min-width: 0;
}

.promo-form .promo-field input {
    width: 100%;
    max-width: none;
    padding-right: 44px;
}

.promo-form .promo-clear {
    position: absolute;
    top: 50%;
    right: 9px;
    z-index: 2;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .92);
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.promo-form .promo-clear:hover {
    background: rgba(255, 255, 255, .18);
}

.promo-form .promo-clear[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .promo-form .promo-field {
        flex-basis: auto;
        width: 100%;
    }
}



/* Notice close button */
.notice.is-dismissible,
.alert.is-dismissible,
.error.is-dismissible,
.success.is-dismissible {
    position: relative;
    padding-right: 48px;
}

.notice-close {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .92);
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.notice-close:hover {
    background: rgba(255, 255, 255, .18);
}


/* Keep profile card actions aligned when titles wrap on responsive layouts. */
.profile-senkuro-card {
    display: flex;
    flex-direction: column;
}

.profile-senkuro-card .card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.profile-senkuro-card .profile-mode-form {
    margin-top: auto;
}

.profile-senkuro-card .profile-mode-form button {
    white-space: nowrap;
}


/* === infinite scroll + back-to-top (added) === */
body.has-infinite-scroll .pagination { display: none; }

.scroll-status {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 6px;
    margin-top: 18px;
}
.scroll-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 16px;
}
.scroll-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .22);
    border-top-color: #37d18a;
    animation: scroll-spin .7s linear infinite;
    flex: 0 0 auto;
}
@keyframes scroll-spin { to { transform: rotate(360deg); } }
.scroll-end {
    color: var(--muted);
    font-size: 13px;
    padding: 8px 14px;
    text-align: center;
}
.scroll-sentinel { width: 100%; height: 1px; }

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #2f86f6, #37d18a);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .42);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.9);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.to-top:hover { filter: brightness(1.08); }
.to-top:active { transform: translateY(0) scale(.96); }
.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
body.modal-open .to-top {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}
@media (max-width: 640px) {
    .to-top { right: 14px; bottom: 14px; width: 46px; height: 46px; font-size: 21px; }
    body.cart-open .to-top.is-visible { bottom: calc(min(44vh, 360px) + 24px); }
}


/* === senkuro trade notice button (added) === */
.success .notice-actions { margin-top: 10px; }
.success .notice-actions .page-btn { width: auto; text-decoration: none; }


/* === trade confirmation popup (added) === */

.success .notice-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.success .notice-actions-label { font-weight: 800; }
.success .notice-actions .page-btn { width: auto; text-decoration: none; padding: 8px 14px; min-width: 62px; }

.trade-popup-toggle { display: none; }
.trade-popup-toggle:checked ~ .trade-popup { display: none; }
.trade-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.trade-popup-backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    background: rgba(6, 8, 12, .72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.trade-popup-card {
    position: relative;
    width: min(460px, 100%);
    padding: 26px 22px 20px;
    border-radius: 22px;
    border: 1px solid rgba(56, 216, 120, .5);
    background:
        radial-gradient(circle at 50% -10%, rgba(56, 216, 120, .18), transparent 60%),
        rgba(20, 24, 30, .98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
    text-align: center;
    animation: trade-pop .28s ease;
}
@keyframes trade-pop {
    from { opacity: 0; transform: translateY(16px) scale(.96); }
    to { opacity: 1; transform: none; }
}
.trade-popup-emoji { font-size: 42px; line-height: 1; margin-bottom: 8px; }
.trade-popup-title { font-size: 20px; font-weight: 900; color: #eafff2; margin-bottom: 10px; }
.trade-popup-text { color: #bbf7d0; font-weight: 700; font-size: 14px; line-height: 1.5; margin: 0 0 16px; }
.trade-popup-subtitle { color: var(--muted); font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.trade-popup-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.trade-popup-actions .page-btn { min-width: 92px; width: auto; text-decoration: none; }
.trade-popup-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, .08);
    color: #dfe6f2;
    font-weight: 800;
    border: 1px solid var(--line);
}
.trade-popup-dismiss:hover { background: rgba(255, 255, 255, .14); }

/* --- Вишлист + уведомления о рестоке --- */
/* Панель «Уведомления» — в том же стиле, что и карточка фильтров «Тип/Ранг»
   (.filters): без рамки, скругление 14px, мягкий градиент. */
.wishlist-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
    border: 0;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wishlist-panel .wl-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
/* Заголовок панели — как .filter-title у «Тип» и «Ранг». */
.wishlist-panel .wl-head h2 {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.wishlist-panel .wl-summary {
    color: var(--muted);
    font-size: .9rem;
}
.wishlist-panel .wl-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wishlist-panel .wl-status {
    font-weight: 700;
    font-size: .95rem;
}
.wishlist-panel .wl-status.on { color: var(--good); }
.wishlist-panel .wl-status.off { color: var(--muted); }
.wishlist-panel .wl-toggle-form { margin: 0; }
.wishlist-panel .wl-hint {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.5;
}
.wishlist-panel .wl-hint a { color: var(--accent); }
.wishlist-panel .wl-hint code {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: .85em;
}

/* Карточка «нет в наличии» в вишлисте */
.card.out-of-stock-card { opacity: .82; }
.card.out-of-stock-card .image-wrap { filter: grayscale(.35); }
.meta-stock.out-of-stock {
    color: var(--accent);
    font-weight: 700;
}
.buy.buy-disabled {
    background: var(--panel-2);
    color: var(--muted);
    border: 1px dashed var(--line);
    cursor: default;
    pointer-events: none;
}

/* Карточка «нет в магазине» в вишлисте (добавлена по ссылке Senkuro). */
.card.not-in-shop-card { opacity: .96; }
.meta-stock.not-in-shop-tag {
    color: #cdb56b;
    font-weight: 700;
}
.buy.buy-senkuro {
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    border: 1px solid var(--line);
    text-decoration: none;
}
.buy.buy-senkuro:hover {
    background: rgba(255, 255, 255, .12);
    border-color: var(--senkuro-red);
}

/* Вишлист: уведомления и форма добавления по ссылке. */
.wishlist-panel .wl-notice {
    margin: 10px 0 0;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: .86rem;
    line-height: 1.4;
}
.wishlist-panel .wl-notice-ok {
    color: var(--good);
    background: rgba(56, 216, 120, .10);
    border: 1px solid rgba(56, 216, 120, .35);
}
.wishlist-panel .wl-notice-error {
    color: #ff9a9e;
    background: rgba(255, 90, 95, .10);
    border: 1px solid rgba(255, 90, 95, .35);
}
.wishlist-panel .wl-addlink-form {
    margin: 12px 0 0;
    display: grid;
    gap: 6px;
}
.wishlist-panel .wl-addlink-label {
    font-size: .86rem;
    color: var(--muted);
    font-weight: 700;
}
.wishlist-panel .wl-addlink-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.wishlist-panel .wl-addlink-row input {
    flex: 1 1 260px;
    min-width: 0;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}
.wishlist-panel .wl-addlink-row input:focus {
    outline: none;
    border-color: rgba(56, 216, 120, .42);
    background: rgba(255, 255, 255, .06);
}

/* Кнопки панели уведомлений в стиле чипов фильтров (Тип/Ранг) */
.wishlist-panel .page-btn {
    box-sizing: border-box;
    min-height: 46px;
    /* асимметричный padding: оптическая центровка текста (Segoe UI/Inter садят текст выше центра) */
    padding: 12px 22px 8px;
    border: 1px solid rgba(56, 216, 120, .42);
    border-radius: 999px;
    background: rgba(56, 216, 120, .16);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: none;
}
.wishlist-panel .page-btn:hover {
    background: rgba(56, 216, 120, .24);
}
.wishlist-panel .wl-addlink-btn { flex: 0 0 auto; }
.wishlist-panel .wl-addlink-type {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.wishlist-panel .wl-type-option {
    cursor: pointer;
    user-select: none;
}
.wishlist-panel .wl-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.wishlist-panel .wl-type-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 16px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.wishlist-panel .wl-type-option:hover span {
    background: rgba(255, 255, 255, .10);
    color: var(--text);
}
.wishlist-panel .wl-type-option input:checked + span {
    border-color: rgba(56, 216, 120, .50);
    background: rgba(56, 216, 120, .18);
    color: var(--text);
}
.wishlist-panel .wl-type-option input:focus-visible + span {
    outline: 2px solid rgba(56, 216, 120, .35);
    outline-offset: 2px;
}
.wishlist-panel .wl-addlink-hint {
    margin: 0;
    font-size: .78rem;
    color: var(--muted);
}
.wishlist-panel .wl-bot-note {
    margin: 10px 0 0;
    font-size: .86rem;
    color: var(--muted);
    line-height: 1.4;
}
.wishlist-panel .wl-bot-note a {
    color: var(--accent);
    font-weight: 700;
}




/* Одноразовое окно согласия с курсом перед вкладом */
.course-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(4, 8, 16, .82);
    backdrop-filter: blur(12px);
}
.course-consent-card {
    width: min(560px, 100%);
    max-height: min(86vh, 680px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 24px;
    padding: 20px;
    background: #101722;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
    color: var(--text);
}
.course-consent-emoji {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(56, 216, 120, .14);
    font-size: 24px;
    margin-bottom: 10px;
}
.course-consent-card h2 {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.15;
}
.course-consent-note {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.45;
    font-size: .95rem;
}
.course-consent-scroll {
    min-height: 120px;
    max-height: 38vh;
    overflow: auto;
    margin: 0 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
}
.course-consent-text {
    white-space: pre-wrap;
    padding: 14px;
    color: var(--text);
    line-height: 1.45;
    font-size: .92rem;
}
.course-consent-form {
    flex: 0 0 auto;
    margin: 0 0 10px;
}
.course-consent-form .page-btn {
    width: 100%;
    justify-content: center;
}
.course-consent-card > .link {
    align-self: center;
    font-size: .9rem;
}
@media (max-width: 560px) {
    .course-consent-overlay { padding: 10px; align-items: flex-start; }
    .course-consent-card { max-height: calc(100vh - 20px); padding: 16px; border-radius: 20px; }
    .course-consent-scroll { max-height: 42vh; }
}


/* Ставки за лот */
.lot-bids-panel { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); }
.lot-bids-panel h2 { margin: 0 0 10px; font-size: 1rem; }
.lot-bids-list { display: grid; gap: 8px; margin-bottom: 10px; }
.lot-bid-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(0,0,0,.16); font-size: .92rem; }
.lot-bid-row small { display: block; margin-top: 3px; color: var(--muted); }
.lot-bid-accept { margin: 0; flex: 0 0 auto; }
.lot-bid-accept button, .compact-bid-form button { border: 0; border-radius: 999px; padding: 9px 14px; color: #fff; font-weight: 900; cursor: pointer; background: linear-gradient(135deg,#2f86f6,#37d18a); }
.lot-bid-create summary { cursor: pointer; color: var(--accent); font-weight: 800; margin-top: 8px; }
.compact-bid-form { margin-top: 10px; display: grid; gap: 8px; }
.compact-bid-form select, .compact-bid-form input { min-height: 42px; }
.small-empty { font-size: .9rem; }


/* Финальный аккуратный блок ставок: после покупки, без тяжёлой формы */
.product-panel .lot-bids-panel {
    margin: 10px 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.product-panel .lot-bids-panel h2 {
    margin: 0 0 6px !important;
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: .07em !important;
}
.product-panel .lot-bids-list {
    margin: 0 0 8px !important;
    display: grid !important;
    gap: 6px !important;
}
.product-panel .lot-bid-row {
    padding: 8px 10px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(255,255,255,.035) !important;
    font-size: 13px !important;
}
.product-panel .lot-bid-create {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
.product-panel .lot-bid-create summary {
    width: fit-content !important;
    min-height: 34px !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    background: rgba(56,216,120,.16) !important;
    border: 1px solid rgba(56,216,120,.45) !important;
    color: var(--text) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    list-style: none !important;
}
.product-panel .lot-bid-create summary::-webkit-details-marker { display: none !important; }
.product-panel .compact-bid-form {
    margin-top: 8px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(255,255,255,.03) !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
}
.product-panel .compact-bid-form label {
    margin: 0 !important;
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}
.product-panel .compact-bid-form label:nth-of-type(3),
.product-panel .compact-bid-form input[name="comment"],
.product-panel .compact-bid-form button { grid-column: 1 / -1 !important; }
.product-panel .compact-bid-form select,
.product-panel .compact-bid-form input {
    min-height: 38px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
}
.product-panel .compact-bid-form button {
    min-height: 40px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg,#2f86f6,#37d18a) !important;
}
.product-panel .small-empty {
    padding: 4px 0 6px !important;
    color: var(--muted) !important;
    font-size: 13px !important;
}
@media (max-width: 560px) { .product-panel .compact-bid-form { grid-template-columns: 1fr !important; } }


/* v6: ставки не ломают карточку — кнопка после покупки, пустой блок не показываем */
.product-panel .buy-form + .lot-bids-panel {
    margin-top: 10px !important;
}
.product-panel .lot-bids-panel:empty { display: none !important; }
.product-panel .lot-bids-panel {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.product-panel .lot-bid-create summary {
    display: inline-flex !important;
    width: auto !important;
    min-height: 34px !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    color: var(--text) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: none !important;
}
.product-panel .lot-bid-create[open] summary {
    border-color: rgba(56,216,120,.45) !important;
    background: rgba(56,216,120,.13) !important;
}
.product-panel .compact-bid-form {
    margin-top: 8px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    background: rgba(0,0,0,.16) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
}

/* v7: красивый блок ставок с количеством и снятием */
.product-panel .lot-bid-row {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.025)) !important;
}
.product-panel .lot-bid-row em {
    display: block !important;
    margin-top: 3px !important;
    color: var(--muted) !important;
    font-style: normal !important;
    font-size: 12px !important;
}
.product-panel .lot-bid-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.product-panel .lot-bid-action { margin: 0 !important; }
.product-panel .lot-bid-action button {
    min-height: 32px !important;
    padding: 7px 11px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg,#2f86f6,#37d18a) !important;
}
.product-panel .lot-bid-action button.soft-danger {
    background: rgba(255,82,116,.16) !important;
    color: #ff9aac !important;
    border: 1px solid rgba(255,82,116,.35) !important;
}
.product-panel .compact-bid-form {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}
.product-panel .compact-bid-form label:nth-of-type(3),
.product-panel .compact-bid-form input[name="quantity"] {
    grid-column: auto !important;
}
.product-panel .compact-bid-form label:nth-of-type(4),
.product-panel .compact-bid-form input[name="comment"],
.product-panel .compact-bid-form button {
    grid-column: 1 / -1 !important;
}
@media (max-width: 560px) {
    .product-panel .lot-bid-row { grid-template-columns: 1fr !important; }
    .product-panel .lot-bid-actions { justify-content: flex-start !important; }
}


.pretty-bid { align-items: flex-start; gap: 12px; }
.bid-main { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.bid-name { color:#f3f4f6; }
.bid-price { font-weight:800; color:#dbeafe; background:rgba(59,130,246,.14); border:1px solid rgba(96,165,250,.25); border-radius:999px; padding:4px 9px; }
.bid-qty { font-weight:700; color:#fde68a; background:rgba(245,158,11,.12); border:1px solid rgba(245,158,11,.24); border-radius:999px; padding:4px 9px; }
.lot-bid-edit { display:inline-block; }
.lot-bid-edit > summary { cursor:pointer; list-style:none; border:1px solid rgba(96,165,250,.35); border-radius:999px; padding:7px 12px; color:#bfdbfe; background:rgba(37,99,235,.14); font-weight:800; }
.lot-bid-edit > summary::-webkit-details-marker { display:none; }
.lot-bid-edit[open] { display:block; width:100%; margin-top:8px; }
.lot-bid-edit[open] > summary { display:inline-block; margin-bottom:8px; }


.lot-bid-actions { align-items:flex-start; }
.lot-bid-edit[open] { flex-basis: 100%; width: 100%; order: 10; }
.lot-bid-edit[open] > summary { margin: 8px 0; }
.bid-edit-card { width:100%; max-width: 460px; border:1px solid rgba(148,163,184,.18); border-radius:18px; padding:12px; background:rgba(15,23,42,.82); box-shadow:0 14px 34px rgba(0,0,0,.28); }
.bid-edit-form { display:flex; flex-direction:column; gap:10px; }
.bid-edit-form label { display:flex; flex-direction:column; gap:6px; margin:0; color:#aeb7c7; font-weight:800; font-size:12px; }
.bid-edit-form label span { display:block; }
.bid-edit-grid { display:grid; grid-template-columns:1fr 120px; gap:10px; }
.bid-edit-form input { width:100%; box-sizing:border-box; }
.bid-edit-form button { width:100%; margin-top:2px; }
@media (max-width: 560px) { .bid-edit-grid { grid-template-columns:1fr; } .bid-edit-card { max-width:none; } }


.lot-bid-card { border:1px solid rgba(148,163,184,.14); border-radius:18px; background:rgba(15,23,42,.32); padding:10px; margin:8px 0; }
.lot-bid-card .lot-bid-row { border:0; background:transparent; padding:0; margin:0; }
.bid-edit-toggle { border:1px solid rgba(96,165,250,.35); border-radius:999px; padding:7px 12px; color:#bfdbfe; background:rgba(37,99,235,.14); font-weight:800; cursor:pointer; }
.bid-edit-panel[hidden] { display:none !important; }
.bid-edit-panel { margin-top:10px; width:100%; max-width:100%; border-top:1px solid rgba(148,163,184,.14); padding-top:10px; }
.bid-edit-panel .bid-edit-form { display:grid; grid-template-columns:1fr; gap:10px; max-width:100%; }
.bid-edit-panel .bid-edit-grid { display:grid; grid-template-columns:minmax(0,1fr) 110px; gap:10px; }
.bid-edit-panel label { display:flex; flex-direction:column; gap:6px; margin:0; min-width:0; color:#aeb7c7; font-weight:800; font-size:12px; }
.bid-edit-panel input { width:100%; min-width:0; box-sizing:border-box; }
.bid-edit-panel button[type="submit"] { width:100%; }
@media (max-width:560px) { .bid-edit-panel .bid-edit-grid { grid-template-columns:1fr; } .lot-bid-actions { width:100%; justify-content:flex-start; } }


/* v38: restore compact v35/v34 bid row design */
.product-panel .lot-bid-row.pretty-bid {
    border: 1px solid rgba(148,163,184,.18) !important;
    background: rgba(15,23,42,.42) !important;
    border-radius: 18px !important;
    padding: 10px 12px !important;
    margin: 8px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}
.product-panel .lot-bid-actions { width: auto !important; align-items: center !important; justify-content: flex-end !important; }
.product-panel .bid-main { display:flex !important; flex-wrap:wrap !important; align-items:center !important; gap:8px !important; }


.site-closed-hero { position:relative; overflow:hidden; }
.site-closed-hero::after { content:""; position:absolute; right:-80px; top:-100px; width:280px; height:280px; border-radius:50%; background:linear-gradient(135deg, rgba(56,189,248,.25), rgba(52,211,153,.18)); filter:blur(18px); pointer-events:none; }
.closed-status-card { margin-top:18px; display:grid; gap:10px; }
.closed-status-card span { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid rgba(148,163,184,.18); border-radius:14px; background:rgba(15,23,42,.46); color:#dbeafe; font-weight:700; }
.closed-actions-panel { margin-top:16px; }
.closed-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:14px; }
.closed-actions .page-btn { min-width:160px; text-align:center; }


/* v43 closed page refresh */
.closed-shell { max-width: 820px; padding-top: 28px; }
.closed-page-card { position:relative; overflow:hidden; border:1px solid rgba(148,163,184,.22); border-radius:28px; padding:28px; background:linear-gradient(135deg, rgba(15,23,42,.94), rgba(17,24,39,.86)); box-shadow:0 24px 80px rgba(0,0,0,.35); }
.closed-glow { position:absolute; right:-90px; top:-90px; width:300px; height:300px; border-radius:999px; background:radial-gradient(circle, rgba(45,212,191,.36), rgba(59,130,246,.16), transparent 68%); filter:blur(4px); pointer-events:none; }
.closed-title-row { position:relative; display:flex; gap:18px; align-items:flex-start; margin-top:10px; }
.closed-icon { width:58px; height:58px; display:grid; place-items:center; border-radius:20px; background:linear-gradient(135deg, rgba(56,189,248,.2), rgba(52,211,153,.18)); border:1px solid rgba(125,211,252,.26); font-size:32px; flex:0 0 auto; }
.closed-page-card h1 { margin:0; font-size:clamp(34px, 6vw, 56px); line-height:.96; letter-spacing:-.04em; }
.closed-page-card .subtitle { max-width:620px; margin-top:12px; }
.closed-status-grid { position:relative; display:grid; grid-template-columns:1fr; gap:10px; margin-top:22px; }
.closed-status-grid span { padding:12px 14px; border-radius:16px; border:1px solid rgba(148,163,184,.18); background:rgba(2,6,23,.38); color:#e5eefc; font-weight:800; }
.closed-account { margin-top:14px; }
.closed-info-card { margin-top:14px; border:1px solid rgba(148,163,184,.18); border-radius:24px; padding:22px; background:rgba(15,23,42,.46); }
.closed-info-card h2 { margin-top:0; }
.closed-info-card p { color:#aeb7c7; line-height:1.55; }
.closed-actions { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:18px; }
.closed-btn { min-width:180px; text-align:center; }
.closed-btn.ghost { background:rgba(255,82,116,.16) !important; border:1px solid rgba(255,82,116,.3) !important; }
@media (max-width: 620px) { .closed-page-card { padding:22px; border-radius:22px; } .closed-title-row { flex-direction:column; } .closed-btn { width:100%; } }


/* v44: closed page matched to dark yin-yang background */
.closed-shell { max-width: 760px !important; padding-top: 38px !important; }
.closed-page-card {
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 26px !important;
    padding: 30px !important;
    background: linear-gradient(145deg, rgba(16,17,24,.92), rgba(10,11,16,.86)) !important;
    box-shadow: 0 28px 90px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.closed-glow {
    right: -120px !important;
    top: -120px !important;
    width: 320px !important;
    height: 320px !important;
    background: radial-gradient(circle, rgba(255,82,116,.22), rgba(147,51,234,.10), transparent 68%) !important;
    filter: blur(10px) !important;
    opacity: .75 !important;
}
.closed-icon {
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 0 24px rgba(255,82,116,.16) !important;
    color: #f8fafc !important;
}
.closed-page-card h1 { color:#f5f6fb !important; text-shadow:0 10px 40px rgba(0,0,0,.35); }
.closed-page-card .subtitle { color:#aeb3c2 !important; }
.closed-status-grid span {
    border: 1px solid rgba(255,255,255,.09) !important;
    background: rgba(255,255,255,.035) !important;
    color: #d8dce8 !important;
}
.closed-account,
.closed-info-card {
    border: 1px solid rgba(255,255,255,.09) !important;
    background: rgba(18,19,26,.72) !important;
    box-shadow: 0 18px 60px rgba(0,0,0,.28) !important;
}
.closed-info-card h2 { color:#f5f6fb !important; }
.closed-info-card p { color:#9ca3b4 !important; }
.closed-btn { background: linear-gradient(135deg, #ff4f73, #7c3aed) !important; border:0 !important; box-shadow:0 10px 30px rgba(255,79,115,.22) !important; }
.closed-btn.ghost { background: rgba(255,255,255,.06) !important; border:1px solid rgba(255,255,255,.12) !important; box-shadow:none !important; }
