:root {
    --bg: #020617;
    --card-bg: rgba(15, 23, 42, 0.8);
    --card-border: rgba(148, 163, 184, 0.15);
    --primary: #38bdf8;
    --primary-dark: #0ea5e9;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #a855f7;
    --accent-muted: rgba(168, 85, 247, 0.15);
}

html {
    font-size: 13px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.45;
}

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

.hidden {
    display: none !important;
}

.background-gradient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.35), transparent 55%),
        radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.25), transparent 40%);
    filter: blur(80px);
    opacity: 0.8;
    pointer-events: none;
}

.page {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    z-index: 1;
}

.page--seals {
    max-width: 1400px;
}

.page--tamer {
    max-width: 1380px;
}

.user-panel,
.admin-panel {
    position: fixed;
    top: 72px;
    width: min(232px, calc(100vw - 32px));
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(10, 18, 38, 0.96), rgba(3, 8, 24, 0.92));
    z-index: 10;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(18px);
    overflow-x: hidden;
    overflow-y: auto;
    isolation: isolate;
    max-height: calc(100vh - 84px);
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}

.user-panel {
    right: 16px;
}

.admin-panel {
    left: 16px;
}

.user-panel > *:not(.panel-orb),
.admin-panel > *:not(.panel-orb) {
    position: relative;
    z-index: 1;
}

.panel-orb {
    position: absolute;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.panel-orb--user {
    top: -56px;
    right: -52px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.9) 0%, rgba(56, 189, 248, 0) 72%);
}

.panel-orb--admin {
    top: -52px;
    left: -44px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.82) 0%, rgba(14, 165, 233, 0) 72%);
}

.theme-toggle--floating {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    font-size: 1rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.theme-toggle--page {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 18;
}

.admin-panel__toggle,
.user-panel__toggle {
    position: fixed;
    bottom: 20px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.88);
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
    z-index: 11;
    display: none;
    backdrop-filter: blur(18px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-panel__toggle {
    left: 20px;
}

.user-panel__toggle {
    right: 20px;
}

.admin-panel__toggle:hover,
.user-panel__toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.38);
}

.admin-panel__toggle.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-actions {
    display: grid;
    gap: 8px;
}

.admin-actions input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.68);
    color: var(--text);
    padding: 0.68rem 0.8rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.admin-actions .ghost-btn {
    width: 100%;
}

.admin-actions .ghost-btn--sm {
    width: auto;
}

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

.user-panel__header--session,
.admin-panel__header {
    align-items: flex-start;
}

.user-panel__header--session {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    padding-right: 38px;
    min-height: 44px;
}

.admin-panel__header {
    margin-bottom: 0.7rem;
}

.user-panel__avatar-shell {
    padding: 2px;
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(56, 189, 248, 0.95), rgba(14, 165, 233, 0.22));
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.18);
    flex-shrink: 0;
}

.user-panel__avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 23, 0.72);
    flex-shrink: 0;
}

.user-panel__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-panel__identity {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
    align-content: center;
}

.user-panel__title {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.25;
}

.user-panel__header--session .eyebrow {
    margin: 0 0 0.14rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
}

.user-panel__email {
    display: none;
}

.user-panel__stats {
    margin: 10px 0 12px;
    display: grid;
    gap: 8px;
}

.user-panel__stat {
    padding: 10px 11px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(7, 12, 28, 0.72));
    border: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    gap: 0.12rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.user-panel__stat .label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.user-panel__stat strong {
    font-size: 1.45rem;
    line-height: 1;
}

.user-panel__stat span {
    display: none;
}

.user-panel__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.user-panel__actions--logged {
    grid-template-columns: 1fr;
}

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

.user-panel__logged-copy,
.user-panel__form-head {
    padding: 0;
    background: none;
    border: none;
    display: grid;
    gap: 0;
}

.user-panel__logged-copy strong,
.user-panel__form-head strong {
    font-size: 0.88rem;
}

.user-panel__logged-copy {
    display: none;
}

.user-panel__logged-copy span,
.user-panel__form-head span {
    display: none;
}

.user-panel__actions .primary-btn,
.user-panel__actions .ghost-btn,
.user-panel__button-row .primary-btn,
.user-panel__button-row .ghost-btn {
    width: 100%;
}

.user-panel__form {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.user-panel__form .remember-field {
    width: 100%;
}

.user-panel__actions .remember-field {
    grid-column: 1 / -1;
}

.user-panel__admin {
    display: grid;
    gap: 8px;
}

.admin-panel__crest {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: linear-gradient(160deg, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.92));
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.08em;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-section {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(6, 12, 28, 0.62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.admin-section__head {
    display: grid;
    gap: 0;
}

.admin-section__head strong {
    font-size: 0.88rem;
}

.admin-section__head span {
    display: none;
}

.admin-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.admin-list__item {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 12, 32, 0.62);
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.admin-list__item::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.58);
    flex-shrink: 0;
}

.admin-list__label {
    flex: 1;
    min-width: 0;
}

.admin-list__item .ghost-btn {
    margin-left: auto;
    min-width: 84px;
    flex-shrink: 0;
}

.user-panel .primary-btn,
.user-panel .ghost-btn,
.admin-panel .primary-btn,
.admin-panel .ghost-btn {
    padding: 0.72rem 0.85rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.user-panel__themes {
    border-top: 1px solid var(--card-border);
    padding-top: 10px;
}

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

.theme-pill {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

.theme-pill.active {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.15);
}

@media (max-width: 1100px) {
    .user-panel {
        display: none;
    }
    .user-panel.is-open {
        display: block;
    }
    .user-panel__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .admin-panel {
        display: none;
        max-width: 320px;
    }
    .admin-panel.is-open {
        display: block;
    }
    .admin-panel__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-actions--tamer {
        justify-content: flex-start;
    }

    .auth-inline--tamer {
        justify-content: flex-start;
    }
}

.seals-hero {
    position: sticky;
    top: 12px;
    z-index: 6;
    margin-bottom: 1rem;
    display: grid;
    gap: 0.65rem;
}

.seals-hero__text {
    max-width: none;
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.seals-hero__text h1 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.1;
}

.seals-hero__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 1 1 420px;
    min-width: 0;
}

.app-topbar__brand .eyebrow {
    margin: 0;
    font-size: 0.72rem;
}

.app-topbar .subtitle,
.app-topbar .section-meta {
    display: none;
}

.topbar-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.72);
}

.topbar-nav__link {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.topbar-nav__link:hover {
    color: var(--text);
    background: rgba(148, 163, 184, 0.1);
}

.topbar-nav__link--active {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.12);
}

.topbar-card {
    background: linear-gradient(135deg, rgba(8, 15, 34, 0.95), rgba(2, 6, 23, 0.92));
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px);
}

.app-topbar__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
}

.topbar-tools .account-tabs {
    max-width: 100%;
    overflow-x: auto;
}

.app-topbar__secondary .topbar-tools {
    justify-content: flex-start;
}

