@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&family=Nunito+Mono:wght@400;500;700&display=swap');

:root {
    --gold: #c19aff;
    --gold-light: #e0caff;
    --gold-dark: #8a62ba;
    --gold-glow: rgba(168,119,231,.22);
    --blue-accent: #85d5e7;
    --blue-glow: rgba(133,213,231,.22);
    --bg-deep: #110e18;
    --bg-panel: #191522;
    --bg-card: #21192d;
    --bg-card-hover: #30223f;
    --bg-input: #14101c;
    --bg-muted: rgba(255,255,255,.04);
    --border: #42324f;
    --border-bright: #815a9e;
    --border-hover: #bc93ee;
    --border-blue: #477e90;
    --border-subtle: #302538;
    --text-main: #ede7f4;
    --text-muted: #b7a9c9;
    --text-light: #a291b5;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 9999px;
    --shadow: 0 4px 16px #0002;
    --shadow-md: 0 12px 32px #0004;
    --shadow-gold: 0 0 0 1px #8a62ba;
    --nav-h: 72px;
    --nav-art-h: 120px;
    --nav-menu-top: var(--nav-h);
    --page-top-gap: 28px;
    --page-frame-width: 1440px;
    --inline-item-line-height: 36px;
    --inline-item-icon-size: 36px;
    --transition: .2s ease;
    --transition-bounce: .3s cubic-bezier(.34,1.56,.64,1);
    --glass-blur: blur(12px);
}

@font-face {
    font-family: "HanWangMingBlack";
    src: url("/images/字體/HANWANGMINGBLACK REGULAR.TTF") format("truetype");
    font-display: block;
}

::selection {
    background: rgba(172, 127, 231, 0.25);
    color: inherit;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito Mono', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}

img {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

.drop-item *,
.item-card,
.item-card *,
.auction-item-card,
.auction-item-card *,
.item-icon-small,
.item-icon-small *,
.item-icon-medium,
.item-icon-medium *,
.tooltip-icon-box,
.tooltip-icon-box *,
.craft-slot,
.craft-slot *,
.craft-gem-option,
.craft-gem-option *,
.craft-result-item,
.craft-result-item * {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

button,
a,
[role="button"],
[data-cursor-mode] {
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-deep);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

@media (max-width: 760px) {
    body {
        background-color: rgb(18, 12, 23);
    }
}

.main-scroll-area {
    flex: 1;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    padding-top: var(--page-top-gap);
    -webkit-overflow-scrolling: touch;
}

.main-scroll-area.site-custom-scrollbar-native-hidden {
    scrollbar-gutter: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-scroll-area.site-custom-scrollbar-native-hidden::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.site-page-scrollbar {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    bottom: 0;
    z-index: 1999;
    display: none;
    width: 12px;
    cursor: var(--site-cursor-page-y-scroll, ns-resize) !important;
    touch-action: none;
}

.site-page-scrollbar.is-visible {
    display: block;
}

.site-page-scrollbar-track {
    position: absolute;
    inset: 0 0 0 auto;
    width: 12px;
    cursor: var(--site-cursor-page-y-scroll, ns-resize) !important;
}

.site-page-scrollbar-thumb {
    position: absolute;
    right: 1px;
    top: 0;
    width: 6px;
    min-height: 32px;
    border-radius: 3px;
    background: var(--border-bright);
    box-shadow: 0 0 8px rgba(172, 127, 231, 0.28);
    cursor: var(--site-cursor-page-y-scroll, ns-resize) !important;
}

.site-page-scrollbar:hover .site-page-scrollbar-thumb,
.site-page-scrollbar.is-dragging .site-page-scrollbar-thumb {
    background: var(--gold);
    box-shadow: 0 0 12px rgba(172, 127, 231, 0.45);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    cursor: var(--site-cursor-y-scroll, auto);
}
::-webkit-scrollbar-track {
    background: transparent;
    cursor: var(--site-cursor-y-scroll, auto);
}
::-webkit-scrollbar-thumb {
    background: var(--border-bright);
    border-radius: 3px;
    cursor: var(--site-cursor-y-scroll, auto);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

::-webkit-scrollbar:horizontal,
::-webkit-scrollbar-track:horizontal,
::-webkit-scrollbar-thumb:horizontal {
    cursor: var(--site-cursor-x-scroll, auto);
}

/* ── 導覽列左側群組（三條槓 + 黑白切換） ── */

/* ── 導覽列中間 LOGO ── */

/* ── 黑白切換按鈕（現移至左側） ── */

/* ── 導覽列右側群組（登入/登出） ── */

@media (hover: none), (pointer: coarse) {
    .main-scroll-area.site-custom-scrollbar-native-hidden {
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        -ms-overflow-style: auto;
    }

    .main-scroll-area.site-custom-scrollbar-native-hidden::-webkit-scrollbar {
        width: 6px;
        height: 6px;
        display: block;
    }

    .site-page-scrollbar {
        display: none !important;
    }
}

.auth-btns {
    z-index: 2002;
    display: flex;
    gap: 8px;
    align-items: center;
}

.login-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(19, 16, 26, 0.68);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 16px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.login-modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.login-modal-frame {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100dvh - 32px);
}

.world-boss-time-tag {
    min-height: 46px;
    padding: 10px 14px;
    background:
        linear-gradient(90deg,
            rgba(33, 23, 43, 0.96) 0%,
            color-mix(in srgb, var(--section-strip-accent, var(--party-accent, var(--tier-accent, var(--gold)))) 36%, rgba(33, 23, 43, 0.96)) 50%,
            rgba(33, 23, 43, 0.96) 100%);
    color: var(--gold-light);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.update-notice {
    display: block;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-light);
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    margin: 0 auto 1rem;
    width: fit-content;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(135deg, rgba(172, 127, 231, 0.15), rgba(184, 134, 11, 0.2));
    color: var(--gold-light);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: linear-gradient(135deg, rgba(172, 127, 231, 0.25), rgba(184, 134, 11, 0.32));
    border-color: var(--border-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
    color: #fff;
}

.btn:active { transform: translateY(0); }

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-muted);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    box-shadow: none;
    transform: translateY(-2px);
}

.rank-tabs-wrapper { margin-bottom: 1.4rem; }

.rank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.8rem;
    justify-content: center;
}

.rank-tab,
.tab-btn,
.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.2;
    text-decoration: none;
    transition: var(--transition);
}

.rank-tab:hover,
.tab-btn:hover,
.filter-btn:hover {
    border-color: var(--border);
    color: var(--text-main);
}

.rank-tab.active,
.tab-btn.active,
.filter-btn.active {
    background: linear-gradient(135deg, rgba(172, 127, 231, 0.18), rgba(184, 134, 11, 0.24));
    color: var(--gold-light);
    border-color: var(--border-bright);
    box-shadow: 0 0 8px var(--gold-glow);
}

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

.rank-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    color: var(--text-muted);
    font-weight: 700;
}

.rank-loading-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--gold-light);
    animation: rank-spin 0.8s linear infinite;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-input::placeholder { color: var(--text-light); }

.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

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

thead tr { border-bottom: 1px solid var(--border); }

th {
    text-align: left;
    padding: 0.7rem 1rem;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0;
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    vertical-align: middle;
}

tbody tr { transition: var(--transition); }
tbody tr:hover { background: rgba(172, 127, 231, 0.04); }
tbody tr:last-child td { border-bottom: none; }

.storage-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
}

.drop-item-hidden {
    opacity: 0.42;
}

.admin-hide-toggle {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(239, 83, 80, 0.3);
    border-radius: var(--radius-md);
    background: rgba(31, 22, 41, 0.92);
    color: #ef5350;
    padding: 3px 8px;
    font-size: 0.72rem;
    line-height: 1.1;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.admin-hide-toggle:hover,
.admin-hide-toggle:focus-within {
    border-color: #ef5350;
    box-shadow: 0 0 8px rgba(239, 83, 80, 0.3);
}

.admin-hide-toggle input {
    width: 12px;
    height: 12px;
    margin: 0;
    accent-color: #ef5350;
    pointer-events: none;
}

.party-item-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    max-width: 100%;
    height: var(--inline-item-line-height);
    min-height: 0;
    margin: 0 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gold-light);
    font: inherit;
    font-weight: 700;
    line-height: var(--inline-item-line-height);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.party-item-name > span:last-child {
    display: inline-flex;
    align-items: center;
    height: var(--inline-item-line-height);
    line-height: var(--inline-item-line-height);
}