.topbar-tools--accounts {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.topbar-tools--accounts .account-tabs {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: thin;
}

.topbar-tools--accounts .icon-btn {
    flex: 0 0 auto;
}

.topbar-tools--tamer .select-group {
    flex: 0 1 180px;
}

.topbar-tools--tamer .select-wrapper {
    width: min(220px, 100%);
}

.topbar-tools--tamer .auth-inline {
    margin-left: auto;
}

@media (max-width: 900px) {
    .seals-hero {
        top: 8px;
    }

    .seals-hero__actions,
    .topbar-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-nav,
    .topbar-tools .account-tabs {
        width: 100%;
    }

    .topbar-tools--accounts {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .topbar-tools--accounts .account-tabs {
        margin-left: 0;
        justify-content: flex-start;
    }

    .topbar-tools--accounts .icon-btn {
        margin-left: auto;
    }

    .topbar-card {
        padding: 0.8rem 0.85rem;
    }

    .topbar-tools--tamer .select-group,
    .topbar-tools--tamer .auth-inline {
        width: 100%;
    }

    .topbar-tools--tamer .auth-inline {
        margin-left: 0;
    }
}

@media (max-width: 1180px) {
    .attribute-tracker-dock {
        display: none;
    }
}

.account-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    scroll-behavior: smooth;
}

.account-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem 0.45rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.account-tab.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
}

.account-tab--dragging {
    opacity: 0.6;
}

.account-tab--drag-over {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.account-tab--add {
    padding: 0.45rem 0.9rem;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    color: var(--primary);
    font-weight: 800;
}

.account-tab--add:hover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.12);
}

.account-tab__label {
    white-space: nowrap;
    pointer-events: none;
}

.account-tab__close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.account-tab__close:hover {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text);
}

.inline-quantity-input {
    width: 90px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 700;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.account-tab__input {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    color: var(--text);
    padding: 0.25rem 0.6rem;
    min-width: 120px;
    font-weight: 600;
}

.account-tabs__empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.attribute-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.attribute-tracker-dock {
    position: fixed;
    top: 88px;
    left: 16px;
    width: min(148px, calc(100vw - 32px));
    padding: 0.5rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(10, 18, 38, 0.96), rgba(3, 8, 24, 0.92));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
    z-index: 9;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-20px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.attribute-tracker-dock.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.attribute-tracker__title {
    margin: 0 0 0.4rem;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

.attribute-bar--floating {
    grid-template-columns: 1fr;
    gap: 0.38rem;
    margin-bottom: 0;
}

.attribute-bar--floating .attribute-card {
    padding: 0.48rem 0.42rem;
    border-radius: 14px;
    gap: 0.14rem;
    min-width: 0;
}

.attribute-bar--floating .attribute-card__label {
    font-size: 0.58rem;
}

.attribute-bar--floating .attribute-card__value {
    font-size: 0.9rem;
}

.attribute-bar--floating .attribute-card__progress {
    font-size: 0.58rem;
}

.attribute-bar--floating .attribute-card__meta,
.attribute-bar--floating .attribute-card__currency,
.attribute-bar--floating .currency-text {
    font-size: 0.62rem;
}

.attribute-bar--floating .attribute-card__currency {
    margin-top: 0.18rem;
    gap: 0.14rem;
}

.attribute-bar--floating .attribute-card.active {
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.18);
}

.attribute-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.attribute-card__label {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.attribute-card__value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
}

.attribute-card__progress {
    margin-top: -0.18rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.68;
    letter-spacing: 0.02em;
}

.attribute-card__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.attribute-card.active {
    border-color: rgba(56, 189, 248, 0.6);
    transform: translateY(-2px);
}

.attribute-card__currency {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text);
}

.currency-icon {
    width: auto;
    height: auto;
}