.inline-item-stack {
    --inline-item-icon-size: var(--inline-item-line-height);
}

.inline-item-stack > p {
    min-height: var(--inline-item-line-height);
    line-height: var(--inline-item-line-height);
}

.inline-item-stack > p .inline-item-text {
    min-height: var(--inline-item-line-height);
    line-height: var(--inline-item-line-height);
}

.inline-item-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 4px;
    min-height: var(--inline-item-line-height);
    line-height: var(--inline-item-line-height);
    text-align: center;
}

.inline-item-line .inline-item-text {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    min-height: var(--inline-item-line-height);
    line-height: var(--inline-item-line-height);
    vertical-align: middle;
}

.inline-item-line .party-item-name {
    flex: 0 0 auto;
    height: var(--inline-item-line-height);
    line-height: var(--inline-item-line-height);
    vertical-align: middle;
}

.inline-item-line .party-item-name > span:last-child {
    height: var(--inline-item-line-height);
    line-height: var(--inline-item-line-height);
}

.party-text-icon-box {
    position: static;
    flex: 0 0 var(--inline-item-icon-size);
    display: grid;
    width: var(--inline-item-icon-size);
    height: var(--inline-item-icon-size);
    margin: 0;
    place-items: center;
    vertical-align: middle;
}

.party-text-icon {
    width: auto;
    height: auto;
    max-width: var(--inline-item-icon-size);
    max-height: var(--inline-item-icon-size);
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
}

.party-item-name[data-action] {
    cursor: pointer;
    touch-action: manipulation;
    transition: color var(--transition), filter var(--transition);
}

.party-item-name[data-action]:hover,
.party-item-name[data-action]:focus-visible {
    color: #ffe58a;
    filter: brightness(1.08);
    transform: none;
    outline: none;
}

.party-item-name[data-action] > span {
    pointer-events: none;
}

.drop-item[data-action="fetch-item"]:hover,
.drop-item[data-action="fetch-item"]:focus-visible {
    transform: none;
}

.party-reward-row:has(.party-item-name:hover),
.party-reward-row:has(.party-item-name:focus-visible),
.party-stage-flag:has(.party-item-name:hover),
.party-stage-flag:has(.party-item-name:focus-visible),
.wandering-section:has(.party-item-name:hover),
.wandering-section:has(.party-item-name:focus-visible),
.lie-hero-panel:has(.party-item-name:hover),
.lie-hero-panel:has(.party-item-name:focus-visible),
.hp-wash-section:has(.party-item-name:hover),
.hp-wash-section:has(.party-item-name:focus-visible) {
    transform: none;
}

.drop-item[data-action] .drop-name,
.wandering-item[data-action] .wandering-item-name {
    transition: color var(--transition), filter var(--transition);
}

.drop-item[data-action]:hover .drop-name,
.drop-item[data-action]:focus-visible .drop-name,
.wandering-item[data-action]:hover .wandering-item-name,
.wandering-item[data-action]:focus-visible .wandering-item-name {
    color: #ffe58a;
    filter: brightness(1.08);
}

.drop-item img {
    width: 36px;
    height: 36px;
    object-fit: scale-down;
    object-position: center;
    flex-shrink: 0;
    pointer-events: none;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    margin-bottom: 4px;
}

.modal-content {
    background:
        radial-gradient(circle at 50% 0, rgba(79, 195, 247, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(54, 38, 72, 0.96), rgba(22, 15, 29, 0.99) 46%, rgba(16, 12, 22, 1)),
        var(--bg-card);
    border: 1px solid rgba(172, 127, 231, 0.68);
    border-radius: 0;
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
    padding: 1.55rem 2rem 1.7rem;
    width: min(400px, 92vw);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 22px 58px rgba(0, 0, 0, 0.76),
        0 0 38px rgba(79, 195, 247, 0.16),
        0 0 28px rgba(172, 127, 231, 0.15);
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
    pointer-events: none;
}

.modal-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 28%),
        linear-gradient(90deg, transparent, rgba(172, 127, 231, 0.14), transparent),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 18px);
    opacity: 0.5;
    pointer-events: none;
}

.modal-content > * {
    position: relative;
    z-index: 1;
}

#login-modal .modal-content {
    color-scheme: light;
    display: grid;
    grid-template-columns: minmax(240px, .82fr) minmax(360px, 1.18fr);
    width: 100%;
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: hidden auto;
    clip-path: none;
    border: 1px solid #d6cedc;
    border-radius: 8px;
    background: #fff;
    color: #241d2b;
    box-shadow: 0 24px 72px rgba(12, 7, 18, .42);
}
#login-modal .modal-content::before,
#login-modal .modal-content::after { content: none; }
.login-art {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: #342654;
}
.login-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 25% center;
}
.login-form-panel {
    min-width: 0;
    padding: 30px 34px 32px;
    background: #fff;
}
.login-dialog-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.login-dialog-logo { display: flex; justify-content: center; width: 100%; margin: 0; }
.login-dialog-logo img { display: block; width: 170px; max-width: 100%; height: auto; }
.login-close-btn {
    position: absolute;
    z-index: 3;
    top: -13px;
    right: -13px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #cfc4d7;
    border-radius: 50%;
    background: #fff;
    color: #50405e;
    box-shadow: 0 2px 8px rgba(22, 12, 32, .2);
    cursor: pointer;
}
.login-close-btn:hover { border-color: #80619b; background: #f2eff4; color: #30223f; }
.login-close-icon { width: 15px; height: 15px; }
#login-modal .login-fields { display: grid; gap: 15px; }
#login-modal .form-group {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
}
#login-modal .login-fields label {
    margin: 0;
    color: #42394b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
#login-modal .login-input-shell {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid #d8d1de;
    border-radius: 4px;
    background: #f8f6fa;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
#login-modal .login-input-shell:focus-within {
    border-color: #674b85;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(103, 75, 133, .12);
}
#login-modal .form-group input[type="text"],
#login-modal .form-group input[type="password"] {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: #241d2b;
    caret-color: #714798;
    font-size: 14px;
    line-height: 1.4;
    appearance: none;
}
#login-modal .form-group input:focus,
#login-modal .form-group input:focus-visible { border: 0; outline: 0; box-shadow: none; background: transparent; }
#login-modal .login-input-shell input::selection { background: #b8a1cf; color: #241d2b; }
#login-modal .form-group input::placeholder { color: #8b8491; opacity: 1; }
#login-modal .login-field-hint { color: #776b80; font-size: 11px; line-height: 1.35; }
#login-modal .login-secret-input { -webkit-text-security: disc; text-security: disc; }
#login-modal .login-secret-input.is-secret-visible { -webkit-text-security: none; text-security: none; }
#login-modal .login-secret-toggle {
    flex: 0 0 auto;
    min-width: 44px;
    height: 28px;
    margin-left: 8px;
    padding: 0 0 0 10px;
    border: 0;
    border-left: 1px solid #ded8e2;
    border-radius: 0;
    background: transparent;
    color: #61447b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
#login-modal .login-secret-toggle:hover,
#login-modal .login-secret-toggle.is-visible { color: #3d2454; }
#login-modal .login-secret-toggle:focus-visible,
#login-modal .login-close-btn:focus-visible,
#login-modal #submit-login-btn:focus-visible { outline: 2px solid #8a63aa; outline-offset: 2px; }
#login-modal .login-input-shell input:-webkit-autofill,
#login-modal .login-input-shell input:-webkit-autofill:hover,
#login-modal .login-input-shell input:-webkit-autofill:focus {
    -webkit-text-fill-color: #241d2b !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    caret-color: #714798;
}
#login-modal .remember-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 18px;
    width: auto;
    margin: 20px 0 0;
    padding: 0;
    text-align: left;
}
#login-modal .remember-option { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
#login-modal .remember-row label { margin: 0; color: #574b62; font-size: 12px; font-weight: 500; line-height: 1.4; cursor: pointer; }
#login-modal .remember-checkbox { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: #714798; cursor: pointer; }
#login-modal .modal-actions { display: block; margin: 0; padding: 24px 0 0; }
#login-modal #submit-login-btn {
    width: 100%;
    min-height: 48px;
    border: 1px solid #3f2d53;
    border-radius: 4px;
    background: #463259;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}