.currency-text {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

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

.attribute-filter {
    display: inline-flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding: 0.35rem;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.attribute-filter--servers {
    margin-left: auto;
}

.filter-pill {
    border: none;
    background: transparent;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-pill.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
}

.search-field {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.search-icon {
    color: var(--text-muted);
    font-size: 1rem;
}

.search-input {
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    min-width: 220px;
}

.search-input:focus {
    outline: none;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-head__actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section-head h2 {
    margin: 0;
    font-size: 1.8rem;
}

.section-meta {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.account-panel {
    padding: 1.75rem 2rem;
}

.account-head {
    margin-bottom: 1rem;
}

.account-head__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.account-total {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.05rem;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.08);
    min-width: 230px;
}

.account-total__label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin: 0;
}

.account-total__value {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--text);
    font-size: 0.9rem;
}

.account-total .currency-icon {
    object-fit: contain;
}

.gold-part {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.gold-part__amount {
    font-weight: 700;
}

.currency-icon--inline {
    vertical-align: middle;
}

.hero-card {
    background: linear-gradient(135deg, var(--card-bg), var(--bg));
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.25);
}

.eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 0.5rem;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
}

.subtitle {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0.75rem 0 0;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.hero-card > * {
    min-width: 0;
}

.hero-card--tamer {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.hero-card__content {
    flex: 1 1 320px;
}

.hero-actions--tamer {
    flex: 1 1 720px;
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 0.85rem;
    min-width: 0;
}

.hero-actions--tamer .select-group {
    flex: 0 1 220px;
}

.hero-actions--tamer .select-wrapper {
    width: min(220px, 100%);
}

.auth-inline--tamer {
    flex: 0 1 260px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.auth-inline--tamer #authStatus {
    overflow-wrap: anywhere;
    text-align: right;
}

.hero-actions--tamer .ghost-btn,
.hero-actions--tamer .primary-btn {
    flex-shrink: 0;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-card__header h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.auth-card__header p {
    margin: 0;
    color: var(--text-muted);
}

.auth-card__form {
    display: grid;
    gap: 10px;
}

.remember-field {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    width: fit-content;
    color: var(--text-muted);
    font-size: 0.92rem;
    cursor: pointer;
}

.remember-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.auth-card__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.primary-btn--outline {
    width: 100%;
    text-align: center;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.auth-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.select-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 500;
}

.select-wrapper {
    position: relative;
    display: inline-flex;
    width: 220px;
}

.select-wrapper select {
    appearance: none;
    width: 100%;
    padding: 0.85rem 2.5rem 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
}

.select-wrapper .chevron {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.primary-btn {
    padding: 0.95rem 1.75rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #020617;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(14, 165, 233, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.3);
    filter: brightness(1.03);
}

.ghost-btn {
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ghost-btn--sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
}

.ghost-btn--primary {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(56, 189, 248, 0.12);
}

.ghost-btn--danger-outline {
    border-color: rgba(248, 113, 113, 0.8);
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

.ghost-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(56, 189, 248, 0.08);
    transform: translateY(-1px);
}

.ghost-btn--danger {
    border-color: rgba(248, 113, 113, 0.7);
    color: #f87171;
}

.ghost-btn--danger:hover {
    border-color: #f87171;
    color: #fca5a5;
}

.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.theme-pill:focus-visible,
.user-panel__toggle:focus-visible,
.admin-panel__toggle:focus-visible,
.theme-toggle--floating:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.ghost-input {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text);
    padding: 0.55rem 1rem;
    min-width: 220px;
}

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

.tabs,
.tab-row {
    display: inline-flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
    padding: 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    width: fit-content;
}

.tab-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: #020617;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.table-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.table-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-card__header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.table-card__header p {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
}

.table-card__meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-pill {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.meta-pill--accent {
    background: var(--accent-muted);
    color: var(--accent);
}

.table-wrapper {
    overflow-x: auto;
}

.seals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.seals-grid--simple {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.digimon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seal-card {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: visible;
}

.seal-card--maxed {
    border-color: rgba(34, 197, 94, 0.78);
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(34, 197, 94, 0) 42%),
        var(--card-bg);
    box-shadow:
        inset 0 0 0 1px rgba(34, 197, 94, 0.25),
        0 14px 28px rgba(22, 163, 74, 0.12);
}

.seal-card--maxed .seal-card__header {
    padding-right: 2.5rem;
}

.seal-card__max-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    border: 1px solid rgba(187, 247, 208, 0.85);
    background: linear-gradient(135deg, #bbf7d0, #22c55e);
    color: #052e16;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.24);
}

.seal-card--simple {
    padding: 0.95rem 1rem;
    gap: 0.7rem;
}

.seal-card--simple .seal-card__header {
    gap: 0.35rem;
    padding-right: 5.1rem;
}

.seal-card--simple .seal-card__header h3 {
    font-size: 1rem;
    line-height: 1.3;
}

.seal-card--simple.seal-card--maxed .seal-card__header {
    padding-right: 2.35rem;
}

.seal-card--simple .seal-card__max-badge {
    top: 0.55rem;
    right: 0.55rem;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.78rem;
}

.seal-card--simple .template-account-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.5rem 0.65rem;
}

.seal-card--simple .template-account-row__label,
.seal-card--simple .seal-card__currency-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.seal-card--simple .template-account-row__value,
.seal-card--simple .base-value,
.seal-card--simple .seal-card__currency .currency-text {
    font-size: 0.92rem;
}

.seal-card--simple .seal-card__actions,
.seal-card--simple .account-seal-actions {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 2;
    background: rgba(2, 6, 23, 0.86);
    padding: 0.2rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(12px);
}

.seal-card--simple:is(:hover, :focus-within) .seal-card__actions,
.seal-card--simple:is(:hover, :focus-within) .account-seal-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.seal-card--simple.seal-card--template .seal-card__meta {
    display: none;
}

.seal-card--simple.account-seal-card .attribute-badge,
.seal-card--simple.account-seal-card .account-seal-stats {
    display: none;
}

.seal-card--simple.account-seal-card .seal-card__meta {
    gap: 0;
}

.seal-card__currency {
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.seal-card__currency .currency-text {
    font-size: 0.95rem;
    color: var(--text);
}

.seal-card__currency-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.seal-card__currency--clickable {
    cursor: pointer;
}

.seal-card--draggable {
    cursor: move;
}

.seal-card--dragging {
    opacity: 0.75;
    border-style: dashed;
}

.seal-card--drag-over {
    outline: 2px dashed var(--primary);
    outline-offset: 4px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge--muted {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.seal-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.seal-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.seal-card__header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.seal-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.attribute-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.18);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.base-value {
    font-weight: 600;
    color: var(--text);
}

.seal-level-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.seal-level-table th,
.seal-level-table td {
    text-align: left;
    padding: 0.4rem 0.3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.seal-level-table th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: none;
}

.account-seal-card {
    gap: 0.5rem;
}

.digimon-card {
    gap: 0.85rem;
}

.digimon-card__top {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-right: 3rem;
}

.digimon-card__rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    max-width: 42px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(2, 6, 23, 0.35));
    pointer-events: none;
}

.digimon-card__avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid var(--card-border);
    background: transparent;
    flex-shrink: 0;
}

.digimon-status-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 0;
    table-layout: fixed;
}

.digimon-status-table th,
.digimon-status-table td {
    text-align: left;
    padding: 0.5rem 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    vertical-align: middle;
}

.digimon-status-table th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    color: var(--text-muted);
    border-top: none;
}

.digimon-status-table__stat {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0.5rem;
    align-items: center;
}

.digimon-status-table__key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.3rem 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    font-weight: 700;
}

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

.digimon-card__rail-shell {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    min-width: 0;
}

.digimon-card__rail-shell .digimon-evolution-diagram {
    flex: 1 1 auto;
    min-width: 0;
}

.digimon-card__note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.digimon-card__switcher {
    width: 36px;
    min-width: 36px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background:
        linear-gradient(180deg, rgba(10, 20, 42, 0.96), rgba(5, 12, 29, 0.96)),
        radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 58%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.35rem;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 10px 18px rgba(2, 6, 23, 0.18);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.digimon-card__switcher:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.48);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 12px 20px rgba(2, 6, 23, 0.24);
}

.digimon-card__switcher-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
}

.digimon-card__switcher-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

.digimon-card__switcher-arrow.is-up {
    border-bottom: 8px solid rgba(186, 230, 253, 0.95);
}

.digimon-card__switcher-arrow.is-down {
    border-top: 8px solid rgba(186, 230, 253, 0.95);
}

.digimon-card__switcher-divider {
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.38);
}

.digimon-evolution-diagram {
    --evolution-scale: 1;
    --evolution-row-gap: calc(0.45rem * var(--evolution-scale));
    --evolution-node-gap: calc(0.3rem * var(--evolution-scale));
    --evolution-padding-y: calc(0.8rem * var(--evolution-scale));
    --evolution-padding-x: calc(0.9rem * var(--evolution-scale));
    --evolution-indent: calc(44px * var(--evolution-scale));
    --evolution-row-min-height: calc(34px * var(--evolution-scale));
    --evolution-icon-size: calc(32px * var(--evolution-scale));
    --evolution-icon-radius: calc(8px * var(--evolution-scale));
    --evolution-icon-inner-radius: calc(7px * var(--evolution-scale));
    --evolution-connector-width: calc(24px * var(--evolution-scale));
    --evolution-connector-height: calc(12px * var(--evolution-scale));
    --evolution-branch-height: calc(22px * var(--evolution-scale));
    --evolution-jogress-column: calc(30px * var(--evolution-scale));
    --evolution-jogress-height: calc(72px * var(--evolution-scale));
    --evolution-jogress-tail-height: calc(76px * var(--evolution-scale));
    --evolution-jogress-row-gap: calc(0.55rem * var(--evolution-scale));
    --evolution-connector-stroke: max(1px, calc(2px * var(--evolution-scale)));
    --evolution-arrow-size: calc(8px * var(--evolution-scale));
    --evolution-arrow-inset: calc(1px * var(--evolution-scale));
    --evolution-forward-line-end: calc(6px * var(--evolution-scale));
    --evolution-branch-left: calc(10px * var(--evolution-scale));
    --evolution-branch-rise: calc(12px * var(--evolution-scale));
    --evolution-branch-source-gap: calc(3px * var(--evolution-scale));
    --evolution-branch-width: calc(12px * var(--evolution-scale));
    --evolution-branch-radius: calc(10px * var(--evolution-scale));
    --evolution-jogress-inner-left: calc(1px * var(--evolution-scale));
    --evolution-jogress-inner-top: calc(16px * var(--evolution-scale));
    --evolution-jogress-inner-width: calc(17px * var(--evolution-scale));
    --evolution-jogress-inner-height: calc(36px * var(--evolution-scale));
    --evolution-jogress-radius: calc(14px * var(--evolution-scale));
    display: flex;
    flex-direction: column;
    gap: var(--evolution-row-gap);
    padding: var(--evolution-padding-y) var(--evolution-padding-x);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(9, 21, 46, 0.92), rgba(7, 14, 31, 0.72)),
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 48%);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.digimon-evolution-diagram__row {
    display: flex;
    gap: var(--evolution-node-gap);
    align-items: center;
    min-height: var(--evolution-row-min-height);
    margin-left: calc(var(--evolution-depth, 0) * var(--evolution-indent));
}

.digimon-evolution-diagram__row.is-branch {
    padding-top: calc(0.05rem * var(--evolution-scale));
}

.digimon-evolution-diagram__jogress-row {
    display: block;
}

.digimon-evolution-diagram__jogress-lanes {
    display: grid;
    grid-template-columns: max-content var(--evolution-jogress-column) max-content;
    column-gap: var(--evolution-node-gap);
    row-gap: var(--evolution-jogress-row-gap);
    align-items: center;
}

.digimon-evolution-diagram__jogress-lane {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    gap: var(--evolution-node-gap);
}

.digimon-evolution-diagram__jogress-lane.is-top {
    grid-column: 1;
    grid-row: 1;
}

.digimon-evolution-diagram__jogress-lane.is-bottom {
    grid-column: 1;
    grid-row: 2;
}

.digimon-evolution-diagram__jogress-tail {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    min-height: var(--evolution-jogress-tail-height);
    gap: var(--evolution-node-gap);
}

.digimon-evolution-diagram__connector {
    position: relative;
    flex: 0 0 var(--evolution-connector-width);
    width: var(--evolution-connector-width);
    height: var(--evolution-connector-height);
}

.digimon-evolution-diagram__connector.is-forward::before,
.digimon-evolution-diagram__connector.is-forward::after,
.digimon-evolution-diagram__connector.is-branch::before,
.digimon-evolution-diagram__connector.is-branch::after,
.digimon-evolution-diagram__connector.is-branch-up::before,
.digimon-evolution-diagram__connector.is-branch-up::after,
.digimon-evolution-diagram__connector.is-jogress::before,
.digimon-evolution-diagram__connector.is-jogress::after,
.digimon-evolution-diagram__connector.is-jogress-inline::before,
.digimon-evolution-diagram__connector.is-jogress-inline::after {
    content: "";
    position: absolute;
}

.digimon-evolution-diagram__connector.is-forward::before {
    left: 0;
    right: var(--evolution-forward-line-end);
    top: 50%;
    height: var(--evolution-connector-stroke);
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0.95));
}

.digimon-evolution-diagram__connector.is-forward::after {
    right: var(--evolution-arrow-inset);
    top: 50%;
    width: var(--evolution-arrow-size);
    height: var(--evolution-arrow-size);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    border-right: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    transform: translateY(-50%) rotate(45deg);
}

.digimon-evolution-diagram__connector.is-branch {
    height: var(--evolution-branch-height);
}

.digimon-evolution-diagram__connector.is-branch-up {
    height: var(--evolution-branch-height);
}

.digimon-evolution-diagram__connector.is-branch::before {
    left: var(--evolution-branch-left);
    top: calc((-1 * var(--evolution-branch-rise)) + var(--evolution-branch-source-gap));
    width: var(--evolution-branch-width);
    height: calc(var(--evolution-branch-rise) + 50% - var(--evolution-branch-source-gap));
    border-left: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.85);
    border-bottom: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.85);
    border-radius: 0 0 0 var(--evolution-branch-radius);
}

.digimon-evolution-diagram__connector.is-branch::after {
    right: var(--evolution-arrow-inset);
    top: 50%;
    width: var(--evolution-arrow-size);
    height: var(--evolution-arrow-size);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    border-right: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    transform: translateY(-50%) rotate(45deg);
}

.digimon-evolution-diagram__connector.is-branch-up::before {
    left: var(--evolution-branch-left);
    top: 50%;
    width: var(--evolution-branch-width);
    height: calc(var(--evolution-branch-rise) + 50% - var(--evolution-branch-source-gap));
    border-left: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.85);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.85);
    border-radius: var(--evolution-branch-radius) 0 0 0;
}

.digimon-evolution-diagram__connector.is-branch-up::after {
    right: var(--evolution-arrow-inset);
    top: 50%;
    width: var(--evolution-arrow-size);
    height: var(--evolution-arrow-size);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    border-right: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    transform: translateY(-50%) rotate(45deg);
}

.digimon-evolution-diagram__connector.is-jogress {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: center;
    width: var(--evolution-jogress-column);
    flex-basis: var(--evolution-jogress-column);
    height: var(--evolution-jogress-height);
}

.digimon-evolution-diagram__connector.is-jogress-inline {
    width: var(--evolution-jogress-column);
    flex: 0 0 var(--evolution-jogress-column);
    height: var(--evolution-jogress-height);
}

.digimon-evolution-diagram__connector.is-jogress::before {
    left: var(--evolution-jogress-inner-left);
    top: var(--evolution-jogress-inner-top);
    width: var(--evolution-jogress-inner-width);
    height: var(--evolution-jogress-inner-height);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.88);
    border-right: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.88);
    border-bottom: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.88);
    border-radius: 0 var(--evolution-jogress-radius) var(--evolution-jogress-radius) 0;
}

.digimon-evolution-diagram__connector.is-jogress-inline::before {
    left: var(--evolution-jogress-inner-left);
    top: var(--evolution-jogress-inner-top);
    width: var(--evolution-jogress-inner-width);
    height: var(--evolution-jogress-inner-height);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.88);
    border-right: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.88);
    border-bottom: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.88);
    border-radius: 0 var(--evolution-jogress-radius) var(--evolution-jogress-radius) 0;
}

.digimon-evolution-diagram__connector.is-jogress::after {
    right: var(--evolution-arrow-inset);
    top: 50%;
    width: var(--evolution-arrow-size);
    height: var(--evolution-arrow-size);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    border-right: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    transform: translateY(-50%) rotate(45deg);
}

.digimon-evolution-diagram__connector.is-jogress-inline::after {
    right: var(--evolution-arrow-inset);
    top: 50%;
    width: var(--evolution-arrow-size);
    height: var(--evolution-arrow-size);
    border-top: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    border-right: var(--evolution-connector-stroke) solid rgba(148, 163, 184, 0.95);
    transform: translateY(-50%) rotate(45deg);
}