#login-modal #submit-login-btn:hover { border-color: #322042; background: #352247; }
#login-modal #submit-login-btn:disabled { opacity: .65; cursor: wait; }

@media (max-width: 660px) {
    .login-modal-frame { width: min(440px, 100%); }
    #login-modal .modal-content { display: block; }
    .login-art { height: clamp(54px, 10dvh, 84px); min-height: 0; }
    .login-art img { object-position: center 36%; }
    .login-form-panel { padding: 18px 22px; }
    .login-dialog-header { margin-bottom: 10px; }
    .login-dialog-logo img { width: 126px; }
}

.drop-qty-equipped {
    color: #66bb6a;
    background: rgba(102, 187, 106, 0.08);
    border-color: rgba(102, 187, 106, 0.35);
}

.drop-qty-inbag {
    color: #e8eaf6;
    background: rgba(232, 234, 246, 0.06);
    border-color: rgba(232, 234, 246, 0.3);
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    color: var(--text-light);
    font-size: 0.9rem;
    gap: 12px;
    opacity: 0.7;
}

.empty-state svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.mob-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid;
    white-space: nowrap;
}

.badge-normal {
    color: var(--blue-accent);
    border-color: var(--border-blue);
    background: rgba(79, 195, 247, 0.08);
}

.badge-boss {
    color: var(--gold-light);
    border-color: var(--border-bright);
    background: rgba(172, 127, 231, 0.1);
}

.mob-id-text {
    font-size: 0.78rem;
    color: var(--text-light);
}

.elem-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.elem-badge {
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.elem-badge:hover { transform: scale(1.05); }

.elem-2 { color: #ef5350; border-color: rgba(239, 83, 80, 0.4);   background: rgba(239, 83, 80, 0.07); }
.elem-3 { color: #42a5f5; border-color: rgba(66, 165, 245, 0.4);  background: rgba(66, 165, 245, 0.07); }
.elem-1 { color: #66bb6a; border-color: rgba(102, 187, 106, 0.4); background: rgba(102, 187, 106, 0.07); }
.elem-undead { color: #ce93d8; border-color: rgba(206, 147, 216, 0.4); background: rgba(206, 147, 216, 0.07); }

.hero-card {
    text-align: center;
    padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2.5rem);
    background: linear-gradient(160deg, rgba(68, 48, 90, 0.55) 0%, rgba(68, 48, 90, 0.45) 100%);
    border-color: var(--border-bright);
    box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(ellipse at center, rgba(172, 127, 231, 0.05) 0%, transparent 65%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffe082 0%, rgb(172, 127, 231) 50%, #ffa000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 14px rgba(240, 192, 64, 0.45));
}

.hero-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 2.4rem;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: var(--transition);
}

.news-item:hover { background: rgba(172, 127, 231, 0.04); border-color: var(--border); }
.news-date { font-size: 0.76rem; color: var(--text-light); white-space: nowrap; padding-top: 2px; min-width: 70px; }
.news-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

.page-controller {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    backdrop-filter: blur(8px);
    min-height: 40px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: nowrap;
}

.btn-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-muted);
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-circle:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(172, 127, 231, 0.07);
}

.page-input {
    width: 56px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--gold);
    outline: none;
    transition: var(--transition);
    appearance: none;
    -moz-appearance: textfield;
    background: var(--bg-input);
}

.page-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-glow);
}

.page-input::-webkit-inner-spin-button,
.page-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.total-pages-display {
    display: inline-block;
    min-width: 35px;
    text-align: center;
    color: var(--gold);
}

.filter-group {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 127px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.filter-row:last-child { margin-bottom: 0; }

.search-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.search-controls {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    align-items: center;
}

#monster-search-field {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

.mob-card.item-card:hover {
    box-shadow: none;
    filter: brightness(1.04);
}

.mob-card.gold {
    background: linear-gradient(135deg, rgba(172, 127, 231, 0.16) 0%, rgba(184, 134, 11, 0.22) 100%);
    border-color: var(--border-bright);
    box-shadow: var(--shadow-gold);
}

.mob-card.gold .mob-name { color: var(--gold-light); }

.mob-img {
    height: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 8px;
}

.mob-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
    transition: transform var(--transition-bounce);
}