.digimon-evolution-strip__item {
    width: var(--evolution-icon-size);
    height: var(--evolution-icon-size);
    padding: 0;
    border-radius: var(--evolution-icon-radius);
    border: 1px solid rgba(125, 211, 252, 0.3);
    background: linear-gradient(180deg, rgba(28, 53, 108, 0.92), rgba(8, 18, 45, 0.95));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.digimon-evolution-strip__item::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--evolution-icon-inner-radius) - 1px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.digimon-evolution-strip__item:hover {
    transform: translateY(calc(-1px * var(--evolution-scale)));
    border-color: rgba(125, 211, 252, 0.52);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 6px 14px rgba(2, 6, 23, 0.22);
}

.digimon-evolution-strip__item img {
    width: var(--evolution-icon-size);
    height: var(--evolution-icon-size);
    object-fit: contain;
    display: block;
}

.digimon-evolution-strip__item.is-active {
    border-color: rgba(34, 197, 94, 0.9);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(34, 197, 94, 0.24),
        0 0 14px rgba(34, 197, 94, 0.2);
}

.digimon-evolution-strip__item.is-owned:not(.is-active) {
    border-color: rgba(56, 189, 248, 0.85);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(56, 189, 248, 0.18),
        0 0 12px rgba(56, 189, 248, 0.14);
}

.digimon-icon-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: -0.2rem 0 0.25rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.digimon-icon-preview img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: transparent;
}

.digimon-calibration-panel {
    margin-top: 0.25rem;
    padding: 1rem;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.digimon-calibration-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.digimon-calibration-panel__header span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.digimon-calibration-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    align-items: end;
    margin-bottom: 0.85rem;
}

.digimon-calibration-panel__note {
    margin: 0 0 0.85rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.digimon-calibration-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.85rem;
}

.digimon-calibration-table th,
.digimon-calibration-table td {
    padding: 0.55rem 0.45rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
}

.digimon-calibration-table th {
    border-top: none;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.digimon-calibration-table input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text);
    padding: 0.6rem 0.75rem;
}

.digimon-calibration-status {
    min-height: 1.2rem;
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.digimon-calibration-status[data-state="error"] {
    color: #f87171;
}

.digimon-calibration-status[data-state="success"] {
    color: #4ade80;
}

.digimon-calibration-status[data-state="loading"] {
    color: var(--primary);
}

.digimon-calibration-modal .modal__body {
    margin-top: 0.75rem;
}

.digimon-calibration-modal .digimon-calibration-panel {
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.digimon-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 1180px) {
    .digimon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.digimon-guide-card {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
}

.digimon-guide-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
}

.digimon-guide-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.digimon-guide-meta {
    margin-top: 1rem;
}

.digimon-account-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: flex-end;
}

.digimon-account-toolbar__control {
    min-width: 220px;
    flex: 1 1 220px;
}

.digimon-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
}

.digimon-inline-note {
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.08);
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.digimon-inline-note--compact {
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
}

.form-control__hint {
    display: block;
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.digimon-rank-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 0.65rem;
    margin-top: 0.55rem;
}

.digimon-rank-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.digimon-rank-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.digimon-rank-option__frame {
    width: 100%;
    min-height: 58px;
    padding: 0.7rem 0.45rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.digimon-rank-option__frame img {
    max-width: 36px;
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.digimon-rank-option__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.digimon-rank-option:hover .digimon-rank-option__frame {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.38);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
}

.digimon-rank-option input:checked + .digimon-rank-option__frame {
    border-color: rgba(34, 197, 94, 0.82);
    background: rgba(34, 197, 94, 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(34, 197, 94, 0.18),
        0 10px 18px rgba(2, 6, 23, 0.18);
}

.digimon-rank-option input:checked + .digimon-rank-option__frame + .digimon-rank-option__label {
    color: var(--text);
}

.digimon-relation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 2.4rem;
    margin-top: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.42);
}

.digimon-relation-tags--single {
    min-height: 2.4rem;
}

.digimon-relation-tags__empty {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.digimon-relation-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    padding: 0.35rem 0.45rem 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.26);
    background: rgba(56, 189, 248, 0.12);
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1.2;
}

.digimon-relation-tag span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.digimon-relation-tag__remove {
    width: 1.2rem;
    height: 1.2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.55);
    color: var(--text);
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1;
}

.digimon-relation-tag__remove:hover {
    background: rgba(239, 68, 68, 0.72);
}

.digimon-relation-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
}

.digimon-relation-panel__head {
    display: grid;
    gap: 0.25rem;
}

.digimon-relation-panel__head h4,
.digimon-relation-panel__head p {
    margin: 0;
}

.digimon-relation-filters {
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) minmax(180px, 220px);
}

.digimon-relation-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.digimon-relation-selection-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.42);
}

.digimon-relation-selection-card--full {
    grid-column: 1 / -1;
}

.digimon-relation-selection-card__head {
    display: grid;
    gap: 0.2rem;
}

.digimon-relation-selection-card__head strong,
.digimon-relation-selection-card__head p {
    margin: 0;
}

.digimon-relation-catalog {
    max-height: 30rem;
    overflow: auto;
    padding-right: 0.25rem;
}

.digimon-relation-card--active {
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.16);
}

.digimon-stats-import {
    display: grid;
    gap: 0.75rem;
}

.digimon-stats-import__actions {
    margin-top: 0;
}

.digimon-stats-import__actions .section-meta {
    margin: 0;
}

#digimonStatsPasteStatus[data-state="success"] {
    color: #86efac;
}

#digimonStatsPasteStatus[data-state="error"] {
    color: #fda4af;
}

.modal textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text);
    padding: 0.9rem 1rem;
    resize: vertical;
}

.template-level-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.template-level-item {
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    background: var(--card-bg);
}

.template-level-item__name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.template-level-item__value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.template-level-popover {
    position: absolute;
    right: 0.75rem;
    top: 100%;
    transform: translateY(6px);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem;
    min-width: 230px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 5;
}

.template-level-popover.visible {
    display: block;
}

.template-level-popover__title {
    margin: 0 0 0.45rem;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 700;
}

.level-pill-row {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.level-pill {
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
}

.level-pill--active {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.45);
    color: var(--primary);
}

.template-level-popover__summary {
    margin: 0.1rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.template-account-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--card-bg);
}

.template-account-row__label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.template-account-row__value {
    font-weight: 700;
    color: var(--text);
}

.template-account-row__value--action {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(56, 189, 248, 0.8);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.account-seal-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-seal-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.25rem 0;
}

.chip-btn {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: transparent;
    color: var(--text);
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.chip-btn--active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(56, 189, 248, 0.12);
}

.chip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chip-btn--danger {
    border-color: rgba(248, 113, 113, 0.6);
    color: #f87171;
}

.chip-btn--danger:hover {
    border-color: #f87171;
    color: #fca5a5;
}

.account-seal-stats__item {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.65rem 0.8rem;
    background: var(--card-bg);
}

.account-seal-stats__label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.account-seal-stats__value {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: var(--card-bg);
}

th {
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

th.asc::after,
th.desc::after {
    content: "";
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
}

th.asc::after {
    border-bottom-color: var(--primary);
}

th.desc::after {
    border-top-color: var(--primary);
}

td {
    padding: 0.65rem 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.95rem;
    color: var(--text);
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
}

td.has-map {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.loader {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 40;
}

.loader.hidden {
    display: none;
}

.loader__spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 50;
}

.toast {
    min-width: 260px;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slide-in 0.35s ease;
}

.toast--error {
    border-color: rgba(248, 113, 113, 0.7);
}

.toast--warning {
    border-color: rgba(250, 204, 21, 0.7);
}

@keyframes slide-in {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.modal.hidden {
    display: none;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
}

.modal__content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 2rem;
    width: min(520px, 90vw);
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-right: 3.5rem;
}

.modal__header--with-action {
    margin-bottom: 0.25rem;
}

.modal__close {
    position: absolute;
    right: 1.25rem;
    top: 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.75rem;
    cursor: pointer;
}

.modal__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.account-manager {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.account-manager__section {
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1rem;
    background: var(--card-bg);
}

.account-manager__section--danger {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(127, 29, 29, 0.12);
}

.account-manager__header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.account-manager__header .section-meta {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

.account-manager__warning {
    margin: 0;
    color: #fca5a5;
    font-weight: 600;
    font-size: 0.9rem;
}

.modal__content--wide {
    width: min(720px, 95vw);
}

.modal__tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
}

.icon-btn--subtle {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.seal-pattern-hint {
    min-height: 1.2rem;
    margin-top: 0.2rem;
}

.seal-defaults-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto;
    gap: 1rem;
    align-items: end;
}

.seal-defaults-toolbar__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 760px) {
    .seal-defaults-toolbar {
        grid-template-columns: 1fr;
    }

    .seal-defaults-toolbar__actions {
        justify-content: flex-start;
    }
}

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

.admin-user-card {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.admin-user-card__info {
    display: grid;
    gap: 2px;
}

.admin-user-card__actions {
    display: flex;
    gap: 6px;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.level-card {
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 0.85rem;
    background: var(--card-bg);
}

.level-card__header {
    margin-bottom: 0.65rem;
}

.level-card__title {
    margin: 0;
    font-weight: 600;
    color: var(--primary);
}

.level-card__hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.modal__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.import-template-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: rgba(56, 189, 248, 0.08);
}

.import-template-card strong {
    display: block;
    margin-bottom: 0.35rem;
}

.import-template-card p {
    margin: 0;
    color: var(--text-muted);
}

.import-template-card .ghost-btn {
    flex-shrink: 0;
}

.form-control {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-control span {
    font-weight: 600;
    color: var(--text);
}

.form-control input,
.form-control select {
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(2, 6, 23, 0.66);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control input:focus,
.form-control select:focus,
.admin-actions input:focus,
.id-row input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.62);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
    background: rgba(2, 6, 23, 0.86);
}

.form-control input[readonly],
.id-row input[readonly] {
    color: rgba(248, 250, 252, 0.82);
}

select,
select option {
    background-color: var(--dropdown-bg, var(--card-bg));
    background: var(--dropdown-bg, var(--card-bg));
    color: var(--dropdown-text, var(--text));
}

select {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    border-color: var(--card-border);
    box-shadow: inset 0 0 0 1px var(--card-border);
}

select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent);
}

select option {
    border: none;
    background-color: var(--card-bg);
}

select option:hover,
select option:focus {
    background: var(--card-border);
    color: var(--text);
}

select::-ms-expand {
    display: none;
}

select option {
    border: none;
}

select option:hover,
select option:focus {
    background: var(--card-border);
    color: var(--text);
}

.gold-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.gold-input-row input {
    flex: 1;
}

.gold-input-row select {
    min-width: 110px;
}

.gold-sync-source {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(56, 189, 248, 0.06);
}

.gold-sync-source__grid {
    gap: 0.75rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.tamer-stage-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.tamer-stage-shell__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.tamer-stage-shell__header h3 {
    margin: 0;
    font-size: 1.35rem;
}

.tamer-stage-shell__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tamer-stage-shell__header > div {
    min-width: 0;
}

.tamer-stage {
    display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(240px, 1fr) minmax(340px, 430px);
    gap: 1rem 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background:
        radial-gradient(circle at top, rgba(14, 165, 233, 0.25), transparent 40%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.95));
    overflow: hidden;
    position: relative;
}

.tamer-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.85), transparent);
    pointer-events: none;
}

.tamer-stage > * {
    position: relative;
    z-index: 1;
}

.tamer-stage__side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    min-width: 0;
    align-content: start;
}

.tamer-stage__rail {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.tamer-stage__center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.tamer-stage__bottom {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    min-width: 0;
}

.tamer-stage-zone--editable {
    min-height: 110px;
    padding: 0.35rem;
    border-radius: 20px;
    border: 1px dashed rgba(56, 189, 248, 0.24);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.tamer-stage-zone--active {
    border-color: rgba(56, 189, 248, 0.68);
    background: rgba(14, 165, 233, 0.08);
}

.tamer-stage__avatar-card {
    position: relative;
    width: min(100%, 320px);
    min-height: 380px;
    border-radius: 28px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.92));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.08);
}

.tamer-stage__avatar-halo {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.3), transparent 70%);
    filter: blur(8px);
}

.tamer-stage__avatar-figure {
    position: relative;
    width: 150px;
    height: 260px;
    border-radius: 999px 999px 26px 26px;
    background:
        radial-gradient(circle at 50% 18%, rgba(248, 250, 252, 0.95) 0 16px, transparent 17px),
        linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0 36%, rgba(14, 165, 233, 0.14) 36% 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
    color: rgba(248, 250, 252, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
}

.tamer-stage__caption {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tamer-stage-slot {
    width: 100%;
    min-height: 88px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
    padding: 0.75rem;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
}

.tamer-stage__rail .tamer-stage-slot {
    min-height: 84px;
    padding: 0.65rem;
    gap: 0.6rem;
    grid-template-columns: 46px minmax(0, 1fr);
}

.tamer-stage-slot:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.18);
}

.tamer-stage-slot--editing {
    cursor: grab;
}

.tamer-stage-slot--editing:active {
    cursor: grabbing;
}

.tamer-stage-slot--dragging {
    opacity: 0.45;
    transform: scale(0.98);
    box-shadow: none;
}

.tamer-stage-slot--drop-target {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.tamer-stage-slot--drop-before {
    border-color: rgba(56, 189, 248, 0.78);
    box-shadow: inset 0 4px 0 rgba(56, 189, 248, 0.95);
}

.tamer-stage-slot--drop-after {
    border-color: rgba(56, 189, 248, 0.78);
    box-shadow: inset 0 -4px 0 rgba(56, 189, 248, 0.95);
}

.tamer-stage-slot--empty {
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.28);
}

.tamer-stage-slot__icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tamer-stage-slot__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tamer-stage__rail .tamer-stage-slot__icon {
    width: 46px;
    height: 46px;
}

.tamer-stage__rail--blank {
    min-height: 100%;
}

.tamer-stage-slot__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tamer-stage-slot__label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}