.item-card .mob-img img { image-rendering: -webkit-optimize-contrast; }

.mob-detail-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0.8rem;
}

.mob-detail-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-light);
}

.mob-detail-id {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
}

.mob-detail-attrs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.mob-detail-title-loading {
    min-height: 34px;
}

.mob-detail-loading-line,
.mob-detail-loading-badge,
.mob-detail-loading-img,
.mob-detail-loading-stat {
    position: relative;
    overflow: hidden;
}

.mob-detail-loading-line::after,
.mob-detail-loading-badge::after,
.mob-detail-loading-img::after,
.mob-detail-loading-stat::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: loading-sheen 1.15s ease-in-out infinite;
    transform: translateX(-100%);
}

.mob-detail-loading-name {
    width: 110px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
}

.mob-detail-loading-badge {
    width: 74px;
    height: 26px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(172, 127, 231, 0.35);
    background: rgba(172, 127, 231, 0.08);
}

.mob-detail-loading-id {
    width: 70px;
    height: 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
}

.mob-detail-loading-img {
    border-color: var(--border);
}

.mob-detail-loading-back {
    pointer-events: none;
    opacity: 0.75;
}

.mob-detail-loading-stat {
    min-height: 70px;
    background: rgba(34, 24, 45, 0.58);
}

.mob-detail-loading-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    color: var(--text-muted);
    font-weight: 700;
}

@keyframes loading-sheen {
    to {
        transform: translateX(100%);
    }
}

.mob-detail-side {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

@keyframes nav-login-glow {
    0%, 100% {
        text-shadow: 0 0 6px rgba(240, 192, 64, 0.3);
        color: var(--gold);
    }
    50% {
        text-shadow: 0 0 18px rgba(240, 192, 64, 0.9), 0 0 32px rgba(240, 192, 64, 0.4);
        color: var(--gold-light);
    }
}

@keyframes nav-logout-glow {
    0%, 100% {
        text-shadow: 0 0 6px rgba(231, 76, 60, 0.3);
        color: #e74c3c;
    }
    50% {
        text-shadow: 0 0 18px rgba(231, 76, 60, 0.9), 0 0 32px rgba(231, 76, 60, 0.4);
        color: #ff6b6b;
    }
}

@keyframes back-glow {
    0%, 100% {
        border-color: rgba(240, 192, 64, 0.35);
        box-shadow: 0 0 6px rgba(240, 192, 64, 0.15);
        color: var(--gold);
    }
    50% {
        border-color: rgba(240, 192, 64, 0.85);
        box-shadow: 0 0 16px rgba(240, 192, 64, 0.45);
        color: var(--gold-light);
    }
}

.mob-detail-back {

    width: 160px;
    flex-shrink: 0;
    background: rgba(34, 24, 45, 0.7);
    border: 1px solid rgba(172, 127, 231, 0.35);
    border-radius: var(--radius-lg);
    padding: 12px 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold);
    cursor: pointer;
    transition: background var(--transition), filter var(--transition);
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    animation: back-glow 2s ease-in-out infinite;
}

.mob-detail-img {

    width: 160px;
    height: 160px;
    flex-shrink: 0;
    background: rgba(34, 24, 45, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mob-detail-img img {
    max-width: 85%;
    max-height: 85%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
}

.stat-card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-bottom: 3px;
    opacity: 0.8;
    white-space: nowrap;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.location-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--bg-muted);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: var(--transition-bounce);
}