.tamer-stage-slot__name {
    margin: 0;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tamer-stage-slot__meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.tamer-stage-drop-hint {
    margin: 0;
    min-height: 88px;
    padding: 1rem;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    grid-column: 1 / -1;
}

.tamer-stage-bank {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.24);
}

.tamer-stage-bank__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.tamer-stage-bank__head h4 {
    margin: 0;
    font-size: 1.1rem;
}

.tamer-stage-bank__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    min-width: 0;
}

.tamer-inline-panel {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 34%),
        rgba(15, 23, 42, 0.28);
    min-width: 0;
}

.tamer-inline-panel__filters {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stage-item-picker {
    position: fixed;
    width: min(520px, calc(100vw - 2rem));
    max-height: min(70vh, 560px);
    overflow: auto;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(2, 6, 23, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    z-index: 70;
}

.stage-item-picker.hidden {
    display: none;
}

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

.stage-item-picker__head h3 {
    margin: 0;
    font-size: 1.2rem;
}

.stage-item-picker__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.stage-picker-option {
    position: relative;
    min-height: 96px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: visible;
}

.stage-picker-option:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 16px 32px rgba(2, 132, 199, 0.16);
}

.stage-picker-option--active {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.38);
}

.stage-picker-option--empty {
    border-style: dashed;
}

.stage-picker-option__frame {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.stage-picker-option__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-picker-option__placeholder {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.55);
}

.stage-picker-option__state {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.stage-picker-option[data-name]:hover::after,
.stage-picker-option[data-name]:focus-visible::after {
    content: attr(data-name);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.55rem);
    transform: translateX(-50%);
    min-width: 120px;
    max-width: 220px;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    white-space: normal;
    pointer-events: none;
    z-index: 2;
}

.layout-config-list,
.equipment-catalog-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.equipment-catalog-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px);
    gap: 0.85rem;
    align-items: end;
}

.layout-config-row,
.equipment-catalog-card {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.7);
    padding: 1rem;
}

.layout-config-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(140px, 180px) 120px;
    gap: 0.85rem;
    align-items: end;
}

.layout-config-row__label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.layout-config-row__label strong {
    font-size: 1rem;
}

.layout-config-row__label span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.equipment-catalog-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 1rem;
}

.equipment-catalog-card__preview {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
    color: var(--text-muted);
}

.equipment-catalog-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.equipment-catalog-card__body {
    display: grid;
    gap: 0.85rem;
}

.equipment-catalog-card__head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.equipment-catalog-card__head h4 {
    margin: 0;
    font-size: 1rem;
}

.equipment-catalog-card__head p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.equipment-catalog-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.equipment-catalog-card__controls {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(180px, 1fr);
    gap: 0.85rem;
    align-items: end;
}

.equipment-catalog-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.equipment-catalog-card__actions input[type="file"] {
    max-width: 240px;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.modal__actions--between {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.modal__actions-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.map-entry {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.map-entry h4 {
    margin: 0 0 0.35rem;
    color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.calculator-card {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.calculator-head {
    align-items: flex-start;
}

.calculator-head__stats {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.calculator-primary {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(220px, 1fr) minmax(180px, 220px);
    gap: 0.9rem;
    align-items: end;
}

.calculator-primary > * {
    min-width: 0;
}

.calculator-submit-btn {
    width: 100%;
    min-height: 54px;
}

.calculator-advanced {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(8, 15, 37, 0.4);
    overflow: hidden;
}

.calculator-advanced[open] {
    background: rgba(8, 15, 37, 0.55);
}

.calculator-advanced__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
    color: var(--text);
    font-weight: 600;
}

.calculator-advanced__summary::-webkit-details-marker {
    display: none;
}

.calculator-advanced__summary::after {
    content: "+";
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
}

.calculator-advanced[open] .calculator-advanced__summary::after {
    content: "-";
}

.calculator-advanced__summary small {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.82rem;
}

.calculator-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.calculator-grid--advanced {
    padding: 0 1rem 1rem;
}

.calculator-grid--advanced > * {
    min-width: 0;
}

.calculator-grid--advanced .calculator-hint {
    grid-column: 1 / -1;
}

.calculator-hint {
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    background: rgba(148, 163, 184, 0.06);
    border: 1px dashed rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.calculator-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(14, 165, 233, 0.06);
    cursor: pointer;
}

.calculator-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.calculator-toggle span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.calculator-toggle strong {
    color: var(--text);
    font-size: 0.92rem;
}

.calculator-toggle small {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.calculator-hint__label {
    margin: 0 0 0.2rem;
    color: var(--text);
    font-weight: 600;
}

.calculator-hint__note {
    margin: 0;
}

.calculator-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.55rem;
    width: 100%;
}

.calculator-pill {
    min-width: 0;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.calculator-pill__label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.calculator-pill__value {
    margin: 0.15rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.calculator-pills--subtle .calculator-pill {
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(148, 163, 184, 0.14);
}

.calculator-pills--subtle .calculator-pill__label {
    font-size: 0.74rem;
}

.calculator-pills--subtle .calculator-pill__value {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.calculator-results {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.calculator-summary-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.calculator-summary-grid--primary {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.calculator-summary-card {
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
}

.calculator-summary-card__label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.calculator-summary-card__value {
    margin: 0.35rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.calculator-summary-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.calculator-summary-card--primary {
    border-color: rgba(56, 189, 248, 0.3);
    background:
        linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.03)),
        var(--card-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calculator-summary-card--primary .calculator-summary-card__value {
    font-size: 1.35rem;
    color: var(--primary);
}

.calculator-summary-card__meta {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.calculator-tooltip-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: help;
}

.calculator-export-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.07);
    color: var(--text-muted);
    font-size: 0.86rem;
}

.calculator-export-row .ghost-btn {
    white-space: nowrap;
}

.calculator-quiet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
}

.calculator-quiet-stat {
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.calculator-quiet-stat--highlight {
    border-color: rgba(45, 212, 191, 0.38);
    background:
        linear-gradient(180deg, rgba(45, 212, 191, 0.14), rgba(45, 212, 191, 0.04)),
        rgba(255, 255, 255, 0.02);
}

.calculator-quiet-stat--success {
    border-color: rgba(34, 197, 94, 0.4);
    background:
        linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.05)),
        rgba(255, 255, 255, 0.02);
}

.calculator-quiet-stat__label {
    display: block;
    color: var(--text-muted);
    font-size: 0.76rem;
    margin-bottom: 0.2rem;
}

.calculator-quiet-stat__value {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 600;
}

.calculator-quiet-stat__value--highlight {
    color: var(--primary);
    font-size: 1.08rem;
}

.calculator-quiet-stat__note {
    display: block;
    margin-top: 0.22rem;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.calculator-inline-note {
    margin: -0.15rem 0 0.15rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.calculator-plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}

.calculator-plan-card {
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.calculator-plan-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.6rem;
}

.calculator-plan-card__title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text);
}

.calculator-plan-card__meta {
    margin: 0.15rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.calculator-plan-card__projected {
    color: var(--primary);
    font-weight: 700;
}

.calculator-plan-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.calculator-plan-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    gap: 0.75rem;
}

.calculator-plan-card__row strong {
    color: var(--text);
    font-weight: 700;
    text-align: right;
}

.calculator-plan-card__row--gold {
    font-size: 0.8rem;
}

.calculator-plan-card__row--quantity strong,
.calculator-plan-card__quantity {
    color: #f87171;
    font-weight: 800;
}

.calculator-plan-card__quantity {
    letter-spacing: 0.02em;
}

.calculator-plan-card__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.calculator-plan-card__gold .gold-part__amount {
    font-size: 0.88rem;
}

.calculator-empty {
    margin: 0.5rem 0;
    text-align: center;
    color: var(--text-muted);
}

.calculator-warning {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.1);
    color: #fecdd3;
    font-weight: 700;
    text-align: center;
}

.calculator-suggestion {
    border-radius: 12px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.08);
    color: var(--text);
    margin-top: 0.75rem;
}

.calculator-suggestion__title {
    margin: 0 0 4px;
    font-weight: 700;
}

.calculator-suggestion__text {
    margin: 0;
    color: var(--text-muted);
}

.calculator-suggestion__gold {
    display: inline-block;
    margin-top: 6px;
}

.calculator-openers-summary {
    margin: 0.5rem 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.calculator-openers-summary__gold {
    display: inline-block;
    margin-left: 6px;
}

@media (max-width: 1180px) {
    .calculator-primary {
        grid-template-columns: minmax(150px, 1fr) minmax(200px, 1fr);
    }

    .calculator-submit-btn {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1181px) {
    .admin-panel.is-collapsed {
        opacity: 0;
        pointer-events: none;
        transform: translateX(calc(-100% - 28px));
    }
}

@media (max-width: 760px) {
    .calculator-primary,
    .calculator-grid,
    .calculator-pills,
    .calculator-summary-grid,
    .calculator-quiet-stats {
        grid-template-columns: 1fr;
    }

    .calculator-advanced__summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .seals-grid--simple {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .seals-grid--simple {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .seals-grid--simple {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) {
    .seal-card--simple .seal-card__actions,
    .seal-card--simple .account-seal-actions {
        position: static;
        margin: 0;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        background: transparent;
        padding: 0;
        border: 0;
        backdrop-filter: none;
    }

    .seal-card--simple .seal-card__header {
        padding-right: 0;
    }
}

.page--profile {
    max-width: 1120px;
}

.hero-card--profile {
    position: relative;
    overflow: hidden;
}

.hero-card--profile::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -80px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0) 72%);
    pointer-events: none;
}

.hero-actions--profile {
    align-items: stretch;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.profile-hero-card {
    min-width: min(260px, 100%);
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: grid;
    gap: 0.35rem;
}

.profile-hero-card__label {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.profile-hero-card strong {
    font-size: 1.1rem;
}

.profile-hero-card p {
    margin: 0;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.profile-hero__actions {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.profile-sidecard {
    display: grid;
    gap: 1.25rem;
    position: sticky;
    top: 24px;
}

.profile-sidecard__top {
    display: grid;
    gap: 0.7rem;
    justify-items: start;
}

.profile-sidecard__top h2 {
    margin: 0;
    font-size: 1.45rem;
}

.profile-avatar-shell {
    width: 96px;
    height: 96px;
    padding: 4px;
    border-radius: 28px;
    background: linear-gradient(140deg, rgba(56, 189, 248, 0.96), rgba(14, 165, 233, 0.18));
    box-shadow: 0 18px 45px rgba(14, 165, 233, 0.18);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: var(--card-bg);
}

.profile-avatar--xl {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.8);
}

.profile-summary-grid {
    display: grid;
    gap: 10px;
}

.profile-summary-stat {
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.7);
}

.profile-summary-stat span {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.profile-summary-stat strong {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.profile-sidecard__note {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.profile-form-section {
    padding: 1.1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.46));
    display: grid;
    gap: 0.95rem;
}

.profile-form-section__head {
    display: grid;
    gap: 0.35rem;
}

.profile-form-section__head strong {
    font-size: 1rem;
}

.profile-form-section__head span {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.profile-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
}

.profile-toggle input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    accent-color: var(--primary);
}

.profile-toggle span {
    display: grid;
    gap: 0.25rem;
}

.profile-toggle strong {
    font-size: 0.95rem;
}

.profile-toggle small {
    color: var(--text-muted);
    line-height: 1.45;
}

.id-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.id-row input {
    flex: 1;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(2, 6, 23, 0.66);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-weight: 700;
}

.id-row .ghost-btn {
    white-space: nowrap;
}

.profile-status {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    min-height: 1.25rem;
}

.profile-status--success {
    color: var(--primary);
}

.profile-status--error {
    color: #f87171;
}

@media (max-width: 980px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-sidecard {
        position: static;
    }
}

@media (max-width: 820px) {
    .hero-card {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .hero-actions--profile {
        width: 100%;
        justify-content: flex-start;
    }

    .profile-hero-card,
    .profile-hero__actions,
    .profile-hero__actions .meta-pill,
    .profile-hero__actions .ghost-btn {
        width: 100%;
    }

    .profile-hero__actions {
        align-items: stretch;
    }

    .calculator-export-row {
        align-items: stretch;
        flex-direction: column;
    }

    .calculator-export-row .ghost-btn {
        width: 100%;
    }

    .select-wrapper {
        width: 100%;
    }

    .hero-actions--tamer .select-group,
    .auth-inline--tamer,
    .import-template-card .ghost-btn {
        width: 100%;
    }

    .tamer-stage {
        grid-template-columns: 1fr;
    }

    .tamer-stage__center {
        min-height: 320px;
        order: -1;
    }

    .tamer-stage__side {
        grid-template-columns: 1fr;
    }

    .tamer-stage__bottom {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tamer-stage-slot {
        width: 100%;
    }

    .tamer-stage__rail .tamer-stage-slot {
        grid-template-columns: 54px minmax(0, 1fr);
        min-height: 88px;
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .tamer-stage__rail .tamer-stage-slot__icon {
        width: 54px;
        height: 54px;
    }

    .equipment-catalog-filters,
    .layout-config-row,
    .equipment-catalog-card,
    .equipment-catalog-card__controls {
        grid-template-columns: 1fr;
    }

    .digimon-relation-filters,
    .digimon-relation-selection-grid {
        grid-template-columns: 1fr;
    }

    .digimon-relation-selection-card--full {
        grid-column: auto;
    }

    .table-card {
        padding: 1.25rem 1rem;
    }

    .id-row {
        flex-direction: column;
    }

    .calculator-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .calculator-pills {
        width: 100%;
    }

    .digimon-card__top {
        align-items: flex-start;
    }

    .digimon-card__rail-shell {
        align-items: flex-start;
    }

    .digimon-status-table__stat {
        grid-template-columns: 1fr;
    }

    .digimon-modal-grid {
        grid-template-columns: 1fr;
    }

    .digimon-account-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .digimon-calibration-controls {
        grid-template-columns: 1fr;
    }
}