.location-tag:hover {
    background: rgba(172, 127, 231, 0.08);
    color: var(--gold-light);
    border-color: var(--border-bright);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.location-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.hidden { display: none; }

.page-controller { margin: 0 auto; }

.exp-calc-shell,
.hp-wash-shell,
.map-change-shell,
.monster-carnival-shell,
.wandering-shell {
    display: grid;
    gap: clamp(16px, 2.6vw, 22px);
    padding: clamp(16px, 3vw, 28px);
}

.exp-calc-shell,
.hp-wash-shell,
.map-change-shell,
.wandering-shell {
    border-width: 2px;
}

.daily-title,
.hp-wash-title,
.monster-carnival-title,
.monster-park-title,
.reward-title,
.theme-title {
    justify-content: center;
    margin-bottom: 0;
    text-align: center;
}

.daily-title h2,
.hp-wash-title h2,
.monster-carnival-title h2,
.reward-title h2 {
    width: 100%;
    text-align: center;
}

.exp-calc-section-title,
.exp-result-card h3,
.hp-wash-section-title,
.map-change-section-title,
.wandering-section-title {
    margin: 0;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(90deg,
            rgba(33, 23, 43, 0.96) 0%,
            rgba(55, 47, 35, 0.92) 50%,
            rgba(33, 23, 43, 0.96) 100%);
    color: var(--gold-light);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.hp-wash-section:hover,
.lie-hero-panel:hover,
.lie-video-card:hover,
.lie-rule-card:hover,
.monster-carnival-section:hover,
.wandering-section:hover {
    z-index: 1;
    transform: translateY(-2px);
    border-color: rgba(255, 218, 113, 0.34);
    box-shadow: 0 0 16px rgba(255, 218, 113, 0.14), 0 12px 26px rgba(0, 0, 0, 0.28);
    filter: brightness(1.04);
}

/* Global item tooltip shell; tooltip.css only keeps the inner item-detail layout. */
#tooltip-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 5px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

#tooltip-copy-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-main);
    background: var(--bg-card-hover);
}

#tooltip-copy-btn svg {
    width: 100%;
    height: 100%;
}

#item-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 10, 19, 0.78);
    display: none;
    z-index: 20000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#item-tooltip,
.item-tooltip-shell {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 6px;
    width: min(320px, 92vw);
    padding: clamp(12px, 3vw, 18px);
    box-shadow: 0 18px 44px #0006;
    outline: none;
}

.item-tooltip-shell {
    position: relative;
    box-sizing: border-box;
}

#item-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20001;
}

#item-tooltip:focus,
#item-tooltip:focus-visible,
#item-tooltip.item-tooltip-shell:focus,
#item-tooltip.item-tooltip-shell:focus-visible,
.item-tooltip-shell:focus,
.item-tooltip-shell:focus-visible,
#tooltip-copy-btn:focus,
#tooltip-copy-btn:focus-visible {
    outline: none;
}

.custom-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 999999; opacity: 0; transition: opacity 0.25s;
}
.custom-modal {
    background: linear-gradient(160deg, rgba(34, 24, 45,0.97) 0%, rgba(24, 17, 32,0.99) 100%);
    border: 1px solid rgba(172, 127, 231,0.45);
    padding: 28px 28px 22px;
    border-radius: 6px;
    width: min(360px, 92vw);
    transform: scale(0.85) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    text-align: center;
    box-shadow: 0 0 30px rgba(172, 127, 231,0.18), 0 20px 50px rgba(0,0,0,0.7);
    position: relative; overflow: hidden;
}
.custom-modal::before {
    content: "";
    position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(172, 127, 231,0.7), transparent);
}
.custom-overlay.show { opacity: 1; }
.custom-overlay.show .custom-modal { transform: scale(1) translateY(0); }
.custom-title {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; letter-spacing: 0;
    background: linear-gradient(135deg, #ffe082, rgb(172, 127, 231), #ffa000);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    filter: drop-shadow(0 0 6px rgba(240,192,64,0.4));
}
.custom-message { color: #9fa8c0; margin-bottom: 22px; line-height: 1.7; white-space: pre-wrap; font-size: 0.95rem; }
.custom-btns { display: flex; gap: 10px; justify-content: center; }
.custom-btn {
    padding: 9px 26px; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 0.9rem; transition: all 0.2s; letter-spacing: 0;
}
.btn-confirm {
    background: linear-gradient(135deg, rgba(172, 127, 231,0.18), rgba(184,134,11,0.22));
    color: #ffe082; border: 1px solid rgba(172, 127, 231,0.5);
}
.btn-confirm:hover { border-color: rgb(172, 127, 231); color: #f0c040; box-shadow: 0 0 14px rgba(172, 127, 231,0.3); transform: translateY(-2px); }
.btn-cancel {
    background: rgba(255,255,255,0.05); color: #6b7a99;
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-cancel:hover { background: rgba(255,255,255,0.08); color: #9fa8c0; }

hr {
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin: 1.5rem 0 !important;
    height: 0 !important;
}
